libCZI
Reading CZI documents made easy
libCZI::ICZIReader Class Referenceabstract

This interface is used to represent the CZI-file. More...

#include <libCZI.h>

Inheritance diagram for libCZI::ICZIReader:
libCZI::ISubBlockRepository libCZI::IAttachmentRepository

Public Member Functions

virtual void Open (std::shared_ptr< IStream > stream)=0
 
virtual std::shared_ptr< IMetadataSegmentReadMetadataSegment ()=0
 
virtual std::shared_ptr< IAccessorCreateAccessor (AccessorType accessorType)=0
 
virtual void Close ()=0
 
std::shared_ptr< ISingleChannelTileAccessorCreateSingleChannelTileAccessor ()
 
std::shared_ptr< ISingleChannelPyramidLayerTileAccessorCreateSingleChannelPyramidLayerTileAccessor ()
 
std::shared_ptr< ISingleChannelScalingTileAccessorCreateSingleChannelScalingTileAccessor ()
 
- Public Member Functions inherited from libCZI::ISubBlockRepository
virtual void EnumerateSubBlocks (std::function< bool(int index, const SubBlockInfo &info)> funcEnum)=0
 
virtual void EnumSubset (const IDimCoordinate *planeCoordinate, const IntRect *roi, bool onlyLayer0, std::function< bool(int index, const SubBlockInfo &info)> funcEnum)=0
 
virtual std::shared_ptr< ISubBlockReadSubBlock (int index)=0
 
virtual bool TryGetSubBlockInfoOfArbitrarySubBlockInChannel (int channelIndex, SubBlockInfo &info)=0
 
virtual SubBlockStatistics GetStatistics ()=0
 
virtual PyramidStatistics GetPyramidStatistics ()=0
 
- Public Member Functions inherited from libCZI::IAttachmentRepository
virtual void EnumerateAttachments (std::function< bool(int index, const AttachmentInfo &info)> funcEnum)=0
 
virtual void EnumerateSubset (const char *contentFileType, const char *name, std::function< bool(int index, const AttachmentInfo &infi)> funcEnum)=0
 
virtual std::shared_ptr< IAttachmentReadAttachment (int index)=0
 

Detailed Description

This interface is used to represent the CZI-file.

Member Function Documentation

◆ Close()

virtual void libCZI::ICZIReader::Close ( )
pure virtual

Closes CZI-reader. The underlying stream-object will be released, and further calls to other methods will fail. The stream is also closed when the object is destroyed, so it is usually not neccesary to explitely call Close. Also, take care that the ownership of the class must be defined when calling Close.

◆ CreateAccessor()

virtual std::shared_ptr<IAccessor> libCZI::ICZIReader::CreateAccessor ( AccessorType  accessorType)
pure virtual

Creates an accessor for the sub-blocks. See also the various typed methods: CreateSingleChannelTileAccessor, CreateSingleChannelPyramidLayerTileAccessor and CreateSingleChannelScalingTileAccessor.

Remarks
If the class is not operational (i. e. Open was not called or Open was not successfull), then an exception of type std::logic_error is thrown.
Parameters
accessorTypeThe type of the accessor.
Returns
The accessor (of the requested type).

◆ CreateSingleChannelPyramidLayerTileAccessor()

std::shared_ptr<ISingleChannelPyramidLayerTileAccessor> libCZI::ICZIReader::CreateSingleChannelPyramidLayerTileAccessor ( )
inline

Creates a single channel pyramid-layer accessor.

Returns
The new single channel tile accessor.

◆ CreateSingleChannelScalingTileAccessor()

std::shared_ptr<ISingleChannelScalingTileAccessor> libCZI::ICZIReader::CreateSingleChannelScalingTileAccessor ( )
inline

Creates a single channel scaling tile accessor.

Returns
The new single channel scaling tile accessor.

◆ CreateSingleChannelTileAccessor()

std::shared_ptr<ISingleChannelTileAccessor> libCZI::ICZIReader::CreateSingleChannelTileAccessor ( )
inline

Creates a single channel tile accessor.

Returns
The new single channel tile accessor.

◆ Open()

virtual void libCZI::ICZIReader::Open ( std::shared_ptr< IStream stream)
pure virtual

Opens the specified stream and reads the global information from the CZI-document. The stream passed in will have its refcount incremented, a reference is held until Close is called (or the instance is destroyed).

Remarks
If this method is called twice, then an exception of type std::logic_error is thrown.
Parameters
streamThe stream object.

◆ ReadMetadataSegment()

virtual std::shared_ptr<IMetadataSegment> libCZI::ICZIReader::ReadMetadataSegment ( )
pure virtual

Reads the metadata segment from the stream.

Remarks
If the class is not operational (i. e. Open was not called or Open was not successfull), then an exception of type std::logic_error is thrown.
Returns
The metadata segment.

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