libCZI
Reading and Writing CZI documents made easy
Loading...
Searching...
No Matches
libCZI::ICZIReader Class Referenceabstract

#include <libCZI.h>

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

Classes

struct  OpenOptions
 This structure gathers the settings for controlling the 'Open' operation of the CZIReader-class. More...
 

Public Member Functions

virtual void Open (const std::shared_ptr< IStream > &stream, const OpenOptions *options=nullptr)=0
 
virtual FileHeaderInfo GetFileHeaderInfo ()=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 (const std::function< bool(int index, const SubBlockInfo &info)> &funcEnum)=0
 
virtual void EnumSubset (const IDimCoordinate *planeCoordinate, const IntRect *roi, bool onlyLayer0, const 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 bool TryGetSubBlockInfo (int index, SubBlockInfo *info) const =0
 
virtual SubBlockStatistics GetStatistics ()=0
 
virtual PyramidStatistics GetPyramidStatistics ()=0
 
virtual libCZI::IntPointAndFrameOfReference TransformPoint (const libCZI::IntPointAndFrameOfReference &source_point, libCZI::CZIFrameOfReference destination_frame_of_reference)=0
 
libCZI::IntRectAndFrameOfReference TransformRectangle (const libCZI::IntRectAndFrameOfReference &source_rectangle, libCZI::CZIFrameOfReference destination_frame_of_reference)
 
- Public Member Functions inherited from libCZI::ISubBlockRepositoryEx
virtual void EnumerateSubBlocksEx (const std::function< bool(int index, const DirectorySubBlockInfo &info)> &funcEnum)=0
 
- Public Member Functions inherited from libCZI::IAttachmentRepository
virtual void EnumerateAttachments (const std::function< bool(int index, const AttachmentInfo &info)> &funcEnum)=0
 
virtual void EnumerateSubset (const char *contentFileType, const char *name, const std::function< bool(int index, const AttachmentInfo &info)> &funcEnum)=0
 
virtual std::shared_ptr< IAttachmentReadAttachment (int index)=0
 

Detailed Description

This interface is used to represent the CZI-file. A note on thread-safety - all methods of this interface may be called from multiple threads concurrently.

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 necessary to explicitly call Close. Note that the stream is not closed immediately (or - there is no guarantee that on return from this call all references to the stream object are released). Concurrently executing operations continue to use the stream and keep it referenced until they are finished.

◆ 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 successful), 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.

◆ GetFileHeaderInfo()

virtual FileHeaderInfo libCZI::ICZIReader::GetFileHeaderInfo ( )
pure virtual

Gets the file header information.

Returns
The file header information.

◆ Open()

virtual void libCZI::ICZIReader::Open ( const std::shared_ptr< IStream > &  stream,
const OpenOptions options = nullptr 
)
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 (assuming successful return), then an exception of type std::logic_error is thrown.
Parameters
streamThe stream object.
options(Optional) Options for controlling the operation. If nullptr is given here, then the default settings are used.

◆ 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 successful), 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: