| IOLink 1.11.0

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
10 namespace iolink
11{
12
16 enum class ImageInterpretation
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
42 CIE_XYZ_CHROMATICITY = 0x12,
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
126 class IOLINK_API ImageInfoProperty final
127{
128 public:
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
180 ImageInfoProperty(const ImageInfoProperty& other);
181 ImageInfoProperty& operator=(const ImageInfoProperty& other);
182
183 ImageInfoProperty(ImageInfoProperty&& other) noexcept;
184 ImageInfoProperty& operator=(ImageInfoProperty&& other) noexcept;
185
186 ~ImageInfoProperty();
187
195 ImageType axesInterpretation() const;
196
202 void setAxesInterpretation(ImageType type);
203
207 ImageInterpretation interpretation() const;
208
212 bool hasAlpha() const;
213
221 size_t bitDepth() const;
222
226 Vector2d valueRange() const;
227
231 void setInterpretation(ImageInterpretation interpretation);
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
258 private:
259 class Private;
260 Private* m_private;
261};
262
263} // end namespace iolink
iolink::DataType
Stores information about a data type.
Definition DataType.h:162
iolink::ImageInfoProperty
This property describes the way the axes must be interpreted (IMAGE, VOLUME, SEQUENCE....
Definition ImageInfoProperty.h:127
iolink::ImageInfoProperty::ImageInfoProperty
ImageInfoProperty(ImageType axesInterpretation, ImageInterpretation interpretation, bool hasAlpha, DataType dataType)
Short constructor using the given data type standard properties to initialize with default values.
iolink::ImageInfoProperty::setAlpha
void setAlpha(bool hasAlpha)
Set if an alpha channel is present.
iolink::ImageInfoProperty::ImageInfoProperty
ImageInfoProperty(ImageType axesInterpretation, ImageInterpretation interpretation, bool hasAlpha, size_t bitDepth, const Vector2d &valueRange)
Constructor.
iolink::ImageInfoProperty::operator==
bool operator==(const ImageInfoProperty &other) const
Equality operator.
iolink::ImageInfoProperty::hasAlpha
bool hasAlpha() const
Return if an alpha channel is present.
iolink::ImageInfoProperty::setValueRange
void setValueRange(const Vector2d &range)
Set the value range of components.
iolink::ImageInfoProperty::ImageInfoProperty
ImageInfoProperty(ImageType axesInterpretation, DataType dataType)
Shorter constructor using the given Image Type and Data type standard properties hasAlpha property is...
iolink::ImageInfoProperty::axesInterpretation
ImageType axesInterpretation() const
Return an ImageType describing the interpretation of the axes of the image.
iolink::ImageInfoProperty::setInterpretation
void setInterpretation(ImageInterpretation interpretation)
Setter for Image Interpretation.
iolink::ImageInfoProperty::valueRange
Vector2d valueRange() const
The value range of the pixel component.
iolink::ImageInfoProperty::setBitDepth
void setBitDepth(size_t bitdepth)
Set the bit depth of pixel components.
iolink::ImageInfoProperty::toString
std::string toString() const
Return string representation.
iolink::ImageInfoProperty::channelCount
static size_t channelCount(ImageInterpretation interpretation)
Method which gives you the number of channels for one pixel in a specific ImageInterpretation.
iolink::ImageInfoProperty::ImageInfoProperty
ImageInfoProperty(DataType dataType)
Shorter constructor using the given data type standard properties to initialize.
iolink::ImageInfoProperty::bitDepth
size_t bitDepth() const
The bit depth of pixel components.
iolink::ImageInfoProperty::setAxesInterpretation
void setAxesInterpretation(ImageType type)
Set the image's axes interpretation.
iolink::ImageInfoProperty::interpretation
ImageInterpretation interpretation() const
Getter for Image interpretation.
iolink::ImageType
A flag system that describes the dimensions of an image.
Definition ImageType.h:43
iolink::Vector
An arithmetic vector.
Definition Vector.h:37
iolink
All IOLink symbols are enclosed in this namespace.
Definition ArrayX.h:8
iolink::ImageInterpretation
ImageInterpretation
Interpretation of an Image.
Definition ImageInfoProperty.h:17
iolink::ImageInterpretation::CIE_UVW
@ CIE_UVW
CIE U*V*W* color space (CIE 1964)
iolink::ImageInterpretation::SRGB
@ SRGB
Standard RGB color.
iolink::ImageInterpretation::CIE_LUV
@ CIE_LUV
CIE L*u*v* color space (CIE 1976)
iolink::ImageInterpretation::CIE_LAB
@ CIE_LAB
CIE L*a*b* color space (CIE 1976)
iolink::ImageInterpretation::HSV
@ HSV
HSV color (Hue, Saturation, Value)
iolink::ImageInterpretation::LABEL
@ LABEL
Indices corresponding to a label.
iolink::ImageInterpretation::CIE_XYZ_CHROMATICITY
@ CIE_XYZ_CHROMATICITY
CIE XYZ color with chromaticity coordinates.
iolink::ImageInterpretation::RGB_CHROMATICITY
@ RGB_CHROMATICITY
RGB color with chromaticity coordinates.
iolink::ImageInterpretation::HSL
@ HSL
HSL color (Hue, Saturation, Lightness)
iolink::ImageInterpretation::RGB
@ RGB
RGB color (CIE 1931)
iolink::ImageInterpretation::MULTISPECTRAL
@ MULTISPECTRAL
Multiple layers of spectral data.
iolink::ImageInterpretation::BINARY
@ BINARY
A boolean.
iolink::ImageInterpretation::CIE_XYZ
@ CIE_XYZ
CIE XYZ color space (CIE 1931)
iolink::ImageInterpretation::YIQ
@ YIQ
YIQ color (NTSC)
iolink::ImageInterpretation::YUV
@ YUV
YUV color.
iolink::ImageInterpretation::GRAYSCALE
@ GRAYSCALE
A shade of grey, from black to white.
iolink::ImageInterpretation::YCC
@ YCC
YCbCr color (PAL)
iolink::ImageInterpretation::YDD
@ YDD
YDbDr color (SECAM & PAL-N)
iolink::ImageInterpretation::CMYK
@ CMYK
CMYK color (Cyan, Magenta, Yellow, blacK)
iolink::PrimitiveTypeId::UNKNOWN
@ UNKNOWN
An opaque type, that the no one knows about.