libCZI
Reading CZI documents made easy
libCZI::CDimBounds Class Reference

Implementation of a class representing an interval (and implementing the libCZI::IDimBounds-interface). More...

#include <libCZI_DimCoordinate.h>

Inheritance diagram for libCZI::CDimBounds:
libCZI::CDimBase libCZI::IDimBounds

Public Member Functions

 CDimBounds ()
 Default constructor - the object will contain no valid dimension.
 
 CDimBounds (std::initializer_list< DimensionAndStartSize > list)
 
void Set (libCZI::DimensionIndex dimension, int start, int size)
 
void EnumValidDimensions (std::function< bool(libCZI::DimensionIndex dim, int start, int size)> func) const
 
void Clear (libCZI::DimensionIndex dimension)
 
void Clear ()
 Clears this object to its blank/initial state. All dimensions will be set to invalid.
 
virtual bool TryGetInterval (libCZI::DimensionIndex dim, int *startIndex, int *size) const
 
- Public Member Functions inherited from libCZI::IDimBounds
bool IsValid (DimensionIndex dim)
 

Additional Inherited Members

- Static Protected Member Functions inherited from libCZI::CDimBase
static std::underlying_type< libCZI::DimensionIndex >::type GetBitIndexForDimension (libCZI::DimensionIndex dim)
 

Detailed Description

Implementation of a class representing an interval (and implementing the libCZI::IDimBounds-interface).

Constructor & Destructor Documentation

◆ CDimBounds()

libCZI::CDimBounds::CDimBounds ( std::initializer_list< DimensionAndStartSize list)
inline

Construct a libCZI::CDimBounds object from an initializer-list.

Parameters
listThe list of "dimension, start and size".

Member Function Documentation

◆ Clear()

void libCZI::CDimBounds::Clear ( libCZI::DimensionIndex  dimension)
inline

Clears the validity of the specified dimension.

Parameters
dimensionThe dimension.

◆ EnumValidDimensions()

void libCZI::CDimBounds::EnumValidDimensions ( std::function< bool(libCZI::DimensionIndex dim, int start, int size)>  func) const
inline

Enumerate valid dimensions.

Parameters
funcThe functor which will be called for all valid dimensions.

◆ Set()

void libCZI::CDimBounds::Set ( libCZI::DimensionIndex  dimension,
int  start,
int  size 
)
inline

Sets (for the specified dimension) the start and the size.

Parameters
dimensionThe dimension.
startThe start.
sizeThe size.

◆ TryGetInterval()

virtual bool libCZI::CDimBounds::TryGetInterval ( libCZI::DimensionIndex  dim,
int *  startIndex,
int *  size 
) const
inlinevirtual

Attempts to get interval and size for the specified dimension.

Parameters
dimThe dimemension.
[out]startIndexIf non-null, it will receive the start index.
[out]sizeIf non-null, it will receive the size.
Returns
True if it succeeds, false if it fails.

Implements libCZI::IDimBounds.


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