Thermal Camera SDK 10.0.1
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
FrameIterator.h
Go to the documentation of this file.
1// Copyright (c) 2025 Optris GmbH Co. KG
2
10
11#pragma once
12
13#include <vector>
14
15#include "otcsdk/Api.h"
16
17
18namespace optris
19{
20
21// Forward declaration
22class Frame;
23
24
27{
28public:
30 using Container = std::vector<unsigned short>;
31
32
38 OTC_SDK_API explicit ConstFrameIterator(const Frame& frame) noexcept;
39
40
46 OTC_SDK_API bool hasNext() const noexcept;
47
50
51
57 OTC_SDK_API unsigned short getValue() const noexcept;
58
59
65 OTC_SDK_API int getIndex() const noexcept;
66
72 OTC_SDK_API int getX() const noexcept;
73
79 OTC_SDK_API int getY() const noexcept;
80
81
82private:
83 Container::const_iterator _iterator;
84 Container::const_iterator _end;
85
86 int _width;
87
88 int _index;
89 int _x;
90 int _y;
91};
92
93
94// Inline implementations
95inline bool ConstFrameIterator::hasNext() const noexcept
96{
97 return _iterator != _end;
98}
99
100inline unsigned short ConstFrameIterator::getValue() const noexcept
101{
102 return *_iterator;
103}
104
105inline int ConstFrameIterator::getIndex() const noexcept
106{
107 return _index;
108}
109
110inline int ConstFrameIterator::getX() const noexcept
111{
112 return _x;
113}
114
115inline int ConstFrameIterator::getY() const noexcept
116{
117 return _y;
118}
119
120} // namespace optris
Contains defines controlling the Windows DLL export and import of symbols.
#define OTC_SDK_API
Only needed when working with Windows DLLs.
Definition Api.h:65
OTC_SDK_API void next()
Moves to the next frame value.
OTC_SDK_API unsigned short getValue() const noexcept
Returns the current frame value.
Definition FrameIterator.h:100
OTC_SDK_API ConstFrameIterator(const Frame &frame) noexcept
Constructor.
std::vector< unsigned short > Container
Container type storing the frame values.
Definition FrameIterator.h:30
OTC_SDK_API int getY() const noexcept
Returns the y-coordinate of the current frame value.
Definition FrameIterator.h:115
OTC_SDK_API int getIndex() const noexcept
Returns the index of the current frame value.
Definition FrameIterator.h:105
OTC_SDK_API int getX() const noexcept
Returns the x-coordinate of the current frame value.
Definition FrameIterator.h:110
OTC_SDK_API bool hasNext() const noexcept
Returns whether there is a next frame value.
Definition FrameIterator.h:95
Represents a data frame received from a device.
Definition Frame.h:33
Main SDK namespace.
Definition DeviceInfo.h:23