IOLink IOL_v1.8.0_release
Loading...
Searching...
No Matches
ImageInfoProperty.h
1#pragma once
2
3#include <iolink/DataType.h>
4#include <iolink/IOLinkAPI.h>
5#include <iolink/ImageType.h>
6#include <iolink/Vector.h>
7
8#include <cstdint>
9
10namespace iolink
11{
12
17{
19 UNKNOWN = 0x00,
20
21 //==============//
22 // Mono channel //
23 //==============//
24
26 GRAYSCALE = 0x01,
27
29 LABEL = 0x02,
30
32 BINARY = 0x03,
33
34 //==================//
35 // CIE color spaces //
36 //==================//
37
39 CIE_XYZ = 0x11,
40
43
45 CIE_UVW = 0x14,
46
48 CIE_LUV = 0x15,
49
51 CIE_LAB = 0x16,
52
53 //=====================//
54 // RGB color encodings //
55 //=====================//
56
58 RGB = 0x21,
59
61 RGB_CHROMATICITY = 0x22,
62
64 SRGB = 0x23,
65
66 //=============================//
67 // Luma/Chroma color encodings //
68 //=============================//
69
71 YUV = 0x31,
72
78 YCC = 0x32,
79
81 YIQ = 0x33,
82
84 YDD = 0x34,
85
86 //===========================//
87 // HSX color encoding family //
88 //===========================//
89
95 HSL = 0x41,
96
101 HSV = 0x42,
102
103 //============================//
104 // CMYK color encoding family //
105 //============================//
106
108 CMYK = 0x51,
109
110 //==========================//
111 // Specific interpretations //
112 //==========================//
113
115 MULTISPECTRAL = 0xFF,
116};
117
126class IOLINK_API ImageInfoProperty final
127{
128public:
134 static size_t channelCount(ImageInterpretation interpretation);
135
144 ImageInfoProperty(ImageType axesInterpretation,
145 ImageInterpretation interpretation,
146 bool hasAlpha,
147 size_t bitDepth,
148 const Vector2d& valueRange);
149
157 explicit ImageInfoProperty(ImageType axesInterpretation,
158 ImageInterpretation interpretation,
159 bool hasAlpha,
160 DataType dataType);
161
169 explicit ImageInfoProperty(DataType dataType);
170
178 ImageInfoProperty(ImageType axesInterpretation, DataType dataType);
179
181 ImageInfoProperty& operator=(const ImageInfoProperty& other);
182
183 ImageInfoProperty(ImageInfoProperty&& other) noexcept;
184 ImageInfoProperty& operator=(ImageInfoProperty&& other) noexcept;
185
187
196
203
208
212 bool hasAlpha() const;
213
221 size_t bitDepth() const;
222
227
232
236 void setAlpha(bool hasAlpha);
237
241 void setBitDepth(size_t bitdepth);
242
246 void setValueRange(const Vector2d& range);
247
251 bool operator==(const ImageInfoProperty& other) const;
252
256 std::string toString() const;
257
258private:
259 class Private;
260 Private* m_private;
261};
262
263} // end namespace iolink