casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
casa::PrincipalAxesDM Class Reference

Interface for DisplayMethods which have data arranged in "axes.". More...

#include <PrincipalAxesDM.h>

Inheritance diagram for casa::PrincipalAxesDM:
casa::DisplayMethod casa::LatticePADisplayMethod< T > casa::ScrollingRasterDM casa::LatticePADMContour< T > casa::LatticePADMMarker< T > casa::LatticePADMRaster< T > casa::LatticePADMVector< T >

List of all members.

Public Member Functions

 PrincipalAxesDM (uInt xAxis, uInt yAxis, uInt mAxis, PrincipalAxesDD *padd)
 User constructor.
virtual ~PrincipalAxesDM ()
 Destructor.
virtual void draw (Display::RefreshReason reason, WorldCanvasHolder &wcHolder)
 Draw on the provided WorldCanvasHolder.
virtual void cleanup ()
 clear drawlist state.

Protected Member Functions

virtual void setup (IPosition fixedPos)
 This method does setup stuff that is common to all elements of an axis-bound display data element.
virtual void setup2d ()
virtual IPosition dataShape ()=0
 This method should be defined in derived classes to simply return the shape of the data object, eg.
virtual uInt dataDrawSelf (WorldCanvas *wCanvas, const Vector< Double > &blc, const Vector< Double > &trc, const IPosition &start, const IPosition &sliceShape, const IPosition &stride, const Bool usePixelEdges=False)=0
 This method should be defined in derived classes to actually draw the data contained in datMatrix, however it likes, starting at the point blc, on *wCanvas.
virtual Bool dataRedrawSelf (WorldCanvas *, Display::RefreshReason)
 Called by draw(): an optimization for ColormapChange in 24bit mode.
virtual Bool needToTranspose ()
 Is a transpose necessary?
 PrincipalAxesDM ()
 The logic behind this cryptic code (see LatticePADM::dataGetSlice): If a either a 1xN or Nx1 slice (including 1x1) is requested, LatticePADM's latt.getSlice() Array will be 1-dimensional, which the Matrix = Array operator will turn into an Nx1 matrix.
 PrincipalAxesDM (const PrincipalAxesDM &other)
 (Required) copy constructor.
void operator= (const PrincipalAxesDM &other)
 (Required) copy assignment.

Protected Attributes

IPosition start
 Some data members which all display elements along principal axes will play around with:
IPosition sliceShape
IPosition stride

Private Attributes

uInt itsXAxisNum
 Axis numbers for internal book-keeping.
uInt itsYAxisNum
uInt itsZAxisNum
Bool notUsed
 Drawlist state.
WorldCanvasHolderholder
AttributeBuffer drawState
uInt drawListNumber

Detailed Description

Interface for DisplayMethods which have data arranged in "axes.".

Synopsis

This class adds to the interface defined by DisplayMethod to provide further infrastructure relevant to data which is arranged by axis (eg. lattice or column-based data).

Definition at line 53 of file PrincipalAxesDM.h.


Constructor & Destructor Documentation

casa::PrincipalAxesDM::PrincipalAxesDM ( uInt  xAxis,
uInt  yAxis,
uInt  mAxis,
PrincipalAxesDD padd 
)

User constructor.

Destructor.

The logic behind this cryptic code (see LatticePADM::dataGetSlice): If a either a 1xN or Nx1 slice (including 1x1) is requested, LatticePADM's latt.getSlice() Array will be 1-dimensional, which the Matrix = Array operator will turn into an Nx1 matrix.

  If, on the other hand, there is no degeneracy in the desired
  slice Matrix, it is returned in lattice (not X,Y) order.  (dk)

(Required) default constructor.

(Required) copy constructor.


Member Function Documentation

virtual void casa::PrincipalAxesDM::cleanup ( ) [virtual]

clear drawlist state.

Reimplemented from casa::DisplayMethod.

