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

Class to draw a single vector map of a slice from an AIPS++ Lattice. More...

#include <LatticePADMMarker.h>

Inheritance diagram for casa::LatticePADMMarker< T >:
casa::LatticePADisplayMethod< T > casa::PrincipalAxesDM casa::DisplayMethod

List of all members.

Public Member Functions

 LatticePADMMarker (const uInt xAxis, const uInt yAxis, const uInt mAxis, const IPosition fixedPos, LatticePADisplayData< T > *arDat)
 Constructors: >2d and 2d.
 LatticePADMMarker (const uInt xAxis, const uInt yAxis, LatticePADisplayData< T > *arDat)
virtual ~LatticePADMMarker ()
 Destructor.
virtual uInt dataDrawSelf (WorldCanvas *wCanvas, const Vector< Double > &blc, const Vector< Double > &trc, const IPosition &start, const IPosition &shape, const IPosition &stride, const Bool usePixelEdges=False)
 Actually draw on the display device.

Private Member Functions

Matrix< FloatgetAmplitude (const Matrix< T > &data) const

Detailed Description

template<class T>
class casa::LatticePADMMarker< T >

Class to draw a single vector map of a slice from an AIPS++ Lattice.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

The purpose of this class is to draw "vector" maps of data that are "lattice"-based. The "PADM" refers to PrincipalAxesDisplayMethod, meaning that one or more instances of this class are used to actually draw slices of a Lattice along its main axes.

Synopsis

This is a helper class for the LatticeAsMarker class. One or more instances of this class are created by a single LatticeAsMarker object, each being responsible for drawing a different slice of the data.

Example

This class should only be used by the LatticeAsMarker class to setup a number of views of an AIPS++ Image or Array. As such, this example simply outlines how this class is used by LatticeAsMarker, in, for example, a support function for a constructor:

    void LatticeAsMarker::setupElements(IPosition fixedPos) {
      if (nPixelAxes > 2) {
        nImages = dataLattice()->shape()(zAxisNum);
        DDelement.resize(nImages);
        for (uInt index = 0; index < nImages; index++) {
          fixedPos(zAxisNum) = index;
          DDelement[index] = (LatticePADisplayMethod<Complex> *)new 
          LatticePADMVector(dataLattice(), xAxisNum, yAxisNum,
                               zAxisNum, fixedPos, this);
        }
      } else {
        nImages = 1;
        DDelement.resize(nImages);
        DDelement[0] = (LatticePADisplayMethod<Complex> *)new
          LatticePADMVector(dataLattice(), xAxisNum, yAxisNum, this);
      }
    }

Motivation

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

Definition at line 111 of file LatticePADMMarker.h.


Constructor & Destructor Documentation

template<class T >
casa::LatticePADMMarker< T >::LatticePADMMarker ( const uInt  xAxis,
const uInt  yAxis,
const uInt  mAxis,
const IPosition  fixedPos,
LatticePADisplayData< T > *  arDat 
)

Constructors: >2d and 2d.

xAxis and yAxis specify which axis in the Lattice (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 as 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 indicates the fixed axis values for axes in the data that are not specified as xAxis or yAxis: indeed, fixedPos(mAxis) indicates which pixel value along the movie axis that this particular object looks after.

template<class T >
casa::LatticePADMMarker< T >::LatticePADMMarker ( const uInt  xAxis,
const uInt  yAxis,
LatticePADisplayData< T > *  arDat 
)
template<class T >
virtual casa::LatticePADMMarker< T >::~LatticePADMMarker ( ) [virtual]

Destructor.


Member Function Documentation

template<class T >
virtual uInt casa::LatticePADMMarker< T >::dataDrawSelf ( WorldCanvas wCanvas,
const Vector< Double > &  blc,
const Vector< Double > &  trc,
const IPosition start,
const IPosition shape,
const IPosition stride,
const Bool  usePixelEdges = False 
) [virtual]

Actually draw on the display device.

The WorldCanvasHolder will tell the LatticeAsMarker that it should now draw, which will in turn determine which of its one or more LatticePADMVector objects should draw by matching the movie value on the WorldCanvas. The vector is drawn in the world coordinate range blc to trc.

Implements casa::PrincipalAxesDM.

template<class T >
Matrix<Float> casa::LatticePADMMarker< T >::getAmplitude ( const Matrix< T > &  data) const [private]

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