casa
5.7.0-16
|
Class to provide default coordinate handling for WorldCanvases. More...
#include <DefaultWCCoordinateHandler.h>
Public Member Functions | |
DefaultWCCoordinateHandler () | |
Default Constructor Required. More... | |
virtual casacore::Bool | linToWorld (casacore::Vector< casacore::Double > &world, const casacore::Vector< casacore::Double > &lin) |
just copy lin to world and vice versa. More... | |
virtual casacore::Bool | linToWorld (casacore::Matrix< casacore::Double > &world, casacore::Vector< casacore::Bool > &failures, const casacore::Matrix< casacore::Double > &lin) |
Batch transformation where each row of lin is a coordinate that is transformed into each row of world. More... | |
virtual casacore::Bool | worldToLin (casacore::Vector< casacore::Double > &lin, const casacore::Vector< casacore::Double > &world) |
transform the world point (N-dimensional) into a lin coordinate (2-dimensional), returning false if the coordinate could not be transformed. More... | |
virtual casacore::Bool | worldToLin (casacore::Matrix< casacore::Double > &lin, casacore::Vector< casacore::Bool > &failures, const casacore::Matrix< casacore::Double > &world) |
Batch transformation where each row of world is a coordinate that is transformed into each row of lin. More... | |
virtual casacore::uInt | nWorldAxes () const |
return the number of world axes. More... | |
virtual casacore::Vector < casacore::String > | worldAxisNames () const |
Routines that give the axes names and the units. More... | |
virtual casacore::Vector < casacore::String > | worldAxisUnits () const |
std::string | errorMessage () const |
virtual | ~DefaultWCCoordinateHandler () |
Destructor. More... | |
Public Member Functions inherited from casa::WCCoordinateHandler | |
WCCoordinateHandler () | |
Default Constructor Required. More... | |
virtual | ~WCCoordinateHandler () |
Routines that give the axes names and the unit. More... | |
Class to provide default coordinate handling for WorldCanvases.
DefaultWCCoordinateHandler stands for Default WorldCanvas casacore::Coordinate Handler
Implements identity transformation function pairs between World Coordinates and linear coordinates. It assumes 2 axes only.
Recognized that 95% of the time the WorldCanvas will be used in conjunction with a world coordinate system of some kind. So it makes more sense to assume that there is always a coordinate handler available and use it rather than to have to check to see if there is a handler registered with the WorldCanvas or not each time you have to do a transformation.
The WorldCanvas creates this default handler for its own purpose.
Definition at line 66 of file DefaultWCCoordinateHandler.h.
casa::DefaultWCCoordinateHandler::DefaultWCCoordinateHandler | ( | ) |
Default Constructor Required.
|
virtual |
Destructor.
|
inlinevirtual |
Implements casa::WCCoordinateHandler.
Definition at line 98 of file DefaultWCCoordinateHandler.h.
|
virtual |
just copy lin to world and vice versa.
The input vectors must be of length 2. The output vectors are resized as needed. The output matrices must be the correct shape on input.
Implements casa::WCCoordinateHandler.
|
virtual |
Batch transformation where each row of lin is a coordinate that is transformed into each row of world.
On input, if the i'th position in the failures vector is true, the i'th transformation is not attempted. If the j'th transformation fails, the j'th position in the failures vector will be set. The return value is true only when the failures vector has no position set to true; This function is implemented in this base class by making repeated calls to the casacore::Vector<casacore::Double> version of linToWorld.
Reimplemented from casa::WCCoordinateHandler.
|
inlinevirtual |
return the number of world axes.
Always 2.
Implements casa::WCCoordinateHandler.
Definition at line 88 of file DefaultWCCoordinateHandler.h.
|
virtual |
Routines that give the axes names and the units.
Both return "Pixel".
|
virtual |
|
virtual |
transform the world point (N-dimensional) into a lin coordinate (2-dimensional), returning false if the coordinate could not be transformed.
Derived classes should override.
Implements casa::WCCoordinateHandler.
|
virtual |
Batch transformation where each row of world is a coordinate that is transformed into each row of lin.
On input, if the i'th position in the failures vector is true, the i'th transformation is not attempted. If the j'th transformation fails, the j'th position in the failures vector will be set. The return value is true only when the failures vector has no position set to true; This function is implemented in this base class by making repeated calls to the casacore::Vector<casacore::Double> version of worldToLin.
Reimplemented from casa::WCCoordinateHandler.