casa
$Rev:20696$
|
Class to manage the drawing of vector maps of slices from AIPS++ Lattices. More...
#include <LatticeAsMarker.h>
Public Member Functions | |
LatticeAsMarker (Array< T > *array, const uInt xAxis, const uInt yAxis, const uInt mAxis, const IPosition fixedPos) | |
Array-based constructors: >2d and 2d. | |
LatticeAsMarker (Array< T > *array, const uInt xAxis, const uInt yAxis) | |
LatticeAsMarker (ImageInterface< T > *image, const uInt xAxis, const uInt yAxis, const uInt mAxis, const IPosition fixedPos) | |
Image-based constructors: >2d and 2d. | |
LatticeAsMarker (ImageInterface< T > *image, const uInt xAxis, const uInt yAxis) | |
virtual | ~LatticeAsMarker () |
Destructor. | |
virtual void | setupElements () |
Create the various elements in the sequence of displayable maps. | |
virtual void | setDefaultOptions () |
install the default options for display | |
virtual Bool | setOptions (Record &rec, Record &recOut) |
Apply the options stored in the provided Record to the LatticeAsMarker object. | |
virtual Record | getOptions () |
Retrieve the currently set options, and their types, default values, and any help text associated with each parameter. | |
virtual Display::DisplayDataType | classType () |
Return the DisplayData type; used by the WorldCanvasHolder to determine the order of drawing. | |
virtual String | className () |
class name | |
Private Attributes | |
Float | itsScale |
Float | itsLineWidth |
Int | itsIncX |
Int | itsIncY |
String | itsColor |
String | itsMarker |
Friends | |
class | LatticePADMMarker< T > |
Class to manage the drawing of vector maps of slices from AIPS++ Lattices.
Public interface
<h3>Review Status</h3><dl><dt>Date Reviewed:<dd>yyyy/mm/dd</dl>
From Lattice and Marker (shape)
The purpose of this class is to draw pixels as markers such as squares where the size of the marker reflects the pixel value. Presently only squares are available. Positive values get solid squares, negative values open squares.
At construction, any axes in the data can be mapped to the X and Y axes of the display device (see the PrincipalAxesDD class). For data with more than two dimensions, a third axis in the dataset can be selected for generating a sequence of maps along: this is known as the "movie" axis. Animation (see the Animator class) will cause different slices of the data to be selected from along this axis. After construction, the axis settings of a LatticeAsMarker object can be modified at a later stage.
A LatticeAsMarker object could be constructed and used as follows:
PagedImage<Complex> *pimage = new PagedImage<Complex>(String("test.im")); DisplayData *dd; uInt ndim = pimage->ndim(); if (ndim < 2) { throw(AipsError(String("Image has less than two dimensions"))); } else if (ndim == 2) { dd = (DisplayData *)(new LatticeAsMarker<Complex>(pimage, 0, 1)); } else { IPosition fixedPos(ndim); fixedPos = 0; dd = (DisplayData *)(new LatticeAsMarker<Complex>(pimage, 0, 1, 2,fixedPos)); } // wcHolder is an existing WorldCanvasHolder *..\. wcHolder->addDisplayData(ddata); wcHolder->refresh();
Displaying 2-dimensional slices of a lattice-based data volume is a standard display requirement for astronomical data visualization and presentation.
Definition at line 123 of file LatticeAsMarker.h.
casa::LatticeAsMarker< T >::LatticeAsMarker | ( | Array< T > * | array, |
const uInt | xAxis, | ||
const uInt | yAxis, | ||
const uInt | mAxis, | ||
const IPosition | fixedPos | ||
) |
Array-based constructors: >2d and 2d.
xAxis and yAxis specify which axis in the array (0-based) should be mapped to X and Y on the display device: ie. 2-d slices of the data to be displayed have these axes. mAxis specifies the "movie" axis, which is the axis along which different slices are taken. fixedPos is an IPosition having the same length as the number of dimensions in the array, and indicate the fixed axis values for axes in the data that are not specified as xAxis, yAxis or mAxis.
casa::LatticeAsMarker< T >::LatticeAsMarker | ( | Array< T > * | array, |
const uInt | xAxis, | ||
const uInt | yAxis | ||
) |
casa::LatticeAsMarker< T >::LatticeAsMarker | ( | ImageInterface< T > * | image, |
const uInt | xAxis, | ||
const uInt | yAxis, | ||
const uInt | mAxis, | ||
const IPosition | fixedPos | ||
) |
Image-based constructors: >2d and 2d.
xAxis and yAxis specify which axis in the image (0-based) should be mapped to X and Y on the display device: ie. 2-d slices of the data to be displayed have these axes. mAxis specifies the "movie" axis, which is the axis along which different slices are taken. fixedPos is an IPosition having the same length as the number of dimensions in the image, and indicate the fixed axis values for axes in the data that are not specified as xAxis, yAxis or mAxis.
casa::LatticeAsMarker< T >::LatticeAsMarker | ( | ImageInterface< T > * | image, |
const uInt | xAxis, | ||
const uInt | yAxis | ||
) |
virtual casa::LatticeAsMarker< T >::~LatticeAsMarker | ( | ) | [virtual] |
Destructor.
virtual String casa::LatticeAsMarker< T >::className | ( | ) | [inline, virtual] |
class name
Reimplemented from casa::LatticePADisplayData< T >.
Definition at line 189 of file LatticeAsMarker.h.
References String.
virtual Display::DisplayDataType casa::LatticeAsMarker< T >::classType | ( | ) | [inline, virtual] |
Return the DisplayData type; used by the WorldCanvasHolder to determine the order of drawing.
Implements casa::DisplayData.
Definition at line 186 of file LatticeAsMarker.h.
virtual Record casa::LatticeAsMarker< T >::getOptions | ( | ) | [virtual] |
Retrieve the currently set options, and their types, default values, and any help text associated with each parameter.
This information can be used to generate form-type graphical user interfaces or command-line interfaces to set the options with prompts.
Reimplemented from casa::LatticePADisplayData< T >.
virtual void casa::LatticeAsMarker< T >::setDefaultOptions | ( | ) | [virtual] |
install the default options for display
Reimplemented from casa::LatticePADisplayData< T >.
virtual Bool casa::LatticeAsMarker< T >::setOptions | ( | Record & | rec, |
Record & | recOut | ||
) | [virtual] |
Apply the options stored in the provided Record to the LatticeAsMarker object.
If the return value is True, then some options have changed, and a refresh is needed to update the display.
Reimplemented from casa::LatticePADisplayData< T >.
virtual void casa::LatticeAsMarker< T >::setupElements | ( | ) | [virtual] |
Create the various elements in the sequence of displayable maps.
This is called upon construction as well as whenever the display and/or movie axes are changed via a call to PrincipalAxesDD::setAxes. virtual void setupElements(IPosition fixedPos = IPosition(2));
Implements casa::LatticePADisplayData< T >.
friend class LatticePADMMarker< T > [friend] |
Definition at line 200 of file LatticeAsMarker.h.
String casa::LatticeAsMarker< T >::itsColor [private] |
Definition at line 197 of file LatticeAsMarker.h.
Int casa::LatticeAsMarker< T >::itsIncX [private] |
Definition at line 195 of file LatticeAsMarker.h.
Int casa::LatticeAsMarker< T >::itsIncY [private] |
Definition at line 196 of file LatticeAsMarker.h.
Float casa::LatticeAsMarker< T >::itsLineWidth [private] |
Definition at line 194 of file LatticeAsMarker.h.
String casa::LatticeAsMarker< T >::itsMarker [private] |
Definition at line 198 of file LatticeAsMarker.h.
Float casa::LatticeAsMarker< T >::itsScale [private] |
Definition at line 193 of file LatticeAsMarker.h.