casa
$Rev:20696$
|
Class providing active behaviour for 2d CachingDisplayDatas. More...
#include <ActiveCaching2dDD.h>
Public Member Functions | |
ActiveCaching2dDD (const CoordinateSystem &coordsys, const Vector< Double > &pixblc, const Vector< Double > &pixtrc) | |
Constructor. | |
virtual | ~ActiveCaching2dDD () |
Destructor. | |
virtual Bool | linToWorld (Vector< Double > &world, const Vector< Double > &lin) |
Coordinate transformation handlers, called by WorldCanvasHolder. | |
virtual Bool | worldToLin (Vector< Double > &lin, const Vector< Double > &world) |
virtual String | showPosition (const Vector< Double > &world, const Bool &displayAxesOnly=False) |
Format a string containing coordinate information at the given world coordinate. | |
virtual Vector< String > | worldAxisNames () const |
World axis information suppliers. | |
virtual Vector< String > | worldAxisUnits () const |
virtual const uInt | nelements (const WorldCanvasHolder &) const |
Return the number of display elements (ie. | |
virtual const uInt | nelements () const |
and non-specific | |
virtual void | setDefaultOptions () |
Install the default options for this DisplayData. | |
virtual Bool | setOptions (Record &rec, Record &recOut) |
Apply options stored in rec to the DisplayData. | |
virtual Record | getOptions () |
Retrieve the current and default options and parameter types. | |
virtual Bool | sizeControl (WorldCanvasHolder &wcHolder, AttributeBuffer &holderBuf) |
Negotiatiate WorldCanvas linear coordinate system when asked to do so by the WorldCanvasHolder. | |
virtual Bool | conformsToCS (const WorldCanvas &wc) |
Determine whether DD can draw on the current coordinate system of the given WC[H]. | |
virtual void | cleanup () |
Tidy up the elements of this DisplayData. | |
Protected Member Functions | |
virtual AttributeBuffer | optionsAsAttributes () |
Return the current options of this DisplayData as an AttributeBuffer. | |
ActiveCaching2dDD () | |
(Required) default constructor. | |
ActiveCaching2dDD (const ActiveCaching2dDD &other) | |
(Required) copy constructor. | |
void | operator= (const ActiveCaching2dDD &other) |
(Required) copy assignment. | |
void | setCoordinateSystem (const CoordinateSystem &coordsys, const Vector< Double > &pixblc, const Vector< Double > &pixtrc) |
Install a CoordinateSystem and limits. | |
void | identifyWorldAxis (Coordinate::Type &type, Int &coordinate, Int &axisincoord, const uInt worldaxisnum) |
Identify a specified world axis by its Coordinate type, number, and axis in that coordinate. | |
String | codeWorldAxis (const uInt worldaxisnum) |
Generate a String code for the specified world axis, describing the coordinate type, number and axis in that coordinate. | |
Vector< Double > | worldAxisIncrements () const |
Return the world axis increments. | |
virtual Bool | worldCoordTracking () const |
Return whether tracking is currently world (T) or pixel (F) coordinates. | |
Protected Attributes | |
CoordinateSystem | itsCoordinateSystem |
Store the 2d CoordinateSystem here. | |
Vector< Double > | itsPixelBlc |
Store the 2d pixel corners here. | |
Vector< Double > | itsPixelTrc |
Private Member Functions | |
void | setSpectralFormatting (CoordinateSystem &cSys, const String &velTypeString, const String &unitString) |
Set Spectral formatting. | |
Private Attributes | |
String | itsOptionsAspect |
Option: aspect ratio for pixels. | |
String | itsSpectralUnit |
Position tracking. | |
String | itsVelocityType |
Bool | itsAbsolute |
Bool | itsShowWorldCoordinate |
Bool | itsFractionalPixels |
Class providing active behaviour for 2d CachingDisplayDatas.
An "active" DisplayData is one which is able to negotiate coordinates on a WorldCanvas, and subsequently provide coordinate conversion facilities. This particular implementation is of a two-dimensional (2d) active DisplayData.
Definition at line 48 of file ActiveCaching2dDD.h.
casa::ActiveCaching2dDD::ActiveCaching2dDD | ( | const CoordinateSystem & | coordsys, |
const Vector< Double > & | pixblc, | ||
const Vector< Double > & | pixtrc | ||
) |
Constructor.
Caller must provide a CoordinateSystem, and the pixel range (via pixelblc
and pixeltrc
) over which the DisplayData is expected to function. The primary use of pixelblc
and pixeltrc
is to provide limits for the unzoomed WorldCanvas. coordsys
must have only two world and pixel axes, otherwise an exception is thrown, and likewise, pixblc
and pixtrc
must both be of length two.
virtual casa::ActiveCaching2dDD::~ActiveCaching2dDD | ( | ) | [virtual] |
Destructor.
casa::ActiveCaching2dDD::ActiveCaching2dDD | ( | ) | [protected] |
(Required) default constructor.
casa::ActiveCaching2dDD::ActiveCaching2dDD | ( | const ActiveCaching2dDD & | other | ) | [protected] |
(Required) copy constructor.
virtual void casa::ActiveCaching2dDD::cleanup | ( | ) | [virtual] |
Tidy up the elements of this DisplayData.
Implements casa::DisplayData.
Reimplemented in casa::TblAsContourDD, casa::TblAsRasterDD, and casa::TblAsXYDD.
String casa::ActiveCaching2dDD::codeWorldAxis | ( | const uInt | worldaxisnum | ) | [protected] |
Generate a String code for the specified world axis, describing the coordinate type, number and axis in that coordinate.
virtual Bool casa::ActiveCaching2dDD::conformsToCS | ( | const WorldCanvas & | wc | ) | [virtual] |
Determine whether DD can draw on the current coordinate system of the given WC[H].
Reimplemented from casa::DisplayData.
Reimplemented in casa::MSAsRaster.
virtual Record casa::ActiveCaching2dDD::getOptions | ( | ) | [virtual] |
Retrieve the current and default options and parameter types.
Reimplemented from casa::CachingDisplayData.
Reimplemented in casa::Profile2dDD, casa::MSAsRaster, casa::TblAsContourDD, casa::TblAsRasterDD, casa::TblAsXYDD, casa::WedgeDD, and casa::Histogram2dDD.
void casa::ActiveCaching2dDD::identifyWorldAxis | ( | Coordinate::Type & | type, |
Int & | coordinate, | ||
Int & | axisincoord, | ||
const uInt | worldaxisnum | ||
) | [protected] |
Identify a specified world axis by its Coordinate type, number, and axis in that coordinate.
virtual Bool casa::ActiveCaching2dDD::linToWorld | ( | Vector< Double > & | world, |
const Vector< Double > & | lin | ||
) | [virtual] |
Coordinate transformation handlers, called by WorldCanvasHolder.
Implements casa::DisplayData.
virtual const uInt casa::ActiveCaching2dDD::nelements | ( | const WorldCanvasHolder & | ) | const [inline, virtual] |
Return the number of display elements (ie.
drawable images) in this DisplayData. Both return 1 because this is defined to be a two-dimensional DisplayData, and can only have one view. That is, there is no third axis to iterate over for multiple views.
Implements casa::DisplayData.
Reimplemented in casa::MSAsRaster.
Definition at line 89 of file ActiveCaching2dDD.h.
References nelements().
Referenced by nelements().
virtual const uInt casa::ActiveCaching2dDD::nelements | ( | ) | const [inline, virtual] |
and non-specific
Implements casa::DisplayData.
Reimplemented in casa::MSAsRaster.
Definition at line 91 of file ActiveCaching2dDD.h.
void casa::ActiveCaching2dDD::operator= | ( | const ActiveCaching2dDD & | other | ) | [protected] |
(Required) copy assignment.
virtual AttributeBuffer casa::ActiveCaching2dDD::optionsAsAttributes | ( | ) | [protected, virtual] |
Return the current options of this DisplayData as an AttributeBuffer.
The caller must delete the returned buffer.
Reimplemented from casa::CachingDisplayData.
Reimplemented in casa::Profile2dDD, casa::MSAsRaster, casa::TblAsContourDD, casa::TblAsRasterDD, casa::TblAsXYDD, casa::WedgeDD, and casa::Histogram2dDD.
void casa::ActiveCaching2dDD::setCoordinateSystem | ( | const CoordinateSystem & | coordsys, |
const Vector< Double > & | pixblc, | ||
const Vector< Double > & | pixtrc | ||
) | [protected] |
Install a CoordinateSystem and limits.
virtual void casa::ActiveCaching2dDD::setDefaultOptions | ( | ) | [virtual] |
Install the default options for this DisplayData.
Reimplemented from casa::CachingDisplayData.
Reimplemented in casa::Profile2dDD, casa::MSAsRaster, casa::TblAsContourDD, casa::TblAsRasterDD, casa::TblAsXYDD, casa::WedgeDD, and casa::Histogram2dDD.
virtual Bool casa::ActiveCaching2dDD::setOptions | ( | Record & | rec, |
Record & | recOut | ||
) | [virtual] |
Apply options stored in rec
to the DisplayData.
A return value of True
means a refresh is needed. recOut
contains any fields which were implicitly changed as a result of the call to this function.
Reimplemented from casa::CachingDisplayData.
Reimplemented in casa::Profile2dDD, casa::MSAsRaster, casa::TblAsContourDD, casa::TblAsRasterDD, casa::TblAsXYDD, casa::WedgeDD, and casa::Histogram2dDD.
void casa::ActiveCaching2dDD::setSpectralFormatting | ( | CoordinateSystem & | cSys, |
const String & | velTypeString, | ||
const String & | unitString | ||
) | [private] |
Set Spectral formatting.
virtual String casa::ActiveCaching2dDD::showPosition | ( | const Vector< Double > & | world, |
const Bool & | displayAxesOnly = False |
||
) | [virtual] |
Format a string containing coordinate information at the given world coordinate.
Implements casa::DisplayData.
Reimplemented in casa::MSAsRaster.
virtual Bool casa::ActiveCaching2dDD::sizeControl | ( | WorldCanvasHolder & | wcHolder, |
AttributeBuffer & | holderBuf | ||
) | [virtual] |
Negotiatiate WorldCanvas linear coordinate system when asked to do so by the WorldCanvasHolder.
Implements casa::DisplayData.
Reimplemented in casa::Profile2dDD.
Vector<Double> casa::ActiveCaching2dDD::worldAxisIncrements | ( | ) | const [protected] |
Return the world axis increments.
virtual Vector<String> casa::ActiveCaching2dDD::worldAxisNames | ( | ) | const [virtual] |
World axis information suppliers.
Implements casa::DisplayData.
virtual Vector<String> casa::ActiveCaching2dDD::worldAxisUnits | ( | ) | const [virtual] |
Implements casa::DisplayData.
virtual Bool casa::ActiveCaching2dDD::worldCoordTracking | ( | ) | const [inline, protected, virtual] |
Return whether tracking is currently world (T) or pixel (F) coordinates.
Definition at line 152 of file ActiveCaching2dDD.h.
References itsShowWorldCoordinate.
virtual Bool casa::ActiveCaching2dDD::worldToLin | ( | Vector< Double > & | lin, |
const Vector< Double > & | world | ||
) | [virtual] |
Implements casa::DisplayData.
Bool casa::ActiveCaching2dDD::itsAbsolute [private] |
Definition at line 168 of file ActiveCaching2dDD.h.
Store the 2d CoordinateSystem here.
Reimplemented in casa::WedgeDD.
Definition at line 155 of file ActiveCaching2dDD.h.
Definition at line 170 of file ActiveCaching2dDD.h.
Option: aspect ratio for pixels.
Definition at line 163 of file ActiveCaching2dDD.h.
Vector<Double> casa::ActiveCaching2dDD::itsPixelBlc [protected] |
Store the 2d pixel corners here.
Definition at line 158 of file ActiveCaching2dDD.h.
Vector<Double> casa::ActiveCaching2dDD::itsPixelTrc [protected] |
Definition at line 158 of file ActiveCaching2dDD.h.
Definition at line 169 of file ActiveCaching2dDD.h.
Referenced by worldCoordTracking().
Position tracking.
Definition at line 166 of file ActiveCaching2dDD.h.
Definition at line 167 of file ActiveCaching2dDD.h.