PCL
pcl::XISF Class Reference

Utility functions, data and constants for XISF support. More...

#include <XISF.h>

Public Types

using block_checksum = XISFChecksum::value_type
 
using block_compression = XISFCompression::value_type
 
using block_endianness = XISFByteOrder::value_type
 
using color_space = ColorSpace::value_type
 
using property_type = VariantType::value_type
 

Public Member Functions

 XISF ()=delete
 
 XISF (const XISF &)=delete
 
 ~XISF ()=delete
 
XISFoperator= (const XISF &)=delete
 

Static Public Member Functions

static block_checksum ChecksumAlgorithmFromId (const String &id)
 
static const char * ChecksumAlgorithmId (block_checksum algorithm)
 
static size_type ChecksumLength (block_checksum algorithm)
 
static color_space ColorSpaceFromId (const String &id)
 
static const char * ColorSpaceId (color_space colorSpace)
 
static const char * ColorSpaceId (const AbstractImage &image)
 
static block_compression CompressionCodecFromId (const String &id)
 
static const char * CompressionCodecId (block_compression codec)
 
static block_compression CompressionCodecNoShuffle (block_compression codec)
 
static int CompressionLevelForMethod (block_compression codec, int level)
 
static bool CompressionNeedsItemSize (block_compression codec)
 
static bool CompressionUsesByteShuffle (block_compression codec)
 
static void EnsurePTLUTInitialized ()
 
static bool GetSampleFormatFromId (int &bitsPerSample, bool &floatSample, bool &complexSample, const String &id)
 
static IsoString InternalPropertyId (const IsoString &id)
 
static bool IsInternalPropertyId (const IsoString &id)
 
static bool IsValidPropertyId (const IsoString &id)
 
static CompressionNewCompression (block_compression codec, size_type itemSize=1)
 
static CryptographicHashNewCryptographicHash (block_checksum algorithm)
 
static property_type PropertyTypeFromId (const String &id)
 
static const char * PropertyTypeId (property_type type)
 
template<class P >
static const char * SampleFormatId (const GenericImage< P > &image)
 
static const char * SampleFormatId (int bitsPerSample, bool floatSample, bool complexSample)
 

Static Public Attributes

constexpr static bool DefaultAutoMetadata = true
 
constexpr static fsize_type DefaultBlockAlignSize = 4096
 
constexpr static block_checksum DefaultChecksum = XISFChecksum::None
 
constexpr static block_compression DefaultCompression = XISFCompression::None
 
constexpr static int DefaultCompressionLevel = 0
 
constexpr static bool DefaultFixNonFinite = true
 
constexpr static bool DefaultIgnoreEmbeddedData = false
 
constexpr static bool DefaultIgnoreFITSKeywords = false
 
constexpr static bool DefaultIgnoreProperties = false
 
constexpr static bool DefaultImportFITSKeywords = false
 
constexpr static fsize_type DefaultMaxBlockInlineSize = 3072
 
constexpr static bool DefaultNoWarnings = false
 
constexpr static double DefaultOutputLowerBound = 0.0
 
constexpr static double DefaultOutputUpperBound = 1.0
 
constexpr static bool DefaultStoreFITSKeywords = true
 
constexpr static int DefaultVerbosity = 1
 
constexpr static bool DefaultWarningsAreErrors = false
 
constexpr static const char * InternalNamespacePrefix = "XISF:"
 
constexpr static int MaxCompressionLevel = 100
 
constexpr static int MaxThumbnailSize = 1024
 

Detailed Description

Definition at line 206 of file XISF.h.

Member Typedef Documentation

◆ block_checksum

using pcl::XISF::block_checksum = XISFChecksum::value_type

Represents a supported block checksum algorithm.

Definition at line 223 of file XISF.h.

◆ block_compression

using pcl::XISF::block_compression = XISFCompression::value_type

Represents a supported block compression codec.

Definition at line 228 of file XISF.h.

◆ block_endianness

using pcl::XISF::block_endianness = XISFByteOrder::value_type

Represents a block byte order (endianness).

Definition at line 233 of file XISF.h.

◆ color_space

