casa
$Rev:20696$
|
Partial implementation of PrincipalAxesDD for Lattice-based data. More...
#include <LatticePADD.h>
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 ImageAnalysis * | imageanalysis () 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 WCResampleHandler * | resampleHandler () |
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. | |
ImageRegion * | itsRegionPtr |
Is itsLattice a SubImage? | |
WCLELMask * | itsMaskPtr |
OTF mask. | |
Unit | itsDataUnit |
The data unit. | |
Display::ComplexToRealMethod | itsComplexToRealMethod |
the complex to real method | |
String | itsResample |
storage for the display parameters | |
String | itsComplexMode |
Partial implementation of PrincipalAxesDD for Lattice-based data.
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.
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
casa::LatticePADisplayData< T >::LatticePADisplayData | ( | Array< T > * | array, |
const uInt | xAxis, | ||
const uInt | yAxis | ||
) |
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.
casa::LatticePADisplayData< T >::LatticePADisplayData | ( | ImageInterface< T > * | image, |
const uInt | xAxis, | ||
const uInt | yAxis | ||
) |
virtual casa::LatticePADisplayData< T >::~LatticePADisplayData | ( | ) | [virtual] |
Destructor.
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.
virtual Display::ComplexToRealMethod casa::LatticePADisplayData< T >::complexMode | ( | ) | [inline, virtual] |
Definition at line 132 of file LatticePADD.h.
virtual const uInt casa::LatticePADisplayData< T >::dataDim | ( | ) | const [virtual] |
Implements casa::DisplayData.
virtual const IPosition casa::LatticePADisplayData< T >::dataShape | ( | ) | const [virtual] |
required functions to help inherited "setup" amongst other things
Implements casa::DisplayData.
String casa::LatticePADisplayData< T >::dataType | ( | ) | const [inline, virtual] |
Pure virtual function from DisplayData...
Implements casa::DisplayData.
Definition at line 96 of file LatticePADD.h.
virtual const Unit casa::LatticePADisplayData< T >::dataUnit | ( | ) | const [virtual] |
Implements casa::DisplayData.
virtual const T casa::LatticePADisplayData< T >::dataValue | ( | IPosition | pos | ) | [virtual] |
Reimplemented in casa::LatticeAsVector< T >.
String casa::LatticePADisplayData< T >::description | ( | ) | const [inline, virtual] |
Reimplemented from casa::DisplayData.
Definition at line 125 of file LatticePADD.h.
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.
virtual String casa::LatticePADisplayData< T >::getBrightnessUnits | ( | ) | [virtual] |
Return the brightness unit as a string.
virtual Record casa::LatticePADisplayData< T >::getHist | ( | ) | [virtual] |
Return the last calculated histogram.
virtual void casa::LatticePADisplayData< T >::getMinAndMax | ( | ) | [virtual] |
Implements casa::PrincipalAxesDD.
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 >.
virtual ImageAnalysis* casa::LatticePADisplayData< T >::imageanalysis | ( | ) | const [virtual] |
Get image analyis about object...
Reimplemented from casa::DisplayData.
ImageInterface<Float>* casa::LatticePADisplayData< T >::imageinterface | ( | ) | [virtual] |
Returns a pointer that should not be deleted...
Reimplemented from casa::DisplayData.
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
virtual Bool casa::LatticePADisplayData< T >::insertFloat | ( | Record & | toGoInto, |
Float | toInsert, | ||
const String | fieldname | ||
) | [virtual] |
virtual MaskedLattice<T>* casa::LatticePADisplayData< T >::maskedLattice | ( | ) | [inline, virtual] |
Definition at line 137 of file LatticePADD.h.
virtual const Bool casa::LatticePADisplayData< T >::maskValue | ( | const IPosition & | pos | ) | [virtual] |
return mask value at given position
virtual WCResampleHandler* casa::LatticePADisplayData< T >::resampleHandler | ( | ) | [inline, virtual] |
Definition at line 128 of file LatticePADD.h.
virtual void casa::LatticePADisplayData< T >::setComplexMode | ( | Display::ComplexToRealMethod | method | ) | [inline, virtual] |
Definition at line 134 of file LatticePADD.h.
virtual void casa::LatticePADisplayData< T >::setDefaultOptions | ( | ) | [virtual] |
install the default options for this DisplayData
Reimplemented from casa::PrincipalAxesDD.
Reimplemented in casa::LatticeAsContour< T >, casa::LatticeAsRaster< T >, casa::LatticeAsVector< T >, and casa::LatticeAsMarker< 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 >.
virtual void casa::LatticePADisplayData< T >::SetUpBeamData_ | ( | ) | [protected, virtual] |
Called by constructors: set up data for beam drawing, if applicable.
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 >.
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.
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.
Bool casa::LatticePADisplayData< T >::calcHist [private] |
Whether to always calculate the histogram or not.
Definition at line 192 of file LatticePADD.h.
Record casa::LatticePADisplayData< T >::imageHistogram [private] |
The image histogram.
Definition at line 189 of file LatticePADD.h.
Array<T>* casa::LatticePADisplayData< T >::itsBaseArrayPtr [private] |
The base array cloned at construction.
Definition at line 186 of file LatticePADD.h.
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().
String casa::LatticePADisplayData< T >::itsComplexMode [private] |
Definition at line 218 of file LatticePADD.h.
Display::ComplexToRealMethod casa::LatticePADisplayData< T >::itsComplexToRealMethod [private] |
the complex to real method
Definition at line 214 of file LatticePADD.h.
Referenced by casa::LatticePADisplayData< Float >::complexMode(), and casa::LatticePADisplayData< Float >::setComplexMode().
Unit casa::LatticePADisplayData< T >::itsDataUnit [private] |
The data unit.
Definition at line 211 of file LatticePADD.h.
Bool casa::LatticePADisplayData< T >::itsDeleteMLPointer [private] |
Says whether the destructor should delete itsMaskedLattice or not.
Definition at line 199 of file LatticePADD.h.
LatticeStatistics<Float>* casa::LatticePADisplayData< T >::itsLatticeStatisticsPtr [private] |
Object to use for calculating statistics.
Definition at line 202 of file LatticePADD.h.
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().
WCLELMask* casa::LatticePADisplayData< T >::itsMaskPtr [private] |
OTF mask.
Definition at line 208 of file LatticePADD.h.
ImageRegion* casa::LatticePADisplayData< T >::itsRegionPtr [private] |
Is itsLattice a SubImage?
Definition at line 205 of file LatticePADD.h.
String casa::LatticePADisplayData< T >::itsResample [private] |
storage for the display parameters
Definition at line 217 of file LatticePADD.h.