libCZI
Reading and Writing CZI documents made easy
Loading...
Searching...
No Matches
libCZI.h
1// SPDX-FileCopyrightText: 2017-2022 Carl Zeiss Microscopy GmbH
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#pragma once
6
7#include <functional>
8#include <memory>
9#include <map>
10#include <limits>
11#include <string>
12#include <vector>
13
14#include "ImportExport.h"
15
16#include "libCZI_exceptions.h"
17#include "libCZI_DimCoordinate.h"
18#include "libCZI_Pixels.h"
19#include "libCZI_Metadata.h"
20#include "libCZI_Metadata2.h"
21#include "libCZI_Utilities.h"
22#include "libCZI_Compositor.h"
23#include "libCZI_Site.h"
24#include "libCZI_compress.h"
25#include "libCZI_StreamsLib.h"
26
27// virtual d'tor -> https://isocpp.org/wiki/faq/virtual-functions#virtual-dtors
28
30namespace libCZI
31{
35 enum class SiteObjectType
36 {
37 Default,
40 };
41
42 class ISite;
43
49
55 LIBCZI_API void SetSiteObject(libCZI::ISite* pSite);
56
57 class ICZIReader;
58 class ICziWriter;
59 class ICziReaderWriter;
60 class IStream;
61 class IOutputStream;
63 class ISubBlock;
64 class IMetadataSegment;
66 class IAttachment;
67 class ISubBlockCache;
68
72 {
75
77 std::string repositoryUrl;
78
80 std::string repositoryBranch;
81
83 std::string repositoryTag;
84 };
85
93 LIBCZI_API void GetLibCZIVersion(int* pMajor, int* pMinor = nullptr, int* pPatch = nullptr, int* pTweak = nullptr);
94
98
101 LIBCZI_API std::shared_ptr<ICZIReader> CreateCZIReader();
102
106 {
110 };
111
116 LIBCZI_API std::shared_ptr<ICziWriter> CreateCZIWriter(const CZIWriterOptions* options = nullptr);
117
120 LIBCZI_API std::shared_ptr<ICziReaderWriter> CreateCZIReaderWriter();
121
125 LIBCZI_API std::shared_ptr<IBitmapData> CreateBitmapFromSubBlock(ISubBlock* subBlk);
126
130 LIBCZI_API std::shared_ptr<ICziMetadata> CreateMetaFromMetadataSegment(IMetadataSegment* metadataSegment);
131
136 LIBCZI_API std::shared_ptr<IAccessor> CreateAccesor(std::shared_ptr<ISubBlockRepository> repository, AccessorType accessorType);
137
142 LIBCZI_API std::shared_ptr<IStream> CreateStreamFromFile(const wchar_t* szFilename);
143
148 LIBCZI_API std::shared_ptr<IStream> CreateStreamFromMemory(std::shared_ptr<const void> ptr, size_t dataSize);
149
153 LIBCZI_API std::shared_ptr<IStream> CreateStreamFromMemory(IAttachment* attachment);
154
162 LIBCZI_API std::shared_ptr<IOutputStream> CreateOutputStreamForFile(const wchar_t* szFilename, bool overwriteExisting);
163
169 LIBCZI_API std::shared_ptr<IInputOutputStream> CreateInputOutputStreamForFile(const wchar_t* szFilename);
170
173 LIBCZI_API std::shared_ptr<ICziMetadataBuilder> CreateMetadataBuilder();
174
177 LIBCZI_API std::shared_ptr<ISubBlockCache> CreateSubBlockCache();
178
183 LIBCZI_API std::shared_ptr<ICziMetadataBuilder> CreateMetadataBuilderFromXml(const std::string& xml);
184
191 {
192 public:
205 virtual void Read(std::uint64_t offset, void* pv, std::uint64_t size, std::uint64_t* ptrBytesRead) = 0;
206
207 virtual ~IStream() = default;
208 };
209
215 {
216 public:
217
224 virtual void Write(std::uint64_t offset, const void* pv, std::uint64_t size, std::uint64_t* ptrBytesWritten) = 0;
225 virtual ~IOutputStream() = default;
226 };
227
230 {
231 };
232
235 {
239 std::int32_t compressionModeRaw;
240
243
246
249
252
255
259
264 double GetZoom() const
265 {
266 if (this->physicalSize.w > this->physicalSize.h)
267 {
268 return static_cast<double>(this->physicalSize.w) / this->logicalRect.w;
269 }
270
271 return static_cast<double>(this->physicalSize.h) / this->logicalRect.h;
272 }
273
278 {
279 return Utils::CompressionModeFromRawCompressionIdentifier(this->compressionModeRaw);
280 }
281
284 bool IsMindexValid() const
285 {
286 return libCZI::Utils::IsValidMindex(this->mIndex);
287 }
288 };
289
293 {
294 std::uint64_t filePosition;
295 };
296
300 {
301 public:
309
312 virtual const SubBlockInfo& GetSubBlockInfo() const = 0;
313
319 virtual void DangerousGetRawData(MemBlkType type, const void*& ptr, size_t& size) const = 0;
320
325 virtual std::shared_ptr<const void> GetRawData(MemBlkType type, size_t* ptrSize) = 0;
326
336 virtual std::shared_ptr<IBitmapData> CreateBitmap() = 0;
337
338 virtual ~ISubBlock() = default;
339
344 template <class Q>
345 void DangerousGetRawData(MemBlkType type, const Q*& ptr, size_t& size) const
346 {
347 const void* p;
348 this->DangerousGetRawData(type, p, size);
349 ptr = static_cast<const Q*>(p);
350 }
351 };
352
355 {
358 std::string name;
359 };
360
363 {
364 public:
367 virtual const AttachmentInfo& GetAttachmentInfo() const = 0;
368
373 virtual void DangerousGetRawData(const void*& ptr, size_t& size) const = 0;
374
378 virtual std::shared_ptr<const void> GetRawData(size_t* ptrSize) = 0;
379
380 virtual ~IAttachment() = default;
381
385 template <class Q>
386 void DangerousGetRawData(const Q*& ptr, size_t& size) const
387 {
388 const void* p;
389 this->DangerousGetRawData(p, size);
390 ptr = static_cast<Q*>(p);
391 }
392 };
393
396 {
397 public:
404
409 virtual std::shared_ptr<const void> GetRawData(MemBlkType type, size_t* ptrSize) = 0;
410
416 virtual void DangerousGetRawData(MemBlkType type, const void*& ptr, size_t& size) const = 0;
417
418 virtual ~IMetadataSegment() = default;
419
422 std::shared_ptr<ICziMetadata> CreateMetaFromMetadataSegment() { return libCZI::CreateMetaFromMetadataSegment(this); }
423 };
424
434
437 {
441
445
449
453
459
463
468 std::map<int, BoundingBoxes> sceneBoundingBoxes;
469
474 bool IsMIndexValid() const
475 {
476 return this->minMindex <= this->maxMindex ? true : false;
477 }
478
481 {
482 this->subBlockCount = -1;
483 this->boundingBox.Invalidate();
484 this->boundingBoxLayer0Only.Invalidate();
485 this->dimBounds.Clear();
486 this->sceneBoundingBoxes.clear();
487 this->minMindex = (std::numeric_limits<int>::max)();
488 this->maxMindex = (std::numeric_limits<int>::min)();
489 }
490 };
491
494 {
505 {
506 std::uint8_t minificationFactor;
507 std::uint8_t pyramidLayerNo;
508
512 bool IsLayer0() const { return this->minificationFactor == 0 && this->pyramidLayerNo == 0; }
513
517 bool IsNotIdentifiedAsPyramidLayer() const { return this->minificationFactor == 0xff && this->pyramidLayerNo == 0xff; }
518 };
519
526
529 std::map<int, std::vector<PyramidLayerStatistics>> scenePyramidStatistics;
530 };
531
533 class LIBCZI_API ISubBlockRepository
534 {
535 public:
541 virtual void EnumerateSubBlocks(const std::function<bool(int index, const SubBlockInfo& info)>& funcEnum) = 0;
542
551 virtual void EnumSubset(const IDimCoordinate* planeCoordinate, const IntRect* roi, bool onlyLayer0, const std::function<bool(int index, const SubBlockInfo& info)>& funcEnum) = 0;
552
558 virtual std::shared_ptr<ISubBlock> ReadSubBlock(int index) = 0;
559
571 virtual bool TryGetSubBlockInfoOfArbitrarySubBlockInChannel(int channelIndex, SubBlockInfo& info) = 0;
572
578 virtual bool TryGetSubBlockInfo(int index, SubBlockInfo* info) const = 0;
579
583
589
590 virtual libCZI::IntPointAndFrameOfReference TransformPoint(const libCZI::IntPointAndFrameOfReference& source_point, libCZI::CZIFrameOfReference destination_frame_of_reference) = 0;
591
592 virtual ~ISubBlockRepository() = default;
593
594 libCZI::IntRectAndFrameOfReference TransformRectangle(const libCZI::IntRectAndFrameOfReference& source_rectangle, libCZI::CZIFrameOfReference destination_frame_of_reference)
595 {
596 libCZI::IntPointAndFrameOfReference source_point_and_frame_of_reference;
597 source_point_and_frame_of_reference.frame_of_reference = source_rectangle.frame_of_reference;
598 source_point_and_frame_of_reference.point = { source_rectangle.rectangle.x, source_rectangle.rectangle.y };
599 libCZI::IntPoint transformed_point_upper_left = this->TransformPoint(source_point_and_frame_of_reference, destination_frame_of_reference).point;
600 source_point_and_frame_of_reference.point = { source_rectangle.rectangle.x + source_rectangle.rectangle.w, source_rectangle.rectangle.y + source_rectangle.rectangle.h };
601 libCZI::IntPointAndFrameOfReference transformed_point_lower_right = this->TransformPoint(source_point_and_frame_of_reference, destination_frame_of_reference);
602 return
603 {
604 transformed_point_lower_right.frame_of_reference,
605 {
606 transformed_point_upper_left.x,
607 transformed_point_upper_left.y,
608 transformed_point_lower_right.point.x - transformed_point_upper_left.x,
609 transformed_point_lower_right.point.y - transformed_point_upper_left.y
610 }
611 };
612 }
613 };
614
616 class LIBCZI_API ISubBlockRepositoryEx
617 {
618 public:
624 virtual void EnumerateSubBlocksEx(const std::function<bool(int index, const DirectorySubBlockInfo& info)>& funcEnum) = 0;
625
626 virtual ~ISubBlockRepositoryEx() = default;
627 };
628
630 class LIBCZI_API IAttachmentRepository
631 {
632 public:
639 virtual void EnumerateAttachments(const std::function<bool(int index, const AttachmentInfo& info)>& funcEnum) = 0;
640
648 virtual void EnumerateSubset(const char* contentFileType, const char* name, const std::function<bool(int index, const AttachmentInfo& info)>& funcEnum) = 0;
649
655 virtual std::shared_ptr<IAttachment> ReadAttachment(int index) = 0;
656
657 virtual ~IAttachmentRepository() = default;
658 };
659
669
673 {
674 public:
676 struct LIBCZI_API OpenOptions
677 {
684 bool lax_subblock_coordinate_checks{ true };
685
692 bool ignore_sizem_for_pyramid_subblocks{ false };
693
699
702 {
703 this->lax_subblock_coordinate_checks = true;
704 this->ignore_sizem_for_pyramid_subblocks = false;
705 this->default_frame_of_reference = libCZI::CZIFrameOfReference::Invalid;
706 }
707 };
708
719 virtual void Open(const std::shared_ptr<IStream>& stream, const OpenOptions* options = nullptr) = 0;
720
724
730 virtual std::shared_ptr<IMetadataSegment> ReadMetadataSegment() = 0;
731
740 virtual std::shared_ptr<IAccessor> CreateAccessor(AccessorType accessorType) = 0;
741
748 virtual void Close() = 0;
749 public:
752 std::shared_ptr<ISingleChannelTileAccessor> CreateSingleChannelTileAccessor()
753 {
754 return std::dynamic_pointer_cast<ISingleChannelTileAccessor, IAccessor>(this->CreateAccessor(libCZI::AccessorType::SingleChannelTileAccessor));
755 }
756
759 std::shared_ptr<ISingleChannelPyramidLayerTileAccessor> CreateSingleChannelPyramidLayerTileAccessor()
760 {
761 return std::dynamic_pointer_cast<ISingleChannelPyramidLayerTileAccessor, IAccessor>(this->CreateAccessor(libCZI::AccessorType::SingleChannelPyramidLayerTileAccessor));
762 }
763
766 std::shared_ptr<ISingleChannelScalingTileAccessor> CreateSingleChannelScalingTileAccessor()
767 {
768 return std::dynamic_pointer_cast<ISingleChannelScalingTileAccessor, IAccessor>(this->CreateAccessor(libCZI::AccessorType::SingleChannelScalingTileAccessor));
769 }
770 };
771}
772
773#include "libCZI_Helpers.h"
774#include "libCZI_Write.h"
775#include "libCZI_ReadWrite.h"
Implementation of a class representing an interval (and implementing the libCZI::IDimBounds-interface...
Definition libCZI_DimCoordinate.h:288
void Clear(libCZI::DimensionIndex dimension)
Definition libCZI_DimCoordinate.h:356
Implementation of a class representing a coordinate (and implementing the IDimCoordinate-interface).
Definition libCZI_DimCoordinate.h:149
Representation of an attachment. An attachment is a binary blob, its inner structure is opaque.
Definition libCZI.h:363
void DangerousGetRawData(const Q *&ptr, size_t &size) const
Definition libCZI.h:386
virtual std::shared_ptr< const void > GetRawData(size_t *ptrSize)=0
virtual void DangerousGetRawData(const void *&ptr, size_t &size) const =0
virtual const AttachmentInfo & GetAttachmentInfo() const =0
Interface for the attachment repository. This interface is used to access the attachments in a CZI-fi...
Definition libCZI.h:631
virtual std::shared_ptr< IAttachment > ReadAttachment(int index)=0
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
Definition libCZI.h:673
std::shared_ptr< ISingleChannelPyramidLayerTileAccessor > CreateSingleChannelPyramidLayerTileAccessor()
Definition libCZI.h:759
std::shared_ptr< ISingleChannelScalingTileAccessor > CreateSingleChannelScalingTileAccessor()
Definition libCZI.h:766
virtual std::shared_ptr< IAccessor > CreateAccessor(AccessorType accessorType)=0
std::shared_ptr< ISingleChannelTileAccessor > CreateSingleChannelTileAccessor()
Definition libCZI.h:752
virtual std::shared_ptr< IMetadataSegment > ReadMetadataSegment()=0
virtual FileHeaderInfo GetFileHeaderInfo()=0
virtual void Close()=0
virtual void Open(const std::shared_ptr< IStream > &stream, const OpenOptions *options=nullptr)=0
Definition libCZI_ReadWrite.h:48
Definition libCZI_Write.h:408
Interface used to represent a coordinate (in the space of the dimensions identified by DimensionIndex...
Definition libCZI_DimCoordinate.h:37
Interface for a read-write-stream.
Definition libCZI.h:230
Interface representing the metadata-segment.
Definition libCZI.h:396
virtual std::shared_ptr< const void > GetRawData(MemBlkType type, size_t *ptrSize)=0
MemBlkType
Values that represent the two different data types found in the metadata-segment.
Definition libCZI.h:400
@ XmlMetadata
The metadata (in UTF8-XML-format)
Definition libCZI.h:401
@ Attachment
The attachment (not currently used).
Definition libCZI.h:402
virtual void DangerousGetRawData(MemBlkType type, const void *&ptr, size_t &size) const =0
std::shared_ptr< ICziMetadata > CreateMetaFromMetadataSegment()
Definition libCZI.h:422
Definition libCZI.h:215
virtual void Write(std::uint64_t offset, const void *pv, std::uint64_t size, std::uint64_t *ptrBytesWritten)=0
Definition libCZI_Site.h:62
Definition libCZI.h:191
virtual void Read(std::uint64_t offset, void *pv, std::uint64_t size, std::uint64_t *ptrBytesRead)=0
Definition libCZI_Compositor.h:138
Definition libCZI.h:300
virtual std::shared_ptr< IBitmapData > CreateBitmap()=0
MemBlkType
Values that represent the three different data types found in a sub-block.
Definition libCZI.h:304
@ Attachment
An enum constant representing the attachment (of a sub-block).
Definition libCZI.h:307
@ Data
An enum constant representing the bitmap-data.
Definition libCZI.h:306
@ Metadata
An enum constant representing the metadata.
Definition libCZI.h:305
virtual std::shared_ptr< const void > GetRawData(MemBlkType type, size_t *ptrSize)=0
virtual const SubBlockInfo & GetSubBlockInfo() const =0
virtual void DangerousGetRawData(MemBlkType type, const void *&ptr, size_t &size) const =0
void DangerousGetRawData(MemBlkType type, const Q *&ptr, size_t &size) const
Definition libCZI.h:345
Additional functionality for the subblock-repository, providing some specialized and not commonly use...
Definition libCZI.h:617
virtual void EnumerateSubBlocksEx(const std::function< bool(int index, const DirectorySubBlockInfo &info)> &funcEnum)=0
Interface for sub-block repository. This interface is used to access the sub-blocks in a CZI-file.
Definition libCZI.h:534
virtual void EnumerateSubBlocks(const std::function< bool(int index, const SubBlockInfo &info)> &funcEnum)=0
virtual SubBlockStatistics GetStatistics()=0
virtual std::shared_ptr< ISubBlock > ReadSubBlock(int index)=0
virtual bool TryGetSubBlockInfo(int index, SubBlockInfo *info) const =0
virtual PyramidStatistics GetPyramidStatistics()=0
virtual void EnumSubset(const IDimCoordinate *planeCoordinate, const IntRect *roi, bool onlyLayer0, const std::function< bool(int index, const SubBlockInfo &info)> &funcEnum)=0
virtual bool TryGetSubBlockInfoOfArbitrarySubBlockInChannel(int channelIndex, SubBlockInfo &info)=0
static bool IsValidMindex(int mIndex)
Definition libCZI_Utilities.h:347
static libCZI::CompressionMode CompressionModeFromRawCompressionIdentifier(std::int32_t m)
External interfaces, classes, functions and structs are found in the namespace "libCZI".
Definition libCZI.h:31
LIBCZI_API std::shared_ptr< ICZIReader > CreateCZIReader()
LIBCZI_API void SetSiteObject(libCZI::ISite *pSite)
LIBCZI_API std::shared_ptr< IBitmapData > CreateBitmapFromSubBlock(ISubBlock *subBlk)
LIBCZI_API std::shared_ptr< ICziMetadata > CreateMetaFromMetadataSegment(IMetadataSegment *metadataSegment)
LIBCZI_API std::shared_ptr< IStream > CreateStreamFromMemory(std::shared_ptr< const void > ptr, size_t dataSize)
LIBCZI_API std::shared_ptr< ICziMetadataBuilder > CreateMetadataBuilderFromXml(const std::string &xml)
AccessorType
Values that represent the accessor types.
Definition libCZI_Compositor.h:22
@ SingleChannelTileAccessor
The single-channel-tile accessor (associated interface: ISingleChannelTileAccessor).
@ SingleChannelPyramidLayerTileAccessor
The single-channel-pyramid-layer-tile accessor (associated interface: ISingleChannelPyramidLayerTileA...
@ SingleChannelScalingTileAccessor
The scaling-single-channel-tile accessor (associated interface: ISingleChannelScalingTileAccessor).
CompressionMode
An enum specifying the compression method.
Definition libCZI_Pixels.h:161
LIBCZI_API std::shared_ptr< ISubBlockCache > CreateSubBlockCache()
LIBCZI_API ISite * GetDefaultSiteObject(libCZI::SiteObjectType type)
LIBCZI_API std::shared_ptr< IInputOutputStream > CreateInputOutputStreamForFile(const wchar_t *szFilename)
SubBlockPyramidType
Definition libCZI_Pixels.h:174
SiteObjectType
Definition libCZI.h:36
@ WithJxrDecoder
An enum constant representing a Site-object using the internal JXRLib.
@ Default
An enum constant representing the default option (which is JXRLib)
@ WithWICDecoder
An enum constant representing a Site-object using the Windows WIC-codec. Note that this option is onl...
CZIFrameOfReference
Values that represent different frame of reference.
Definition libCZI_Pixels.h:86
@ Invalid
Invalid frame of reference.
LIBCZI_API std::shared_ptr< ICziReaderWriter > CreateCZIReaderWriter()
LIBCZI_API std::shared_ptr< ICziMetadataBuilder > CreateMetadataBuilder()
LIBCZI_API void GetLibCZIBuildInformation(BuildInformation &info)
LIBCZI_API std::shared_ptr< IAccessor > CreateAccesor(std::shared_ptr< ISubBlockRepository > repository, AccessorType accessorType)
PixelType
An enum representing a pixel-type.
Definition libCZI_Pixels.h:144
LIBCZI_API std::shared_ptr< IOutputStream > CreateOutputStreamForFile(const wchar_t *szFilename, bool overwriteExisting)
LIBCZI_API void GetLibCZIVersion(int *pMajor, int *pMinor=nullptr, int *pPatch=nullptr, int *pTweak=nullptr)
LIBCZI_API std::shared_ptr< ICziWriter > CreateCZIWriter(const CZIWriterOptions *options=nullptr)
LIBCZI_API std::shared_ptr< IStream > CreateStreamFromFile(const wchar_t *szFilename)
Information about an attachment.
Definition libCZI.h:355
char contentFileType[9]
A null-terminated character array identifying the content of the attachment.
Definition libCZI.h:357
std::string name
A string identifying the content of the attachment.
Definition libCZI.h:358
libCZI::GUID contentGuid
A Guid identifying the content of the attachment.
Definition libCZI.h:356
This structure gathers the bounding-boxes determined from all sub-blocks and only be those on pyramid...
Definition libCZI.h:427
IntRect boundingBoxLayer0
The bounding-boxes determined only from sub-blocks of pyramid-layer 0.
Definition libCZI.h:432
IntRect boundingBox
The bounding-box determined from all sub-blocks.
Definition libCZI.h:429
Definition libCZI.h:72
std::string repositoryTag
The tag or hash of the repository - if available.
Definition libCZI.h:83
std::string repositoryUrl
The URL of the repository - if available.
Definition libCZI.h:77
std::string repositoryBranch
The branch - if available.
Definition libCZI.h:80
std::string compilerIdentification
The compiler identification. This is a free-form string.
Definition libCZI.h:74
Definition libCZI.h:106
bool allow_duplicate_subblocks
Definition libCZI.h:109
Definition libCZI.h:293
std::uint64_t filePosition
The file position of the subblock.
Definition libCZI.h:294
Global information about the CZI-file (from the CZI-fileheader-segment).
Definition libCZI.h:662
libCZI::GUID fileGuid
Definition libCZI.h:665
int majorVersion
The major version.
Definition libCZI.h:666
int minorVersion
The minor version.
Definition libCZI.h:667
Represents a globally unique identifier (GUID) consisting of four unsigned 32-bit integers.
Definition libCZI_Utilities.h:25
This structure gathers the settings for controlling the 'Open' operation of the CZIReader-class.
Definition libCZI.h:677
void SetDefault()
Sets the the default.
Definition libCZI.h:701
This structure combines a point with a specification of the frame of reference.
Definition libCZI_Pixels.h:102
libCZI::CZIFrameOfReference frame_of_reference
The frame of reference.
Definition libCZI_Pixels.h:103
IntPoint point
The point.
Definition libCZI_Pixels.h:104
A point (with integer coordinates).
Definition libCZI_Pixels.h:79
This structure combines a rectangle with a specification of the frame of reference.
Definition libCZI_Pixels.h:95
libCZI::CZIFrameOfReference frame_of_reference
The frame of reference.
Definition libCZI_Pixels.h:96
libCZI::IntRect rectangle
The rectangle.
Definition libCZI_Pixels.h:97
A rectangle (with integer coordinates).
Definition libCZI_Pixels.h:17
int h
The height of the rectangle.
Definition libCZI_Pixels.h:21
int y
The y-coordinate of the upper-left point of the rectangle.
Definition libCZI_Pixels.h:19
int x
The x-coordinate of the upper-left point of the rectangle.
Definition libCZI_Pixels.h:18
int w
The width of the rectangle.
Definition libCZI_Pixels.h:20
void Invalidate()
Invalidates this object.
Definition libCZI_Pixels.h:24
A structure representing a size (width and height) in integers.
Definition libCZI_Pixels.h:121
std::uint32_t h
The height.
Definition libCZI_Pixels.h:123
std::uint32_t w
The width.
Definition libCZI_Pixels.h:122
std::uint8_t minificationFactor
Factor by which adjacent pyramid-layers are shrunk. Commonly used in CZI are 2 or 3.
Definition libCZI.h:506
bool IsLayer0() const
Definition libCZI.h:512
std::uint8_t pyramidLayerNo
The pyramid layer number.
Definition libCZI.h:507
bool IsNotIdentifiedAsPyramidLayer() const
Definition libCZI.h:517
Information about a pyramid-layer.
Definition libCZI.h:522
int count
The number of sub-blocks which are present in the pyramid-layer.
Definition libCZI.h:524
PyramidLayerInfo layerInfo
This identifies the pyramid-layer.
Definition libCZI.h:523
Statistics about the pyramid-layers.
Definition libCZI.h:494
std::map< int, std::vector< PyramidLayerStatistics > > scenePyramidStatistics
Definition libCZI.h:529
Information about a sub-block.
Definition libCZI.h:235
CompressionMode GetCompressionMode() const
Definition libCZI.h:277
PixelType pixelType
The pixel type of the sub-block.
Definition libCZI.h:242
int mIndex
The M-index of the sub-block (if available). If not available, it has the value std::numeric_limits<i...
Definition libCZI.h:254
std::int32_t compressionModeRaw
Definition libCZI.h:239
bool IsMindexValid() const
Definition libCZI.h:284
SubBlockPyramidType pyramidType
Definition libCZI.h:258
libCZI::IntSize physicalSize
The physical size of the bitmap (which may be different to the size of logicalRect).
Definition libCZI.h:251
libCZI::IntRect logicalRect
The rectangle where the bitmap (in this sub-block) is located.
Definition libCZI.h:248
double GetZoom() const
Definition libCZI.h:264
libCZI::CDimCoordinate coordinate
The coordinate of the sub-block.
Definition libCZI.h:245
Statistics about all sub-blocks found in a CZI-document.
Definition libCZI.h:437
CDimBounds dimBounds
Definition libCZI.h:462
int subBlockCount
Definition libCZI.h:440
int minMindex
Definition libCZI.h:444
void Invalidate()
Invalidates this object.
Definition libCZI.h:480
IntRect boundingBoxLayer0Only
Definition libCZI.h:458
bool IsMIndexValid() const
Definition libCZI.h:474
IntRect boundingBox
Definition libCZI.h:452
std::map< int, BoundingBoxes > sceneBoundingBoxes
Definition libCZI.h:468
int maxMindex
Definition libCZI.h:448