casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes | Friends
casa::LatticeAsVector< T > Class Template Reference

Class to manage the drawing of vector maps of slices from AIPS++ Lattices. More...

#include <LatticeAsVector.h>

Inheritance diagram for casa::LatticeAsVector< T >:
casa::LatticePADisplayData< T > casa::PrincipalAxesDD casa::DisplayData casa::DisplayOptions casa::DisplayEH casa::DlTarget

List of all members.

Public Member Functions

 LatticeAsVector (Array< T > *array, const uInt xAxis, const uInt yAxis, const uInt mAxis, const IPosition fixedPos)
 Array-based constructors: >2d and 2d.
 LatticeAsVector (Array< T > *array, const uInt xAxis, const uInt yAxis)
 LatticeAsVector (ImageInterface< T > *image, const uInt xAxis, const uInt yAxis, const uInt mAxis, const IPosition fixedPos)
 Image-based constructors: >2d and 2d.
 LatticeAsVector (ImageInterface< T > *image, const uInt xAxis, const uInt yAxis)
virtual ~LatticeAsVector ()
 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 LatticeAsVector 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
virtual const T dataValue (IPosition pos)
 Value of the Lattice at a position--used by showValue().

Private Member Functions

Float getVariance ()
template<>
Float getVariance ()
template<>
Float getVariance ()

Private Attributes

Float itsScale
Float itsLineWidth
Int itsIncX
Int itsIncY
Bool itsArrow
Float itsBarb
String itsColor
Float itsRotation
String itsPhaseType
Bool itsDebias
Float itsVar
Unit itsUnits
Bool itsConstAmp

Friends

class LatticePADMVector< T >

Detailed Description

template<class T>
class casa::LatticeAsVector< T >

Class to manage the drawing of vector maps of slices from AIPS++ Lattices.

Intended use:

Public interface

 <h3>Review Status</h3><dl><dt>Date Reviewed:<dd>yyyy/mm/dd</dl> 

Prerequisite

Etymology

The purpose of this class is to draw vectors maps of data that is lattice-based.

Synopsis

This class should be used to display vector maps---i.e. lines with an amplitude and position angle for two-dimensional slices of data extracted from AIPS++ Lattices or Arrays having two or more dimensions. The data source can be Complex or Float. If Complex, then both the amplitude and position angle can be extracted. If Float, the data represents the position angle (degrees) and an amplitude of unity is assumed. I

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 LatticeAsVector object can be modified at a later stage.

Example

A LatticeAsVector 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 LatticeAsVector<Complex>(pimage, 0, 1));
    } else {
      IPosition fixedPos(ndim);
      fixedPos = 0;
      dd = (DisplayData *)(new LatticeAsVector<Complex>(pimage, 0, 1, 2,fixedPos));
    }
    // wcHolder is an existing WorldCanvasHolder *..\.
    wcHolder->addDisplayData(ddata);
    wcHolder->refresh();

Motivation

Displaying 2-dimensional slices of a lattice-based data volume is a standard display requirement for astronomical data visualization and presentation.

Template Type Argument Requirements (T)

Definition at line 125 of file LatticeAsVector.h.


Constructor & Destructor Documentation

template<class T >
casa::LatticeAsVector< T >::LatticeAsVector ( 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.

template<class T >
casa::LatticeAsVector< T >::LatticeAsVector ( Array< T > *  array,
const uInt  xAxis,
const uInt  yAxis 
)
template<class T >
casa::LatticeAsVector< T >::LatticeAsVector ( 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.

template<class T >
casa::LatticeAsVector< T >::LatticeAsVector ( ImageInterface< T > *  image,
const uInt  xAxis,
const uInt  yAxis 
)
template<class T >
virtual casa::LatticeAsVector< T >::~LatticeAsVector ( ) [virtual]

Destructor.


Member Function Documentation

template<class T >
virtual String casa::LatticeAsVector< T >::className ( ) [inline, virtual]

class name

Reimplemented from casa::LatticePADisplayData< T >.

Definition at line 191 of file LatticeAsVector.h.

References String.

template<class T >
virtual Display::DisplayDataType casa::LatticeAsVector< T >::classType ( ) [inline, virtual]

Return the DisplayData type; used by the WorldCanvasHolder to determine the order of drawing.

Implements casa::DisplayData.

Definition at line 188 of file LatticeAsVector.h.

template<class T >
virtual const T casa::LatticeAsVector< T >::dataValue ( IPosition  pos) [virtual]

Value of the Lattice at a position--used by showValue().

Overrides base version to take user-controlled addition to phase angle into account.

Reimplemented from casa::LatticePADisplayData< T >.

template<class T >
virtual Record casa::LatticeAsVector< 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 >.

template<class T >
Float casa::LatticeAsVector< T >::getVariance ( ) [private]
template<>
Float casa::LatticeAsVector< Complex >::getVariance ( ) [private]
template<>
Float casa::LatticeAsVector< Float >::getVariance ( ) [private]
template<class T >
virtual void casa::LatticeAsVector< T >::setDefaultOptions ( ) [virtual]

install the default options for display

Reimplemented from casa::LatticePADisplayData< T >.

template<class T >
virtual Bool casa::LatticeAsVector< T >::setOptions ( Record rec,
Record recOut 
) [virtual]

Apply the options stored in the provided Record to the LatticeAsVector 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 >.

template<class T >
virtual void casa::LatticeAsVector< 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 >.


Friends And Related Function Documentation

template<class T >
friend class LatticePADMVector< T > [friend]

Definition at line 215 of file LatticeAsVector.h.


Member Data Documentation

template<class T >
Bool casa::LatticeAsVector< T >::itsArrow [private]

Definition at line 205 of file LatticeAsVector.h.

template<class T >
Float casa::LatticeAsVector< T >::itsBarb [private]

Definition at line 206 of file LatticeAsVector.h.

template<class T >
String casa::LatticeAsVector< T >::itsColor [private]

Definition at line 207 of file LatticeAsVector.h.

template<class T >
Bool casa::LatticeAsVector< T >::itsConstAmp [private]

Definition at line 213 of file LatticeAsVector.h.

template<class T >
Bool casa::LatticeAsVector< T >::itsDebias [private]

Definition at line 210 of file LatticeAsVector.h.

template<class T >
Int casa::LatticeAsVector< T >::itsIncX [private]

Definition at line 203 of file LatticeAsVector.h.

template<class T >
Int casa::LatticeAsVector< T >::itsIncY [private]

Definition at line 204 of file LatticeAsVector.h.

template<class T >
Float casa::LatticeAsVector< T >::itsLineWidth [private]

Definition at line 202 of file LatticeAsVector.h.

template<class T >
String casa::LatticeAsVector< T >::itsPhaseType [private]

Definition at line 209 of file LatticeAsVector.h.

template<class T >
Float casa::LatticeAsVector< T >::itsRotation [private]

Definition at line 208 of file LatticeAsVector.h.

template<class T >
Float casa::LatticeAsVector< T >::itsScale [private]

Definition at line 201 of file LatticeAsVector.h.

template<class T >
Unit casa::LatticeAsVector< T >::itsUnits [private]

Definition at line 212 of file LatticeAsVector.h.

template<class T >
Float casa::LatticeAsVector< T >::itsVar [private]

Definition at line 211 of file LatticeAsVector.h.


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