PCL
XISF.h
Go to the documentation of this file.
1 // ____ ______ __
2 // / __ \ / ____// /
3 // / /_/ // / / /
4 // / ____// /___ / /___ PixInsight Class Library
5 // /_/ \____//_____/ PCL 2.6.5
6 // ----------------------------------------------------------------------------
7 // pcl/XISF.h - Released 2024-01-13T15:47:58Z
8 // ----------------------------------------------------------------------------
9 // This file is part of the PixInsight Class Library (PCL).
10 // PCL is a multiplatform C++ framework for development of PixInsight modules.
11 //
12 // Copyright (c) 2003-2024 Pleiades Astrophoto S.L. All Rights Reserved.
13 //
14 // Redistribution and use in both source and binary forms, with or without
15 // modification, is permitted provided that the following conditions are met:
16 //
17 // 1. All redistributions of source code must retain the above copyright
18 // notice, this list of conditions and the following disclaimer.
19 //
20 // 2. All redistributions in binary form must reproduce the above copyright
21 // notice, this list of conditions and the following disclaimer in the
22 // documentation and/or other materials provided with the distribution.
23 //
24 // 3. Neither the names "PixInsight" and "Pleiades Astrophoto", nor the names
25 // of their contributors, may be used to endorse or promote products derived
26 // from this software without specific prior written permission. For written
27 // permission, please contact info@pixinsight.com.
28 //
29 // 4. All products derived from this software, in any form whatsoever, must
30 // reproduce the following acknowledgment in the end-user documentation
31 // and/or other materials provided with the product:
32 //
33 // "This product is based on software from the PixInsight project, developed
34 // by Pleiades Astrophoto and its contributors (https://pixinsight.com/)."
35 //
36 // Alternatively, if that is where third-party acknowledgments normally
37 // appear, this acknowledgment must be reproduced in the product itself.
38 //
39 // THIS SOFTWARE IS PROVIDED BY PLEIADES ASTROPHOTO AND ITS CONTRIBUTORS
40 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
41 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PLEIADES ASTROPHOTO OR ITS
43 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
44 // EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, BUSINESS
45 // INTERRUPTION; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; AND LOSS OF USE,
46 // DATA OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49 // POSSIBILITY OF SUCH DAMAGE.
50 // ----------------------------------------------------------------------------
51 
52 #ifndef __PCL_XISF_h
53 #define __PCL_XISF_h
54 
56 
57 #include <pcl/Defs.h>
58 
59 #include <pcl/AutoPointer.h>
60 #include <pcl/ColorFilterArray.h>
61 #include <pcl/DisplayFunction.h>
62 #include <pcl/FITSHeaderKeyword.h>
63 #include <pcl/ICCProfile.h>
64 #include <pcl/Image.h>
65 #include <pcl/ImageInfo.h>
66 #include <pcl/ImageOptions.h>
67 #include <pcl/Property.h>
68 #include <pcl/XML.h>
69 
70 namespace pcl
71 {
72 
73 // ----------------------------------------------------------------------------
74 
101 // ----------------------------------------------------------------------------
102 
103 class XISFReaderEngine;
104 class XISFWriterEngine;
105 
106 class PCL_CLASS Compression;
107 class PCL_CLASS CryptographicHash;
108 
109 // ----------------------------------------------------------------------------
110 
125 namespace XISFChecksum
126 {
127  enum value_type
128  {
129  Unknown = -1,
130  None = 0,
131  SHA1,
132  SHA256,
133  SHA512,
134  NumberOfSupportedAlgorithms
135  };
136 }
137 
138 // ----------------------------------------------------------------------------
139 
159 namespace XISFCompression
160 {
161  enum value_type
162  {
163  Unknown = -1,
164  None = 0,
165  Zlib,
166  LZ4,
167  LZ4HC,
168  Zstd,
169  Zlib_Sh,
170  LZ4_Sh,
171  LZ4HC_Sh,
172  Zstd_Sh,
173  NumberOfSupportedCodecs
174  };
175 }
176 
177 // ----------------------------------------------------------------------------
178 
190 namespace XISFByteOrder
191 {
192  enum value_type
193  {
194  LittleEndian,
195  BigEndian
196  };
197 }
198 
199 // ----------------------------------------------------------------------------
200 
206 class PCL_CLASS XISF
207 {
208 public:
209 
213  using property_type = VariantType::value_type;
214 
218  using color_space = ColorSpace::value_type;
219 
223  using block_checksum = XISFChecksum::value_type;
224 
228  using block_compression = XISFCompression::value_type;
229 
233  using block_endianness = XISFByteOrder::value_type;
234 
239  XISF() = delete;
240 
245  XISF( const XISF& ) = delete;
246 
251  XISF& operator =( const XISF& ) = delete;
252 
257  ~XISF() = delete;
258 
259  /*
260  * ### N.B.: As of version 1.8.5.1309: Clang on macOS does not know how to
261  * compile the following constexpr static members, giving buggy 'Undefined
262  * symbols for architecture x86_64' errors on some modules...
263  */
264 #ifndef __clang__
265 
270  constexpr static fsize_type DefaultBlockAlignSize = 4096;
271 
275  constexpr static fsize_type DefaultMaxBlockInlineSize = 3072; // 3072*4/3 = 4096 (base64)
276 
280  constexpr static int MaxThumbnailSize = 1024;
281 
285  constexpr static block_checksum DefaultChecksum = XISFChecksum::None;
286 
290  constexpr static block_compression DefaultCompression = XISFCompression::None;
291 
297  constexpr static int DefaultCompressionLevel = 0;
298 
302  constexpr static int MaxCompressionLevel = 100;
303 
307  constexpr static int DefaultVerbosity = 1;
308 
314  constexpr static bool DefaultFixNonFinite = true;
315 
319  constexpr static double DefaultOutputLowerBound = 0.0;
320 
324  constexpr static double DefaultOutputUpperBound = 1.0;
325 
331  constexpr static bool DefaultStoreFITSKeywords = true;
332 
338  constexpr static bool DefaultIgnoreFITSKeywords = false;
339 
345  constexpr static bool DefaultImportFITSKeywords = false;
346 
350  constexpr static bool DefaultIgnoreEmbeddedData = false;
351 
355  constexpr static bool DefaultIgnoreProperties = false;
356 
360  constexpr static bool DefaultAutoMetadata = true;
361 
365  constexpr static bool DefaultNoWarnings = false;
366 
370  constexpr static bool DefaultWarningsAreErrors = false;
371 
375  constexpr static const char* InternalNamespacePrefix = "XISF:";
376 
377 #else
378 
379  static const fsize_type DefaultBlockAlignSize;
380  static const fsize_type DefaultMaxBlockInlineSize;
381  static const int MaxThumbnailSize;
382  static const block_checksum DefaultChecksum;
383  static const block_compression DefaultCompression;
384  static const int DefaultCompressionLevel;
385  static const int MaxCompressionLevel;
386  static const int DefaultVerbosity;
387  static const bool DefaultFixNonFinite;
388  static const double DefaultOutputLowerBound;
389  static const double DefaultOutputUpperBound;
390  static const bool DefaultStoreFITSKeywords;
391  static const bool DefaultIgnoreFITSKeywords;
392  static const bool DefaultImportFITSKeywords;
393  static const bool DefaultIgnoreEmbeddedData;
394  static const bool DefaultIgnoreProperties;
395  static const bool DefaultAutoMetadata;
396  static const bool DefaultNoWarnings;
397  static const bool DefaultWarningsAreErrors;
398  static const char* InternalNamespacePrefix;
399 
400 #endif // !__clang__
401 
416  static const char* SampleFormatId( int bitsPerSample, bool floatSample, bool complexSample );
417 
422  template <class P>
423  static const char* SampleFormatId( const GenericImage<P>& image )
424  {
425  return SampleFormatId( P::BitsPerSample(), P::IsFloatSample(), P::IsComplexSample() );
426  }
427 
433  static bool GetSampleFormatFromId( int& bitsPerSample, bool& floatSample, bool& complexSample, const String& id );
434 
447  static const char* ColorSpaceId( color_space colorSpace );
448 
453  static const char* ColorSpaceId( const AbstractImage& image )
454  {
455  return ColorSpaceId( image.ColorSpace() );
456  }
457 
462  static color_space ColorSpaceFromId( const String& id );
463 
471  static const char* PropertyTypeId( property_type type );
472 
477  static property_type PropertyTypeFromId( const String& id );
478 
483  static const char* CompressionCodecId( block_compression codec );
484 
489  static block_compression CompressionCodecFromId( const String& id );
490 
496  static Compression* NewCompression( block_compression codec, size_type itemSize = 1 );
497 
502  static int CompressionLevelForMethod( block_compression codec, int level );
503 
508  static bool CompressionUsesByteShuffle( block_compression codec );
509 
514  static block_compression CompressionCodecNoShuffle( block_compression codec );
515 
520  static bool CompressionNeedsItemSize( block_compression codec );
521 
526  static const char* ChecksumAlgorithmId( block_checksum algorithm );
527 
532  static block_checksum ChecksumAlgorithmFromId( const String& id );
533 
538  static size_type ChecksumLength( block_checksum algorithm );
539 
544  static CryptographicHash* NewCryptographicHash( block_checksum algorithm );
545 
564  static bool IsValidPropertyId( const IsoString& id )
565  {
566  return Property::IsValidIdentifier( id );
567  }
568 
569  static bool IsValidPropertyId( const IsoString::ustring_base& id )
570  {
571  return IsValidPropertyId( IsoString( id ) );
572  }
573 
582  static bool IsInternalPropertyId( const IsoString& id )
583  {
584  return id.StartsWith( InternalNamespacePrefix );
585  }
586 
587  static bool IsInternalPropertyId( const IsoString::ustring_base& id )
588  {
589  return IsInternalPropertyId( IsoString( id ) );
590  }
591 
596  {
597  if ( !IsInternalPropertyId( id ) )
598  return InternalNamespacePrefix + id;
599  return id;
600  }
601 
602  static IsoString InternalPropertyId( const IsoString::ustring_base& id )
603  {
604  return InternalPropertyId( IsoString( id ) );
605  }
606 
618  static void EnsurePTLUTInitialized();
619 };
620 
621 // ----------------------------------------------------------------------------
622 
636 class PCL_CLASS XISFOptions
637 {
638 public:
639 
640  bool storeFITSKeywords : 1;
644  bool ignoreProperties : 1;
645  bool autoMetadata : 1;
646  bool noWarnings : 1;
647  bool warningsAreErrors : 1;
648  XISF::block_checksum checksumAlgorithm : 4;
649  XISF::block_compression compressionCodec : 5;
652  bool fixNonFinite : 1;
657 
662  {
663  Reset();
664  }
665 
669  XISFOptions( const XISFOptions& ) = default;
670 
674  XISFOptions& operator =( const XISFOptions& ) = default;
675 
679  void Reset()
680  {
681  storeFITSKeywords = XISF::DefaultStoreFITSKeywords;
682  ignoreFITSKeywords = XISF::DefaultIgnoreFITSKeywords;
683  importFITSKeywords = XISF::DefaultImportFITSKeywords;
684  ignoreEmbeddedData = XISF::DefaultIgnoreEmbeddedData;
685  ignoreProperties = XISF::DefaultIgnoreProperties;
686  autoMetadata = XISF::DefaultAutoMetadata;
687  noWarnings = XISF::DefaultNoWarnings;
688  warningsAreErrors = XISF::DefaultWarningsAreErrors;
689  checksumAlgorithm = XISF::DefaultChecksum;
690  compressionCodec = XISF::DefaultCompression;
691  compressionLevel = XISF::DefaultCompressionLevel;
692  verbosity = XISF::DefaultVerbosity;
693  fixNonFinite = XISF::DefaultFixNonFinite;
694  blockAlignmentSize = XISF::DefaultBlockAlignSize;
695  maxInlineBlockSize = XISF::DefaultMaxBlockInlineSize;
696  outputLowerBound = XISF::DefaultOutputLowerBound;
697  outputUpperBound = XISF::DefaultOutputUpperBound;
698  }
699 };
700 
701 // ----------------------------------------------------------------------------
702 
719 struct PCL_CLASS XISFFileSignature
720 {
721  uint8 magic[ 8 ] = { 'X', 'I', 'S', 'F', '0', '1', '0', '0' };
722  uint32 headerLength = 0; // length in bytes of the XML file header
723  uint32 reserved = 0; // reserved - must be zero
724 
729  XISFFileSignature() = default;
730 
734  XISFFileSignature( const XISFFileSignature& ) = default;
735 
739  XISFFileSignature& operator =( const XISFFileSignature& ) = default;
740 
746  : headerLength( length )
747  {
748  }
749 
754  void Validate() const;
755 };
756 
757 // ----------------------------------------------------------------------------
758 
773 namespace XISFMessageType
774 {
775  enum value_type
776  {
777  Informative,
778  Note,
779  Warning,
780  RecoverableError
781  };
782 }
783 
784 // ----------------------------------------------------------------------------
785 
801 class PCL_CLASS XISFLogHandler
802 {
803 public:
804 
809  using message_type = XISFMessageType::value_type;
810 
814  XISFLogHandler() = default;
815 
819  virtual ~XISFLogHandler()
820  {
821  }
822 
839  virtual void Init( const String& filePath, bool writing )
840  {
841  }
842 
859  virtual void Log( const String& text, message_type type )
860  {
861  }
862 
872  virtual void Close()
873  {
874  }
875 };
876 
877 // ----------------------------------------------------------------------------
878 
891 class PCL_CLASS XISFReader
892 {
893 public:
894 
899  XISFReader();
900 
905  virtual ~XISFReader() noexcept( false );
906 
907  /*
908  * Copy constructor. This constructor is disabled because %XISF streams are
909  * unique objects.
910  */
911  XISFReader( const XISFReader& ) = delete;
912 
913  /*
914  * Copy assignment. This operator is disabled because %XISF streams are
915  * unique objects.
916  */
917  XISFReader& operator =( const XISFReader& ) = delete;
918 
922  void SetOptions( const pcl::XISFOptions& options );
923 
928  {
929  return m_options;
930  }
931 
936  void SetHints( const IsoString& );
937 
947  void SetLogHandler( XISFLogHandler* handler );
948 
953  bool IsOpen() const;
954 
958  void Open( const String& path );
959 
965  void Close();
966 
971  String FilePath() const;
972 
976  int NumberOfImages() const;
977 
982  void SelectImage( int index );
983 
988  int SelectedImageIndex() const;
989 
994  pcl::ImageInfo ImageInfo() const;
995 
1001 
1009  void SetImageOptions( const pcl::ImageOptions& options );
1010 
1018  IsoString ImageId() const;
1019 
1028  FITSKeywordArray ReadFITSKeywords();
1029 
1038  ICCProfile ReadICCProfile();
1039 
1048  UInt8Image ReadThumbnail();
1049 
1059  RGBColorSystem ReadRGBWorkingSpace();
1060 
1069  DisplayFunction ReadDisplayFunction();
1070 
1079  ColorFilterArray ReadColorFilterArray();
1080 
1087  PropertyDescriptionArray ImagePropertyDescriptions() const;
1088 
1097  Variant ReadImageProperty( const IsoString& identifier );
1098 
1106  PropertyArray ReadImageProperties();
1107 
1113  PropertyDescriptionArray PropertyDescriptions() const;
1114 
1123  Variant ReadProperty( const IsoString& identifier );
1124 
1131  PropertyArray ReadProperties();
1132 
1136  void ReadImage( FImage& image );
1137 
1141  void ReadImage( DImage& image );
1142 
1146  void ReadImage( ComplexImage& image );
1147 
1151  void ReadImage( DComplexImage& image );
1152 
1156  void ReadImage( UInt8Image& image );
1157 
1161  void ReadImage( UInt16Image& image );
1162 
1166  void ReadImage( UInt32Image& image );
1167 
1179  bool ImplementsIncrementalRead() const;
1180 
1189  void ReadSamples( FImage::sample* buffer, int startRow, int rowCount, int channel );
1190 
1197  void ReadSamples( DImage::sample* buffer, int startRow, int rowCount, int channel );
1198 
1205  void ReadSamples( ComplexImage::sample* buffer, int startRow, int rowCount, int channel );
1206 
1213  void ReadSamples( DComplexImage::sample* buffer, int startRow, int rowCount, int channel );
1214 
1221  void ReadSamples( UInt8Image::sample* buffer, int startRow, int rowCount, int channel );
1222 
1229  void ReadSamples( UInt16Image::sample* buffer, int startRow, int rowCount, int channel );
1230 
1237  void ReadSamples( UInt32Image::sample* buffer, int startRow, int rowCount, int channel );
1238 
1253  static XMLDocument* ExtractHeader( const String& path, XMLParserOptions options = XMLParserOptions() );
1254 
1255 private:
1256 
1258  AutoPointer<XISFLogHandler> m_logHandler;
1259  XISFOptions m_options;
1260  IsoString m_hints;
1261 
1262  void CheckOpenStream( const char* ) const;
1263  void CheckClosedStream( const char* ) const;
1264 };
1265 
1266 // ----------------------------------------------------------------------------
1267 
1280 class PCL_CLASS XISFWriter
1281 {
1282 public:
1283 
1288  XISFWriter();
1289 
1294  virtual ~XISFWriter() noexcept( false );
1295 
1296  /*
1297  * Copy constructor. This constructor is disabled because %XISF streams are
1298  * unique objects.
1299  */
1300  XISFWriter( const XISFWriter& ) = delete;
1301 
1302  /*
1303  * Copy assignment. This operator is disabled because %XISF streams are
1304  * unique objects.
1305  */
1306  XISFWriter& operator =( const XISFWriter& ) = delete;
1307 
1311  void SetOptions( const pcl::XISFOptions& options );
1312 
1317  {
1318  return m_options;
1319  }
1320 
1325  void SetHints( const IsoString& );
1326 
1336  void SetLogHandler( XISFLogHandler* handler );
1337 
1352  void SetCreatorApplication( const String& appName );
1353 
1368  void SetCreatorModule( const String& modName );
1369 
1374  bool IsOpen() const;
1375 
1380  void Create( const String& path, int count );
1381 
1387  void Close();
1388 
1393  String FilePath() const;
1394 
1402  void SetImageOptions( const ImageOptions& options );
1403 
1408  void SetImageId( const IsoString& id );
1409 
1414  void WriteFITSKeywords( const FITSKeywordArray& keywords );
1415 
1423  const FITSKeywordArray& FITSKeywords() const;
1424 
1428  void WriteICCProfile( const ICCProfile& profile );
1429 
1434  void WriteThumbnail( const UInt8Image& thumbnail );
1435 
1440  void WriteRGBWorkingSpace( const RGBColorSystem& rgbws );
1441 
1446  void WriteDisplayFunction( const DisplayFunction& df );
1447 
1452  void WriteColorFilterArray( const ColorFilterArray& cfa );
1453 
1458  void WriteImageProperty( const IsoString& identifier, const Variant& value );
1459 
1464  void WriteImageProperties( const PropertyArray& properties );
1465 
1472  void RemoveImageProperty( const IsoString& identifier );
1473 
1478  void WriteProperty( const IsoString& identifier, const Variant& value );
1479 
1484  void WriteProperties( const PropertyArray& properties );
1485 
1492  void RemoveProperty( const IsoString& identifier );
1493 
1497  void WriteImage( const Image& image );
1498 
1502  void WriteImage( const DImage& image );
1503 
1507  void WriteImage( const ComplexImage& image );
1508 
1512  void WriteImage( const DComplexImage& image );
1513 
1517  void WriteImage( const UInt8Image& image );
1518 
1522  void WriteImage( const UInt16Image& image );
1523 
1527  void WriteImage( const UInt32Image& image );
1528 
1532  void WriteImage( const ImageVariant& image );
1533 
1541  void CreateImage( const ImageInfo& info );
1542 
1551  void WriteSamples( const FImage::sample* buffer, int startRow, int rowCount, int channel );
1552 
1560  void WriteSamples( const DImage::sample* buffer, int startRow, int rowCount, int channel );
1561 
1569  void WriteSamples( const ComplexImage::sample* buffer, int startRow, int rowCount, int channel );
1570 
1578  void WriteSamples( const DComplexImage::sample* buffer, int startRow, int rowCount, int channel );
1579 
1587  void WriteSamples( const UInt8Image::sample* buffer, int startRow, int rowCount, int channel );
1588 
1596  void WriteSamples( const UInt16Image::sample* buffer, int startRow, int rowCount, int channel );
1597 
1605  void WriteSamples( const UInt32Image::sample* buffer, int startRow, int rowCount, int channel );
1606 
1611  void CloseImage();
1612 
1613 private:
1614 
1616  AutoPointer<XISFLogHandler> m_logHandler;
1617  XISFOptions m_options;
1618  IsoString m_hints;
1619  String m_creatorApplication;
1620  String m_creatorModule;
1621 
1622  void CheckOpenStream( const char* ) const;
1623  void CheckClosedStream( const char* ) const;
1624 };
1625 
1626 // ----------------------------------------------------------------------------
1627 
1628 } // pcl
1629 
1630 #endif // __PCL_XISF_h
1631 
1632 // ----------------------------------------------------------------------------
1633 // EOF pcl/XISF.h - Released 2024-01-13T15:47:58Z
pcl::AbstractImage
Base class of all two-dimensional images in PCL.
Definition: AbstractImage.h:118
pcl::XISF
Utility functions, data and constants for XISF support.
Definition: XISF.h:206
pcl
PCL root namespace.
Definition: AbstractImage.h:76
pcl::ICCProfile
A high-level interface to ICC color profiles.
Definition: ICCProfile.h:234
pcl::XISFWriter::Options
pcl::XISFOptions Options() const
Definition: XISF.h:1316
pcl::XISFOptions::fixNonFinite
bool fixNonFinite
Replace NaNs, infinities and negative zeros with lower bound values in floating point images (reading...
Definition: XISF.h:652
pcl::XISF::DefaultIgnoreFITSKeywords
constexpr static bool DefaultIgnoreFITSKeywords
Definition: XISF.h:338
ColorFilterArray.h
pcl::ColorFilterArray
Color filter array (CFA) structure.
Definition: ColorFilterArray.h:82
pcl::XISF::DefaultCompression
constexpr static block_compression DefaultCompression
Definition: XISF.h:290
pcl::XISFReader
XISF input file stream
Definition: XISF.h:891
pcl::String
Unicode (UTF-16) string.
Definition: String.h:8112
pcl::Variant
Acts like a union to store instances of different data types.
Definition: Variant.h:331
pcl::RGBColorSystem
Colorimetrically defined RGB working color space.
Definition: RGBColorSystem.h:101
pcl::XISF::DefaultNoWarnings
constexpr static bool DefaultNoWarnings
Definition: XISF.h:365
pcl::XMLDocument
XML document parsing and generation
Definition: XML.h:2640
pcl::XISFOptions::autoMetadata
bool autoMetadata
Automatically generate a number of reserved XISF properties.
Definition: XISF.h:645
pcl::XISFOptions::checksumAlgorithm
XISF::block_checksum checksumAlgorithm
The algorithm used for block checksum calculations.
Definition: XISF.h:648
pcl::XISF::ColorSpaceId
static const char * ColorSpaceId(const AbstractImage &image)
Definition: XISF.h:453
pcl::XISF::DefaultStoreFITSKeywords
constexpr static bool DefaultStoreFITSKeywords
Definition: XISF.h:331
pcl::IsoString
Eight-bit string (ISO/IEC-8859-1 or UTF-8 string)
Definition: String.h:5424
pcl::Property::IsValidIdentifier
static bool IsValidIdentifier(const IsoString &id)
Definition: Property.h:206
pcl::XISFOptions::compressionLevel
uint8 compressionLevel
Codec-independent compression level: 0 = auto, 1 = fast, 100 = maximum compression.
Definition: XISF.h:650
pcl::XISFLogHandler::Close
virtual void Close()
Definition: XISF.h:872
pcl::uint32
unsigned int uint32
Definition: Defs.h:669
pcl::XISF::DefaultVerbosity
constexpr static int DefaultVerbosity
Definition: XISF.h:307
pcl::XISFOptions::outputUpperBound
double outputUpperBound
Upper bound for output floating point pixel samples (=1.0 by default).
Definition: XISF.h:656
pcl::uint16
unsigned short uint16
Definition: Defs.h:657
pcl::XISF::IsInternalPropertyId
static bool IsInternalPropertyId(const IsoString &id)
Definition: XISF.h:582
pcl::XISFOptions
XISF-specific file options
Definition: XISF.h:636
pcl::XISFLogHandler::Init
virtual void Init(const String &filePath, bool writing)
Definition: XISF.h:839
pcl::XISFOptions::maxInlineBlockSize
uint16 maxInlineBlockSize
Maximum size in bytes of an inline/embedded block.
Definition: XISF.h:654
pcl::XISFLogHandler
XISF stream message logger
Definition: XISF.h:801
ImageInfo.h
pcl::XISF::DefaultOutputUpperBound
constexpr static double DefaultOutputUpperBound
Definition: XISF.h:324
pcl::XISFFileSignature::XISFFileSignature
XISFFileSignature(uint32 length)
Definition: XISF.h:745
pcl::Compression
Abstract base class of data compression algorithm implementations.
Definition: Compression.h:83
pcl::AutoPointer< XISFReaderEngine >
pcl::XISF::DefaultBlockAlignSize
constexpr static fsize_type DefaultBlockAlignSize
Definition: XISF.h:270
pcl::GenericString< char16_type, CharTraits, PCL_STRING_ALLOCATOR >
pcl::XISFOptions::ignoreEmbeddedData
bool ignoreEmbeddedData
Do not load existing embedded data (such as ICC profiles for example).
Definition: XISF.h:643
pcl::XISF::InternalPropertyId
static IsoString InternalPropertyId(const IsoString &id)
Definition: XISF.h:595
pcl::XISFLogHandler::Log
virtual void Log(const String &text, message_type type)
Definition: XISF.h:859
pcl::XISFOptions::storeFITSKeywords
bool storeFITSKeywords
Include FITS header keywords in output XISF files.
Definition: XISF.h:640
pcl::GenericImage::sample
typename pixel_traits::sample sample
Definition: Image.h:305
Property.h
pcl::size_type
size_t size_type
Definition: Defs.h:612
pcl::XISF::DefaultOutputLowerBound
constexpr static double DefaultOutputLowerBound
Definition: XISF.h:319
pcl::XISFOptions::warningsAreErrors
bool warningsAreErrors
Treat warnings as fatal errors.
Definition: XISF.h:647
pcl::XISFOptions::noWarnings
bool noWarnings
Suppress all warning and diagnostics messages.
Definition: XISF.h:646
pcl::Flags< XMLParserOption::mask_type >
pcl::XISFOptions::XISFOptions
XISFOptions()
Definition: XISF.h:661
pcl::Array
Generic dynamic array.
Definition: Array.h:99
pcl::XISF::DefaultImportFITSKeywords
constexpr static bool DefaultImportFITSKeywords
Definition: XISF.h:345
pcl::uint8
unsigned char uint8
Definition: Defs.h:645
pcl::ImageOptions
Format-independent, fundamental image stream options.
Definition: ImageOptions.h:97
pcl::XISFWriter
XISF output file stream
Definition: XISF.h:1280
pcl::XISFOptions::compressionCodec
XISF::block_compression compressionCodec
The codec used for compression of XISF blocks.
Definition: XISF.h:649
DisplayFunction.h
Image.h
FITSHeaderKeyword.h
pcl::XISF::IsValidPropertyId
static bool IsValidPropertyId(const IsoString &id)
Definition: XISF.h:564
pcl::XISFReader::Options
pcl::XISFOptions Options() const
Definition: XISF.h:927
AutoPointer.h
pcl::CryptographicHash
Abstract base class for cryptographic hashing algorithm implementations.
Definition: Cryptography.h:85
pcl::ImageInfo
A simple structure to hold basic information about images.
Definition: ImageInfo.h:71
pcl::XISF::DefaultMaxBlockInlineSize
constexpr static fsize_type DefaultMaxBlockInlineSize
Definition: XISF.h:275
ICCProfile.h
pcl::XISFLogHandler::~XISFLogHandler
virtual ~XISFLogHandler()
Definition: XISF.h:819
pcl::XISF::DefaultCompressionLevel
constexpr static int DefaultCompressionLevel
Definition: XISF.h:297
pcl::XISFOptions::outputLowerBound
double outputLowerBound
Lower bound for output floating point pixel samples (=0.0 by default).
Definition: XISF.h:655
pcl::fsize_type
int64 fsize_type
Definition: Defs.h:1188
XML.h
pcl::XISFOptions::importFITSKeywords
bool importFITSKeywords
Import FITS keywords as XISF properties.
Definition: XISF.h:642
pcl::XISF::DefaultFixNonFinite
constexpr static bool DefaultFixNonFinite
Definition: XISF.h:314
pcl::XISFOptions::blockAlignmentSize
uint16 blockAlignmentSize
Block alignment size in bytes (0 = 1 = unaligned).
Definition: XISF.h:653
pcl::XISF::DefaultIgnoreEmbeddedData
constexpr static bool DefaultIgnoreEmbeddedData
Definition: XISF.h:350
pcl::XISF::DefaultChecksum
constexpr static block_checksum DefaultChecksum
Definition: XISF.h:285
pcl::XISF::DefaultWarningsAreErrors
constexpr static bool DefaultWarningsAreErrors
Definition: XISF.h:370
pcl::XISFOptions::verbosity
uint8 verbosity
Verbosity level: 0 = quiet, > 0 = write console state messages.
Definition: XISF.h:651
pcl::XISFOptions::Reset
void Reset()
Definition: XISF.h:679
pcl::DisplayFunction
Adaptive histogram transformations for image visualization.
Definition: DisplayFunction.h:93
pcl::XISFOptions::ignoreProperties
bool ignoreProperties
Do not load existing XISF properties.
Definition: XISF.h:644
ImageOptions.h
pcl::ImageColor::ColorSpace
color_space ColorSpace() const noexcept
Definition: ImageColor.h:178
pcl::ImageVariant
Acts like a union for all types of images in PCL, with optional class-wide ownership of transported i...
Definition: ImageVariant.h:321
pcl::XISF::DefaultAutoMetadata
constexpr static bool DefaultAutoMetadata
Definition: XISF.h:360
Defs.h
pcl::XISF::SampleFormatId
static const char * SampleFormatId(const GenericImage< P > &image)
Definition: XISF.h:423
pcl::XISFOptions::ignoreFITSKeywords
bool ignoreFITSKeywords
Do not load FITS keywords from input XISF files.
Definition: XISF.h:641
pcl::XISFFileSignature
XISF monolithic file signature
Definition: XISF.h:719
pcl::GenericImage
Implements a generic, two-dimensional, shared or local image.
Definition: Image.h:277
pcl::XISF::DefaultIgnoreProperties
constexpr static bool DefaultIgnoreProperties
Definition: XISF.h:355