libCZI
Reading CZI documents made easy
libCZI_Metadata.h
1 //******************************************************************************
2 //
3 // libCZI is a reader for the CZI fileformat written in C++
4 // Copyright (C) 2017 Zeiss Microscopy GmbH
5 //
6 // This program is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 //
19 // To obtain a commercial version please contact Zeiss Microscopy GmbH.
20 //
21 //******************************************************************************
22 
23 #pragma once
24 
25 #include "ImportExport.h"
26 #include "libCZI_DimCoordinate.h"
27 #include "libCZI_Pixels.h"
28 #include <limits>
29 #include <string>
30 #include <vector>
31 #include <map>
32 #include <functional>
33 #include <memory>
34 #include <cmath>
35 
36 namespace libCZI
37 {
38  struct SubBlockStatistics;
39 
41  struct LIBCZI_API XmlDateTime
42  {
43  int sec;
44  int min;
45  int hour;
46  int mday;
47  int mon;
48  int year;
49 
50  bool isUTC;
51 
54 
57 
59  void Clear()
60  {
61  this->sec = this->min = this->hour = this->mday = this->mon = this->year = 0;
62  this->isUTC = false;
63  this->offsetHours = (std::numeric_limits<int>::min)();
64  this->offsetMinutes = (std::numeric_limits<int>::min)();
65  }
66 
70  bool HasTimeZoneOffset() const
71  {
72  if (this->isUTC)
73  {
74  return false;
75  }
76 
77  if (this->offsetHours <= -24 || this->offsetHours >= 24 || this->offsetMinutes >= 60 || this->offsetMinutes < 0)
78  {
79  return false;
80  }
81 
82  return true;
83  }
84 
88  std::string ToXmlString() const;
89 
93  std::wstring ToXmlWstring() const;
94 
97  bool IsValid() const;
98 
104  static bool TryParse(const char* sz, XmlDateTime* ptrDateTime);
105 
111  static bool TryParse(const wchar_t* szw, XmlDateTime* ptrDateTime);
112  };
113 
116  {
118  GeneralDocumentInfo() : name_valid(false), title_valid(false), userName_valid(false), description_valid(false), comment_valid(false), keywords_valid(false), rating_valid(false), rating(0), creationDateTime_valid(false) {}
119  bool name_valid;
120  std::wstring name;
121  bool title_valid;
122  std::wstring title;
124  std::wstring userName;
126  std::wstring description;
128  std::wstring comment;
130  std::wstring keywords;
132  int rating;
134  std::wstring creationDateTime;
135 
139  LIBCZI_API void SetName(const wchar_t* sz) { this->SetMember(&GeneralDocumentInfo::name, &GeneralDocumentInfo::name_valid, sz); }
140 
144  LIBCZI_API void SetName(const std::wstring& str) { this->SetName(str.c_str()); }
145 
149  LIBCZI_API void SetTitle(const wchar_t* sz) { this->SetMember(&GeneralDocumentInfo::title, &GeneralDocumentInfo::title_valid, sz); }
150 
154  LIBCZI_API void SetTitle(const std::wstring& str) { this->SetTitle(str.c_str()); }
155 
159  LIBCZI_API void SetUserName(const wchar_t* sz) { this->SetMember(&GeneralDocumentInfo::userName, &GeneralDocumentInfo::userName_valid, sz); }
160 
164  LIBCZI_API void SetUserName(const std::wstring& str) { this->SetUserName(str.c_str()); }
165 
169  LIBCZI_API void SetDescription(const wchar_t* sz) { this->SetMember(&GeneralDocumentInfo::description, &GeneralDocumentInfo::description_valid, sz); }
170 
174  LIBCZI_API void SetDescription(const std::wstring& str) { this->SetDescription(str.c_str()); }
175 
179  LIBCZI_API void SetComment(const wchar_t* sz) { this->SetMember(&GeneralDocumentInfo::comment, &GeneralDocumentInfo::comment_valid, sz); }
180 
184  LIBCZI_API void SetComment(const std::wstring& str) { this->SetComment(str.c_str()); }
185 
189  LIBCZI_API void SetKeywords(const wchar_t* sz) { this->SetMember(&GeneralDocumentInfo::keywords, &GeneralDocumentInfo::keywords_valid, sz); }
190 
194  LIBCZI_API void SetKeywords(const std::wstring& str) { this->SetKeywords(str.c_str()); }
195 
198  LIBCZI_API void SetRating(int rating) { this->rating = rating; this->rating_valid = rating >= 0 ? true : false; }
199 
203  LIBCZI_API void SetCreationDate(const wchar_t* sz) { this->SetMember(&GeneralDocumentInfo::creationDateTime, &GeneralDocumentInfo::creationDateTime_valid, sz); }
204 
208  LIBCZI_API void SetCreationDate(const std::wstring& str) { this->SetCreationDate(str.c_str()); }
209 
213  LIBCZI_API void SetCreationDate(const XmlDateTime* dateTime) { if (dateTime != nullptr && dateTime->IsValid()) { this->SetCreationDate(dateTime->ToXmlWstring()); } else { this->SetCreationDate(static_cast<const wchar_t*>(nullptr)); } }
214 
216  LIBCZI_API void Clear()
217  {
218  this->name_valid = this->title_valid = this->userName_valid = this->description_valid =
219  this->comment_valid = this->keywords_valid = this->rating_valid = this->creationDateTime_valid = false;
220  }
221  private:
222  void SetMember(std::wstring(GeneralDocumentInfo::* strMember), bool(GeneralDocumentInfo::* validMember), const wchar_t* str)
223  {
224  if (str == nullptr || *str == L'\0')
225  {
226  (this->*strMember).clear();
227  this->*validMember = false;
228  }
229  else
230  {
231  this->*strMember = str;
232  this->*validMember = true;
233  }
234  }
235  };
236 
238  struct LIBCZI_API ScalingInfo
239  {
241  ScalingInfo() : scaleX(std::numeric_limits<double>::quiet_NaN()), scaleY(std::numeric_limits<double>::quiet_NaN()), scaleZ(std::numeric_limits<double>::quiet_NaN()) {}
242  double scaleX;
243  double scaleY;
244  double scaleZ;
245 
249  bool IsScaleXValid() const { return !std::isnan(this->scaleX) && !std::isinf(this->scaleX); }
250 
254  bool IsScaleYValid() const { return !std::isnan(this->scaleY) && !std::isinf(this->scaleY); }
255 
259  bool IsScaleZValid() const { return !std::isnan(this->scaleZ) && !std::isinf(this->scaleZ); }
260 
268  bool IsScaleValid(char d) const
269  {
270  switch (d)
271  {
272  case 'x':case'X': return this->IsScaleXValid();
273  case 'y':case'Y': return this->IsScaleYValid();
274  case 'z':case'Z': return this->IsScaleZValid();
275  default: throw std::invalid_argument("invalid dimension");
276  }
277  }
278 
286  double GetScale(char d) const
287  {
288  switch (d)
289  {
290  case 'x':case'X': return this->scaleX;
291  case 'y':case'Y': return this->scaleY;
292  case 'z':case'Z': return this->scaleZ;
293  default: throw std::invalid_argument("invalid dimension");
294  }
295  }
296  };
297 
301  {
302  std::wstring defaultUnitFormatX;
303  std::wstring defaultUnitFormatY;
304  std::wstring defaultUnitFormatZ;
305 
313  LIBCZI_API std::wstring GetDefaultUnitFormat(char d) const
314  {
315  switch (d)
316  {
317  case 'x':case'X': return this->defaultUnitFormatX;
318  case 'y':case'Y': return this->defaultUnitFormatY;
319  case 'z':case'Z': return this->defaultUnitFormatZ;
320  default: throw std::invalid_argument("invalid dimension");
321  }
322  }
323  };
324 
326  class LIBCZI_API IDimensionInfo
327  {
328  public:
329 
332  virtual DimensionIndex GetDimension() const = 0;
333 
337  virtual void GetInterval(int* start, int* end) const = 0;
338 
339  virtual ~IDimensionInfo() {}
340  };
341 
343  class LIBCZI_API IDimensionZInfo
344  {
345  public:
353  enum class XyzHandedness : std::uint8_t
354  {
355  LeftHanded,
356  RightHanded,
357  Undefined
358  };
359 
369  enum class ZaxisDirection : std::uint8_t
370  {
371  FromSpecimenToObjective,
372  FromObjectiveToSpecimen,
373  Undefined
374  };
375 
380  enum class ZDriveMode : std::uint8_t
381  {
382  Continuous,
383  Step
384  };
385 
389  virtual bool TryGetReferencePosition(double* d) = 0;
390 
395  virtual bool TryGetIntervalDefinition(double* offset, double* increment) = 0;
396 
400  virtual bool TryGetPositionList(std::vector<double>* positions) = 0;
401 
405  virtual bool TryGetXyzHandedness(XyzHandedness* xyzHandedness) = 0;
406 
410  virtual bool TryGetZAxisDirection(ZaxisDirection* zAxisDirection) = 0;
411 
415  virtual bool TryGetZDriveMode(ZDriveMode* zdrivemode) = 0;
416 
420  virtual bool TryZDriveSpeed(double* zdrivespeed) = 0;
421  };
422 
424  class LIBCZI_API IDimensionTInfo
425  {
426  public:
431  virtual bool TryGetStartTime(XmlDateTime* dateTime) = 0;
432 
437  virtual bool TryGetIntervalDefinition(double* offset, double* increment) = 0;
438 
442  virtual bool TryGetOffsetsList(std::vector<double>* offsets) = 0;
443  };
444 
446  struct DisplaySettingsPOD;
448 
450  class LIBCZI_API IDisplaySettings
451  {
452  public:
455  {
456  double x;
457  double y;
458 
462  SplineControlPoint(double x, double y) : x(x), y(y) {};
463 
467  bool operator==(const SplineControlPoint& rhs) const { return this->x == rhs.x && this->y == rhs.y; }
468 
472  bool operator!=(const SplineControlPoint& rhs) const { return !this->operator==(rhs); }
473  };
474 
476  enum class GradationCurveMode : std::uint8_t
477  {
478  Linear,
479  Gamma,
480  Spline
481  };
482 
483 
488  enum class TintingMode : std::uint8_t
489  {
490  None = 0,
491  Color = 1,
492  LookUpTableExplicit = 2,
493  LookUpTableWellKnown = 3
494  };
495 
498  {
499  double a;
500  double b;
501  double c;
502  double d;
503 
509  double Get(int index) const
510  {
511  switch (index)
512  {
513  case 0: return this->a;
514  case 1: return this->b;
515  case 2: return this->c;
516  case 3: return this->d;
517  default: return std::numeric_limits<double>::quiet_NaN();
518  }
519  }
520  };
521 
523  struct SplineData
524  {
526  double xPos;
527 
530  };
531 
536  virtual void EnumChannels(std::function<bool(int chIndex)> func) const = 0;
537 
544  virtual std::shared_ptr<libCZI::IChannelDisplaySetting> GetChannelDisplaySettings(int chIndex) const = 0;
545 
546  virtual ~IDisplaySettings() {}
547 
551  static void Clone(const IDisplaySettings* disp, DisplaySettingsPOD& pod);
552  };
553 
555  class LIBCZI_API IChannelDisplaySetting
556  {
557  public:
561  virtual bool GetIsEnabled() const = 0;
562 
566  virtual float GetWeight() const = 0;
567 
574  virtual bool TryGetTintingColorRgb8(libCZI::Rgb8Color* pColor) const = 0;
575 
580  virtual void GetBlackWhitePoint(float* pBlack, float* pWhite) const = 0;
581 
585  virtual IDisplaySettings::GradationCurveMode GetGradationCurveMode() const = 0;
586 
592  virtual bool TryGetGamma(float* gamma)const = 0;
593 
605  virtual bool TryGetSplineControlPoints(std::vector<libCZI::IDisplaySettings::SplineControlPoint>* ctrlPts) const = 0;
606 
612  virtual bool TryGetSplineData(std::vector<libCZI::IDisplaySettings::SplineData>* data) const = 0;
613 
614  virtual ~IChannelDisplaySetting() {}
615 
619  static void Clone(const IChannelDisplaySetting* disp, ChannelDisplaySettingsPOD& pod);
620  };
621 
625  {
627  bool isEnabled;
628 
630  float weight;
631 
634 
637 
639  float blackPoint;
640 
642  float whitePoint;
643 
646 
648  float gamma;
649 
651  std::vector<libCZI::IDisplaySettings::SplineControlPoint> splineCtrlPoints;
652 
656  LIBCZI_API static IChannelDisplaySetting* CreateIChannelDisplaySetting(const ChannelDisplaySettingsPOD& pod);
657 
662  LIBCZI_API static std::shared_ptr<IChannelDisplaySetting> CreateIChannelDisplaySettingSp(const ChannelDisplaySettingsPOD& pod);
663 
666  LIBCZI_API void Clear()
667  {
668  this->isEnabled = false;
669  this->tintingMode = IDisplaySettings::TintingMode::None;
670  this->blackPoint = 0;
671  this->whitePoint = 1;
672  this->gradationCurveMode = IDisplaySettings::GradationCurveMode::Linear;
673  this->weight = 1;
674  this->gamma = 1;
675  }
676  };
677 
681  {
683  std::map<int, ChannelDisplaySettingsPOD > channelDisplaySettings;
684 
688  LIBCZI_API static libCZI::IDisplaySettings* CreateIDisplaySetting(const DisplaySettingsPOD& pod);
689 
694  LIBCZI_API static std::shared_ptr<libCZI::IDisplaySettings> CreateIDisplaySettingSp(const DisplaySettingsPOD& pod);
695  };
696 
698 
701  {
702  public:
705  virtual GeneralDocumentInfo GetGeneralDocumentInfo() const = 0;
706 
709  virtual libCZI::ScalingInfoEx GetScalingInfoEx() const = 0;
710 
713  virtual libCZI::ScalingInfo GetScalingInfo() const = 0;
714 
720  virtual void EnumDimensions(std::function<bool(DimensionIndex)> enumDimensions) = 0;
721 
727  virtual std::shared_ptr<IDimensionInfo> GetDimensionInfo(DimensionIndex dim) = 0;
728 
732  virtual std::shared_ptr<IDimensionZInfo> GetDimensionZInfo() = 0;
733 
737  virtual std::shared_ptr<IDimensionTInfo> GetDimensionTInfo() = 0;
738 
742  virtual std::shared_ptr<IDimensionsChannelsInfo> GetDimensionChannelsInfo() = 0;
743 
748  virtual std::shared_ptr<IDisplaySettings> GetDisplaySettings() const = 0;
749 
750  virtual ~ICziMultiDimensionDocumentInfo() {}
751 
754  std::vector<DimensionIndex> GetDimensions()
755  {
756  std::vector<DimensionIndex> vec;
757  this->EnumDimensions([&](DimensionIndex i)->bool {vec.push_back(i); return true; });
758  return vec;
759  }
760  };
761 
763  class LIBCZI_API IXmlNodeRead
764  {
765  public:
768  virtual std::wstring Name() const = 0;
769 
777  virtual bool TryGetAttribute(const wchar_t* attributeName, std::wstring* attribValue) const = 0;
778 
782  virtual void EnumAttributes(const std::function<bool(const std::wstring& attribName, const std::wstring& attribValue)>& enumFunc) const = 0;
783 
789  virtual bool TryGetValue(std::wstring* value) const = 0;
790 
814  virtual std::shared_ptr<IXmlNodeRead> GetChildNodeReadonly(const char* path) = 0;
815 
819  virtual void EnumChildren(std::function<bool(std::shared_ptr<IXmlNodeRead>)> enumChildren) = 0;
820 
824  bool TryGetValueAsDouble(double* p);
825 
829  bool TryGetValueAsFloat(float* p);
830 
834  bool TryGetValueAsInt32(std::int32_t* p);
835 
839  bool TryGetValueAsUInt32(std::uint32_t* p);
840 
844  bool TryGetValueAsInt64(std::int64_t* p);
845 
849  bool TryGetValueAsUInt64(std::uint64_t* p);
850 
855  bool TryGetValueAsBool(bool* p);
856 
857  virtual ~IXmlNodeRead() {};
858  };
859 
861  class LIBCZI_API ICziMetadata : public IXmlNodeRead
862  {
863  public:
869  virtual bool IsXmlValid() const = 0;
870 
874  virtual std::string GetXml() = 0;
875 
879  virtual std::shared_ptr<libCZI::ICziMultiDimensionDocumentInfo> GetDocumentInfo() = 0;
880 
881  virtual ~ICziMetadata() {}
882  };
883 }
ZaxisDirection
Definition: libCZI_Metadata.h:369
std::wstring ToXmlWstring() const
bool creationDateTime_valid
Whether the field creationDateTime is valid.
Definition: libCZI_Metadata.h:133
std::wstring defaultUnitFormatX
The default unit-format for X.
Definition: libCZI_Metadata.h:302
GeneralDocumentInfo()
Default constructor - all fields are intially marked "invalid".
Definition: libCZI_Metadata.h:118
std::wstring userName
Name of the user who created the document.
Definition: libCZI_Metadata.h:124
LIBCZI_API void SetComment(const wchar_t *sz)
Definition: libCZI_Metadata.h:179
bool comment_valid
Whether the field comment is valid.
Definition: libCZI_Metadata.h:127
double scaleZ
The length of a pixel in y-direction in the unit meters. If unknown/invalid, this value is numeric_li...
Definition: libCZI_Metadata.h:244
bool IsScaleValid(char d) const
Definition: libCZI_Metadata.h:268
LIBCZI_API void SetCreationDate(const XmlDateTime *dateTime)
Definition: libCZI_Metadata.h:213
Representation of the CZI-metadata.
Definition: libCZI_Metadata.h:861
int year
year [-9999 - 9999]
Definition: libCZI_Metadata.h:48
ScalingInfo()
Default constructor - sets all members to invalid.
Definition: libCZI_Metadata.h:241
std::vector< DimensionIndex > GetDimensions()
Definition: libCZI_Metadata.h:754
int offsetHours
The hours of the timezone-offset. If greater than 24 or less than -24, it indicates an invalid timezo...
Definition: libCZI_Metadata.h:53
double b
The coefficient of the square.
Definition: libCZI_Metadata.h:500
bool title_valid
Whether the field title is valid.
Definition: libCZI_Metadata.h:121
LIBCZI_API void SetTitle(const wchar_t *sz)
Definition: libCZI_Metadata.h:149
int offsetMinutes
The minutes of the timezone-offset. If greater than 60 or negative, it indicates an invalid timezone-...
Definition: libCZI_Metadata.h:56
Definition: libCZI_Metadata.h:300
LIBCZI_API void SetName(const wchar_t *sz)
Definition: libCZI_Metadata.h:139
The defintion of the (piecewise) spline. The spline starts at xPos which is the normalized position (...
Definition: libCZI_Metadata.h:523
Definition: libCZI_Metadata.h:680
LIBCZI_API void SetDescription(const wchar_t *sz)
Definition: libCZI_Metadata.h:169
GradationCurveMode
Values that represent the gradation curve modes.
Definition: libCZI_Metadata.h:476
std::wstring defaultUnitFormatY
The default unit-format for Y.
Definition: libCZI_Metadata.h:303
double y
The normalized y-coordinate of a spline control point.
Definition: libCZI_Metadata.h:457
double c
The coefficient of the linear term.
Definition: libCZI_Metadata.h:501
float whitePoint
The (normalized) white point value.
Definition: libCZI_Metadata.h:642
double x
The normalized x-coordinate of a spline control point.
Definition: libCZI_Metadata.h:456
std::wstring description
A text describing the document.
Definition: libCZI_Metadata.h:126
std::wstring comment
A text with comments on the document.
Definition: libCZI_Metadata.h:128
double a
The coefficient of the cube.
Definition: libCZI_Metadata.h:499
void Clear()
Clears this object to its blank/initial state.
Definition: libCZI_Metadata.h:59
The display settings.
Definition: libCZI_Metadata.h:450
double Get(int index) const
Definition: libCZI_Metadata.h:509
double xPos
The (normalized) position for which this spline definition is valid.
Definition: libCZI_Metadata.h:526
bool keywords_valid
Whether the field keywords is valid.
Definition: libCZI_Metadata.h:129
std::wstring title
Title of the document.
Definition: libCZI_Metadata.h:122
Scaling information - gives the size of a pixel.
Definition: libCZI_Metadata.h:238
Base class for information about the dimension.
Definition: libCZI_Metadata.h:326
double d
The constant.
Definition: libCZI_Metadata.h:502
bool IsScaleYValid() const
Definition: libCZI_Metadata.h:254
CubicSplineCoefficients coefficients
The spline coefficients for this piece.
Definition: libCZI_Metadata.h:529
A structure representing an R-G-B-color triple (as bytes).
Definition: libCZI_Pixels.h:111
float blackPoint
The (normalized) black point value.
Definition: libCZI_Metadata.h:639
float gamma
The value for gamma (only valid if gradation curve mode == Gamma).
Definition: libCZI_Metadata.h:648
This structure defines the information for the "T-dimension". It resembles the ZEN-metadata-structure...
Definition: libCZI_Metadata.h:424
The coefficients of a cubic spline defined by .
Definition: libCZI_Metadata.h:497
double GetScale(char d) const
Definition: libCZI_Metadata.h:286
double scaleY
The length of a pixel in y-direction in the unit meters. If unknown/invalid, this value is numeric_li...
Definition: libCZI_Metadata.h:243
TintingMode
Definition: libCZI_Metadata.h:488
bool rating_valid
Whether the field rating is valid.
Definition: libCZI_Metadata.h:131
int min
minutes after the hour - [0, 59]
Definition: libCZI_Metadata.h:44
IDisplaySettings::TintingMode tintingMode
The tinting mode.
Definition: libCZI_Metadata.h:633
LIBCZI_API void SetKeywords(const std::wstring &str)
Definition: libCZI_Metadata.h:194
bool isEnabled
A boolean indicating whether the corresponding channel is &#39;active&#39; in the multi-channel-composition.
Definition: libCZI_Metadata.h:627
ZDriveMode
Definition: libCZI_Metadata.h:380
bool IsValid() const
int mon
months since January - [0, 11]
Definition: libCZI_Metadata.h:47
LIBCZI_API void SetKeywords(const wchar_t *sz)
Definition: libCZI_Metadata.h:189
LIBCZI_API void Clear()
Definition: libCZI_Metadata.h:666
SplineControlPoint(double x, double y)
Definition: libCZI_Metadata.h:462
std::wstring name
Name of the document.
Definition: libCZI_Metadata.h:120
This interface provides read-only access to an XML-node.
Definition: libCZI_Metadata.h:763
int hour
hours since midnight - [0, 23]
Definition: libCZI_Metadata.h:45
Definition: libCZI_Metadata.h:624
std::wstring keywords
List of keywords (should be separated by semicolons)
Definition: libCZI_Metadata.h:130
LIBCZI_API void SetComment(const std::wstring &str)
Definition: libCZI_Metadata.h:184
LIBCZI_API void SetCreationDate(const std::wstring &str)
Definition: libCZI_Metadata.h:208
bool IsScaleXValid() const
Definition: libCZI_Metadata.h:249
std::map< int, ChannelDisplaySettingsPOD > channelDisplaySettings
The channel display settings. Key is the channel index, and value is the POD-channel-display-data str...
Definition: libCZI_Metadata.h:683
bool userName_valid
Whether the field userName is valid.
Definition: libCZI_Metadata.h:123
LIBCZI_API void SetUserName(const wchar_t *sz)
Definition: libCZI_Metadata.h:159
LIBCZI_API void SetDescription(const std::wstring &str)
Definition: libCZI_Metadata.h:174
int sec
Seconds after the minute - [0, 60] including leap second.
Definition: libCZI_Metadata.h:43
LIBCZI_API void SetName(const std::wstring &str)
Definition: libCZI_Metadata.h:144
XyzHandedness
Definition: libCZI_Metadata.h:353
LIBCZI_API std::wstring GetDefaultUnitFormat(char d) const
Definition: libCZI_Metadata.h:313
bool description_valid
Whether the field description is valid.
Definition: libCZI_Metadata.h:125
int rating
An integer specifying a "five-star-rating" (should be between 0 and 5).
Definition: libCZI_Metadata.h:132
External interfaces, classes, functions and structs are found in the namespace "libCZI".
Definition: libCZI.h:45
This structure defines the information for the "Z-dimension". It resembles the ZEN-metadata-structure...
Definition: libCZI_Metadata.h:343
The top-level interface for the CZI-metadata object.
Definition: libCZI_Metadata.h:700
int mday
day of the month - [1, 31]
Definition: libCZI_Metadata.h:46
bool operator==(const SplineControlPoint &rhs) const
Definition: libCZI_Metadata.h:467
DimensionIndex
Values that represent dimension indexes.
Definition: libCZI_DimCoordinate.h:34
The (normalized) control points of a spline.
Definition: libCZI_Metadata.h:454
LIBCZI_API void SetCreationDate(const wchar_t *sz)
Definition: libCZI_Metadata.h:203
IDisplaySettings::GradationCurveMode gradationCurveMode
The gradation curve mode.
Definition: libCZI_Metadata.h:645
The display-settings for a channel.
Definition: libCZI_Metadata.h:555
LIBCZI_API void Clear()
Sets all fields to "invalid".
Definition: libCZI_Metadata.h:216
The gradation curve is a straight line (from white point to black point).
LIBCZI_API void SetRating(int rating)
Definition: libCZI_Metadata.h:198
libCZI::Rgb8Color tintingColor
The tinting color (only valid if tinting mode == Color).
Definition: libCZI_Metadata.h:636
bool IsScaleZValid() const
Definition: libCZI_Metadata.h:259
None - which gives the "original color", ie. in case of RGB the RGB-value is directly used...
General document information - corresponding to Information/Document.
Definition: libCZI_Metadata.h:115
This structure specifies the information in an XSD-DateTime field (cf. https://www.w3schools.com/XML/schema_dtypes_date.asp).
Definition: libCZI_Metadata.h:41
float weight
The weight of the channel (for multi-channel-composition).
Definition: libCZI_Metadata.h:630
std::vector< libCZI::IDisplaySettings::SplineControlPoint > splineCtrlPoints
The spline control points (only valid if gradation curve mode == Spline).
Definition: libCZI_Metadata.h:651
LIBCZI_API void SetTitle(const std::wstring &str)
Definition: libCZI_Metadata.h:154
std::wstring defaultUnitFormatZ
The default unit-format for Z.
Definition: libCZI_Metadata.h:304
LIBCZI_API void SetUserName(const std::wstring &str)
Definition: libCZI_Metadata.h:164
Definition: libCZI_Metadata2.h:227
bool name_valid
Whether the field name is valid.
Definition: libCZI_Metadata.h:119
bool HasTimeZoneOffset() const
Definition: libCZI_Metadata.h:70
bool operator!=(const SplineControlPoint &rhs) const
Definition: libCZI_Metadata.h:472
double scaleX
The length of a pixel in x-direction in the unit meters. If unknown/invalid, this value is numeric_li...
Definition: libCZI_Metadata.h:242
bool isUTC
True if this object is specifying the time-date in UTC.
Definition: libCZI_Metadata.h:50
std::wstring creationDateTime
The creation date of the document (formatted as xml-datatype "dateTime").
Definition: libCZI_Metadata.h:134