libCZI
Reading CZI documents made easy
libCZI Namespace Reference

External interfaces, classes, functions and structs are found in the namespace "libCZI". More...

Classes

struct  AttachmentInfo
 Information about an attachment. More...
 
struct  BitmapLockInfo
 Information about a locked bitmap - allowing direct access to the image data in memory. More...
 
struct  BoundingBoxes
 This structure gathers the bounding-boxes determined from all sub-blocks and only be those on pyramid-layer 0. More...
 
class  CDimBase
 Base class containing some commonly used methods. More...
 
class  CDimBounds
 Implementation of a class representing an interval (and implementing the libCZI::IDimBounds-interface). More...
 
class  CDimCoordinate
 Implementation of a class representing a coordinate (and implementing the IDimCoordinate-interface). More...
 
class  Compositors
 Composition operations are found in this class: multi-tile compositor and multi-channel compositor. More...
 
struct  DblRect
 A rectangle (with double coordinates). More...
 
struct  DimensionAndStartSize
 A structure combining a dimension and an interval (defined by a start value and the size). More...
 
struct  DimensionAndValue
 A structure combining a dimension and a value. More...
 
struct  GeneralDocumentInfo
 General document information - corresponding to Information/Document. More...
 
class  IAccessor
 The base interface (all accessor-interface must derive from this). More...
 
class  IAttachment
 Representation of an attachment. An attachment is a binary blob, its inner structure is opaque. More...
 
class  IAttachmentRepository
 Interface for the attachment repository. This interface is used to access the attachments in a CZI-file. More...
 
class  IBitmapData
 
class  IChannelDisplaySetting
 The display-settings for a channel. More...
 
class  ICziMetadata
 Representation of the CZI-metadata. More...
 
class  ICziMultiDimensionDocumentInfo
 The top-level interface for the CZI-metadata object. More...
 
class  ICZIReader
 This interface is used to represent the CZI-file. More...
 
class  IDecoder
 The interface used for operating image decoder. That is the simplest possible interface at this point... More...
 
class  IDimBounds
 Interface used to represent an interval (for several dimensions). More...
 
class  IDimCoordinate
 Interface used to represent a coordinate (in the space of the dimensions identified by DimensionIndex). More...
 
class  IDimensionInfo
 Base class for information about the dimension. (not yet implemented) More...
 
class  IDisplaySettings
 The display settings. More...
 
class  IIndexSet
 
class  IMetadataSegment
 Interface representing the metadata-segment. More...
 
struct  IntRect
 A rectangle (with integer coordinates). More...
 
struct  IntSize
 A structure representing a size (width and height) in integers. More...
 
class  ISingleChannelPyramidLayerTileAccessor
 
class  ISingleChannelScalingTileAccessor
 
class  ISingleChannelTileAccessor
 
class  ISite
 
class  IStream
 
class  ISubBlock
 
class  ISubBlockRepository
 Interface for sub-block repository. This interface is used to access the sub-blocks in a CZI-file. More...
 
class  LibCZIAccessorException
 Exception for signalling errors specific for accessors. More...
 
struct  LibCZICZIParseException
 Exception for signalling errors parsing the CZI-stream. More...
 
class  LibCZIException
 Base class for all libCZI-specific exceptions. More...
 
struct  LibCZIInvalidPlaneCoordinateException
 Exception for signalling an incorrect plane-coordinate object. More...
 
class  LibCZIIOException
 
class  LibCZIStringParseException
 Exception for signalling that a string did not parse correctly. More...
 
struct  PyramidStatistics
 Statistics about the pyramid-layers. More...
 
struct  Rgb8Color
 A structure representing an R-G-B-color triple (as bytes). More...
 
struct  RgbFloatColor
 A structure representing an R-G-B-color triple (as floats). More...
 
struct  ScalingInfo
 Scaling information - gives the size of a pixel. More...
 
class  ScopedBitmapLocker
 
struct  SubBlockInfo
 Information about a sub-block. More...
 
struct  SubBlockStatistics
 Statistics about all sub-blocks found in a CZI-document. More...
 
class  Utils
 A bunch of utility functions. More...
 

Typedefs

typedef ScopedBitmapLocker< IBitmapData * > ScopedBitmapLockerP
 Defines an alias representing the scoped bitmap locker for use with libCZI::IBitmapData.
 
typedef ScopedBitmapLocker< std::shared_ptr< IBitmapData > > ScopedBitmapLockerSP
 Defines an alias representing the scoped bitmap locker for use with a shared_ptr of type libCZI::IBitmapData.
 

Enumerations

enum  SiteObjectType { SiteObjectType::Default, SiteObjectType::WithJxrDecoder }
 
enum  AccessorType { AccessorType::SingleChannelTileAccessor, AccessorType::SingleChannelPyramidLayerTileAccessor, AccessorType::SingleChannelScalingTileAccessor }
 Values that represent the accessor types. More...
 
