Class ISubBlockRepository#
Defined in File libCZI.h
Inheritance Relationships#
Derived Types#
public libCZI::ICZIReader
(Class ICZIReader)public libCZI::ICziReaderWriter
(Class ICziReaderWriter)
Class Documentation#
-
class ISubBlockRepository#
Interface for sub-block repository. This interface is used to access the sub-blocks in a CZI-file.
Subclassed by libCZI::ICZIReader, libCZI::ICziReaderWriter
Public Functions
-
virtual void EnumerateSubBlocks(const std::function<bool(int index, const SubBlockInfo &info)> &funcEnum) = 0#
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.
-
virtual void EnumSubset(const IDimCoordinate *planeCoordinate, const IntRect *roi, bool onlyLayer0, const std::function<bool(int index, const SubBlockInfo &info)> &funcEnum) = 0#
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.
-
virtual std::shared_ptr<ISubBlock> ReadSubBlock(int index) = 0#
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.
-
virtual bool TryGetSubBlockInfoOfArbitrarySubBlockInChannel(int channelIndex, SubBlockInfo &info) = 0#
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.
info – [out] The sub-block information (will be set only if the method is successful).
- Returns:
true if it succeeds, false if it fails.
-
virtual bool TryGetSubBlockInfo(int index, SubBlockInfo *info) const = 0#
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.
info – [inout] If non-null and operation is successful, then the information is put here.
- Returns:
True if it succeeds; false otherwise.
-
virtual SubBlockStatistics GetStatistics() = 0#
Gets the statistics about the sub-blocks (determined from examining all sub-blocks).
- Returns:
The sub-block statistics.
-
virtual PyramidStatistics GetPyramidStatistics() = 0#
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.
-
virtual libCZI::IntPointAndFrameOfReference TransformPoint(const libCZI::IntPointAndFrameOfReference &source_point, libCZI::CZIFrameOfReference destination_frame_of_reference) = 0#
Transform the specified point from one coordinate system to another.
- Parameters:
source_point – Source point and specification of the coordinate system it is defined in.
destination_frame_of_reference – Identifies the coordinate system to which the point should be transformed.
- Returns:
The transformed point.
-
virtual ~ISubBlockRepository() = default#
-
inline libCZI::IntRectAndFrameOfReference TransformRectangle(const libCZI::IntRectAndFrameOfReference &source_rectangle, libCZI::CZIFrameOfReference destination_frame_of_reference)#
Transform the specified rectangle from one coordinate system to another.
- Parameters:
source_rectangle – Source rectangle and specification of the coordinate system it is defined in.
destination_frame_of_reference – Identifies the coordinate system to which the point should be transformed.
- Returns:
The transformed rectangle.
-
virtual void EnumerateSubBlocks(const std::function<bool(int index, const SubBlockInfo &info)> &funcEnum) = 0#