103 class XISFReaderEngine;
104 class XISFWriterEngine;
106 class PCL_CLASS Compression;
107 class PCL_CLASS CryptographicHash;
125 namespace XISFChecksum
134 NumberOfSupportedAlgorithms
159 namespace XISFCompression
173 NumberOfSupportedCodecs
190 namespace XISFByteOrder
213 using property_type = VariantType::value_type;
218 using color_space = ColorSpace::value_type;
223 using block_checksum = XISFChecksum::value_type;
228 using block_compression = XISFCompression::value_type;
233 using block_endianness = XISFByteOrder::value_type;
275 constexpr
static fsize_type DefaultMaxBlockInlineSize = 3072;
280 constexpr
static int MaxThumbnailSize = 1024;
285 constexpr
static block_checksum DefaultChecksum = XISFChecksum::None;
290 constexpr
static block_compression DefaultCompression = XISFCompression::None;
297 constexpr
static int DefaultCompressionLevel = 0;
302 constexpr
static int MaxCompressionLevel = 100;
307 constexpr
static int DefaultVerbosity = 1;
314 constexpr
static bool DefaultFixNonFinite =
true;
319 constexpr
static double DefaultOutputLowerBound = 0.0;
324 constexpr
static double DefaultOutputUpperBound = 1.0;
331 constexpr
static bool DefaultStoreFITSKeywords =
true;
338 constexpr
static bool DefaultIgnoreFITSKeywords =
false;
345 constexpr
static bool DefaultImportFITSKeywords =
false;
350 constexpr
static bool DefaultIgnoreEmbeddedData =
false;
355 constexpr
static bool DefaultIgnoreProperties =
false;
360 constexpr
static bool DefaultAutoMetadata =
true;
365 constexpr
static bool DefaultNoWarnings =
false;
370 constexpr
static bool DefaultWarningsAreErrors =
false;
375 constexpr
static const char* InternalNamespacePrefix =
"XISF:";
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;
416 static const char*
SampleFormatId(
int bitsPerSample,
bool floatSample,
bool complexSample );
425 return SampleFormatId( P::BitsPerSample(), P::IsFloatSample(), P::IsComplexSample() );
571 return IsValidPropertyId(
IsoString(
id ) );
584 return id.StartsWith( InternalNamespacePrefix );
589 return IsInternalPropertyId(
IsoString(
id ) );
597 if ( !IsInternalPropertyId(
id ) )
598 return InternalNamespacePrefix + id;
604 return InternalPropertyId(
IsoString(
id ) );
721 uint8 magic[ 8 ] = {
'X',
'I',
'S',
'F',
'0',
'1',
'0',
'0' };
746 : headerLength( length )
773 namespace XISFMessageType
809 using message_type = XISFMessageType::value_type;
859 virtual void Log(
const String& text, message_type type )
1262 void CheckOpenStream(
const char* )
const;
1263 void CheckClosedStream(
const char* )
const;
1619 String m_creatorApplication;
1622 void CheckOpenStream(
const char* )
const;
1623 void CheckClosedStream(
const char* )
const;
Base class of all two-dimensional images in PCL.
Color filter array (CFA) structure.
Abstract base class of data compression algorithm implementations.
Abstract base class for cryptographic hashing algorithm implementations.
Adaptive histogram transformations for image visualization.
Implements a generic, two-dimensional, shared or local image.
typename pixel_traits::sample sample
A high-level interface to ICC color profiles.
color_space ColorSpace() const noexcept
A simple structure to hold basic information about images.
Format-independent, fundamental image stream options.
Acts like a union for all types of images in PCL, with optional class-wide ownership of transported i...
Eight-bit string (ISO/IEC-8859-1 or UTF-8 string)
static bool IsValidIdentifier(const IsoString &id)
Colorimetrically defined RGB working color space.
Acts like a union to store instances of different data types.
XISF stream message logger
virtual void Log(const String &text, message_type type)
virtual void Init(const String &filePath, bool writing)
virtual ~XISFLogHandler()
XISF-specific file options
uint8 compressionLevel
Codec-independent compression level: 0 = auto, 1 = fast, 100 = maximum compression.
bool ignoreFITSKeywords
Do not load FITS keywords from input XISF files.
bool autoMetadata
Automatically generate a number of reserved XISF properties.
uint16 maxInlineBlockSize
Maximum size in bytes of an inline/embedded block.
uint16 blockAlignmentSize
Block alignment size in bytes (0 = 1 = unaligned).
bool noWarnings
Suppress all warning and diagnostics messages.
uint8 verbosity
Verbosity level: 0 = quiet, > 0 = write console state messages.
double outputUpperBound
Upper bound for output floating point pixel samples (=1.0 by default).
bool ignoreProperties
Do not load existing XISF properties.
bool storeFITSKeywords
Include FITS header keywords in output XISF files.
bool warningsAreErrors
Treat warnings as fatal errors.
XISFOptions(const XISFOptions &)=default
bool fixNonFinite
Replace NaNs, infinities and negative zeros with lower bound values in floating point images (reading...
bool importFITSKeywords
Import FITS keywords as XISF properties.
XISF::block_checksum checksumAlgorithm
The algorithm used for block checksum calculations.
XISF::block_compression compressionCodec
The codec used for compression of XISF blocks.
double outputLowerBound
Lower bound for output floating point pixel samples (=0.0 by default).
bool ignoreEmbeddedData
Do not load existing embedded data (such as ICC profiles for example).
Variant ReadImageProperty(const IsoString &identifier)
int SelectedImageIndex() const
void ReadImage(UInt32Image &image)
void ReadSamples(UInt16Image::sample *buffer, int startRow, int rowCount, int channel)
void Open(const String &path)
void ReadImage(DComplexImage &image)
DisplayFunction ReadDisplayFunction()
PropertyArray ReadProperties()
PropertyDescriptionArray PropertyDescriptions() const
void ReadSamples(DComplexImage::sample *buffer, int startRow, int rowCount, int channel)
Variant ReadProperty(const IsoString &identifier)
void ReadImage(UInt8Image &image)
void ReadSamples(ComplexImage::sample *buffer, int startRow, int rowCount, int channel)
void SelectImage(int index)
RGBColorSystem ReadRGBWorkingSpace()
void ReadSamples(UInt8Image::sample *buffer, int startRow, int rowCount, int channel)
void ReadSamples(DImage::sample *buffer, int startRow, int rowCount, int channel)
void ReadSamples(FImage::sample *buffer, int startRow, int rowCount, int channel)
void ReadImage(FImage &image)
void ReadSamples(UInt32Image::sample *buffer, int startRow, int rowCount, int channel)
void SetLogHandler(XISFLogHandler *handler)
pcl::ImageOptions ImageOptions() const
pcl::ImageInfo ImageInfo() const
IsoString ImageId() const
PropertyArray ReadImageProperties()
ColorFilterArray ReadColorFilterArray()
UInt8Image ReadThumbnail()
void ReadImage(UInt16Image &image)
int NumberOfImages() const
bool ImplementsIncrementalRead() const
static XMLDocument * ExtractHeader(const String &path, XMLParserOptions options=XMLParserOptions())
void SetImageOptions(const pcl::ImageOptions &options)
void ReadImage(DImage &image)
ICCProfile ReadICCProfile()
PropertyDescriptionArray ImagePropertyDescriptions() const
void ReadImage(ComplexImage &image)
FITSKeywordArray ReadFITSKeywords()
void SetHints(const IsoString &)
virtual ~XISFReader() noexcept(false)
void WriteICCProfile(const ICCProfile &profile)
void WriteImage(const DImage &image)
void WriteThumbnail(const UInt8Image &thumbnail)
void RemoveImageProperty(const IsoString &identifier)
void SetCreatorApplication(const String &appName)
void WriteSamples(const DComplexImage::sample *buffer, int startRow, int rowCount, int channel)
void WriteImageProperty(const IsoString &identifier, const Variant &value)
void WriteImage(const ComplexImage &image)
void SetCreatorModule(const String &modName)
void WriteProperties(const PropertyArray &properties)
void WriteSamples(const UInt16Image::sample *buffer, int startRow, int rowCount, int channel)
void Create(const String &path, int count)
void WriteImageProperties(const PropertyArray &properties)
void WriteImage(const DComplexImage &image)
void WriteFITSKeywords(const FITSKeywordArray &keywords)
void WriteSamples(const ComplexImage::sample *buffer, int startRow, int rowCount, int channel)
void WriteRGBWorkingSpace(const RGBColorSystem &rgbws)
virtual ~XISFWriter() noexcept(false)
void WriteImage(const UInt16Image &image)
void WriteSamples(const DImage::sample *buffer, int startRow, int rowCount, int channel)
const FITSKeywordArray & FITSKeywords() const
void SetImageId(const IsoString &id)
void WriteSamples(const UInt32Image::sample *buffer, int startRow, int rowCount, int channel)
void WriteColorFilterArray(const ColorFilterArray &cfa)
void SetImageOptions(const ImageOptions &options)
void WriteSamples(const FImage::sample *buffer, int startRow, int rowCount, int channel)
void RemoveProperty(const IsoString &identifier)
void SetHints(const IsoString &)
void WriteProperty(const IsoString &identifier, const Variant &value)
void WriteDisplayFunction(const DisplayFunction &df)
void WriteImage(const ImageVariant &image)
void SetLogHandler(XISFLogHandler *handler)
void CreateImage(const ImageInfo &info)
void WriteImage(const UInt32Image &image)
void WriteSamples(const UInt8Image::sample *buffer, int startRow, int rowCount, int channel)
void WriteImage(const UInt8Image &image)
void WriteImage(const Image &image)
Utility functions, data and constants for XISF support.
static bool CompressionNeedsItemSize(block_compression codec)
static const char * CompressionCodecId(block_compression codec)
static bool IsInternalPropertyId(const IsoString &id)
static bool CompressionUsesByteShuffle(block_compression codec)
static const char * ChecksumAlgorithmId(block_checksum algorithm)
static block_compression CompressionCodecNoShuffle(block_compression codec)
constexpr static bool DefaultWarningsAreErrors
constexpr static block_checksum DefaultChecksum
XISF(const XISF &)=delete
constexpr static bool DefaultIgnoreFITSKeywords
constexpr static int DefaultCompressionLevel
static const char * SampleFormatId(const GenericImage< P > &image)
static const char * ColorSpaceId(color_space colorSpace)
constexpr static block_compression DefaultCompression
static color_space ColorSpaceFromId(const String &id)
constexpr static bool DefaultIgnoreProperties
static const char * SampleFormatId(int bitsPerSample, bool floatSample, bool complexSample)
static size_type ChecksumLength(block_checksum algorithm)
constexpr static double DefaultOutputLowerBound
constexpr static bool DefaultFixNonFinite
static block_checksum ChecksumAlgorithmFromId(const String &id)
static const char * PropertyTypeId(property_type type)
constexpr static int DefaultVerbosity
constexpr static bool DefaultAutoMetadata
static property_type PropertyTypeFromId(const String &id)
static int CompressionLevelForMethod(block_compression codec, int level)
constexpr static double DefaultOutputUpperBound
static const char * ColorSpaceId(const AbstractImage &image)
constexpr static bool DefaultIgnoreEmbeddedData
static Compression * NewCompression(block_compression codec, size_type itemSize=1)
constexpr static fsize_type DefaultBlockAlignSize
static bool GetSampleFormatFromId(int &bitsPerSample, bool &floatSample, bool &complexSample, const String &id)
constexpr static bool DefaultNoWarnings
constexpr static bool DefaultStoreFITSKeywords
static bool IsValidPropertyId(const IsoString &id)
static block_compression CompressionCodecFromId(const String &id)
static IsoString InternalPropertyId(const IsoString &id)
static void EnsurePTLUTInitialized()
constexpr static bool DefaultImportFITSKeywords
static CryptographicHash * NewCryptographicHash(block_checksum algorithm)
constexpr static fsize_type DefaultMaxBlockInlineSize
XML document parsing and generation
XISF monolithic file signature
XISFFileSignature(uint32 length)
XISFFileSignature()=default
XISFFileSignature(const XISFFileSignature &)=default