enum  DimensionIndex : std::uint8_t {
  DimensionIndex::invalid = 0, DimensionIndex::MinDim = 1, DimensionIndex::Z = 1, DimensionIndex::C = 2,
  DimensionIndex::T = 3, DimensionIndex::R = 4, DimensionIndex::S = 5, DimensionIndex::I = 6,
  DimensionIndex::H = 7, DimensionIndex::V = 8, DimensionIndex::B = 9, DimensionIndex::MaxDim = 9
}
 Values that represent dimension indexes. More...
 
enum  PixelType : std::uint8_t {
  PixelType::Invalid = 0xff, PixelType::Gray8 = 0, PixelType::Gray16 = 1, PixelType::Gray32Float = 2,
  PixelType::Bgr24 = 3, PixelType::Bgr48 = 4, PixelType::Bgr96Float = 8, PixelType::Bgra32 = 9,
  PixelType::Gray64ComplexFloat = 10, PixelType::Bgr192ComplexFloat = 11, PixelType::Gray32 = 12, PixelType::Gray64Float = 13
}
 An enum representing a pixel-type. More...
 
enum  CompressionMode : std::uint8_t { CompressionMode::Invalid = 0xff, CompressionMode::UnCompressed = 0, CompressionMode::Jpg = 1, CompressionMode::JpgXr = 4 }
 An enum specifying the compression method. More...
 
enum  ImageDecoderType { ImageDecoderType::JPXR_JxrLib }
 

Functions

LIBCZI_API ISiteGetDefaultSiteObject (libCZI::SiteObjectType type)
 
LIBCZI_API void SetSiteObject (libCZI::ISite *pSite)
 
LIBCZI_API void GetLibCZIVersion (int *pMajor, int *pMinor)
 
LIBCZI_API std::shared_ptr< ICZIReaderCreateCZIReader ()
 
LIBCZI_API std::shared_ptr< IBitmapDataCreateBitmapFromSubBlock (ISubBlock *subBlk)
 
LIBCZI_API std::shared_ptr< ICziMetadataCreateMetaFromMetadataSegment (IMetadataSegment *metadataSegment)
 
LIBCZI_API std::shared_ptr< IAccessorCreateAccesor (std::shared_ptr< ISubBlockRepository > repository, AccessorType accessorType)
 
LIBCZI_API std::shared_ptr< IStreamCreateStreamFromFile (const wchar_t *szFilename)
 
std::ostream & operator<< (std::ostream &os, const IntRect &rect)
 
std::ostream & operator<< (std::ostream &os, const IntSize &size)
 

Variables

const int LOGLEVEL_CATASTROPHICERROR = 0
 Identifies a catastrophic error (i. e. the program cannot continue).
 
const int LOGLEVEL_ERROR = 1
 Identifies a non-recoverable error.
 
const int LOGLEVEL_SEVEREWARNING = 2
 Identifies that a severe problem has occured. Proper operation of the module is not ensured.
 
const int LOGLEVEL_WARNING = 3
 Identifies that a problem has been identified. It is likely that proper operation can be kept up.
 
const int LOGLEVEL_INFORMATION = 4
 Identifies an informational output. It has no impact on the proper operation.
 
const int LOGLEVEL_CHATTYINFORMATION = 5
 Identifies an informational output which has no impact on proper operation. Use this for output which may occur with high frequency.
 

Detailed Description

External interfaces, classes, functions and structs are found in the namespace "libCZI".

Enumeration Type Documentation

◆ AccessorType

enum libCZI::AccessorType
strong

Values that represent the accessor types.

Enumerator
SingleChannelTileAccessor 

The single-channel-tile accessor (associated interface: ISingleChannelTileAccessor).

SingleChannelPyramidLayerTileAccessor 

The single-channel-pyramidlayer-tile accessor (associated interface: ISingleChannelPyramidLayerTileAccessor).

SingleChannelScalingTileAccessor 

The scaling-single-channel-tile accessor (associated interface: ISingleChannelScalingTileAccessor).

◆ CompressionMode

enum libCZI::CompressionMode : std::uint8_t
strong

An enum specifying the compression method.

Enumerator
Invalid 

Invalid compression type.

UnCompressed 

The data is uncompressed.

Jpg 

The data is JPG-compressed.

JpgXr 

The data is JPG-XR-compressed.

◆ DimensionIndex

enum libCZI::DimensionIndex : std::uint8_t
strong

Values that represent dimension indexes.

Enumerator
invalid 

Invalid dimension index.

MinDim 

This enum must be have the value of the lowest (valid) dimension index.

The Z-dimension.

The C-dimension ("channel").

The T-dimension ("time").

The R-dimension ("rotation").

The S-dimension ("scene").

The I-dimension ("illumination").

The H-dimension ("phase").

The V-dimension ("view").

The B-dimension ("block") - its use is deprecated.

MaxDim 

