PCL
pcl::DrizzleData Class Reference

Drizzle integration data parser and generator. More...

#include <DrizzleData.h>

Public Types

typedef Array< DPointdistortion_vector
 
typedef Array< Pointrejection_coordinates
 
typedef Array< rejection_coordinatesrejection_data
 
typedef vector_spline::spline spline
 
typedef PointSurfaceSpline< DPointvector_spline
 
typedef Array< float > weight_vector
 

Public Member Functions

 DrizzleData ()=default
 
 DrizzleData (const DrizzleData &)=default
 
 DrizzleData (DrizzleData &&)=default
 
 DrizzleData (const String &filePath, bool ignoreIntegrationData=false)
 
 DrizzleData (const XMLDocument &xml, bool ignoreIntegrationData=false)
 
 DrizzleData (const XMLElement &element, bool ignoreIntegrationData=false)
 
virtual ~DrizzleData ()
 
const vector_splineAlignmentInverseSplines () const
 
const MatrixAlignmentMatrix () const
 
const DPointAlignmentOrigin () const
 
const vector_splineAlignmentSplines () const
 
const StringAlignmentTargetFilePath () const
 
const StringCFASourceFilePath () const
 
const StringCFASourcePattern () const
 
void Clear ()
 
void ClearIntegrationData ()
 
TimePoint CreationTime () const
 
void DisableCompression (bool disable=true)
 
void EnableCompression (bool enable=true)
 
void GetLocalDistortionModel (distortion_vector &P1, distortion_vector &D2, distortion_vector &P2, distortion_vector &D1, weight_vector &W, int &order, float &regularization, bool &extrapolate)
 
bool HasAlignmentInverseSplines () const
 
bool HasAlignmentMatrix () const
 
bool HasAlignmentSplines () const
 
bool HasImageWeightsData () const
 
bool HasIntegrationData () const
 
bool HasLocalDistortionModel () const
 
bool HasRejectionData () const
 
bool IsCompressionEnabled () const
 
bool IsRejected (const Point &position, int channel=0) const
 
const DVectorLocation () const
 
const StringMetadata () const
 
int NumberOfChannels () const
 
DrizzleDataoperator= (const DrizzleData &)=default
 
DrizzleDataoperator= (DrizzleData &&)=default
 
void Parse (const String &filePath, bool ignoreIntegrationData=false)
 
void Parse (const XMLDocument &xml, bool ignoreIntegrationData=false)
 
void Parse (const XMLElement &element, bool ignoreIntegrationData=false)
 
double Pedestal () const
 
int ReferenceHeight () const
 
const DVectorReferenceLocation () const
 
int ReferenceWidth () const
 
const UI64VectorRejectionHighCount () const
 
const UI64VectorRejectionLowCount () const
 
const UInt8ImageRejectionMap () const
 
const DVectorScale () const
 
XMLDocumentSerialize () const
 
void SerializeToFile (const String &path) const
 
void SetAlignmentInverseSplines (const vector_spline &Sinv)
 
void SetAlignmentMatrix (const Matrix &H)
 
void SetAlignmentOrigin (const DPoint &p0)
 
void SetAlignmentSplines (const vector_spline &S)
 
void SetAlignmentTargetFilePath (const String &filePath)
 
void SetCFASourceFilePath (const String &filePath)
 
void SetCFASourcePattern (const String &cfaPattern)
 
void SetLocalDistortionModel (const distortion_vector &P1, const distortion_vector &D2, const distortion_vector &P2, const distortion_vector &D1, const weight_vector &W, int order=2, float regularization=0.01F, bool extrapolate=true)
 
void SetLocation (const DVector &v)
 
void SetMetadata (const String &metadata)
 
void SetPedestal (double p)
 
void SetReferenceDimensions (int width, int height)
 
void SetReferenceLocation (const DVector &v)
 
void SetRejectionMap (const UInt8Image &map)
 
void SetScale (const DVector &v)
 
void SetSourceFilePath (const String &filePath)
 
void SetWeight (const DVector &v)
 
const StringSourceFilePath () const
 
const DVectorWeight () const
 

Detailed Description

DrizzleData implements support for the XML drizzle data format (XDRZ format, .xdrz file suffix).

A drizzle image integration process has been formalized as the following chain of subtasks on the PixInsight/PCL platform:

  • 1. Demosaicing. Only required if the input data set has been mosaiced with a color filter array, such as a Bayer filter.
  • 2. Image registration. Generates image alignment information in the form of alignment matrices (projective transformations) and/or two-dimensional surface splines (for arbitrary distortion correction, global and local distortion correction models).
  • 3. Image integration. Generates statistical data for each channel of the integrated image. This includes estimates of location and scale, statistical weights and pixel rejection data.
  • 4. Drizzle integration. The input data for the drizzle algorithm is the input image for subtasks 1 (CFA drizzle) or 2 (normal drizzle). The information generated by subtasks 2 and 3 is used to perform a drizzle image integration process by inverse coordinate projection with image weighting, image normalization, and pixel rejection.

An XDRZ file stores all of the data generated by the above drizzle integration subtasks as an XML document. The DrizzleData class is a high-level interface for parsing and generation of these special files.

This class also implements an internal read-only compatibility layer with the old plain text drizzle data format (.drz file suffix) used by versions of PixInsight before the 1.8.5 standard distribution. By using the class constructor or the Parse() member function to load and parse an existing file, the correct file format is detected automatically.

See also
NormalizationData

Definition at line 112 of file DrizzleData.h.

Member Typedef Documentation

◆ distortion_vector

An ordered list of reference image coordinates or image displacements used to store a local distortion model.

Definition at line 133 of file DrizzleData.h.

◆ rejection_coordinates

A list of coordinates corresponding to pixels rejected by an image integration task.

Definition at line 145 of file DrizzleData.h.

◆ rejection_data

A set of per-channel pixel rejection coordinates.

Definition at line 150 of file DrizzleData.h.

◆ spline

Represents a coordinate interpolating/approximating surface spline used for image registration with arbitrary distortion correction.

Definition at line 127 of file DrizzleData.h.

◆ vector_spline

Represents a vector surface spline interpolation/approximation in two dimensions. This class is used to implement image alignment with arbitrary distortion correction.

Definition at line 121 of file DrizzleData.h.

◆ weight_vector

An ordered list of statistical weights corresponding to points in a local distortion model.

Definition at line 139 of file DrizzleData.h.

Constructor & Destructor Documentation

◆ DrizzleData() [1/6]

pcl::DrizzleData::DrizzleData ( )
default

Default constructor. Constructs an empty DrizzleData object.

◆ DrizzleData() [2/6]

pcl::DrizzleData::DrizzleData ( const DrizzleData )
default

Copy constructor.

◆ DrizzleData() [3/6]

pcl::DrizzleData::DrizzleData ( DrizzleData &&  )
default

Move constructor.

◆ DrizzleData() [4/6]

pcl::DrizzleData::DrizzleData ( const String filePath,
bool  ignoreIntegrationData = false 
)
inline

Constructs a new DrizzleData instance by loading and parsing a file.

Parameters
filePathPath to an existing file that will be parsed. The file contents can be in XML drizzle data format (normally, a file with the .xdrz suffix), or in old plain text format (typically with the .drz suffix). This constructor will detect the format in use from the first bytes of the file, and will decode it correspondingly.
ignoreIntegrationDataIf true, all drizzle data relative to the image integration task will be ignored. This includes statistical location and scale estimates for image normalization, image weights, and pixel rejection data.

This constructor validates the data retrieved from the specified file. It throws the appropriate Error exceptions in the event of parsing errors or invalid data.

Definition at line 187 of file DrizzleData.h.

◆ DrizzleData() [5/6]

pcl::DrizzleData::DrizzleData ( const XMLDocument xml,
bool  ignoreIntegrationData = false 
)
inline

Constructs a new DrizzleData instance by parsing a well-formed XML document.

Parameters
xmlReference to the source XML document. This constructor expects an XML document in valid XML drizzle data format (.xdrz).
ignoreIntegrationDataIf true, all drizzle data relative to the image integration task will be ignored. This includes statistical location and scale estimates for image normalization, image weights, and pixel rejection data.

This constructor validates the data retrieved from the specified XML document. It throws an Error exception in the event of an invalid document or invalid data.

Definition at line 209 of file DrizzleData.h.

◆ DrizzleData() [6/6]

pcl::DrizzleData::DrizzleData ( const XMLElement element,
bool  ignoreIntegrationData = false 
)
inline

Constructs a new DrizzleData instance by parsing an XML element.

Parameters
elementReference to the source XML element. This constructor expects an XML document tree in valid XML drizzle data format (.xdrz) rooted at this element.
ignoreIntegrationDataIf true, all drizzle data relative to the image integration task will be ignored. This includes statistical location and scale estimates for image normalization, image weights, and pixel rejection data.

This constructor validates the data retrieved from the specified XML element. It throws an Error exception in the event of invalid data.

Definition at line 229 of file DrizzleData.h.

◆ ~DrizzleData()

virtual pcl::DrizzleData::~DrizzleData ( )
inlinevirtual

Virtual destructor.

Definition at line 237 of file DrizzleData.h.

Member Function Documentation

◆ AlignmentInverseSplines()

const vector_spline& pcl::DrizzleData::AlignmentInverseSplines ( ) const
inline

Returns the inverse vector surface spline interpolation/approximation device in two dimensions for the drizzle source image represented by this instance. These splines define an inverse image registration transformation with corrections for arbitrary distortions.

See also
SetAlignmentInverseSplines(), SetAlignmentSplines()

Definition at line 513 of file DrizzleData.h.

◆ AlignmentMatrix()

const Matrix& pcl::DrizzleData::AlignmentMatrix ( ) const
inline

Returns the 3x3 alignment matrix for the drizzle source image represented by this instance. The returned matrix defines a projective geometric transformation, also known as homography.

See also
SetAlignmentMatrix()

Definition at line 441 of file DrizzleData.h.

◆ AlignmentOrigin()

const DPoint& pcl::DrizzleData::AlignmentOrigin ( ) const
inline

Returns the origin of image alignment coordinates. The returned point corresponds to image coordinates {0,0} in the coordinate system used for image registration.

See also
SetAlignmentOrigin()

Definition at line 413 of file DrizzleData.h.

◆ AlignmentSplines()

const vector_spline& pcl::DrizzleData::AlignmentSplines ( ) const
inline

Returns the vector surface spline interpolation/approximation device in two dimensions for the drizzle source image represented by this instance. These splines define an image registration transformation with corrections for arbitrary distortions.

See also
SetAlignmentSplines(), SetAlignmentInverseSplines()

Definition at line 476 of file DrizzleData.h.

◆ AlignmentTargetFilePath()

const String& pcl::DrizzleData::AlignmentTargetFilePath ( ) const
inline

Returns the full path to the registered image file corresponding to the drizzle source image represented by this instance, or an empty string if that file path is not available.

The file identified by this function stores the output image of the image registration task. This file can be used as input for a regular (non-drizzle) integration task.

Note
This file should not be used as input for drizzle integration, since it has already been registered and interpolated. Use SourceFilePath() or CFASourceFilePath() as input for drizzle or Bayer drizzle, respectively.
See also
SetAlignmentTargetFilePath()

Definition at line 349 of file DrizzleData.h.

◆ CFASourceFilePath()

const String& pcl::DrizzleData::CFASourceFilePath ( ) const
inline

Returns the full path to the mosaiced/unregistered image file corresponding to the drizzle source image represented by this instance.

The file identified by this function stores the input image of the image demosaicing (e.g., de-Bayering) task. This file can be used as input for a Bayer drizzle integration task.

See also
SetCFASourceFilePath(), CFASourcePattern()

Definition at line 287 of file DrizzleData.h.

◆ CFASourcePattern()

const String& pcl::DrizzleData::CFASourcePattern ( ) const
inline

Returns a string representation of the color filter array (CFA) used by the mosaiced/unregistered image file corresponding to the drizzle source image represented by this instance.

The CFA corresponds to the file represented by CFASourceFilePath(). For the standard Bayer filters, this function returns "RGGB", "BGGR", "GBRG", and "GRBG".

See also
SetCFASourcePattern(), CFASourceFilePath()

Definition at line 314 of file DrizzleData.h.

◆ Clear()

void pcl::DrizzleData::Clear ( )

Clears all of the drizzle integration data transported by this instance, yielding an empty DrizzleData object.

◆ ClearIntegrationData()

void pcl::DrizzleData::ClearIntegrationData ( )

Clears the image integration data transported by this instance. This includes statistical location and scale estimates for image normalization, image weights, and pixel rejection data.

◆ CreationTime()

TimePoint pcl::DrizzleData::CreationTime ( ) const
inline

Returns the UTC time this drizzle data was created, or an invalid TimePoint instance if creation time information is not available.

Definition at line 999 of file DrizzleData.h.

◆ DisableCompression()

void pcl::DrizzleData::DisableCompression ( bool  disable = true)
inline

Disables compression of serialized drizzle data.

See also
IsCompressionEnabled(), EnableCompression()

Definition at line 1111 of file DrizzleData.h.

◆ EnableCompression()

void pcl::DrizzleData::EnableCompression ( bool  enable = true)
inline

Enables compression of serialized drizzle data.

See also
IsCompressionEnabled(), DisableCompression()

Definition at line 1101 of file DrizzleData.h.

◆ GetLocalDistortionModel()

void pcl::DrizzleData::GetLocalDistortionModel ( distortion_vector P1,
distortion_vector D2,
distortion_vector P2,
distortion_vector D1,
weight_vector W,
int &  order,
float &  regularization,
bool &  extrapolate 
)
inline

Stores a copy of the local distortion model in the specified arrays.

Parameters
P1Reference to an array of points where the function will store a copy of the reference image coordinates of the local distortion model.
D2Reference to an array of points where the function will store a copy of the set of pixels displacements of the local distortion model.
P2Reference to an array of points where the function will store a copy of the reference image coordinates of the inverse local distortion model.
D1Reference to an array of points where the function will store a copy of the set of pixels displacements of the inverse local distortion model.
WReference to an array of scalars where the function will store a copy of the set of statistical weights associated with the local distortion model. This array can be empty if the local distortion model is unweighted.
orderReference to a variable that will be assigned the derivability order for surface interpolation generation. Normally this is a surface spline derivative order.
regularizationReference to a variable that will be assigned the recommended regularization factor for surface interpolation generation. Normally this is a thin plate spline smoothness factor.
extrapolateReference to a variable that will be assigned true if the local distortion model has to be extrapolated over the entire reference image; false if the model can only be interpolated within the containing rectangle of the set P.

If this instance does not transport a valid local distortion model, the specified arrays P1, D2, P2 and D1 will be empty after calling this function.

See also
SetLocalDistortionModel(), HasLocalDistortionModel()

Definition at line 586 of file DrizzleData.h.

◆ HasAlignmentInverseSplines()

bool pcl::DrizzleData::HasAlignmentInverseSplines ( ) const
inline

Returns true iff this instance defines an inverse vector surface spline interpolation/approximation device.

See also
AlignmentInverseSplines(), HasAlignmentSplines(), HasAlignmentMatrix()

Definition at line 537 of file DrizzleData.h.

◆ HasAlignmentMatrix()

bool pcl::DrizzleData::HasAlignmentMatrix ( ) const
inline

Returns true iff this instance defines a 3x3 alignment matrix for the projective image registration transformation.

See also
AlignmentMatrix(), HasAlignmentSplines()

Definition at line 463 of file DrizzleData.h.

◆ HasAlignmentSplines()

bool pcl::DrizzleData::HasAlignmentSplines ( ) const
inline

Returns true iff this instance defines a vector surface spline interpolation/approximation device.

See also
AlignmentSplines(), HasAlignmentInverseSplines(), HasAlignmentMatrix()

Definition at line 500 of file DrizzleData.h.

◆ HasImageWeightsData()

bool pcl::DrizzleData::HasImageWeightsData ( ) const
inline

Returns true iff this DrizzleData object transports per-channel statistical image weights. If no weight information is available, the Weight() member function will return a reference to an internal vector with all components set to one.

Definition at line 872 of file DrizzleData.h.

◆ HasIntegrationData()

bool pcl::DrizzleData::HasIntegrationData ( ) const
inline

Returns true iff this DrizzleData object transports image integration data for normalization and image combination. This includes at least location and reference location estimates, and optionally (but usually present) scaling factors and statistical image weights.

Definition at line 861 of file DrizzleData.h.

◆ HasLocalDistortionModel()

bool pcl::DrizzleData::HasLocalDistortionModel ( ) const
inline

Returns true iff this instance defines a local distortion model consisting of a list of reference points and their corresponding pixel displacements in image coordinates.

Definition at line 670 of file DrizzleData.h.

◆ HasRejectionData()

bool pcl::DrizzleData::HasRejectionData ( ) const
inline

Returns true iff pixel rejection information is available for the drizzle image represented by this instance.

Definition at line 990 of file DrizzleData.h.

◆ IsCompressionEnabled()

bool pcl::DrizzleData::IsCompressionEnabled ( ) const
inline

Returns true if drizzle data compression is enabled for serializations performed with this object.

Drizzle data compression is enabled by default for newly constructed DrizzleData objects. Currently the LZ4 compression codec is applied for serialization of pixel rejection data.

See also
EnableCompression(), DisableCompression()

Definition at line 1091 of file DrizzleData.h.

◆ IsRejected()

bool pcl::DrizzleData::IsRejected ( const Point position,
int  channel = 0 
) const
inline

Returns true iff the pixel at the specified pixel coordinates has been rejected for the drizzle source image represented by this instance.

See also
RejectionMap(), HasRejectionData()

Definition at line 967 of file DrizzleData.h.

◆ Location()

const DVector& pcl::DrizzleData::Location ( ) const
inline

Returns the vector of per-channel robust estimates of location for the drizzle source image represented by this instance.

See Scale() for a description of the output normalization procedure.

Typically, the components of the vector returned by this function are median values, or similar robust estimates of location, computed for each channel of the image identified by AlignmentTargetFilePath(). These estimates are normally generated by a regular integration task.

See also
SetLocation(), ReferenceLocation(), Scale()

Definition at line 711 of file DrizzleData.h.

◆ Metadata()

const String& pcl::DrizzleData::Metadata ( ) const
inline

Returns a string serialization of metadata items corresponding to the drizzle source image represented by this instance. Metadata items are normally generated and serialized by a regular integration task.

See also
SetMetadata()

Definition at line 682 of file DrizzleData.h.

◆ NumberOfChannels()

int pcl::DrizzleData::NumberOfChannels ( ) const
inline

Returns the number of channels or pixel sample planes in the image represented by this instance.

Definition at line 401 of file DrizzleData.h.

◆ operator=() [1/2]

DrizzleData& pcl::DrizzleData::operator= ( const DrizzleData )
default

Copy assignment operator. Returns a reference to this object.

◆ operator=() [2/2]

DrizzleData& pcl::DrizzleData::operator= ( DrizzleData &&  )
default

Move assignment operator. Returns a reference to this object.

◆ Parse() [1/3]

void pcl::DrizzleData::Parse ( const String filePath,
bool  ignoreIntegrationData = false 
)

Loads and parses a drizzle data file.

Parameters
filePathPath to an existing file that will be parsed. The file contents can be in XML drizzle data format (normally, a file with the .xdrz suffix), or in old plain text format (typically with the .drz suffix). This function will detect the format in use from the first bytes read from the file, and will decode it correspondingly.
ignoreIntegrationDataIf true, all drizzle data relative to the image integration task will be ignored. This includes statistical location and scale estimates for image normalization, image weights, and pixel rejection data.

All of the previous data transported by this instance will be replaced with new data acquired from the specified file.

This function validates the data retrieved from the specified file. It throws an Error exception in the event of parsing errors or invalid data.

◆ Parse() [2/3]

void pcl::DrizzleData::Parse ( const XMLDocument xml,
bool  ignoreIntegrationData = false 
)

Parses a well-formed XML document.

Parameters
xmlReference to the source XML document. This member function expects an XML document in valid XML drizzle data format (.xdrz).
ignoreIntegrationDataIf true, all drizzle data relative to the image integration task will be ignored. This includes statistical location and scale estimates for image normalization, image weights, and pixel rejection data.

All of the previous data transported by this instance will be replaced with new data acquired from the specified XML contents.

This function validates the data retrieved from the specified XML document. It throws an Error exception in the event of an invalid document or invalid data.

◆ Parse() [3/3]

void pcl::DrizzleData::Parse ( const XMLElement element,
bool  ignoreIntegrationData = false 
)

Parses an XML element.

Parameters
elementReference to the source XML element. This member function expects an XML document tree in valid XML drizzle data format (.xdrz) rooted at this element.
ignoreIntegrationDataIf true, all drizzle data relative to the image integration task will be ignored. This includes statistical location and scale estimates for image normalization, image weights, and pixel rejection data.

All of the previous data transported by this instance will be replaced with new data acquired from the specified XML contents.

This function validates the data retrieved from the specified XML element. It throws an Error exception in the event of invalid data.

◆ Pedestal()

double pcl::DrizzleData::Pedestal ( ) const
inline

Returns a positive value in the range [0,1] to be subtracted from the image represented by this instance.

Definition at line 808 of file DrizzleData.h.

◆ ReferenceHeight()

int pcl::DrizzleData::ReferenceHeight ( ) const
inline

Returns the height in pixels of the registration reference image.

See also
ReferenceWidth(), SetReferenceDimensions()

Definition at line 380 of file DrizzleData.h.

◆ ReferenceLocation()

const DVector& pcl::DrizzleData::ReferenceLocation ( ) const
inline

Returns the vector of per-channel robust estimates of location for the reference integration image associated with the drizzle source image represented by this instance.

See Scale() for a description of the output normalization procedure.

Typically, the components of the vector returned by this function are median values, or similar robust estimates of location, computed for each channel of an image used as reference by a regular integration task.

See also
SetLocation(), ReferenceLocation(), Scale()

Definition at line 742 of file DrizzleData.h.

◆ ReferenceWidth()

int pcl::DrizzleData::ReferenceWidth ( ) const
inline

Returns the width in pixels of the registration reference image.

See also
ReferenceHeight(), SetReferenceDimensions()

Definition at line 370 of file DrizzleData.h.

◆ RejectionHighCount()

const UI64Vector& pcl::DrizzleData::RejectionHighCount ( ) const
inline

Returns the vector of per-channel high pixel rejection counts for the drizzle source image represented by this instance.

The components of the returned vector are the total amounts of rejected high pixels for each channel of the image identified by AlignmentTargetFilePath(). Pixel rejection counts are normally generated by a regular image integration task.

See also
RejectionLowCount(), RejectionMap()

Definition at line 904 of file DrizzleData.h.

◆ RejectionLowCount()

const UI64Vector& pcl::DrizzleData::RejectionLowCount ( ) const
inline

Returns the vector of per-channel low pixel rejection counts for the drizzle source image represented by this instance.

The components of the returned vector are the total amounts of rejected low pixels for each channel of the image identified by AlignmentTargetFilePath(). Pixel rejection counts are normally generated by a regular image integration task.

See also
RejectionHighCount(), RejectionMap()

Definition at line 888 of file DrizzleData.h.

◆ RejectionMap()

const UInt8Image& pcl::DrizzleData::RejectionMap ( ) const
inline

Returns a reference to a pixel rejection map generated for the drizzle image represented by this instance.

This member function returns a reference to an 8-bit unsigned integer image known as drizzle rejection map. Each channel of the rejection map corresponds to the same channel of the image represented by this object. For a channel index c, a pixel sample of a rejection map can have the following values:

  • 0 (no bit set): The corresponding pixel has not been rejected for image channel c.
  • Bit 0 set: High statistical rejection: The pixel has been rejected above the estimated central value of its pixel integration stack using a statistical rejection algorithm (such as sigma clipping).
  • Bit 1 set: Low statistical rejection: The pixel has been rejected below the estimated central value of its pixel integration stack using a statistical rejection algorithm (such as sigma clipping).
  • Bit 2 set: High range rejection: The pixel has been rejected because its value is greater than or equal to a prescribed upper limit.
  • Bit 3 set: Low range rejection: The pixel has been rejected because its value is smaller than or equal to a prescribed lower limit.
  • Bit 4 set: High large-scale rejection: The pixel belongs to a bright large-scale image structure that has been rejected using multiscale analysis techniques.
  • Bit 5 set: Low large-scale rejection: The pixel belongs to a dark large-scale image structure that has been rejected using multiscale analysis techniques.

Bits 6 and 7 are reserved for future extensions and should be zero in the current implementation.

Rejection maps are automatically generated from pixel rejection data stored in .xdrz files. Pixel rejection data are normally generated by a regular image integration task.

If no pixel rejection information is available in this instance, this function returns a reference to an empty image.

See also
SetRejectionMap(), HasRejectionData(), IsRejected()

Definition at line 956 of file DrizzleData.h.

◆ Scale()

const DVector& pcl::DrizzleData::Scale ( ) const
inline

Returns the vector of per-channel scaling factors for the drizzle source image represented by this instance.

For normalization of output pixel samples in a channel c of the drizzle image, the following equation must be applied:

vc' = (vc - Lc)*Sc + L0c

where vc is the source pixel sample, Lc is the location estimate given by Location()[c], Sc is the scaling factor given by Scale()[c], L0c is the reference location estimate given by ReferenceLocation()[c], and vc' is the normalized pixel sample value.

Typically, the components of the vector returned by this function are computed from robust estimates of dispersion, such as MAD or the square root of the biweight midvariance among many others, computed for each channel of the image identified by AlignmentTargetFilePath() and multiplied by the inverse of the corresponding estimates computed for an integration reference image. Scaling factors are normally generated by a regular integration task.

See also
SetScale(), Location(), ReferenceLocation()

Definition at line 783 of file DrizzleData.h.

◆ Serialize()

XMLDocument* pcl::DrizzleData::Serialize ( ) const

Serializes the drizzle integration data transported by this object as a new XML document in .xdrz format.

The returned XMLDocument object has been allocated dynamically. The caller is responsible for destroying and deallocating it as appropriate.

◆ SerializeToFile()

void pcl::DrizzleData::SerializeToFile ( const String path) const

Serializes the drizzle integration data transported by this object as a new XML document file in .xdrz format. The file will be newly created at the specified file path.

Warning
If a file already exists at the specified path, its previous contents will be lost after calling this function.

◆ SetAlignmentInverseSplines()

void pcl::DrizzleData::SetAlignmentInverseSplines ( const vector_spline Sinv)
inline

Sets a new inverse vector surface spline interpolation/approximation device. This member function is reserved for image registration tasks involved in drizzle integration processes.

See also
AlignmentInverseSplines(), AlignmentSplines()

Definition at line 525 of file DrizzleData.h.

◆ SetAlignmentMatrix()

void pcl::DrizzleData::SetAlignmentMatrix ( const Matrix H)
inline

Defines a new 3x3 alignment matrix. This function is reserved for image registration tasks involved in drizzle integration processes.

See also
AlignmentMatrix()

Definition at line 452 of file DrizzleData.h.

◆ SetAlignmentOrigin()

void pcl::DrizzleData::SetAlignmentOrigin ( const DPoint p0)
inline

Defines the origin of image alignment coordinates. This function is reserved for image registration tasks involved in drizzle integration processes.

Note
The default alignment origin coordinates are {0.5,0.5}, that is, the center of the top-left pixel in the image coordinate system. These coordinates ensure compatibility with old versions of drizzle data serializations and standard image registration tools on the PixInsight platform.

Definition at line 429 of file DrizzleData.h.

◆ SetAlignmentSplines()

void pcl::DrizzleData::SetAlignmentSplines ( const vector_spline S)
inline

Sets a new vector surface spline interpolation/approximation device. This member function is reserved for image registration tasks involved in drizzle integration processes.

See also
AlignmentSplines(), AlignmentInverseSplines()

Definition at line 488 of file DrizzleData.h.

◆ SetAlignmentTargetFilePath()

void pcl::DrizzleData::SetAlignmentTargetFilePath ( const String filePath)
inline

Sets the path to the registered image file corresponding to the drizzle image represented by this instance.

See also
AlignmentTargetFilePath()

Definition at line 360 of file DrizzleData.h.

References pcl::File::FullPath().

◆ SetCFASourceFilePath()

void pcl::DrizzleData::SetCFASourceFilePath ( const String filePath)
inline

Sets the path to the mosaiced/unregistered image file corresponding t the drizzle source image represented by this instance.

See also
CFASourceFilePath(), SetCFASourcePattern()

Definition at line 298 of file DrizzleData.h.

References pcl::File::FullPath().

◆ SetCFASourcePattern()

void pcl::DrizzleData::SetCFASourcePattern ( const String cfaPattern)
inline

Defines the color filter array (CFA) used by the mosaiced/unregistered image file corresponding to the drizzle source image represented by this instance.

See CFASourcePattern() for more information on CFA representations.

See also
CFASourcePattern(), SetCFASourceFilePath()

Definition at line 328 of file DrizzleData.h.

◆ SetLocalDistortionModel()

void pcl::DrizzleData::SetLocalDistortionModel ( const distortion_vector P1,
const distortion_vector D2,
const distortion_vector P2,
const distortion_vector D1,
const weight_vector W,
int  order = 2,
float  regularization = 0.01F,
bool  extrapolate = true 
)
inline

Defines a new local distortion model. This function is reserved for image registration tasks involved in drizzle integration processes.

Parameters
P1Reference to an array of points in reference image coordinates.
D2Reference to an array of point displacements in taget image coordinates.
P2Reference to an array of points in target image coordinates.
D1Reference to an array of point displacements in reference image coordinates.
WReference to an array of statistical weights associated with the points in the local distortion model. This array can be empty if the local distortion model is unweighted. If nonempty, this array must have the same length as P1.
orderDerivability order for surface interpolation generation. Normally this is a surface spline derivative order. The default value is 2, which is the usual choice for generation of thin plate splines.
regularizationThe regularization factor for surface interpolation generation, which should be ≥ 0. Normally this is a thin plate spline smoothness factor. Set to zero to disable surface spline regularization. The default value is 0.01 for regularization at the centipixel level.
extrapolateTrue if the local distortion model has to be extrapolated over the entire reference image; false if the model can only be interpolated within the containing rectangle of the set P. Extrapolation is enabled by default.

Each point in the reference array P1 must have a counterpart in the array D2. Point displacements are intended to be applied to projected reference coordinates on the registration target image. The same applies to the inverse local distortion model P2 and D1, but points in P2 are target image coordinates and points in D1 are projected displacements in reference image coordinates.

See also
GetLocalDistortionModel(), HasLocalDistortionModel()

Definition at line 647 of file DrizzleData.h.

◆ SetLocation()

void pcl::DrizzleData::SetLocation ( const DVector v)
inline

Sets a new vector of per-channel robust estimates of location for the drizzle source image represented by this instance. This function is reserved for image integration tasks involved in drizzle integration processes.

See also
Location(), ReferenceLocation(), SetScale()

Definition at line 724 of file DrizzleData.h.

◆ SetMetadata()

void pcl::DrizzleData::SetMetadata ( const String metadata)
inline

Defines a string serialization of metadata items for the drizzle source image represented by this instance.

See also
Metadata()

Definition at line 693 of file DrizzleData.h.

◆ SetPedestal()

void pcl::DrizzleData::SetPedestal ( double  p)
inline

Defines a positive value in the range [0,1] to be subtracted from the image represented by this instance. This function is reserved for image integration tasks involved in drizzle integration processes.

Definition at line 818 of file DrizzleData.h.

References pcl::Range().

◆ SetReferenceDimensions()

void pcl::DrizzleData::SetReferenceDimensions ( int  width,
int  height 
)
inline

Sets new registration reference image dimensions in pixels, width and height, respectively.

See also
ReferenceWidth(), ReferenceHeight()

Definition at line 391 of file DrizzleData.h.

◆ SetReferenceLocation()

void pcl::DrizzleData::SetReferenceLocation ( const DVector v)
inline

Sets a new vector of per-channel robust estimates of location for the reference integration image. This function is reserved for image integration tasks involved in drizzle integration processes.

See also
ReferenceLocation(), Location(), SetScale()

Definition at line 754 of file DrizzleData.h.

◆ SetRejectionMap()

void pcl::DrizzleData::SetRejectionMap ( const UInt8Image map)
inline

Defines per-channel pixel rejection data for the drizzle source image represented by this instance. The specified map image is a drizzle rejection map as described in RejectionMap().

See also
RejectionMap(), HasRejectionData()

Definition at line 981 of file DrizzleData.h.

◆ SetScale()

void pcl::DrizzleData::SetScale ( const DVector v)
inline

Sets a new vector of per-channel scaling factors for the drizzle source image represented by this instance. This function is reserved for image integration tasks involved in drizzle integration processes.

See also
Scale(), SetLocation()

Definition at line 799 of file DrizzleData.h.

◆ SetSourceFilePath()

void pcl::DrizzleData::SetSourceFilePath ( const String filePath)
inline

Sets the path to the unregistered image file corresponding to the drizzle image represented by this instance.

See also
SourceFilePath()

Definition at line 272 of file DrizzleData.h.

References pcl::File::FullPath().

◆ SetWeight()

void pcl::DrizzleData::SetWeight ( const DVector v)
inline

Sets a new vector of per-channel statistical weights for the drizzle image represented by this instance. This function is reserved for image integration tasks involved in drizzle integration processes.

See also
Weight(), SetLocation(), SetReferenceLocation(), SetScale()

Definition at line 850 of file DrizzleData.h.

◆ SourceFilePath()

const String& pcl::DrizzleData::SourceFilePath ( ) const
inline

Returns the full path to the unregistered image file corresponding to the drizzle source image represented by this instance.

The file identified by this function stores the input image of the image registration task. This file can be used as input for a drizzle integration task.

See also
SetSourceFilePath()

Definition at line 261 of file DrizzleData.h.

◆ Weight()

const DVector& pcl::DrizzleData::Weight ( ) const
inline

Returns the vector of per-channel statistical weights for the drizzle image represented by this instance.

Typically, the components of the returned vector are efficient statistical weights computed for each channel of the image identified by AlignmentTargetFilePath(). These weights are normally generated by a regular integration task.

See also
SetWeight(), Location(), ReferenceLocation(), Scale()

Definition at line 834 of file DrizzleData.h.


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