Implementation of a class representing a coordinate (and implementing the IDimCoordinate
-interface).
More...
#include <libCZI_DimCoordinate.h>
Implementation of a class representing a coordinate (and implementing the IDimCoordinate
-interface).
◆ CDimCoordinate() [1/2]
libCZI::CDimCoordinate::CDimCoordinate |
( |
std::initializer_list< DimensionAndValue > |
list | ) |
|
|
inline |
Constructor which constructs a coordinate object from the specified initializer list. It can be used like this:
Implementation of a class representing a coordinate (and implementing the IDimCoordinate-interface).
Definition libCZI_DimCoordinate.h:149
@ C
The C-dimension ("channel").
@ T
The T-dimension ("time").
- Parameters
-
list | The list of dimensions-and-values. |
◆ CDimCoordinate() [2/2]
Copy-constructor which creates a copy of the specifed coordinate.
- Parameters
-
other | The coordinate for which to create a copy. It may be null in which case an empty coordinate is created. |
◆ Clear()
Clears the validity of the specified dimension.
- Parameters
-
dimension | The dimension to mark as 'not valid for this coordinate'. |
◆ EnumValidDimensions()
void libCZI::CDimCoordinate::EnumValidDimensions |
( |
const std::function< bool(libCZI::DimensionIndex dim, int value)> & |
func | ) |
const |
|
inline |
Enumerate the valid dimensions contained in this coordinate. The specified functor will be called for each valid dimension (and providing the functor with the dimension index and the coordinate). If the functor returns false, the enumeration is cancelled.
- Parameters
-
func | The functor to call for each valid dimension. If returning false, the enumeration is cancelled. |
◆ Parse()
static CDimCoordinate libCZI::CDimCoordinate::Parse |
( |
const char * |
str | ) |
|
|
static |
Parse the specified string and construct a CDimCoordinate-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 -). There can be more than one dimension given, in which case the parts can be separated by a comma, a semicolon or spaces. The regular expression is:
([:blank:]*[Z|C|T|R|S|I|H|V|B][\\+|-]?[[:digit:]]+[,|;| ]*)
It is illegal to give the same dimension multiple times.
- Exceptions
-
- Parameters
-
- Returns
- A CDimCoordinate object constructed from the string.
◆ Set()
Sets the value for the specified dimension. The specified dimension will be marked 'valid'.
- Parameters
-
dimension | The dimension to set. |
value | The value to set. |
◆ TryGetPosition()
Attempts to get position index in the specified dimension.
- Parameters
-
| dim | The dimension. |
[out] | coordinate | If non-null and the dimension is valid (in this coordinate), it will receive the value of the coordinate for the specified dimension. |
- Returns
- True if it succeeds (i. e. the specified dimension is given in this coordinate), false otherwise.
Implements libCZI::IDimCoordinate.
The documentation for this class was generated from the following file: