casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casa::WCCoordinateHandler Class Referenceabstract

Base class defining a set of transformations for WorldCanvas coordinates. More...

#include <WCCoordinateHandler.h>

Inheritance diagram for casa::WCCoordinateHandler:
casa::DefaultWCCoordinateHandler casa::WorldCanvasHolder

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...
 

Detailed Description

Base class defining a set of transformations for WorldCanvas coordinates.

Prerequisite

Etymology

WCCoordinateHandler : WorldCanvas casacore::Coordinate Handler

Synopsis

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&ltDouble&gt versions of linToWorld and worldToLin as described in detail below. It is also recommended that the casacore::Matrix&ltDouble&gt versions of linToWorld and worldToLin be written to maximize efficiency.

Motivation

Definition at line 83 of file WCCoordinateHandler.h.

Constructor & Destructor Documentation

casa::WCCoordinateHandler::WCCoordinateHandler ( )

Default Constructor Required.

virtual casa::WCCoordinateHandler::~WCCoordinateHandler ( )
virtual

Routines that give the axes names and the unit.

Destructor

Member Function Documentation

virtual std::string casa::WCCoordinateHandler::errorMessage ( ) const
pure virtual
virtual casacore::Bool casa::WCCoordinateHandler::linToWorld ( casacore::Vector< casacore::Double > &  world,
const casacore::Vector< casacore::Double > &  lin 
)
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 casacore::Bool casa::WCCoordinateHandler::linToWorld ( casacore::Matrix< casacore::Double > &  world,
casacore::Vector< casacore::Bool > &  failures,
const casacore::Matrix< casacore::Double > &  lin 
)
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.

virtual casacore::uInt casa::WCCoordinateHandler::nWorldAxes ( ) const
pure virtual

Return the number of axes in the world coordinates.

Implemented in casa::WorldCanvasHolder, and casa::DefaultWCCoordinateHandler.

virtual casacore::Bool casa::WCCoordinateHandler::worldToLin ( casacore::Vector< casacore::Double > &  lin,
const casacore::Vector< casacore::Double > &  world 
)
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 casacore::Bool casa::WCCoordinateHandler::worldToLin ( casacore::Matrix< casacore::Double > &  lin,
casacore::Vector< casacore::Bool > &  failures,
const casacore::Matrix< casacore::Double > &  world 
)
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.


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