using pcl::XISF::color_space = ColorSpace::value_type

Represents a supported color space.

Definition at line 218 of file XISF.h.

◆ property_type

using pcl::XISF::property_type = VariantType::value_type

Represents a supported XISF property type.

Definition at line 213 of file XISF.h.

Constructor & Destructor Documentation

◆ XISF() [1/2]

pcl::XISF::XISF ( )
delete

Default constructor. This constructor is disabled because XISF is not an instantiable class.

◆ XISF() [2/2]

pcl::XISF::XISF ( const XISF )
delete

Copy constructor. This constructor is disabled because XISF is not an instantiable class.

◆ ~XISF()

pcl::XISF::~XISF ( )
delete

Destructor. This destructor is disabled because XISF is not an instantiable class.

Member Function Documentation

◆ ChecksumAlgorithmFromId()

static block_checksum pcl::XISF::ChecksumAlgorithmFromId ( const String id)
static

Returns a checksum algorithm, given its identifier. Used for deserialization from XML file headers.

◆ ChecksumAlgorithmId()

static const char* pcl::XISF::ChecksumAlgorithmId ( block_checksum  algorithm)
static

Returns the identifier of a supported checksum algorithm. Used as XML element attribute values in XISF headers.

◆ ChecksumLength()

static size_type pcl::XISF::ChecksumLength ( block_checksum  algorithm)
static

Returns the length in bytes of a cryptographic digest computed with the specified algorithm.

◆ ColorSpaceFromId()

static color_space pcl::XISF::ColorSpaceFromId ( const String id)
static

Returns a color space, given its identifier. Used for deserialization from XML file headers.

◆ ColorSpaceId() [1/2]

static const char* pcl::XISF::ColorSpaceId ( color_space  colorSpace)
static

Returns the identifier of a color space. Used as XML element attribute values in XISF headers.

XISF 1.0 supports three color spaces:

  • Grayscale
  • RGB
  • CIE L*a*b*

For more information on color spaces, see RGBColorSystem.

◆ ColorSpaceId() [2/2]

static const char* pcl::XISF::ColorSpaceId ( const AbstractImage image)
inlinestatic

Returns the identifier of the color space corresponding to the specified image.

Definition at line 453 of file XISF.h.

References pcl::ImageColor::ColorSpace().

◆ CompressionCodecFromId()

static block_compression pcl::XISF::CompressionCodecFromId ( const String id)
static

Returns a compression codec, given its identifier. Used for deserialization from XML file headers.

◆ CompressionCodecId()

static const char* pcl::XISF::CompressionCodecId ( block_compression  codec)
static

Returns the identifier of a supported compression codec. Used as XML element attribute values in XISF headers.

◆ CompressionCodecNoShuffle()

static block_compression pcl::XISF::CompressionCodecNoShuffle ( block_compression  codec)
static

Given a compression codec, returns the equivalent codec without byte shuffling.

◆ CompressionLevelForMethod()

static int pcl::XISF::CompressionLevelForMethod ( block_compression  codec,
int  level 
)
static

Returns the codec-specific compression level to be used for the specified compression codec and abstract compression level.

◆ CompressionNeedsItemSize()

static bool pcl::XISF::CompressionNeedsItemSize ( block_compression  codec)
static

Returns true iff a compression codec needs to know the size of each element in a compressed block (for example, for byte shuffling).

◆ CompressionUsesByteShuffle()

static bool pcl::XISF::CompressionUsesByteShuffle ( block_compression  codec)
static

Returns true iff the specified compression codec uses byte shuffling to preprocess uncompressed data.

◆ EnsurePTLUTInitialized()

static void pcl::XISF::EnsurePTLUTInitialized ( )
static

Ensures that the internal pixel traits lookup tables have been properly allocated and initialized. This is a thread-safe function used internally by the XISFReader and XISFWriter classes to accelerate conversions among all supported pixel sample data types. This allows external applications to perform image I/O operations without a running PixInsight core application.

Note
This is an internal routine. You normally should not need to call it, unless you are hacking the current XISF implementation.

◆ GetSampleFormatFromId()

