casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
casa::PrincipalAxesDM Class Referenceabstract

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 >

Public Member Functions

 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)
 

Protected Member Functions

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::IPosition dataShape ()=0
 This method should be defined in derived classes to simply return the shape of the data object, eg. 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 &sliceShape, const casacore::IPosition &stride, const casacore::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. More...
 
virtual casacore::Bool dataRedrawSelf (WorldCanvas *, Display::RefreshReason)
 Called by draw(): an optimization for ColormapChange in 24bit mode. More...
 
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

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
 

Private Attributes

casacore::uInt itsXAxisNum
 Axis numbers for internal book-keeping. More...
 
casacore::uInt itsYAxisNum
 
casacore::uInt itsZAxisNum
 
casacore::Bool notUsed
 Drawlist state. More...
 
WorldCanvasHolderholder
 
AttributeBuffer drawState
 
casacore::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 57 of file PrincipalAxesDM.h.

Constructor & Destructor Documentation

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

User constructor.

virtual casa::PrincipalAxesDM::~PrincipalAxesDM ( )
virtual

Destructor.

casa::PrincipalAxesDM::PrincipalAxesDM ( )
protected

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.

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

(Required) default constructor.

casa::PrincipalAxesDM::PrincipalAxesDM ( const PrincipalAxesDM other)
protected

(Required) copy constructor.

Member Function Documentation

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

clear drawlist state.

Reimplemented from casa::DisplayMethod.

virtual casacore::uInt casa::PrincipalAxesDM::dataDrawSelf ( WorldCanvas wCanvas,
const casacore::Vector< casacore::Double > &  blc,
const casacore::Vector< casacore::Double > &  trc,
const casacore::IPosition start,
const casacore::IPosition sliceShape,
const casacore::IPosition stride,
const casacore::Bool  usePixelEdges = false 
)
protectedpure 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 casacore::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 casacore::Bool casa::PrincipalAxesDM::dataRedrawSelf ( WorldCanvas ,
Display::RefreshReason   
)
inlineprotectedvirtual

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 114 of file PrincipalAxesDM.h.

virtual casacore::IPosition casa::PrincipalAxesDM::dataShape ( )
protectedpure 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 casacore::Bool casa::PrincipalAxesDM::needToTranspose ( )
inlineprotectedvirtual

Is a transpose necessary?

Definition at line 125 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 ( casacore::IPosition  fixedPos)
protectedvirtual

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 ( )
protectedvirtual

Member Data Documentation

casacore::uInt casa::PrincipalAxesDM::drawListNumber
private

Definition at line 157 of file PrincipalAxesDM.h.

AttributeBuffer casa::PrincipalAxesDM::drawState
private

Definition at line 156 of file PrincipalAxesDM.h.

WorldCanvasHolder* casa::PrincipalAxesDM::holder
private

Definition at line 155 of file PrincipalAxesDM.h.

casacore::uInt casa::PrincipalAxesDM::itsXAxisNum
private

Axis numbers for internal book-keeping.

Definition at line 148 of file PrincipalAxesDM.h.

Referenced by needToTranspose().

casacore::uInt casa::PrincipalAxesDM::itsYAxisNum
private

Definition at line 148 of file PrincipalAxesDM.h.

Referenced by needToTranspose().

casacore::uInt casa::PrincipalAxesDM::itsZAxisNum
private

Definition at line 148 of file PrincipalAxesDM.h.

casacore::Bool casa::PrincipalAxesDM::notUsed
private

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 154 of file PrincipalAxesDM.h.

casacore::IPosition casa::PrincipalAxesDM::sliceShape
protected

Definition at line 121 of file PrincipalAxesDM.h.

Referenced by needToTranspose().

casacore::IPosition casa::PrincipalAxesDM::start
protected

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

Definition at line 116 of file PrincipalAxesDM.h.

casacore::IPosition casa::PrincipalAxesDM::stride
protected

Definition at line 122 of file PrincipalAxesDM.h.


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