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

Partial implementation of PrincipalAxesDD for Lattice-based data. More...

#include <LatticePADD.h>

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

List of all members.

Public Member Functions

 LatticePADisplayData (Array< T > *array, const uInt xAxis, const uInt yAxis, const uInt mAxis, const IPosition fixedPos)
 Constructors (no default) LatticePADisplayData();.
 LatticePADisplayData (Array< T > *array, const uInt xAxis, const uInt yAxis)
 LatticePADisplayData (ImageInterface< T > *image, const uInt xAxis, const uInt yAxis, const uInt mAxis, const IPosition fixedPos, viewer::StatusSink *sink=0)
 Image-based constructors: >2d and 2d.
 LatticePADisplayData (ImageInterface< T > *image, const uInt xAxis, const uInt yAxis)
virtual ~LatticePADisplayData ()
 Destructor.
virtual String showValue (const Vector< Double > &world)
 Format a string containing value information at the given world coordinate.
virtual const IPosition dataShape () const
 required functions to help inherited "setup" amongst other things
virtual const uInt dataDim () const
virtual const T dataValue (IPosition pos)
virtual const Unit dataUnit () const
String dataType () const
 Pure virtual function from DisplayData...
virtual ImageAnalysisimageanalysis () const
 Get image analyis about object...
ImageInterface< Float > * imageinterface ()
 Returns a pointer that should not be deleted...
virtual void setupElements ()=0
 left as pure virtual for implementation in concrete class
virtual void getMinAndMax ()
virtual const Bool maskValue (const IPosition &pos)
 return mask value at given position
virtual void setDefaultOptions ()
 install the default options for this DisplayData
virtual Bool setOptions (Record &rec, Record &recOut)
 apply options stored in val to the DisplayData; return value True means a refresh is needed...
virtual Record getOptions ()
 retrieve the current and default options and parameter types.
virtual String className ()
 Return the class name of this DisplayData; useful mostly for debugging purposes, and perhaps future use in the glish widget interface.
String description () const
virtual WCResampleHandlerresampleHandler ()
virtual
Display::ComplexToRealMethod 
complexMode ()
virtual void setComplexMode (Display::ComplexToRealMethod method)
virtual MaskedLattice< T > * maskedLattice ()
virtual Bool insertArray (Record &toGoInto, Vector< Float > toInsert, const String fieldname)
 Insert an array into a Record.
virtual Bool insertFloat (Record &toGoInto, Float toInsert, const String fieldname)
virtual Record getHist ()
 Return the last calculated histogram.
virtual String getBrightnessUnits ()
 Return the brightness unit as a string.

Static Public Member Functions

static Bool useStriding (const IPosition &shape, IPosition &stride, uInt maxPixels=1000000u, uInt minPerAxis=20u)
 Aids updateHistogram() by computing a stride to use for efficiency when computing histograms (could be used elsewhere too).

Protected Member Functions

virtual void SetUpBeamData_ ()
 Called by constructors: set up data for beam drawing, if applicable.