static bool pcl::XISF::GetSampleFormatFromId ( int &  bitsPerSample,
bool &  floatSample,
bool &  complexSample,
const String id 
)
static

Provides the parameters (bit size, complex/float/integer format) of a pixel sample format, given its identifier. Used for deserialization from XML file headers.

◆ InternalPropertyId()

static IsoString pcl::XISF::InternalPropertyId ( const IsoString id)
inlinestatic

Returns a property identifier 'internalized' with the XISF: prefix.

Definition at line 595 of file XISF.h.

◆ IsInternalPropertyId()

static bool pcl::XISF::IsInternalPropertyId ( const IsoString id)
inlinestatic

Returns true iff the specified string id is the identifier of a reserved XISF property.

Property identifiers starting with the XISF: namespace prefix are reserved by the XISF format and cannot be defined by external client applications.

Definition at line 582 of file XISF.h.

◆ IsValidPropertyId()

static bool pcl::XISF::IsValidPropertyId ( const IsoString id)
inlinestatic

Returns true iff the specified string id is a valid XISF property identifier.

A valid XISF property identifier is a sequence:

t1[:t2[:...:tn]]

where each ti satisfies the following conditions:

  • It is not an empty string.
  • Its first character is either an alphabetic character or an underscore character.
  • Its second and successive characters, if they exist, are all of them either alphabetic characters, decimal digits, or underscores.

Definition at line 564 of file XISF.h.

References pcl::Property::IsValidIdentifier().

◆ NewCompression()

static Compression* pcl::XISF::NewCompression ( block_compression  codec,
size_type  itemSize = 1 
)
static

Returns a pointer to a dynamically allocated Compression object. The returned object implements the specified compression codec. itemSize is the length in bytes of a data element, for byte shufflig.

◆ NewCryptographicHash()

static CryptographicHash* pcl::XISF::NewCryptographicHash ( block_checksum  algorithm)
static

Returns a pointer to a dynamically allocated CryptographicHash object. The returned object implements the specified hashing algorithm.

◆ operator=()

XISF& pcl::XISF::operator= ( const XISF )
delete

Copy assignment. This operator is disabled because XISF is not an instantiable class.

◆ PropertyTypeFromId()

static property_type pcl::XISF::PropertyTypeFromId ( const String id)
static

Get a property data type, given its identifier. Used for deserialization from XML file headers.

◆ PropertyTypeId()

static const char* pcl::XISF::PropertyTypeId ( property_type  type)
static

Returns the identifier of a property data type. Used as XML element attribute values in XISF headers.

XISF can store image properties in a variety of scalar, vector and matrix types. See the code below and pcl/Variant.h for details.

◆ SampleFormatId() [1/2]

template<class P >
static const char* pcl::XISF::SampleFormatId ( const GenericImage< P > &  image)
inlinestatic

Returns the identifier of the pixel sample data type corresponding to the specified image.

Definition at line 423 of file XISF.h.

◆ SampleFormatId() [2/2]

static const char* pcl::XISF::SampleFormatId ( int  bitsPerSample,
bool  floatSample,
bool  complexSample 
)
static

Returns the identifier of a pixel sample data type. Used as XML element attribute values in XISF headers.

XISF 1.0 supports seven pixel sample formats:

  • 32-bit IEEE 754 floating point real (float)
  • 64-bit IEEE 754 floating point real (double)
  • 32-bit IEEE 754 floating point complex (fcomplex)
  • 64-bit IEEE 754 floating point complex (dcomplex)
  • 8-bit unsigned integer real (uint8)
  • 16-bit unsigned integer real (uint16)
  • 32-bit unsigned integer real (uint32)

Member Data Documentation

◆ DefaultAutoMetadata

constexpr static bool pcl::XISF::DefaultAutoMetadata = true
staticconstexpr

Whether to generate XISF standard metadata properties by default.

Definition at line 360 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultBlockAlignSize

constexpr static fsize_type pcl::XISF::DefaultBlockAlignSize = 4096
staticconstexpr

Default block size in bytes for optional alignment of XISF data structures.

Definition at line 270 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultChecksum

constexpr static block_checksum pcl::XISF::DefaultChecksum = XISFChecksum::None
staticconstexpr

