casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | List of all members
casa::LatticePADMRaster< T > Class Template Reference

Class to draw a raster image of a slice of an AIPS++ Lattice. More...

#include <LatticeAsRaster.h>

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

Public Member Functions

 LatticePADMRaster (const casacore::uInt xAxis, const casacore::uInt yAxis, const casacore::uInt mAxis, const casacore::IPosition fixedPos, LatticePADisplayData< T > *arDat)
 Constructors: >2d and 2d. More...
 
 LatticePADMRaster (const casacore::uInt xAxis, const casacore::uInt yAxis, LatticePADisplayData< T > *arDat)
 
virtual ~LatticePADMRaster ()
 Destructor. More...
 
virtual casacore::Bool dataRedrawSelf (WorldCanvas *, Display::RefreshReason)
 Invoke (much more rapid) redraw of previous color-index rendering if applicable (i.e., only during colormap 'fiddling' – ColorTableChange refresh). More...
 
virtual casacore::uInt dataDrawSelf (WorldCanvas *wCanvas, const casacore::Vector< casacore::Double > &blc, const casacore::Vector< casacore::Double > &trc, const casacore::IPosition &start, const casacore::IPosition &shape, const casacore::IPosition &stride, const casacore::Bool usePixelEdges=false)
 Actually draw on the display device. More...
 
- Public Member Functions inherited from casa::LatticePADisplayMethod< T >
 LatticePADisplayMethod ()
 Constructor do I need the default constructor? More...
 
 LatticePADisplayMethod (const casacore::uInt xAxis, const casacore::uInt yAxis, const casacore::uInt mAxis, const casacore::IPosition fixedPos, LatticePADisplayData< T > *arDat)
 
 LatticePADisplayMethod (const casacore::uInt xAxis, const casacore::uInt yAxis, LatticePADisplayData< T > *arDat)
 2d version More...
 
virtual ~LatticePADisplayMethod ()
 Destructor. More...
 
virtual casacore::Bool dataGetSlice (casacore::Matrix< T > &datMatrix, casacore::Matrix< casacore::Bool > &mask, const casacore::IPosition &start, const casacore::IPosition &sliceShape, const casacore::IPosition &stride)
 Extract data from the lattice: used by draw() in PrincipalAxesDM this is probably not needed in this class... More...
 
- Public Member Functions inherited from casa::PrincipalAxesDM
 PrincipalAxesDM (casacore::uInt xAxis, casacore::uInt yAxis, casacore::uInt mAxis, PrincipalAxesDD *padd)
 User constructor. More...
 
virtual ~PrincipalAxesDM ()
 Destructor. More...
 
virtual void draw (Display::RefreshReason reason, WorldCanvasHolder &wcHolder)
 Draw on the provided WorldCanvasHolder. More...
 
virtual void cleanup ()
 clear drawlist state. More...
 
- Public Member Functions inherited from casa::DisplayMethod
 DisplayMethod (DisplayData *parentDisplayData)
 Constructor. More...
 
virtual ~DisplayMethod ()
 Destructor. More...
 
void addRestriction (Attribute &newAt, casacore::Bool permanent)
 Set & remove restrictions. More...
 
void addRestrictions (AttributeBuffer &newBuf)
 
void setRestriction (Attribute &newAt)
 
void setRestrictions (AttributeBuffer &newBuf)
 
void removeRestriction (const casacore::String &name)
 
casacore::Bool existRestriction (const casacore::String &name)
 
void clearRestrictions ()
 
casacore::Bool matches (Attribute &at)
 match restriction More...
 
casacore::Bool matches (AttributeBuffer &atBuf)
 

Private Member Functions

bool initializeColorMatrix (LatticeAsRaster< T > *lar, const casacore::IPosition &start, const casacore::IPosition &shape, const casacore::IPosition &stride, casacore::Matrix< T > &datMatrix, casacore::Matrix< casacore::Bool > &maskMatrix) const
 

Additional Inherited Members

- Protected Member Functions inherited from casa::LatticePADisplayMethod< T >
virtual casacore::IPosition dataShape ()
 Query the shape of the lattice: used by draw() in PrincipalAxesDM. More...
 
virtual casacore::Bool dataGetSlice (casacore::Matrix< T > &datMatrix, casacore::Matrix< casacore::Bool > &mask, const casacore::IPosition &start, const casacore::IPosition &sliceShape, const casacore::IPosition &stride, casacore::MaskedLattice< T > &latt)
 
- Protected Member Functions inherited from casa::PrincipalAxesDM
virtual void setup (casacore::IPosition fixedPos)
 This method does setup stuff that is common to all elements of an axis-bound display data element. More...
 
virtual void setup2d ()
 
virtual casacore::Bool needToTranspose ()
 Is a transpose necessary? More...
 
 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() casacore::Array will be 1-dimensional, which the casacore::Matrix = casacore::Array operator will turn into an Nx1 matrix. More...
 
 PrincipalAxesDM (const PrincipalAxesDM &other)
 (Required) copy constructor. More...
 
void operator= (const PrincipalAxesDM &other)
 (Required) copy assignment. More...
 
- Protected Member Functions inherited from casa::DisplayMethod
 DisplayMethod ()
 (Required) default constructor. More...
 
 DisplayMethod (const DisplayMethod &other)
 (Required) copy constructor. More...
 
void operator= (const DisplayMethod &other)
 (Required) copy assignment. More...
 
DisplayDataparentDisplayData ()
 Return the parent DisplayData. More...
 
- Protected Attributes inherited from casa::PrincipalAxesDM
casacore::IPosition start
 Some data members which all display elements along principal axes will play around with: More...
 
casacore::IPosition sliceShape
 
casacore::IPosition stride
 
- Protected Attributes inherited from casa::DisplayMethod
AttributeBuffer restrictions
 

Detailed Description

template<class T>
class casa::LatticePADMRaster< T >

Class to draw a raster image of a slice of an AIPS++ Lattice.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

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

Synopsis

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

Example

This class should only be used by the LatticeAsRaster 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 LatticeAsRaster, in, for example, a support function for a constructor:

template <class T>
if (nPixelAxes > 2) {
nImages = dataLattice()->shape()(zAxisNum);
DDelement.resize(nImages);
for (casacore::uInt index = 0; index < nImages; index++) {
fixedPos(zAxisNum) = index;
DDelement[index] = (LatticePADisplayMethod<T> *)new
LatticePADMRaster<T>(dataLattice(), xAxisNum, yAxisNum,
zAxisNum, fixedPos, this);
}
} else {
nImages = 1;
DDelement.resize(nImages);
DDelement[0] = (LatticePADisplayMethod<T> *)new
LatticePADMRaster<T>(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.

Template Type Argument Requirements (T)

Definition at line 45 of file LatticeAsRaster.h.

Constructor & Destructor Documentation

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

Constructors: >2d and 2d.

xAxis and yAxis specify which axis in the casacore::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::LatticePADMRaster< T >::LatticePADMRaster ( const casacore::uInt  xAxis,
const casacore::uInt  yAxis,
LatticePADisplayData< T > *  arDat 
)
template<class T >
virtual casa::LatticePADMRaster< T >::~LatticePADMRaster ( )
virtual

Destructor.

Member Function Documentation

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

Actually draw on the display device.

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

Implements casa::PrincipalAxesDM.

template<class T >
virtual casacore::Bool casa::LatticePADMRaster< T >::dataRedrawSelf ( WorldCanvas ,
Display::RefreshReason   
)
virtual

Invoke (much more rapid) redraw of previous color-index rendering if applicable (i.e., only during colormap 'fiddling' – ColorTableChange refresh).

Return value indicates success.

Reimplemented from casa::PrincipalAxesDM.

template<class T >
bool casa::LatticePADMRaster< T >::initializeColorMatrix ( LatticeAsRaster< T > *  lar,
const casacore::IPosition start,
const casacore::IPosition shape,
const casacore::IPosition stride,
casacore::Matrix< T > &  datMatrix,
casacore::Matrix< casacore::Bool > &  maskMatrix 
) const
private

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