libCZI
Reading and Writing CZI documents made easy
libCZI::SubBlockInfo Struct Reference

Information about a sub-block. More...

#include <libCZI.h>

Inheritance diagram for libCZI::SubBlockInfo:
libCZI::DirectorySubBlockInfo

Public Member Functions

double GetZoom () const
 
CompressionMode GetCompressionMode () const
 
bool IsMindexValid () const
 

Public Attributes

std::int32_t compressionModeRaw
 
PixelType pixelType
 The pixel type of the sub-block.
 
libCZI::CDimCoordinate coordinate
 The coordinate of the sub-block.
 
libCZI::IntRect logicalRect
 The rectangle where the bitmap (in this sub-block) is located.
 
libCZI::IntSize physicalSize
 The physical size of the bitmap (which may be different to the size of logicalRect).
 
int mIndex
 The M-index of the sub-block (if available). If not available, it has the value std::numeric_limits<int>::max() or std::numeric_limits<int>::min().
 
SubBlockPyramidType pyramidType
 

Detailed Description

Information about a sub-block.

Member Function Documentation

◆ GetCompressionMode()

CompressionMode libCZI::SubBlockInfo::GetCompressionMode ( ) const
inline

Gets compression mode enumeration. Note that unknown compression-mode identifiers (unknown to libCZI) are mapped to CompressionMode::Invalid.

Returns
The compression mode enumeration.

◆ GetZoom()

double libCZI::SubBlockInfo::GetZoom ( ) const
inline

Calculate a zoom-factor from the physical- and logical size.

Remarks
This calculation not really well-defined.
Returns
The zoom factor.

◆ IsMindexValid()

bool libCZI::SubBlockInfo::IsMindexValid ( ) const
inline

Query if the M-index is valid.

Returns
True if the M-index is valid, false if not.

Member Data Documentation

◆ compressionModeRaw

std::int32_t libCZI::SubBlockInfo::compressionModeRaw

The (raw) compression mode identification of the sub-block. This value is not interpreted, use "GetCompressionMode" to have it converted to the CompressionMode-enumeration. Note that unknown compression-mode identifiers (unknown to libCZI) are mapped to CompressionMode::Invalid.

◆ pyramidType

SubBlockPyramidType libCZI::SubBlockInfo::pyramidType

This field indicates the "pyramid-type" of the sub-block. The significance and importance of this field is unclear, and is considered legacy. It is recommended to ignore this field.


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