PCL
|
XISF output file stream More...
#include <XISF.h>
Public Member Functions | |
XISFWriter () | |
virtual | ~XISFWriter () noexcept(false) |
void | Close () |
void | CloseImage () |
void | Create (const String &path, int count) |
void | CreateImage (const ImageInfo &info) |
String | FilePath () const |
const FITSKeywordArray & | FITSKeywords () const |
bool | IsOpen () const |
pcl::XISFOptions | Options () const |
void | RemoveImageProperty (const IsoString &identifier) |
void | RemoveProperty (const IsoString &identifier) |
void | SetCreatorApplication (const String &appName) |
void | SetCreatorModule (const String &modName) |
void | SetHints (const IsoString &) |
void | SetImageId (const IsoString &id) |
void | SetImageOptions (const ImageOptions &options) |
void | SetLogHandler (XISFLogHandler *handler) |
void | SetOptions (const pcl::XISFOptions &options) |
void | WriteColorFilterArray (const ColorFilterArray &cfa) |
void | WriteDisplayFunction (const DisplayFunction &df) |
void | WriteFITSKeywords (const FITSKeywordArray &keywords) |
void | WriteICCProfile (const ICCProfile &profile) |
void | WriteImage (const ComplexImage &image) |
void | WriteImage (const DComplexImage &image) |
void | WriteImage (const DImage &image) |
void | WriteImage (const Image &image) |
void | WriteImage (const ImageVariant &image) |
void | WriteImage (const UInt16Image &image) |
void | WriteImage (const UInt32Image &image) |
void | WriteImage (const UInt8Image &image) |
void | WriteImageProperties (const PropertyArray &properties) |
void | WriteImageProperty (const IsoString &identifier, const Variant &value) |
void | WriteProperties (const PropertyArray &properties) |
void | WriteProperty (const IsoString &identifier, const Variant &value) |
void | WriteRGBWorkingSpace (const RGBColorSystem &rgbws) |
void | WriteSamples (const ComplexImage::sample *buffer, int startRow, int rowCount, int channel) |
void | WriteSamples (const DComplexImage::sample *buffer, int startRow, int rowCount, int channel) |
void | WriteSamples (const DImage::sample *buffer, int startRow, int rowCount, int channel) |
void | WriteSamples (const FImage::sample *buffer, int startRow, int rowCount, int channel) |
void | WriteSamples (const UInt16Image::sample *buffer, int startRow, int rowCount, int channel) |
void | WriteSamples (const UInt32Image::sample *buffer, int startRow, int rowCount, int channel) |
void | WriteSamples (const UInt8Image::sample *buffer, int startRow, int rowCount, int channel) |
void | WriteThumbnail (const UInt8Image &thumbnail) |
XISFWriter allows you to write 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::XISFWriter::XISFWriter | ( | ) |
Constructs an XISFWriter 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 the object.
void pcl::XISFWriter::Close | ( | ) |
If this stream is open, flushes all pending file write operations, closes the disk file, and clears all internal data structures. If this stream is closed, calling this member function has no effect.
void pcl::XISFWriter::CloseImage | ( | ) |
Complete the image created by a previous call to CreateImage() and generate it in the output stream.
void pcl::XISFWriter::Create | ( | const String & | path, |
int | count | ||
) |
Creates a new file for writing at the specified path, and prepares to write count images and their embedded data.
void pcl::XISFWriter::CreateImage | ( | const ImageInfo & | info | ) |
Creates a new image with the specified geometry and color space, and prepare for sequential/random write access.
The data type and other image parameters are defined by the current set of format-independent options (see SetImageOptions()).
String pcl::XISFWriter::FilePath | ( | ) | const |
Returns the full path of the output file being accessed through this XISFWriter object, or an empty string if no file has been created.
const FITSKeywordArray& pcl::XISFWriter::FITSKeywords | ( | ) | const |
Returns the list of FITS header keywords embedded in the current image. This is necessary because the PixInsight core application has an option to reload the list of keywords actually embedded after writing a new image. Client applications without this requirement can safely ignore this member function.
bool pcl::XISFWriter::IsOpen | ( | ) | const |
Returns true iff this stream is currently open for file write operations. The stream is open only after a successful call to Create().
|
inline |
void pcl::XISFWriter::RemoveImageProperty | ( | const IsoString & | identifier | ) |
Removes a property with the specified identifier from the list of properties associated with the current image. If no property with the specified identifier has been defined for the current image, this member function takes no action.
void pcl::XISFWriter::RemoveProperty | ( | const IsoString & | identifier | ) |
Removes a property with the specified identifier from the list of properties associated with the XISF unit. If no property with the specified identifier has been defined previously, this member function takes no action.
void pcl::XISFWriter::SetCreatorApplication | ( | const String & | appName | ) |
Sets the value of the XISF:CreatorApplication reserved metadata property to be included in newly created XISF units.
The XISF:CreatorApplication property is mandatory. If this implementation is being used in an installed PixInsight module (such as the standard XISF format support module for example), this property will be generated automatically by retrieving version information from the running PixInsight core application, and the value set with this function will be ignored. If this implementation is used in an external application, calling this function with the appropriate application name (including version information) is mandatory. See the XISF specification for more information on reserved metadata properties.
void pcl::XISFWriter::SetCreatorModule | ( | const String & | modName | ) |
Sets the value of the XISF:CreatorModule reserved metadata property to be included in newly created XISF units.
The XISF:CreatorModule property is optional. If this implementation is being used in an installed PixInsight module (such as the standard XISF format support module for example), this property will be generated automatically by retrieving the name and version of the running module, and the value set with this function will be ignored. If this implementation is being used in an external application, the value set by calling this function will be used. If no CreatorModule is defined, the corresponding metadata property will not be generated. See the XISF specification for more information on reserved metadata properties.
void pcl::XISFWriter::SetHints | ( | const IsoString & | ) |
Tell the writer which format hints have been specified, for inclusion as a reserved metadata property.
void pcl::XISFWriter::SetImageId | ( | const IsoString & | id | ) |
Sets the identifier of the current image (that is, of the next image that will be written) in this input stream.
void pcl::XISFWriter::SetImageOptions | ( | const ImageOptions & | options | ) |
Defines a new set of format-independent options for the next image written by this output stream.
Only options that modify the writing behavior of the stream will be taken into account; the rest will be ignored, irrespective of their values.
void pcl::XISFWriter::SetLogHandler | ( | XISFLogHandler * | handler | ) |
Associates a log handler with this XISF output 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::XISFWriter::SetOptions | ( | const pcl::XISFOptions & | options | ) |
Define a set of format-specific options.
void pcl::XISFWriter::WriteColorFilterArray | ( | const ColorFilterArray & | cfa | ) |
Embeds a color filter array (CFA) description for the current image of this output stream.
void pcl::XISFWriter::WriteDisplayFunction | ( | const DisplayFunction & | df | ) |
Defines display function parameters for the current image of this output stream.
void pcl::XISFWriter::WriteFITSKeywords | ( | const FITSKeywordArray & | keywords | ) |
Embeds a set of FITS header keywords in the current image of this output stream.
void pcl::XISFWriter::WriteICCProfile | ( | const ICCProfile & | profile | ) |
Embeds an ICC profile in the current image of this output stream.
void pcl::XISFWriter::WriteImage | ( | const ComplexImage & | image | ) |
Writes a 32-bit floating point complex image to this output stream.
void pcl::XISFWriter::WriteImage | ( | const DComplexImage & | image | ) |
Writes a 64-bit floating point complex image to this output stream.
void pcl::XISFWriter::WriteImage | ( | const DImage & | image | ) |
Writes a 64-bit floating point image to this output stream.
void pcl::XISFWriter::WriteImage | ( | const Image & | image | ) |
Writes a 32-bit floating point image to this output stream.
void pcl::XISFWriter::WriteImage | ( | const ImageVariant & | image | ) |
Writes the specified image to this output stream.
void pcl::XISFWriter::WriteImage | ( | const UInt16Image & | image | ) |
Writes a 16-bit unsigned integer image to this output stream.
void pcl::XISFWriter::WriteImage | ( | const UInt32Image & | image | ) |
Writes a 32-bit unsigned integer image to this output stream.
void pcl::XISFWriter::WriteImage | ( | const UInt8Image & | image | ) |
Writes an 8-bit unsigned integer image to this output stream.
void pcl::XISFWriter::WriteImageProperties | ( | const PropertyArray & | properties | ) |
Associates a set of properties with the current image in this output stream.
Associates a property with the specified identifier and value with the current image in this output stream.
void pcl::XISFWriter::WriteProperties | ( | const PropertyArray & | properties | ) |
Associates a set of properties with the XISF unit being generated by this output stream.
Associates a property with the specified identifier and value with the XISF unit being generated by this output stream.
void pcl::XISFWriter::WriteRGBWorkingSpace | ( | const RGBColorSystem & | rgbws | ) |
Defines RGB working space parameters for the current image of this output stream.
void pcl::XISFWriter::WriteSamples | ( | const ComplexImage::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental/random write of 32-bit complex pixel samples.
This is an overloaded member function for the ComplexImage type; see WriteSamples( const Image::sample*, int, int, int ) for a full description.
void pcl::XISFWriter::WriteSamples | ( | const DComplexImage::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental/random write of 64-bit complex pixel samples.
This is an overloaded member function for the DComplexImage type; see WriteSamples( const Image::sample*, int, int, int ) for a full description.
void pcl::XISFWriter::WriteSamples | ( | const DImage::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental/random write of 64-bit floating point pixel samples.
This is an overloaded member function for the DImage type; see WriteSamples( const Image::sample*, int, int, int ) for a full description.
void pcl::XISFWriter::WriteSamples | ( | const FImage::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental/random write of 32-bit floating point pixel samples.
buffer | Address of the source pixel sample buffer. |
startRow | First pixel row to write. |
rowCount | Number of pixel rows to write. |
channel | Channel index to write. |
void pcl::XISFWriter::WriteSamples | ( | const UInt16Image::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental/random write of 16-bit unsigned integer pixel samples.
This is an overloaded member function for the UInt16Image type; see WriteSamples( const Image::sample*, int, int, int ) for a full description.
void pcl::XISFWriter::WriteSamples | ( | const UInt32Image::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental/random write of 32-bit unsigned integer pixel samples.
This is an overloaded member function for the UInt32Image type; see WriteSamples( const Image::sample*, int, int, int ) for a full description.
void pcl::XISFWriter::WriteSamples | ( | const UInt8Image::sample * | buffer, |
int | startRow, | ||
int | rowCount, | ||
int | channel | ||
) |
Incremental/random write of 8-bit unsigned integer pixel samples.
This is an overloaded member function for the UInt8Image type; see WriteSamples( const Image::sample*, int, int, int ) for a full description.
void pcl::XISFWriter::WriteThumbnail | ( | const UInt8Image & | thumbnail | ) |
Embeds an 8-bit thumbnail image in the current image of this output stream.