virtual void drawBeamEllipse_ (WorldCanvas *wc)
 Will draw the beam ellipse if applicable (i.e., the LatticePADD has an image with beam data, beam drawing is turned on, and the WC's CoordinateSystem is set to sky coordinates).

Private Attributes

ImageInterface< T > * itsBaseImagePtr
 The base image cloned at construction.
Array< T > * itsBaseArrayPtr
 The base array cloned at construction.
Record imageHistogram
 The image histogram.
Bool calcHist
 Whether to always calculate the histogram or not.
MaskedLattice< T > * itsMaskedLatticePtr
 The masked lattice, effectively referencing one of itsBaseImagePtr or itsBaseArray, or some sub-region of said.
Bool itsDeleteMLPointer
 Says whether the destructor should delete itsMaskedLattice or not.
LatticeStatistics< Float > * itsLatticeStatisticsPtr
 Object to use for calculating statistics.
ImageRegionitsRegionPtr
 Is itsLattice a SubImage?
WCLELMaskitsMaskPtr
 OTF mask.
Unit itsDataUnit
 The data unit.
Display::ComplexToRealMethod itsComplexToRealMethod
 the complex to real method
String itsResample
 storage for the display parameters
String itsComplexMode

Detailed Description

template<class T>
class casa::LatticePADisplayData< T >

Partial implementation of PrincipalAxesDD for Lattice-based data.

Synopsis

This class is a partial (ie. base) implementation of PrincipalAxesDD which adds methods particular to handling Lattice-based data.

Definition at line 60 of file LatticePADD.h.


Constructor & Destructor Documentation

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

Constructors (no default) LatticePADisplayData();.

Array-based constructors: >2d and 2d

template<class T>
casa::LatticePADisplayData< T >::LatticePADisplayData ( Array< T > *  array,
const uInt  xAxis,
const uInt  yAxis 
)
template<class T>
casa::LatticePADisplayData< T >::LatticePADisplayData ( ImageInterface< T > *  image,
const uInt  xAxis,
const uInt  yAxis,
const uInt  mAxis,
const IPosition  fixedPos,
viewer::StatusSink sink = 0 
)

Image-based constructors: >2d and 2d.

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

Destructor.


Member Function Documentation

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

Return the class name of this DisplayData; useful mostly for debugging purposes, and perhaps future use in the glish widget interface.

Reimplemented from casa::PrincipalAxesDD.

Reimplemented in casa::LatticeAsContour< T >, casa::LatticeAsRaster< T >, casa::LatticeAsVector< T >, and casa::LatticeAsMarker< T >.

Definition at line 124 of file LatticePADD.h.

template<class T>
virtual Display::ComplexToRealMethod casa::LatticePADisplayData< T >::complexMode ( ) [inline, virtual]

Definition at line 132 of file LatticePADD.h.

template<class T>
virtual const uInt casa::LatticePADisplayData< T >::dataDim ( ) const [virtual]

Implements casa::DisplayData.

template<class T>
virtual const IPosition casa::LatticePADisplayData< T >::dataShape ( ) const [virtual]

required functions to help inherited "setup" amongst other things

Implements casa::DisplayData.

template<class T>
String casa::LatticePADisplayData< T >::dataType ( ) const [inline, virtual]

Pure virtual function from DisplayData...

Implements casa::DisplayData.

Definition at line 96 of file LatticePADD.h.

template<class T>
virtual const Unit casa::LatticePADisplayData< T >::dataUnit ( ) const [virtual]

Implements casa::DisplayData.

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

Reimplemented in casa::LatticeAsVector< T >.

template<class T>
String casa::LatticePADisplayData< T >::description ( ) const [inline, virtual]

Reimplemented from casa::DisplayData.

Definition at line 125 of file LatticePADD.h.

template<class T>
virtual void casa::LatticePADisplayData< T >::drawBeamEllipse_ ( WorldCanvas wc) [protected, virtual]

Will draw the beam ellipse if applicable (i.e., the LatticePADD has an image with beam data, beam drawing is turned on, and the WC's CoordinateSystem is set to sky coordinates).

Reimplemented from casa::PrincipalAxesDD.

template<class T>
virtual String casa::LatticePADisplayData< T >::getBrightnessUnits ( ) [virtual]

Return the brightness unit as a string.

template<class T>
virtual Record casa::LatticePADisplayData< T >::getHist ( ) [virtual]

Return the last calculated histogram.

template<class T>
virtual void casa::LatticePADisplayData< T >::getMinAndMax ( ) [virtual]

Implements casa::PrincipalAxesDD.

template<class T>
virtual Record casa::LatticePADisplayData< T >::getOptions ( ) [virtual]

retrieve the current and default options and parameter types.

Reimplemented from casa::PrincipalAxesDD.

Reimplemented in casa::LatticeAsContour< T >, casa::LatticeAsRaster< T >, casa::LatticeAsVector< T >, and casa::LatticeAsMarker< T >.

template<class T>
virtual ImageAnalysis* casa::LatticePADisplayData< T >::imageanalysis ( ) const [virtual]

Get image analyis about object...

Reimplemented from casa::DisplayData.

template<class T>
ImageInterface<Float>* casa::LatticePADisplayData< T >::imageinterface ( ) [virtual]

Returns a pointer that should not be deleted...

Reimplemented from casa::DisplayData.

template<class T>
virtual Bool casa::LatticePADisplayData< T >::insertArray ( Record toGoInto,
Vector< Float toInsert,
const String  fieldname 
) [virtual]

Insert an array into a Record.

The array is insert into a "value" field, eg somerecord.fieldname.value

template<class T>
virtual Bool casa::LatticePADisplayData< T >::insertFloat ( Record toGoInto,
Float  toInsert,
const String  fieldname 
) [virtual]
template<class T>
virtual MaskedLattice<T>* casa::LatticePADisplayData< T >::maskedLattice ( ) [inline, virtual]

Definition at line 137 of file LatticePADD.h.

template<class T>
virtual const Bool casa::LatticePADisplayData< T >::maskValue ( const IPosition pos) [virtual]

return mask value at given position

template<class T>
virtual WCResampleHandler* casa::LatticePADisplayData< T >::resampleHandler ( ) [inline, virtual]

Definition at line 128 of file LatticePADD.h.

template<class T>
virtual void casa::LatticePADisplayData< T >::setComplexMode ( Display::ComplexToRealMethod  method) [inline, virtual]

Definition at line 134 of file LatticePADD.h.

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

apply options stored in val to the DisplayData; return value True means a refresh is needed...

Reimplemented from casa::PrincipalAxesDD.

Reimplemented in casa::LatticeAsContour< T >, casa::LatticeAsRaster< T >, casa::LatticeAsVector< T >, and casa::LatticeAsMarker< T >.

template<class T>
virtual void casa::LatticePADisplayData< T >::SetUpBeamData_ ( ) [protected, virtual]

Called by constructors: set up data for beam drawing, if applicable.

template<class T>
virtual void casa::LatticePADisplayData< T >::setupElements ( ) [pure virtual]

left as pure virtual for implementation in concrete class

Reimplemented from casa::PrincipalAxesDD.

Implemented in casa::LatticeAsContour< T >, casa::LatticeAsRaster< T >, casa::LatticeAsVector< T >, and casa::LatticeAsMarker< T >.

template<class T>
virtual String casa::LatticePADisplayData< T >::showValue ( const Vector< Double > &  world) [virtual]

Format a string containing value information at the given world coordinate.

Implements casa::DisplayData.

template<class T>
static Bool casa::LatticePADisplayData< T >::useStriding ( const IPosition shape,
IPosition stride,
uInt  maxPixels = 1000000u,
uInt  minPerAxis = 20u 
) [static]

Aids updateHistogram() by computing a stride to use for efficiency when computing histograms (could be used elsewhere too).

Input parameter 'shape' is the shape of the original lattice or array. Return value indicates whether striding should be used; if so, the recommended stride is returned in the 'stride' parameter. maxPixels is the desired maximum number of elements in the sub-lattice that would result from using the returned stride (may be exceeded because of minPerAxis requirements, or in any case by a few percent). A stride greater than 1 will not be returned for an axis if it would make the length of that axis in the strided sub-lattice less than minPerAxis.


Member Data Documentation

template<class T>
Bool casa::LatticePADisplayData< T >::calcHist [private]

Whether to always calculate the histogram or not.

Definition at line 192 of file LatticePADD.h.

template<class T>
Record casa::LatticePADisplayData< T >::imageHistogram [private]

The image histogram.

Definition at line 189 of file LatticePADD.h.

template<class T>
Array<T>* casa::LatticePADisplayData< T >::itsBaseArrayPtr [private]

The base array cloned at construction.

Definition at line 186 of file LatticePADD.h.

template<class T>
ImageInterface<T>* casa::LatticePADisplayData< T >::itsBaseImagePtr [private]

The base image cloned at construction.

Definition at line 183 of file LatticePADD.h.

Referenced by casa::LatticePADisplayData< Float >::description().

template<class T>
String casa::LatticePADisplayData< T >::itsComplexMode [private]

Definition at line 218 of file LatticePADD.h.

the complex to real method

Definition at line 214 of file LatticePADD.h.

Referenced by casa::LatticePADisplayData< Float >::complexMode(), and casa::LatticePADisplayData< Float >::setComplexMode().

template<class T>
Unit casa::LatticePADisplayData< T >::itsDataUnit [private]

The data unit.

Definition at line 211 of file LatticePADD.h.

template<class T>
Bool casa::LatticePADisplayData< T >::itsDeleteMLPointer [private]

Says whether the destructor should delete itsMaskedLattice or not.

Definition at line 199 of file LatticePADD.h.

Object to use for calculating statistics.

Definition at line 202 of file LatticePADD.h.

template<class T>
MaskedLattice<T>* casa::LatticePADisplayData< T >::itsMaskedLatticePtr [private]

The masked lattice, effectively referencing one of itsBaseImagePtr or itsBaseArray, or some sub-region of said.

Definition at line 196 of file LatticePADD.h.

Referenced by casa::LatticePADisplayData< Float >::maskedLattice().

template<class T>
WCLELMask* casa::LatticePADisplayData< T >::itsMaskPtr [private]

OTF mask.

Definition at line 208 of file LatticePADD.h.

template<class T>
ImageRegion* casa::LatticePADisplayData< T >::itsRegionPtr [private]

Is itsLattice a SubImage?

Definition at line 205 of file LatticePADD.h.

template<class T>
String casa::LatticePADisplayData< T >::itsResample [private]

storage for the display parameters

Definition at line 217 of file LatticePADD.h.


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