Class CDimBounds#
Defined in File libCZI_DimCoordinate.h
Inheritance Relationships#
Base Types#
public libCZI::CDimBase
(Class CDimBase)public libCZI::IDimBounds
(Class IDimBounds)
Class Documentation#
-
class CDimBounds : public libCZI::CDimBase, public libCZI::IDimBounds#
Implementation of a class representing an interval (and implementing the
libCZI::IDimBounds
-interface).Public Functions
-
inline CDimBounds()#
Default constructor - the object will contain no valid dimension.
-
inline explicit CDimBounds(const IDimBounds *other)#
Constructor which copies the content of the specified IDimBounds-object.
- Parameters:
other – The IDimBounds-object to copy information from.
-
inline CDimBounds(std::initializer_list<DimensionAndStartSize> list)#
Construct a libCZI::CDimBounds object from an initializer-list.
- Parameters:
list – The list of “dimension, start and size”.
-
inline void Set(libCZI::DimensionIndex dimension, int start, int size)#
Sets (for the specified dimension) the start and the size.
- Parameters:
dimension – The dimension.
start – The start.
size – The size.
-
inline void EnumValidDimensions(const std::function<bool(libCZI::DimensionIndex dim, int start, int size)> &func) const#
Enumerate valid dimensions.
- Parameters:
func – The functor which will be called for all valid dimensions.
-
inline void Clear(libCZI::DimensionIndex dimension)#
Clears the validity of the specified dimension.
- Parameters:
dimension – The dimension.
-
inline void Clear()#
Clears this object to its blank/initial state. All dimensions will be set to invalid.
-
inline bool IsEmpty() const#
Query if this object is empty - no valid dimensions contained.
- Returns:
True if empty, false if not.
-
inline virtual bool TryGetInterval(libCZI::DimensionIndex dim, int *startIndex, int *size) const override#
Attempts to get interval and size for the specified dimension.
- Parameters:
dim – The dimemension.
startIndex – [out] If non-null, it will receive the start index.
size – [out] If non-null, it will receive the size.
- Returns:
True if it succeeds, false if it fails.
Public Static Functions
-
static CDimBounds Parse(const char *str)#
Parse the specified string and construct a CDimBounds-object from the information. The syntax for the string is - a character identifying the dimension (one of ‘Z’, ‘C’, ‘T’, ‘R’, ‘S’, ‘I’, ‘H’, ‘V’, ‘B’) followed by an integer (possibly with a + or -) specifying the start-index, followed by a colon ‘:’, then followed by an integer specifying the size. There can be more than one dimension given, in which case the above sequence is repeated for a different dimension. It is illegal to give the same dimension multiple times. Examples: “T0:10”, “T0:5Z0:10”, “C0:2T0:10Z0:5”.
- Throws:
LibCZIStringParseException – Thrown when the specified string cannot be parsed because of a syntactical error.
- Parameters:
str – The string to parse.
- Returns:
A CDimBounds object constructed from the string.
-
inline CDimBounds()#