| IOLink 1.11.0

Loading...
Searching...
No Matches
Public Member Functions | List of all members
iolink::ImageType Class Reference

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.

## Detailed Description

A flag system that describes the dimensions of an image.

An image is firstly defined by its dimensions.

i.e.

- a classic Image has COLUMN and ROW dimensions
- a volume has COLUMN, ROW and SLICE dimensions Concerning the order of dimensions, it follows ImageDimension values order.

## Member Function Documentation

## ◆ add() [1/2]

void iolink::ImageType::add | ( | ImageDimension | dimension | ) |

Add the given dimension to the ImageType.

Parameters

  dimension | dimension to add in the ImageType

## ◆ add() [2/2]

void iolink::ImageType::add | ( | ImageType | other | ) |

Add all the dimensions from given ImageType to current ImageType.

Parameters

  other | ImageType whose dimensions must be added into the current ImageType

## ◆ dimension()

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

Exceptions

  Error | if index does not exist in current ImageType

Parameters

  index | dimension index in the ImageType

Returns
  the dimension corresponding to the given index

## ◆ has()

bool iolink::ImageType::has | ( | ImageDimension | dimension | ) | const

Checks if the ImageType has the given dimension.

Parameters

  dimension | dimension presence to be checked

Returns
  TRUE if dimension is present in the ImageType

## ◆ indexDimension()

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)

Parameters

  dimension | the dimension whom you want to get the index in the current ImageType

Returns
  -1 if the dimension is not present, otherwise the position (index) in current ImageType

## ◆ operator!=()

bool iolink::ImageType::operator!= | ( | ImageType | other | ) | const

Not-Equality operator.

Parameters

  other | Right operand which represents a ImageType to compare to current one

Returns
  TRUE if ImageType is NOT equal to current one

## ◆ operator==()

bool iolink::ImageType::operator== | ( | ImageType | other | ) | const

Equality operator.

Parameters

  other | Right operand which represents a ImageType to compare to current one

Returns
  TRUE if ImageType is equal to current one

## ◆ operator|()

ImageType iolink::ImageType::operator| | ( | ImageDimension | rhs | ) | const

Equivalent to add.

Parameters

  rhs | Right operand which represents a dimension to add to current ImageType

Returns
  ImageType with new given dimension

## ◆ remove() [1/3]

void iolink::ImageType::remove | ( | ImageDimension | dimension | ) |

Remove the given dimension to the ImageType.

Parameters

  dimension | dimension to remove from ImageType

## ◆ remove() [2/3]

void iolink::ImageType::remove | ( | ImageType | other | ) |

Remove all the given dimensions to the ImageType.

Parameters

  other | ImageType whose dimensions must be removed from current ImageType

## ◆ remove() [3/3]

void iolink::ImageType::remove | ( | size_t | index | ) |

Remove the nth dimension to the ImageType.

Parameters

  index | index of the dimension to remove

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

- iolink/public/include/iolink/ImageType.h