Function libCZI_SubBlockGetRawData

Function libCZI_SubBlockGetRawData#

Function Documentation#

LibCZIApiErrorCode libCZI_SubBlockGetRawData(SubBlockObjectHandle sub_block_object, std::int32_t type, std::uint64_t *size, void *data)#

Copy the raw data from the specified sub-block object to the specified memory buffer. The value of the ‘size’ parameter on input is the size of the buffer pointed to by ‘data’. On output, the value of ‘size’ is the actual size of the data. At most the initial value of ‘size’ bytes are copied to the buffer. If the initial value of ‘size’ is zero (0) or ‘data’ is null, then no data is copied. For the ‘type’ parameter, the following values are valid: 0 (data) and 1 (metadata). For 0 (data), the data is the raw pixel data of the bitmap. This data may be compressed. For 1 (metadata), the data is the raw metadata in XML-format (UTF8-encoded).

Parameters:
  • sub_block_object – The sub block object.

  • type – The type - 0 for “pixel-data”, 1 for “sub-block metadata”.

  • size[inout] On input, the size of the memory block pointed to by ‘data’, on output the actual size of the available data.

  • data[out] Pointer where the data is to be copied to. At most the initial content of ‘size’ bytes are copied.

Returns:

An error-code indicating success or failure of the operation.