This enum must be have the value of the highest (valid) dimension index.

◆ ImageDecoderType

Values that represent image decoder types - used for distinguishing decoder objects created by ISite::GetDecoder.

Enumerator
JPXR_JxrLib 

Identifies an encoder capable of decoding a JPG-XR compressed image.

◆ PixelType

enum libCZI::PixelType : std::uint8_t
strong

An enum representing a pixel-type.

Enumerator
Invalid 

Invalid pixel type.

Gray8 

Grayscale 8-bit unsinged.

Gray16 

Grayscale 16-bit unsinged.

Gray32Float 

Grayscale 4 byte float.

Bgr24 

BGR-color 8-bytes triples (memory order B, G, R).

Bgr48 

BGR-color 16-bytes triples (memory order B, G, R).

Bgr96Float 

BGR-color 4 byte float triples (memory order B, G, R).

Bgra32 

Currently not supported in libCZI.

Gray64ComplexFloat 

Currently not supported in libCZI.

Bgr192ComplexFloat 

Currently not supported in libCZI.

Gray32 

Currently not supported in libCZI.

Gray64Float 

Currently not supported in libCZI.

◆ SiteObjectType

Values that represent site-object-types. On Windows, we provide on Site-object that uses the WIC-codec and one that uses an internal JPEG-XR decoder (JXRLib).

Enumerator
Default 

An enum constant representing the default option (which is JXRLib)

WithJxrDecoder 

An enum constant representing a Site-object using the internal JXRLib.

Function Documentation

◆ CreateAccesor()

LIBCZI_API std::shared_ptr<IAccessor> libCZI::CreateAccesor ( std::shared_ptr< ISubBlockRepository repository,
AccessorType  accessorType 
)

Creates an accesor of the specified type which uses the specified sub-block repository.

Parameters
repositoryThe sub-block repository.
accessorTypeType of the accessor.
Returns
The newly creted accesor object.

◆ CreateBitmapFromSubBlock()

LIBCZI_API std::shared_ptr<IBitmapData> libCZI::CreateBitmapFromSubBlock ( ISubBlock subBlk)

Creates bitmap from sub block.

Parameters
[in]subBlkThe sub-block.
Returns
The newly allocated bitmap containing the image from the sub-block.

◆ CreateCZIReader()

LIBCZI_API std::shared_ptr<ICZIReader> libCZI::CreateCZIReader ( )

Creates a new instance of the CZI-reader class.

Returns
The newly created CZI-reader.

◆ CreateMetaFromMetadataSegment()

LIBCZI_API std::shared_ptr<ICziMetadata> libCZI::CreateMetaFromMetadataSegment ( IMetadataSegment metadataSegment)

Creates metadata-object from a metadata segment.

Parameters
[in]metadataSegmentThe metadata segment object.
Returns
The newly created metadata object.

◆ CreateStreamFromFile()

LIBCZI_API std::shared_ptr<IStream> libCZI::CreateStreamFromFile ( const wchar_t *  szFilename)

Creates a stream-object for the specified file. A stock-implementation of a stream-object (for reading a file from disk) is provided here.

Parameters
szFilenameFilename of the file.
Returns
The new stream object.

◆ GetDefaultSiteObject()

LIBCZI_API ISite* libCZI::GetDefaultSiteObject ( libCZI::SiteObjectType  type)

Gets one of the available Site-objects. The objects returned are static objects with an unbounded lifetime.

Parameters
typeThe Site-object type.
Returns
nullptr if it fails, else the default site object (of the specified type).

◆ GetLibCZIVersion()

LIBCZI_API void libCZI::GetLibCZIVersion ( int *  pMajor,
int *  pMinor 
)

Gets the version of the library.

Parameters
[out]pMajorIf non-null, will receive the major version number.
[out]pMinorIf non-null, will receive the minor version number.

◆ operator<<() [1/2]

std::ostream& libCZI::operator<< ( std::ostream &  os,
const IntRect rect 
)
inline

Stream insertion operator for the libCZI::IntRect type. A string of the form '(x,y,width,height)' is output to the stream.

Parameters
[in]osThe stream to output the rect to.
rectThe rectangle.
Returns
The ostream object os.

◆ operator<<() [2/2]

std::ostream& libCZI::operator<< ( std::ostream &  os,
const IntSize size 
)
inline

Stream insertion operator for the libCZI::IntSize type. A string of the form '(width,height)' is output to the stream.

Parameters
[in]osThe stream to output the size to.
sizeThe size structure.
Returns
The ostream object os.

◆ SetSiteObject()

LIBCZI_API void libCZI::SetSiteObject ( libCZI::ISite pSite)

Sets the global Site-object. This function must only be called once and before any other function in this library is called. The object passed in here must have a lifetime greater than any usage of the library. If no Site-object is set, then at first usage a default Site-object is created and used.

Parameters
[in]pSiteThe Site-object to use. It must not be nullptr.