casa
5.7.0-16
|
Base class defining a set of transformations for WorldCanvas coordinates. More...
#include <WCCoordinateHandler.h>
Public Member Functions | |
WCCoordinateHandler () | |
Default Constructor Required. More... | |
virtual casacore::Bool | linToWorld (casacore::Vector< casacore::Double > &world, const casacore::Vector< casacore::Double > &lin)=0 |
transform the lin point (2-dimensional) into a world coordinate (N-dimensional), returning false if the coordinate could not be transformed. 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)=0 |
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 std::string | errorMessage () const =0 |
virtual casacore::uInt | nWorldAxes () const =0 |
Return the number of axes in the world coordinates. More... | |
virtual | ~WCCoordinateHandler () |
Routines that give the axes names and the unit. More... | |
Base class defining a set of transformations for WorldCanvas coordinates.
WCCoordinateHandler : WorldCanvas casacore::Coordinate Handler
The WCCoordinateHandler class implements the concept of a coordinate transformation pair that can be plugged in to the WorldCanvas. It is designed for derivation by the programmer and can thereby be arbitrarily implemented.
This class defines an interface between the WorldCanvas, which uses coordinate transformations for various reasons, and the derived class that implements these coordinate transformations.
The designer of the derived class must write the casacore::Vector<Double> versions of linToWorld and worldToLin as described in detail below. It is also recommended that the casacore::Matrix<Double> versions of linToWorld and worldToLin be written to maximize efficiency.
Wanted to bundle these transformations into a class to follow OO methods.
Definition at line 83 of file WCCoordinateHandler.h.
casa::WCCoordinateHandler::WCCoordinateHandler | ( | ) |
Default Constructor Required.
|
virtual |
Routines that give the axes names and the unit.
Destructor
|
pure virtual |
Implemented in casa::WorldCanvasHolder, and casa::DefaultWCCoordinateHandler.
|
pure virtual |
transform the lin point (2-dimensional) into a world coordinate (N-dimensional), returning false if the coordinate could not be transformed.
Derived classes should override.
Implemented in casa::WorldCanvasHolder, and casa::DefaultWCCoordinateHandler.
Referenced by casa::WorldCanvasHolder::linToWorld().
|
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 in casa::WorldCanvasHolder, and casa::DefaultWCCoordinateHandler.
|
pure virtual |
Return the number of axes in the world coordinates.
Implemented in casa::WorldCanvasHolder, and casa::DefaultWCCoordinateHandler.
|
pure 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.
Implemented in casa::WorldCanvasHolder, and casa::DefaultWCCoordinateHandler.
Referenced by casa::WorldCanvasHolder::worldToLin().
|
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 in casa::WorldCanvasHolder, and casa::DefaultWCCoordinateHandler.