libCZI
Reading and Writing CZI documents made easy
Loading...
Searching...
No Matches
libCZI::AddSubBlockInfo Struct Reference

#include <libCZI_Write.h>

Inheritance diagram for libCZI::AddSubBlockInfo:
libCZI::AddSubBlockInfoBase

Public Member Functions

 AddSubBlockInfo ()
 Default constructor.
 
 AddSubBlockInfo (const AddSubBlockInfoBase &other)
 
void Clear () override
 Clears this object to its blank/initial state.
 
- Public Member Functions inherited from libCZI::AddSubBlockInfoBase
 AddSubBlockInfoBase ()
 Default constructor.
 
void SetCompressionMode (libCZI::CompressionMode m)
 
libCZI::CompressionMode GetCompressionMode () const
 

Public Attributes

size_t sizeData
 The size of the subblock's data in bytes.
 
std::function< bool(int callCnt, size_t offset, const void *&ptr, size_t &size)> getData
 
size_t sizeMetadata
 The size of the subblock's metadata in bytes (note: max value is (numeric_limits<int>::max() ).
 
std::function< bool(int callCnt, size_t offset, const void *&ptr, size_t &size)> getMetaData
 
size_t sizeAttachment
 The size of the subblock's attachment in bytes (note: max value is (numeric_limits<int>::max() ).
 
std::function< bool(int callCnt, size_t offset, const void *&ptr, size_t &size)> getAttachment
 
- Public Attributes inherited from libCZI::AddSubBlockInfoBase
libCZI::CDimCoordinate coordinate
 The subblock's coordinate.
 
bool mIndexValid
 Whether the field 'mIndex' is valid;.
 
int mIndex
 The M-index of the subblock.
 
int x
 The x-coordinate of the subblock.
 
int y
 The x-coordinate of the subblock.
 
int logicalWidth
 The logical with of the subblock (in pixels).
 
int logicalHeight
 The logical height of the subblock (in pixels).
 
int physicalWidth
 The physical with of the subblock (in pixels).
 
int physicalHeight
 The physical height of the subblock (in pixels).
 
libCZI::PixelType PixelType
 The pixel type of the subblock.
 
libCZI::SubBlockPyramidType pyramid_type
 
std::int32_t compressionModeRaw
 

Detailed Description

Information for adding a subblock to a CZI-file with ICziWriter. Here we add the information about the payload-data. We employ a pull-based model, where the caller has to supply callback-functions for delivering the data.

Constructor & Destructor Documentation

◆ AddSubBlockInfo()

libCZI::AddSubBlockInfo::AddSubBlockInfo ( const AddSubBlockInfoBase other)
inlineexplicit

Copy-Constructor which copies all information from the specified base-class object.

Parameters
otherThe other object of type AddSubBlockInfoBase from which information will be copied.

Member Function Documentation

◆ Clear()

void libCZI::AddSubBlockInfo::Clear ( )
inlineoverridevirtual

Clears this object to its blank/initial state.

Reimplemented from libCZI::AddSubBlockInfoBase.

Member Data Documentation

◆ getAttachment

std::function<bool(int callCnt, size_t offset, const void*& ptr, size_t& size)> libCZI::AddSubBlockInfo::getAttachment

The functor will be called to retrieve the subblock's attachment. The function must set the arguments 'ptr' and 'size', and the memory pointed to must be valid until the next call into the functor (or returning from the 'SyncAddSubBlock' method). The argument 'callCnt' is incremented with each call (starting from 0), and 'offset' is incremented by the number of bytes already retrieved. The functor will be called until the amount of bytes specified by 'sizeAttachment" has been retrieved or if it returns false. If returning false, the subblock-attachment is filled with zeroes (if necessary) so that 'sizeAttachment' bytes are reached.

◆ getData

std::function<bool(int callCnt, size_t offset, const void*& ptr, size_t& size)> libCZI::AddSubBlockInfo::getData

The functor will be called to retrieve the subblock's data. The function must set the arguments 'ptr' and 'size', and the memory pointed to must be valid until the next call into the functor (or returning from the 'SyncAddSubBlock' method). The argument 'callCnt' is incremented with each call (starting from 0), and 'offset' is incremented by the number of bytes already retrieved. The functor will be called until the amount of bytes specified by 'sizeData" has been retrieved or if it returns false. If returning false, the subblock-data is filled with zeroes (if necessary) so that 'sizeData' bytes are reached.

◆ getMetaData

std::function<bool(int callCnt, size_t offset, const void*& ptr, size_t& size)> libCZI::AddSubBlockInfo::getMetaData

The functor will be called to retrieve the subblock's metadata. The function must set the arguments 'ptr' and 'size', and the memory pointed to must be valid until the next call into the functor (or returning from the 'SyncAddSubBlock' method). The argument 'callCnt' is incremented with each call (starting from 0), and 'offset' is incremented by the number of bytes already retrieved. The functor will be called until the amount of bytes specified by 'sizeMetadata" has been retrieved or if it returns false. If returning false, the subblock-metadata is filled with zeroes (if necessary) so that 'sizeMetadata' bytes are reached.


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