IOLink IOL_v1.8.0_release
|
A flag system that describes the dimensions of an image. More...
#include <iolink/ImageType.h>
Public Member Functions | |
ImageType () | |
Create an ImageType with no known dimensions. | |
ImageType (ImageDimension dimension) | |
Create an ImageType with only one given dimension. | |
ImageType (const ImageDimension *dimensionsList, size_t count) | |
Create an ImageType with a list of dimensions (C array style) | |
ImageType (std::initializer_list< ImageDimension > dimensionsList) | |
Create an ImageType with a list of dimensions. | |
ImageType (uint64_t val) | |
Create an ImageType from an 64-bits integer. | |
bool | has (ImageDimension dimension) const |
Checks if the ImageType has the given dimension. | |
void | add (ImageDimension dimension) |
Add the given dimension to the ImageType. | |
size_t | dimensionCount () const |
Give the number of dimensions in the ImageType. | |
void | add (ImageType other) |
Add all the dimensions from given ImageType to current ImageType. | |
void | remove (ImageDimension dimension) |
Remove the given dimension to the ImageType. | |
void | remove (size_t index) |
Remove the nth dimension to the ImageType. | |
void | remove (ImageType other) |
Remove all the given dimensions to the ImageType. | |
ImageDimension | dimension (size_t index) const |
Return the nth dimension at the given position. | |
size_t | indexDimension (ImageDimension dimension) |
Return the position of given dimension in the current ImageType. | |
ImageType | operator| (ImageDimension rhs) const |
Equivalent to add. | |
bool | operator== (ImageType other) const |
Equality operator. | |
bool | operator!= (ImageType other) const |
Not-Equality operator. | |
std::string | toString () const |
Return string interpretation. | |
uint64_t | value () const |
Return internal 64-bit integer value. | |
Friends | |
ImageType | operator| (ImageDimension lhs, ImageDimension rhs) |
Binary Operator to combine two dimensions. | |
ImageType | operator| (ImageDimension lhs, ImageType rhs) |
Binary Operator to combine a dimension with an ImageType. | |
A flag system that describes the dimensions of an image.
An image is firstly defined by its dimensions.
i.e.
void iolink::ImageType::add | ( | ImageDimension | dimension | ) |
void iolink::ImageType::add | ( | ImageType | other | ) |
ImageDimension iolink::ImageType::dimension | ( | size_t | index | ) | const |
Return the nth dimension at the given position.
e.g. in an IMAGE_SEQUENCE: COLUMN is the dimension returned for index = 0 ROW is the dimension returned for index = 1 SEQUENCE is the dimension returned for index = 2
index | dimension index in the ImageType |
bool iolink::ImageType::has | ( | ImageDimension | dimension | ) | const |
size_t iolink::ImageType::indexDimension | ( | ImageDimension | dimension | ) |
Return the position of given dimension in the current ImageType.
e.g. in an IMAGE_SEQUENCE: COLUMN is the first dimension (idx = 0 is returned) ROW is the second dimension (idx = 1 is returned) SEQUENCE is the 3th dimension (idx= 2 is returned)
dimension | the dimension whom you want to get the index in the current ImageType |
bool iolink::ImageType::operator!= | ( | ImageType | other | ) | const |
bool iolink::ImageType::operator== | ( | ImageType | other | ) | const |
ImageType iolink::ImageType::operator| | ( | ImageDimension | rhs | ) | const |
void iolink::ImageType::remove | ( | ImageDimension | dimension | ) |
void iolink::ImageType::remove | ( | ImageType | other | ) |
void iolink::ImageType::remove | ( | size_t | index | ) |
Remove the nth dimension to the ImageType.
index | index of the dimension to remove |
|
friend |
Binary Operator to combine two dimensions.
lhs | left operand - ImageDimension |
rhs | right operand - ImageDimension |
|
friend |