PCL
|
XISF input file stream More...
#include <XISF.h>
Static Public Member Functions | |
static XMLDocument * | ExtractHeader (const String &path, XMLParserOptions options=XMLParserOptions()) |
XISFReader allows you to read properties, images and metadata serialized in monolithic XISF units stored as local files. This class can be used without a running PixInsight core application to implement XISF support in external applications.
pcl::XISFReader::XISFReader | ( | ) |
Constructs an XISFReader object. The stream is created in a default closed state.
|
virtualnoexcept |
Virtual destructor. If the stream is open, the destructor calls the Close() member function before destroying this object.
void pcl::XISFReader::Close | ( | ) |
If this stream is open, closes the disk file and clears all internal data structures. If this stream is closed, calling this member function has no effect.
|
static |
Extract and parse the XML header document of an existing monolithic XISF file at the specified path, and return it as a dynamically allocated instance of XMLDocument.
Ownership of the returned object is transferred to the caller, who is responsible for destroying it when appropriate.
This function will throw an Error exception if either the file is not a monolithic XISF unit, or the header is not a well-formed XML document. The header is not verified for validity or correctness as per the XISF format specification; only well-formedness of the XML document is checked.
String pcl::XISFReader::FilePath | ( | ) | const |
Returns the full path of the file being accessed through this XISFReader object, or an empty string if no file has been opened.
IsoString pcl::XISFReader::ImageId | ( | ) | const |
Returns the identifier of the current image in this input stream.
If no identifier is available for the current image, if no file has been opened, or if the current file contains no images, this function returns an empty string.
pcl::ImageInfo pcl::XISFReader::ImageInfo | ( | ) | const |
Returns geometry and color space parameters for the current image in this input stream.
pcl::ImageOptions pcl::XISFReader::ImageOptions | ( | ) | const |
Returns format-independent options corresponding to the current image in this input stream.
PropertyDescriptionArray pcl::XISFReader::ImagePropertyDescriptions | ( | ) | const |
Returns a list of property identifiers and data types describing the set of properties associated with the current image in this XISF unit. The returned list can be empty if no image is available, or if the current image has no properties.
bool pcl::XISFReader::ImplementsIncrementalRead | ( | ) | const |
Returns true iff this stream supports incremental read operations.
Incremental reads are not supported for compressed images. The reader will be forced to load and uncompresses a compressed image transparently upon the first call to a ReadSamples() member function, and the entire pixel data of the image will be stored in a temporary memory buffer. Pixel samples returned by succesive calls to ReadSamples() will be copied from this temporary buffer. Note that this is just a convenience feature that provides none of the benefits of incremental stream I/O operations.
bool pcl::XISFReader::IsOpen | ( | ) | const |
Returns true iff this stream is currently open for file read operations. The stream is open only after a successful call to Open().
int pcl::XISFReader::NumberOfImages | ( | ) | const |
Returns the number of images available in this XISF input stream.
void pcl::XISFReader::Open | ( | const String & | path | ) |
Opens an existing file for reading at the specified file path.
|
inline |
PropertyDescriptionArray pcl::XISFReader::PropertyDescriptions | ( | ) | const |
Returns a list of property identifiers and data types describing the set of properties associated with the XISF unit. The returned list can be empty if no file has been opened, or if the XISF unit has no properties.
ColorFilterArray pcl::XISFReader::ReadColorFilterArray | ( | ) |
Extracts a color filter array (CFA) description from the current image in this input stream, and returns it as a pcl::ColorFilterArray object.
If no CFA has been defined for the current image, if no file has been opened, or if the current file contains no images, this function returns an invalid ColorFilterArray instance.
DisplayFunction pcl::XISFReader::ReadDisplayFunction | ( | ) |
Extracts display function parameters from the current image in this input stream, and returns them as a pcl::DisplayFunction object.
If no display function has been defined for the current image, if no file has been opened, or if the current file contains no images, this function returns an identity display function.
FITSKeywordArray pcl::XISFReader::ReadFITSKeywords | ( | ) |
Extracts a list of FITS header keywords from the current image in this input stream, and returns the extracted keywords as a dynamic array.
If no FITS keywords are available for the current image, if no file has been opened, or if the current file contains no images, this function returns an empty array.
ICCProfile pcl::XISFReader::ReadICCProfile | ( | ) |
Extracts an ICC profile from the current image in this input stream, and returns the extracted ICC profile structure.
If no ICC profile is available for the current image, if no file has been opened, or if the current file contains no images, this function returns an empty ICCProfile structure.
void pcl::XISFReader::ReadImage | ( | ComplexImage & | image | ) |
Reads a 32-bit floating point complex image from this input stream.
void pcl::XISFReader::ReadImage | ( | DComplexImage & | image | ) |
Reads a 64-bit floating point complex image from this input stream.
void pcl::XISFReader::ReadImage | ( | DImage & | image | ) |
Reads a 64-bit floating point image from this input stream.
void pcl::XISFReader::ReadImage | ( | FImage & | image | ) |
Reads a 32-bit floating point image from this input stream.
void pcl::XISFReader::ReadImage | ( | UInt16Image & | image | ) |
Reads a 16-bit unsigned integer image from this input stream.
void pcl::XISFReader::ReadImage | ( | UInt32Image & | image | ) |
Reads a 32-bit unsigned integer image from this input stream.
void pcl::XISFReader::ReadImage | ( | UInt8Image & | image | ) |
Reads an 8-bit unsigned integer image from this input stream.
PropertyArray pcl::XISFReader::ReadImageProperties | ( | ) |
Returns an array with all properties extracted from the current image.
If no property is available for the current image, if no file has been opened, or if the current file contains no images, this function returns an empty array.
Extracts a property from the current image with the specified identifier, and returns its value as a Variant object.
If no property with the specified identifier is available for the current image, if no file has been opened, or if the current file contains no images, this function returns an invalid Variant object.
PropertyArray pcl::XISFReader::ReadProperties | ( | ) |
Returns an array with all properties associated with the XISF unit.
If no property is available for the XISF unit, or if no file has been opened, this function returns an empty array.
Extracts a property associated with the XISF unit with the specified identifier, and returns its value as a Variant object.
If no property with the specified identifier is available for this XISF unit, or if no file has been opened, this function returns an invalid Variant object.
RGBColorSystem pcl::XISFReader::ReadRGBWorkingSpace | ( | ) |
Extracts RGB working space parameters from the current image in this input stream, and returns them as a RGBColorSystem object.
If no RGB working space has been defined for the current image, if no file has been opened, or if the current file contains no images, this function returns a duplicate of the sRGB color space, since this is the default XISF color space.
void pcl::XISFReader::ReadSamples | ( | ComplexImage::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental random access read of 32-bit complex pixel samples.
This is an overloaded member function for the ComplexImage type; see ReadSamples( Image::sample*, int, int, int ) for a full description.
void pcl::XISFReader::ReadSamples | ( | DComplexImage::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental random access read of 64-bit complex pixel samples.
This is an overloaded member function for the DComplexImage type; see ReadSamples( Image::sample*, int, int, int ) for a full description.
void pcl::XISFReader::ReadSamples | ( | DImage::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental random access read of 64-bit floating point pixel samples.
This is an overloaded member function for the DImage type; see ReadSamples( Image::sample*, int, int, int ) for a full description.
void pcl::XISFReader::ReadSamples | ( | FImage::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental random access read of 32-bit floating point pixel samples.
[out] | buffer | Address of the destination pixel sample buffer. |
startRow | First pixel row to read. | |
rowCount | Number of pixel rows to read. | |
channel | Channel index to read. |
void pcl::XISFReader::ReadSamples | ( | UInt16Image::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental random access read of 16-bit unsigned integer pixel samples.
This is an overloaded member function for the UInt16Image type; see ReadSamples( Image::sample*, int, int, int ) for a full description.
void pcl::XISFReader::ReadSamples | ( | UInt32Image::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental random access read of 32-bit unsigned integer pixel samples.
This is an overloaded member function for the UInt32Image type; see ReadSamples( Image::sample*, int, int, int ) for a full description.
void pcl::XISFReader::ReadSamples | ( | UInt8Image::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental random access read of 8-bit unsigned integer pixel samples.
This is an overloaded member function for the UInt8Image type; see ReadSamples( Image::sample*, int, int, int ) for a full description.
UInt8Image pcl::XISFReader::ReadThumbnail | ( | ) |
Extracts a thumbnail image from the current image in this input stream, and returns the extracted thumbnail as an 8-bit unsigned integer image.
If no thumbnail is available for the current image, if no file has been opened, or if the current file contains no images, this function returns an empty image.
int pcl::XISFReader::SelectedImageIndex | ( | ) | const |
Returns the index of the currently selected image, or -1 if either no file has been opened, or if the file does not contain any images.
void pcl::XISFReader::SelectImage | ( | int | index | ) |
Sets the current image index in this input stream. index must be in the range [0,NumberOfImages()-1].
void pcl::XISFReader::SetHints | ( | const IsoString & | ) |
Tell the reader which format hints have been specified, for inclusion as a reserved metadata property.
void pcl::XISFReader::SetImageOptions | ( | const pcl::ImageOptions & | options | ) |
Defines a new set of format-independent options for the current image in this input stream.
Only options that modify the reading behavior of the stream will be taken into account; the rest will be ignored, irrespective of their values.
void pcl::XISFReader::SetLogHandler | ( | XISFLogHandler * | handler | ) |
Associates a log handler with this XISF input stream.
The specified handler object must be allocated dynamically by the caller. It will be owned by this XISFReader instance, which will destroy and deallocate it when appropriate. To force destruction of the associated log handler (if any), call this function with a null pointer as argument.
void pcl::XISFReader::SetOptions | ( | const pcl::XISFOptions & | options | ) |
Define a set of format-specific options.