casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::WCCoordinateHandler Class Reference

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

#include <WCCoordinateHandler.h>

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

List of all members.

Public Member Functions

 WCCoordinateHandler ()
 Default Constructor Required.
virtual Bool linToWorld (Vector< Double > &world, const Vector< Double > &lin)=0
 transform the lin point (2-dimensional) into a world coordinate (N-dimensional), returning False if the coordinate could not be transformed.
virtual Bool linToWorld (Matrix< Double > &world, Vector< Bool > &failures, const Matrix< Double > &lin)
 Batch transformation where each row of lin is a coordinate that is transformed into each row of world.
virtual Bool worldToLin (Vector< Double > &lin, const Vector< Double > &world)=0
 transform the world point (N-dimensional) into a lin coordinate (2-dimensional), returning False if the coordinate could not be transformed.
virtual Bool worldToLin (Matrix< Double > &lin, Vector< Bool > &failures, const Matrix< Double > &world)
 Batch transformation where each row of world is a coordinate that is transformed into each row of lin.
virtual uInt nWorldAxes () const =0
 Return the number of axes in the world coordinates.
virtual ~WCCoordinateHandler ()
 Routines that give the axes names and the unit.

Detailed Description

Base class defining a set of transformations for WorldCanvas coordinates.

Prerequisite

Etymology

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

Motivation

Definition at line 79 of file WCCoordinateHandler.h.


Constructor & Destructor Documentation

Default Constructor Required.

Routines that give the axes names and the unit.

Destructor


Member Function Documentation

virtual Bool casa::WCCoordinateHandler::linToWorld ( Vector< Double > &  world,
const Vector< 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.

virtual Bool casa::WCCoordinateHandler::linToWorld ( Matrix< Double > &  world,
Vector< Bool > &  failures,
const Matrix< 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 Vector<Double> version of linToWorld.

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

virtual uInt casa::WCCoordinateHandler::nWorldAxes ( ) const [pure virtual]

Return the number of axes in the world coordinates.

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

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

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

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


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