virtual uInt casa::PrincipalAxesDM::dataDrawSelf ( WorldCanvas wCanvas,
const Vector< Double > &  blc,
const Vector< Double > &  trc,
const IPosition start,
const IPosition sliceShape,
const IPosition stride,
const Bool  usePixelEdges = False 
) [protected, pure virtual]

This method should be defined in derived classes to actually draw the data contained in datMatrix, however it likes, starting at the point blc, on *wCanvas.

It must return a uInt which indicates the drawListNumber it allocated for this drawing. If usePixelEdges is True, then the given blc and trc correspond to the world blc and trc of the first and last pixels in the given data, otherwise they correspond to the world centres of the blc and trc pixels.

Implemented in casa::LatticePADMRaster< T >, casa::LatticePADMContour< T >, casa::LatticePADMMarker< T >, casa::LatticePADMVector< T >, and casa::ScrollingRasterDM.

virtual Bool casa::PrincipalAxesDM::dataRedrawSelf ( WorldCanvas ,
Display::RefreshReason   
) [inline, protected, virtual]

Called by draw(): an optimization for ColormapChange in 24bit mode.

Redraws the last image using only mapToColor on the WorldCanvas, if possible. If it returns True, the new method WC::redrawIndexedImage() was used successfully (otherwise, draw() continues in the normal way). Override to enable, if necessary (see LatticePADMRaster for an example).

Reimplemented in casa::LatticePADMRaster< T >.

Definition at line 110 of file PrincipalAxesDM.h.

References casa::False.

virtual IPosition casa::PrincipalAxesDM::dataShape ( ) [protected, pure virtual]

This method should be defined in derived classes to simply return the shape of the data object, eg.

Array.shape() or Image.shape(), etc.

Implemented in casa::LatticePADisplayMethod< T >, and casa::ScrollingRasterDM.

virtual void casa::PrincipalAxesDM::draw ( Display::RefreshReason  reason,
WorldCanvasHolder wcHolder 
) [virtual]

Draw on the provided WorldCanvasHolder.

This method provides generic preparation that is common to all objects which are being sliced along principal axes. It calls the pure virtual functions (below) which must be defined in fully typed derived classes.

Implements casa::DisplayMethod.

virtual Bool casa::PrincipalAxesDM::needToTranspose ( ) [inline, protected, virtual]

Is a transpose necessary?

Definition at line 121 of file PrincipalAxesDM.h.

References itsXAxisNum, itsYAxisNum, and sliceShape.

void casa::PrincipalAxesDM::operator= ( const PrincipalAxesDM other) [protected]

(Required) copy assignment.

virtual void casa::PrincipalAxesDM::setup ( IPosition  fixedPos) [protected, virtual]

This method does setup stuff that is common to all elements of an axis-bound display data element.

Reimplemented in casa::ScrollingRasterDM.

virtual void casa::PrincipalAxesDM::setup2d ( ) [protected, virtual]

Member Data Documentation

Definition at line 152 of file PrincipalAxesDM.h.

Definition at line 151 of file PrincipalAxesDM.h.

Definition at line 150 of file PrincipalAxesDM.h.

Axis numbers for internal book-keeping.

Definition at line 143 of file PrincipalAxesDM.h.

Referenced by needToTranspose().

Definition at line 143 of file PrincipalAxesDM.h.

Referenced by needToTranspose().

Definition at line 143 of file PrincipalAxesDM.h.

Drawlist state.

Moved here, where it's used, from DisplayMethod, and made private. 11/03 dk. The Caching side uses different state (and purgeCache(), rather than cleanup()).

Definition at line 149 of file PrincipalAxesDM.h.

Definition at line 117 of file PrincipalAxesDM.h.

Referenced by needToTranspose().

Some data members which all display elements along principal axes will play around with:

Definition at line 112 of file PrincipalAxesDM.h.

Definition at line 118 of file PrincipalAxesDM.h.


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