Default block checksum algorithm.

Definition at line 285 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultCompression

constexpr static block_compression pcl::XISF::DefaultCompression = XISFCompression::None
staticconstexpr

Default block compression codec.

Definition at line 290 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultCompressionLevel

constexpr static int pcl::XISF::DefaultCompressionLevel = 0
staticconstexpr

Default compression level. This is zero by default, which means that the specific compression level used will be chosen as a good compromise for the selected compression codec.

Definition at line 297 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultFixNonFinite

constexpr static bool pcl::XISF::DefaultFixNonFinite = true
staticconstexpr

Whether to replace NaNs, infinities and negative zeros with lower bound values (usually zero) in floating point images. This applies only to input operations.

Definition at line 314 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultIgnoreEmbeddedData

constexpr static bool pcl::XISF::DefaultIgnoreEmbeddedData = false
staticconstexpr

Whether to ignore all embedded data by default.

Definition at line 350 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultIgnoreFITSKeywords

constexpr static bool pcl::XISF::DefaultIgnoreFITSKeywords = false
staticconstexpr

Whether to ignore existing FITS keywords by default. Has to be false because some components of our standard tool set still depend heavily on FITS keywords. Should be true, and it will be, eventually.

Definition at line 338 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultIgnoreProperties

constexpr static bool pcl::XISF::DefaultIgnoreProperties = false
staticconstexpr

Whether to ignore embedded image properties by default.

Definition at line 355 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultImportFITSKeywords

constexpr static bool pcl::XISF::DefaultImportFITSKeywords = false
staticconstexpr

Whether to import FITS keywords as XISF properties by default. Can be useful for digestions of data stored in legacy formats, but is a bad idea on a regular basis.

Definition at line 345 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultMaxBlockInlineSize

constexpr static fsize_type pcl::XISF::DefaultMaxBlockInlineSize = 3072
staticconstexpr

Default maximum size in bytes of an inline XISF block.

Definition at line 275 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultNoWarnings

constexpr static bool pcl::XISF::DefaultNoWarnings = false
staticconstexpr

Whether to silent warning conditions by default.

Definition at line 365 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultOutputLowerBound

constexpr static double pcl::XISF::DefaultOutputLowerBound = 0.0
staticconstexpr

The default lower bound of the output floating point pixel sample range.

Definition at line 319 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultOutputUpperBound

constexpr static double pcl::XISF::DefaultOutputUpperBound = 1.0
staticconstexpr

The default upper bound of the output floating point pixel sample range.

Definition at line 324 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultStoreFITSKeywords

constexpr static bool pcl::XISF::DefaultStoreFITSKeywords = true
staticconstexpr

Whether to serialize FITS keywords by default. Has to be true because some components of our standard tool set still depend heavily on FITS keywords. Should be false, and it will be, eventually.

Definition at line 331 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultVerbosity

constexpr static int pcl::XISF::DefaultVerbosity = 1
staticconstexpr

The default verbosity level: 0=quiet, 1=normal, 2=quite, >2=very.

Definition at line 307 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ DefaultWarningsAreErrors

constexpr static bool pcl::XISF::DefaultWarningsAreErrors = false
staticconstexpr

Whether to treat warnings as unrecoverable errors by default.

Definition at line 370 of file XISF.h.

Referenced by pcl::XISFOptions::Reset().

◆ InternalNamespacePrefix

constexpr static const char* pcl::XISF::InternalNamespacePrefix = "XISF:"
staticconstexpr

The namespace prefix of all XISF reserved properties.

Definition at line 375 of file XISF.h.

◆ MaxCompressionLevel

constexpr static int pcl::XISF::MaxCompressionLevel = 100
staticconstexpr

Maximum codec-independent compression level.

Definition at line 302 of file XISF.h.

◆ MaxThumbnailSize

constexpr static int pcl::XISF::MaxThumbnailSize = 1024
staticconstexpr

Maximum allowed width or height of an XISF image thumbnail in pixels.

Definition at line 280 of file XISF.h.


The documentation for this class was generated from the following file: