Interface for sub-block repository. This interface is used to access the sub-blocks in a CZI-file.
More...
#include <libCZI.h>
Interface for sub-block repository. This interface is used to access the sub-blocks in a CZI-file.
◆ EnumerateSubBlocks()
virtual void libCZI::ISubBlockRepository::EnumerateSubBlocks |
( |
const std::function< bool(int index, const SubBlockInfo &info)> & |
funcEnum | ) |
|
|
pure virtual |
Enumerate all sub-blocks.
- Parameters
-
funcEnum | The functor which will be called for every sub-block. If the return value of the functor is true, the enumeration is continued, otherwise it is stopped. The first argument is the index of the sub-block and the second is providing information about the sub-block. |
◆ EnumSubset()
virtual void libCZI::ISubBlockRepository::EnumSubset |
( |
const IDimCoordinate * |
planeCoordinate, |
|
|
const IntRect * |
roi, |
|
|
bool |
onlyLayer0, |
|
|
const std::function< bool(int index, const SubBlockInfo &info)> & |
funcEnum |
|
) |
| |
|
pure virtual |
Enumerate the subset of sub-blocks defined by the parameters.
- Parameters
-
planeCoordinate | The plane coordinate. Only sub-blocks on this plane will be considered. |
roi | The ROI - only sub-blocks which intersects with this ROI will be considered. |
onlyLayer0 | If true, then only sub-blocks on pyramid-layer 0 will be considered. |
funcEnum | The functor which will be called for every sub-block. If the return value of the functor is true, the enumeration is continued, otherwise it is stopped. The first argument is the index of the sub-block and the second is providing information about the sub-block. |
◆ GetPyramidStatistics()
Gets the statistics about the pyramid-layers. This information is constructed from all T, Z, C, ... Pyramids are constructed per scene in CZI.
- Returns
- The pyramid statistics.
◆ GetStatistics()
Gets the statistics about the sub-blocks (determined from examining all sub-blocks).
- Returns
- The sub-block statistics.
◆ ReadSubBlock()
virtual std::shared_ptr< ISubBlock > libCZI::ISubBlockRepository::ReadSubBlock |
( |
int |
index | ) |
|
|
pure virtual |
Reads the sub-block identified by the specified index. If there is no sub-block present (for the specified index) then an empty shared_ptr is returned. If a different kind of problem occurs (e. g. I/O error or corrupted data) an exception is thrown.
- Parameters
-
index | Index of the sub-block (as reported by the Enumerate-methods). |
- Returns
- If successful, the sub-block object; otherwise an empty shared_ptr.
◆ TryGetSubBlockInfo()
virtual bool libCZI::ISubBlockRepository::TryGetSubBlockInfo |
( |
int |
index, |
|
|
SubBlockInfo * |
info |
|
) |
| const |
|
pure virtual |
Attempts to get the subblock information of the subblock with the specified index. If the specified index is not valid, then false is returned.
- Parameters
-
| index | Index of the subblock to query information for. |
[in,out] | info | If non-null and operation is successful, then the information is put here. |
- Returns
- True if it succeeds; false otherwise.
◆ TryGetSubBlockInfoOfArbitrarySubBlockInChannel()
virtual bool libCZI::ISubBlockRepository::TryGetSubBlockInfoOfArbitrarySubBlockInChannel |
( |
int |
channelIndex, |
|
|
SubBlockInfo & |
info |
|
) |
| |
|
pure virtual |
Attempts to get subblock information of an arbitrary subblock in of the specified channel. The purpose is that it is quite often necessary to determine the pixeltype of a channel - and if we do not want to/cannot rely on metadata for determining this, then the obvious way is to look at an (arbitrary) subblock. In order to allow the repository to have this information available fast (i. e. cached) we introduce a specific method for this purpose. A cornerstone case is when no subblock has a channel-index - the rule is: if no subblock has channel- information, then a channelIndex of 0 fits. Otherwise a subblock is a match if the channel- index is an exact match.
- Parameters
-
| channelIndex | The channel index. |
[out] | info | The sub-block information (will be set only if the method is successful). |
- Returns
- true if it succeeds, false if it fails.
The documentation for this class was generated from the following file: