14#include "libCZI_Metadata.h"
15#include "libCZI_Pixels.h"
29 std::uint8_t Data4[8];
37 return this->Data1 == other.
Data1 &&
38 this->Data2 == other.
Data2 &&
39 this->Data3 == other.
Data3 &&
40 this->Data4[0] == other.
Data4[0] &&
41 this->Data4[1] == other.
Data4[1] &&
42 this->Data4[2] == other.
Data4[2] &&
43 this->Data4[3] == other.
Data4[3] &&
44 this->Data4[4] == other.
Data4[4] &&
45 this->Data4[5] == other.
Data4[5] &&
46 this->Data4[6] == other.
Data4[6] &&
47 this->Data4[7] == other.
Data4[7];
56 return !(*
this == other);
65 if (this->Data1 != other.
Data1)
67 return this->Data1 < other.
Data1 ? -1 : 1;
70 if (this->Data2 != other.
Data2)
72 return this->Data2 < other.
Data2 ? -1 : 1;
75 if (this->Data3 != other.
Data3)
77 return this->Data3 < other.
Data3 ? -1 : 1;
80 for (
int i = 0; i < 8; ++i)
82 if (this->Data4[i] != other.
Data4[i])
84 return this->Data4[i] < other.
Data4[i] ? -1 : 1;
92 class ISubBlockRepository;
93 class IDisplaySettings;
94 class ICompressParameters;
130 static int CalcMd5SumHash(
const void* ptrData,
size_t sizeData, std::uint8_t* ptrHash,
int hashSize);
140 static std::vector<std::uint8_t>
Create8BitLookUpTableFromSplines(
int tableElementCnt,
float blackPoint,
float whitePoint,
const std::vector<libCZI::IDisplaySettings::SplineData>& splineData);
168 static std::vector<libCZI::IDisplaySettings::SplineData>
CalcSplineDataFromPoints(
int pointCnt, std::function< std::tuple<double, double>(
int idx)> getPoint);
194 if (physicalSize.
w > physicalSize.
h)
196 return static_cast<float>(physicalSize.
w) / logicalRect.
w;
200 return static_cast<float>(physicalSize.
h) / logicalRect.
h;
212 if (physicalSize.
w > physicalSize.
h)
214 return static_cast<float>(physicalSize.
w) / logicalSize.
w;
218 return static_cast<float>(physicalSize.
h) / logicalSize.
h;
315 static std::shared_ptr<ICziMetadataBuilder>
CreateSubBlockMetadata(
const std::function<
bool(
int, std::tuple<std::string, std::string>&)>& tagsEnum =
nullptr);
349 return mIndex != (std::numeric_limits<int>::max)() && mIndex != (std::numeric_limits<int>::min)();
354 static const char*
const KEY_COMPRESS_EXPLICIT_LEVEL ;
360 static const char*
const KEY_COMPRESS_PRE_PROCESS ;
370 static const char*
const VALUE_COMPRESS_HILO_BYTE_UNPACK ;
374 using CompressionOption = std::pair<libCZI::CompressionMode, std::shared_ptr<libCZI::ICompressParameters>>;
Implementation of a class representing an interval (and implementing the libCZI::IDimBounds-interface...
Definition libCZI_DimCoordinate.h:288
Implementation of a class representing a coordinate (and implementing the IDimCoordinate-interface).
Definition libCZI_DimCoordinate.h:149
Definition libCZI_Pixels.h:197
Interface used to represent an interval (for several dimensions).
Definition libCZI_DimCoordinate.h:80
Interface used to represent a coordinate (in the space of the dimensions identified by DimensionIndex...
Definition libCZI_DimCoordinate.h:37
Interface for sub-block repository. This interface is used to access the sub-blocks in a CZI-file.
Definition libCZI.h:534
A bunch of utility functions.
Definition libCZI_Utilities.h:98
static bool HasSameDimensions(const IDimCoordinate *a, const IDimCoordinate *b)
static int CalcMd5SumHash(libCZI::IBitmapData *bm, std::uint8_t *ptrHash, int hashSize)
static int Compare(const IDimCoordinate *a, const IDimCoordinate *b)
static std::int32_t CompressionModeToCompressionIdentifier(libCZI::CompressionMode mode)
static const char * PixelTypeToInformalString(libCZI::PixelType pixeltype)
static std::shared_ptr< libCZI::IBitmapData > NearestNeighborResize(libCZI::IBitmapData *bmSrc, int dstWidth, int dstHeight)
static bool IsValidMindex(int mIndex)
Definition libCZI_Utilities.h:347
static std::vector< libCZI::IDisplaySettings::SplineData > CalcSplineDataFromPoints(int pointCnt, std::function< std::tuple< double, double >(int idx)> getPoint)
static libCZI::CompressionMode CompressionModeFromRawCompressionIdentifier(std::int32_t m)
static bool EnumAllCoordinates(const libCZI::CDimBounds &bounds, const std::function< bool(std::uint64_t, const libCZI::CDimCoordinate &coord)> &func)
static bool StringToDimCoordinate(const char *sz, libCZI::CDimCoordinate *coord)
static std::vector< std::uint8_t > Create8BitLookUpTableFromSplines(int tableElementCnt, float blackPoint, float whitePoint, const std::vector< libCZI::IDisplaySettings::SplineData > &splineData)
static CompressionOption ParseCompressionOptions(const std::string &options)
std::pair< libCZI::CompressionMode, std::shared_ptr< libCZI::ICompressParameters > > CompressionOption
Definition libCZI_Utilities.h:374
static std::shared_ptr< libCZI::IBitmapData > NearestNeighborResize(libCZI::IBitmapData *bmSrc, int dstWidth, int dstHeight, const DblRect &roiSrc, const DblRect &roiDest)
static std::uint8_t GetBytesPerPixel(libCZI::PixelType pixelType)
static std::string DimBoundsToString(const libCZI::IDimBounds *bounds)
static std::vector< std::uint8_t > Create8BitLookUpTableFromGamma(int tableElementCnt, float blackPoint, float whitePoint, float gamma)
static std::vector< std::uint16_t > Create16BitLookUpTableFromGamma(int tableElementCnt, float blackPoint, float whitePoint, float gamma)
static std::shared_ptr< libCZI::IIndexSet > IndexSetFromString(const std::wstring &s)
static const char * CompressionModeToInformalString(libCZI::CompressionMode compressionMode)
static void FillBitmap(libCZI::IBitmapData *bm, const libCZI::RgbFloatColor &floatColor)
static float CalcZoom(const libCZI::IntSize &logicalSize, const libCZI::IntSize &physicalSize)
Definition libCZI_Utilities.h:210
static libCZI::DimensionIndex CharToDimension(char c)
static libCZI::PixelType TryDeterminePixelTypeForChannel(libCZI::ISubBlockRepository *repository, int channelIdx)
static std::shared_ptr< ICziMetadataBuilder > CreateSubBlockMetadata(const std::function< bool(int, std::tuple< std::string, std::string > &)> &tagsEnum=nullptr)
static int CalcMd5SumHash(const void *ptrData, size_t sizeData, std::uint8_t *ptrHash, int hashSize)
static char DimensionToChar(libCZI::DimensionIndex dim)
static std::string DimCoordinateToString(const libCZI::IDimCoordinate *coord)
static float CalcZoom(const libCZI::IntRect &logicalRect, const libCZI::IntSize &physicalSize)
Definition libCZI_Utilities.h:192
External interfaces, classes, functions and structs are found in the namespace "libCZI".
Definition libCZI.h:31
DimensionIndex
Values that represent dimension indexes.
Definition libCZI_DimCoordinate.h:17
CompressionMode
An enum specifying the compression method.
Definition libCZI_Pixels.h:161
PixelType
An enum representing a pixel-type.
Definition libCZI_Pixels.h:144
A rectangle (with double coordinates).
Definition libCZI_Pixels.h:109
Represents a globally unique identifier (GUID) consisting of four unsigned 32-bit integers.
Definition libCZI_Utilities.h:25
bool operator!=(const GUID &other) const
Provide an inequality comparison operator between GUID objects.
Definition libCZI_Utilities.h:54
std::uint32_t Data1
The first component of the GUID.
Definition libCZI_Utilities.h:26
std::uint16_t Data2
The second component of the GUID.
Definition libCZI_Utilities.h:27
int compare(const GUID &other) const
Provide a method to lexically compare two GUID objects.
Definition libCZI_Utilities.h:63
std::uint8_t Data4[8]
The fourth component of the GUID, represented as an array of 8 bytes.
Definition libCZI_Utilities.h:29
bool operator==(const GUID &other) const
Provide an equality comparison operator between GUID objects.
Definition libCZI_Utilities.h:35
std::uint16_t Data3
The third component of the GUID.
Definition libCZI_Utilities.h:28
A rectangle (with integer coordinates).
Definition libCZI_Pixels.h:17
int h
The height of the rectangle.
Definition libCZI_Pixels.h:21
int w
The width of the rectangle.
Definition libCZI_Pixels.h:20
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
A structure representing an R-G-B-color triple (as floats).
Definition libCZI_Pixels.h:136