IOLink  IOL_v1.1.0_release
iolink::ImageInfoProperty Class Referencefinal

This property describes the way the axes must be interpreted (IMAGE, VOLUME, SEQUENCE...) and also the composition of the image by providing : More...

#include <iolink/property/ImageInfoProperty.h>

Public Member Functions

 ImageInfoProperty (ImageType axesInterpretation, ImageInterpretation interpretation, bool hasAlpha, size_t bitDepth, const Vector2d &valueRange)
 Constructor. More...
 
 ImageInfoProperty (ImageType axesInterpretation, ImageInterpretation interpretation, bool hasAlpha, DataType dataType)
 Short constructor using the given data type standard properties to initialize with default values. More...
 
 ImageInfoProperty (DataType dataType)
 Shorter constructor using the given data type standard properties to initialize. More...
 
 ImageInfoProperty (ImageType axesInterpretation, DataType dataType)
 Shorter constructor using the given Image Type and Data type standard properties hasAlpha property is set to False. More...
 
 ImageInfoProperty (const ImageInfoProperty &other)
 
ImageInfoPropertyoperator= (const ImageInfoProperty &other)
 
 ImageInfoProperty (ImageInfoProperty &&other) noexcept
 
ImageInfoPropertyoperator= (ImageInfoProperty &&other) noexcept
 
ImageType axesInterpretation () const
 Return an ImageType describing the interpretation of the axes of the image. More...
 
void setAxesInterpretation (ImageType type)
 Set the image's axes interpretation. More...
 
ImageInterpretation interpretation () const
 Getter for Image interpretation.
 
bool hasAlpha () const
 Return if an alpha channel is present.
 
size_t bitDepth () const
 The bit depth of pixel components. More...
 
Vector2d valueRange () const
 The value range of the pixel component.
 
void setInterpretation (ImageInterpretation interpretation)
 Setter for Image Interpretation.
 
void setAlpha (bool hasAlpha)
 Set if an alpha channel is present.
 
void setBitDepth (size_t bitdepth)
 Set the bit depth of pixel components.
 
void setValueRange (const Vector2d &range)
 Set the value range of components.
 
bool operator== (const ImageInfoProperty &other) const
 Equality operator.
 
std::string toString () const
 Return string representation.
 

Static Public Member Functions

static size_t channelCount (ImageInterpretation interpretation)
 Method which gives you the number of channels for one pixel in a specific ImageInterpretation. More...
 

Detailed Description

This property describes the way the axes must be interpreted (IMAGE, VOLUME, SEQUENCE...) and also the composition of the image by providing :

  • its interpretation (GRAYSCALE, RGB, ...)
  • the presence of a alpha channel
  • the bit depth where data is stored
  • the range of value of the data (It is actually the min and max values that are stored in the image)

Constructor & Destructor Documentation

◆ ImageInfoProperty() [1/4]

iolink::ImageInfoProperty::ImageInfoProperty ( ImageType  axesInterpretation,
ImageInterpretation  interpretation,
bool  hasAlpha,
size_t  bitDepth,
const Vector2d valueRange 
)

Constructor.

Parameters
axesInterpretationAxes interpretation for the image
interpretationThe image interpretation
hasAlphaIndicate if an Alpha channel is present
bitDepthBit count effectively used to store each component of the pixel
valueRangeRange of value of the component

◆ ImageInfoProperty() [2/4]

iolink::ImageInfoProperty::ImageInfoProperty ( ImageType  axesInterpretation,
ImageInterpretation  interpretation,
bool  hasAlpha,
DataType  dataType 
)
explicit

Short constructor using the given data type standard properties to initialize with default values.

Parameters
axesInterpretationAxes interpretation for the image
interpretationThe image interpretation
hasAlphaIndicate if an Alpha channel is present
dataTypeDataType to use as reference to initialize member data.

◆ ImageInfoProperty() [3/4]

iolink::ImageInfoProperty::ImageInfoProperty ( DataType  dataType)
explicit

Shorter constructor using the given data type standard properties to initialize.

BitDepth and value range is initialized thanks to dataType. hasAlpha property is set to False. Other properties are set to UNKNOWN.

Parameters
dataTypeDataType to use as reference to initialize member data.

◆ ImageInfoProperty() [4/4]

iolink::ImageInfoProperty::ImageInfoProperty ( ImageType  axesInterpretation,
DataType  dataType 
)

Shorter constructor using the given Image Type and Data type standard properties hasAlpha property is set to False.

Image interpretation is set to UNKNOWN.

Parameters
axesInterpretationAxes interpretation for the image
dataTypeDataType to use as reference to initialize member data.

Member Function Documentation

◆ axesInterpretation()

ImageType iolink::ImageInfoProperty::axesInterpretation ( ) const

Return an ImageType describing the interpretation of the axes of the image.

For example a classical image ImageType will have the ImageDimension::COLUMN and ImageDimension::ROW set. A sequence of 2D images will have ImageDimension::SEQUENCE in addition.

◆ bitDepth()

size_t iolink::ImageInfoProperty::bitDepth ( ) const

The bit depth of pixel components.

For example, data can be stored on 16 bits, but only 12 of those are used, so the image view will have a data type of UINT16, but its real bit depth will be 12.

◆ channelCount()

static size_t iolink::ImageInfoProperty::channelCount ( ImageInterpretation  interpretation)
static

Method which gives you the number of channels for one pixel in a specific ImageInterpretation.

Parameters
interpretationImageInterpretation for which we want to know the channel count
Returns
the channel count corresponding to the given ImageInterpretation

◆ setAxesInterpretation()

void iolink::ImageInfoProperty::setAxesInterpretation ( ImageType  type)

Set the image's axes interpretation.

Parameters
typeType of Image to set

The documentation for this class was generated from the following file: