casa
5.7.0-16
|
Converts Gaussian parameters between pixel and world. More...
#include <GaussianConvert.h>
Public Member Functions | |
GaussianConvert () | |
Default constructor. More... | |
GaussianConvert (const CoordinateSystem &cSys, const Vector< uInt > &worldAxes) | |
Constructor. More... | |
~GaussianConvert () | |
Destructor. More... | |
GaussianConvert (const GaussianConvert &other) | |
Copy constructor. More... | |
GaussianConvert & | operator= (const GaussianConvert &other) |
Assignment operator. More... | |
void | setCoordinateSystem (const CoordinateSystem &cSys) |
(Re)set the coordinate system More... | |
void | setWorldAxes (const Vector< uInt > &worldAxes) |
Re(set) the world axes. More... | |
Bool | toWorld (Quantum< Double > &majorAxisOut, Quantum< Double > &minorAxisOut, Quantum< Double > &positionAngleOut, Double majorAxisIn, Double minorAxisIn, const Quantum< Double > &positionAngleIn) |
Convert Gaussian parameters from pixels to world. More... | |
Bool | toPixel (Double &majorAxisOut, Double &minorAxisOut, Quantum< Double > &positionAngleOut, const Quantum< Double > &majorAxisIn, const Quantum< Double > &minorAxisIn, const Quantum< Double > &positionAngleIn) |
Convert Gaussian parameters from world to pixel. More... | |
Bool | toPixel (Vector< Double > &pixel, const Vector< Quantum< Double > > &world) |
Convert location. More... | |
Bool | toWorld (Vector< Quantum< Double > > &world, const Vector< Double > &pixel) |
String | errorMessage () const |
Recover error messages from the conversion functions. More... | |
Private Member Functions | |
void | convertAxes (Double &minorAxisOut, Double &majorAxisOut, Quantum< Double > &positionAngleOut, Double minorAxisIn, Double majorAxisIn, const Quantum< Double > &positionAngleIn, const CoordinateSystem &cSys, String dir) |
void | checkCoordinateSystem () |
void | checkWorldAxes () |
Double | positionAngleRange (Double pa) |
Private Attributes | |
CoordinateSystem | itsCSys |
Vector< uInt > | itsWorldAxes |
String | itsErrorMessage |
Bool | itsValid |
Converts Gaussian parameters between pixel and world.
Public interface
Converts Gaussian parameters between world and pixel. In the pixel coordinate system ([0,0] in center of image) the position angle is positive +y to -x. This is consistent with Gaussian2D. In the world coordinate system the pa is positive N through E
Definition at line 72 of file GaussianConvert.h.
casacore::GaussianConvert::GaussianConvert | ( | ) |
Default constructor.
casacore::GaussianConvert::GaussianConvert | ( | const CoordinateSystem & | cSys, |
const Vector< uInt > & | worldAxes | ||
) |
Constructor.
You specify which world axes (must be length 2) of the coordinate system are the relevant ones for your gaussian (x then y)
casacore::GaussianConvert::~GaussianConvert | ( | ) |
Destructor.
casacore::GaussianConvert::GaussianConvert | ( | const GaussianConvert & | other | ) |
Copy constructor.
Uses copy semantics.
|
private |
|
private |
|
private |
|
inline |
Recover error messages from the conversion functions.
Definition at line 129 of file GaussianConvert.h.
References itsErrorMessage.
GaussianConvert& casacore::GaussianConvert::operator= | ( | const GaussianConvert & | other | ) |
Assignment operator.
Uses copy semantics.
void casacore::GaussianConvert::setCoordinateSystem | ( | const CoordinateSystem & | cSys | ) |
(Re)set the coordinate system
Re(set) the world axes.
Bool casacore::GaussianConvert::toPixel | ( | Double & | majorAxisOut, |
Double & | minorAxisOut, | ||
Quantum< Double > & | positionAngleOut, | ||
const Quantum< Double > & | majorAxisIn, | ||
const Quantum< Double > & | minorAxisIn, | ||
const Quantum< Double > & | positionAngleIn | ||
) |
Convert Gaussian parameters from world to pixel.
Returns False if it fails with an error message recoverable with function errorMessage. For the output position angle, if the output units are not set, the units of the input position angle will be used.
Bool casacore::GaussianConvert::toPixel | ( | Vector< Double > & | pixel, |
const Vector< Quantum< Double > > & | world | ||
) |
Convert location.
Bool casacore::GaussianConvert::toWorld | ( | Quantum< Double > & | majorAxisOut, |
Quantum< Double > & | minorAxisOut, | ||
Quantum< Double > & | positionAngleOut, | ||
Double | majorAxisIn, | ||
Double | minorAxisIn, | ||
const Quantum< Double > & | positionAngleIn | ||
) |
Convert Gaussian parameters from pixels to world.
Returns False if it fails with an error message recoverable with function errorMessage. If you set the units of the output axis quanta they will be honoured, otherwise they will come out in the axis units of the coordinate system. For the output position angle, if the output units are not set, the units of the input position angle will be used.
Bool casacore::GaussianConvert::toWorld | ( | Vector< Quantum< Double > > & | world, |
const Vector< Double > & | pixel | ||
) |
|
private |
Definition at line 134 of file GaussianConvert.h.
|
private |
Definition at line 136 of file GaussianConvert.h.
Referenced by errorMessage().
|
private |
Definition at line 137 of file GaussianConvert.h.
Definition at line 135 of file GaussianConvert.h.