casa
5.7.0-16
|
Class to manage the drawing of raster images of slices from AIPS++ Lattices. More...
#include <LatticeAsRaster.h>
Public Member Functions | |
LatticeAsRaster (casacore::Array< T > *array, const casacore::uInt xAxis, const casacore::uInt yAxis, const casacore::uInt mAxis, const casacore::IPosition fixedPos) | |
casacore::Array-based constructors: >2d and 2d. More... | |
LatticeAsRaster (casacore::Array< T > *array, const casacore::uInt xAxis, const casacore::uInt yAxis) | |
LatticeAsRaster (std::shared_ptr< casacore::ImageInterface< T > > image, const casacore::uInt xAxis, const casacore::uInt yAxis, const casacore::uInt mAxis, const casacore::IPosition fixedPos, viewer::StatusSink *sink=0) | |
Image-based constructors: >2d and 2d. More... | |
LatticeAsRaster (std::shared_ptr< casacore::ImageInterface< T > > image, const casacore::uInt xAxis, const casacore::uInt yAxis) | |
virtual | ~LatticeAsRaster () |
Destructor. More... | |
virtual void | setupElements () |
Create the various elements in the sequence of displayable images. More... | |
virtual void | setDefaultOptions () |
Install the default options for display. More... | |
virtual casacore::Bool | setOptions (casacore::Record &rec, casacore::Record &recOut) |
Apply the options stored in the provided casacore::Record to the LatticeAsRaster object. More... | |
virtual casacore::Record | getOptions (bool scrub=false) const |
Retrieve the currently set options, and their types, default values, and any help text associated with each parameter. More... | |
virtual Display::DisplayDataType | classType () |
static casacore::Record getGlobalOption(); More... | |
virtual casacore::String | className () const |
class name More... | |
Public Member Functions inherited from casa::LatticePADisplayData< T > | |
LatticePADisplayData (casacore::Array< T > *array, const casacore::uInt xAxis, const casacore::uInt yAxis, const casacore::uInt mAxis, const casacore::IPosition fixedPos) | |
Constructors (no default) | |
LatticePADisplayData (casacore::Array< T > *array, const casacore::uInt xAxis, const casacore::uInt yAxis) | |
LatticePADisplayData (std::shared_ptr< casacore::ImageInterface< T > > image, const casacore::uInt xAxis, const casacore::uInt yAxis, const casacore::uInt mAxis, const casacore::IPosition fixedPos, viewer::StatusSink *sink=0) | |
Image-based constructors: >2d and 2d. More... | |
LatticePADisplayData (std::shared_ptr< casacore::ImageInterface< T > > image, const casacore::uInt xAxis, const casacore::uInt yAxis) | |
virtual | ~LatticePADisplayData () |
Destructor. More... | |
virtual casacore::String | showValue (const casacore::Vector< casacore::Double > &world) |
casacore::Format a string containing value information at the given world coordinate More... | |
virtual const casacore::IPosition | dataShape () const |
required functions to help inherited "setup" amongst other things More... | |
virtual casacore::uInt | dataDim () const |
virtual T | dataValue (casacore::IPosition pos) |
virtual const casacore::Unit | dataUnit () const |
casacore::String | dataType () const |
Pure virtual function from DisplayData... More... | |
std::shared_ptr < casacore::ImageInterface < casacore::Float > > | imageinterface () |
Returns a pointer that should not be deleted... More... | |
virtual void | getMinAndMax () |
virtual casacore::Bool | maskValue (const casacore::IPosition &pos) |
return mask value at given position More... | |
casacore::String | description () const |
virtual WCResampleHandler * | resampleHandler () |
virtual Display::ComplexToRealMethod | complexMode () |
virtual void | setComplexMode (Display::ComplexToRealMethod method) |
virtual std::shared_ptr < casacore::MaskedLattice< T > > | maskedLattice () |
virtual casacore::Bool | insertArray (casacore::Record &toGoInto, casacore::Vector< casacore::Float > toInsert, const casacore::String fieldname) |
Insert an array into a Record. More... | |
virtual casacore::Bool | insertFloat (casacore::Record &toGoInto, casacore::Float toInsert, const casacore::String fieldname) |
virtual casacore::Record | getHist () const |
Return the last calculated histogram. More... | |
virtual casacore::String | getBrightnessUnits () const |
Return the brightness unit as a string. More... | |
Public Member Functions inherited from casa::PrincipalAxesDD | |
PrincipalAxesDD (casacore::uInt xAxis, casacore::uInt yAxis, casacore::Int mAxis=-1, casacore::Bool axisLabels=true, viewer::StatusSink *sink=0) | |
constructor More... | |
virtual | ~PrincipalAxesDD () |
destructor More... | |
virtual casacore::Bool | linToWorld (casacore::Vector< casacore::Double > &world, const casacore::Vector< casacore::Double > &lin) |
casacore::Coordinate transformation handlers, called by WorldCanvasHolder More... | |
virtual casacore::Bool | worldToLin (casacore::Vector< casacore::Double > &lin, const casacore::Vector< casacore::Double > &world) |
virtual casacore::Bool | linToFullWorld (casacore::Vector< casacore::Double > &fullWorld, const casacore::Vector< casacore::Double > &lin) |
virtual casacore::String | showPosition (const casacore::Vector< casacore::Double > &world, const casacore::Bool &displayAxesOnly=false) |
casacore::Format a string containing coordinate and data information at the given world coordinate More... | |
virtual casacore::String | showPosition (const casacore::Vector< casacore::Double > &world, const casacore::Bool &showAbs, const casacore::Bool &displayAxesOnly) |
casacore::Format a string containing coordinate and data information at the given world coordinate. More... | |
virtual void | setSubstituteTitleText (const casacore::String text) |
virtual casacore::Bool | conformsToCS (const WorldCanvas &wc) |
Is the DD is capable (in its current state) of drawing in the current DisplayCoordinateSystem of the WCH's WorldCanvas? More... | |
virtual casacore::Vector < casacore::String > | worldAxisNames () const |
Miscellaneous information supply routines. More... | |
virtual casacore::Vector < casacore::String > | worldAxisUnits () const |
virtual casacore::Vector < casacore::Double > | worldAxisIncrements () |
virtual void | worldAxisType (casacore::Coordinate::Type &type, casacore::Int &coordinate, casacore::Int &axisincoord, const casacore::uInt &worldaxisnum) |
virtual casacore::String | worldAxisCode (const casacore::uInt &worldaxisnum) |
virtual casacore::uInt | nelements (const WorldCanvasHolder &wcHolder) const |
Return the number of display elements (eg. More... | |
virtual casacore::uInt | nelements () const |
and non-specific More... | |
virtual void | setDataMin (casacore::Double datmin) |
Set and retrieve the minimum and maximum data values. More... | |
virtual void | setDataMax (casacore::Double datmax) |
virtual casacore::Double | getDataMin () const |
virtual casacore::Double | getDataMax () const |
virtual casacore::Bool | sizeControl (WorldCanvasHolder &wcHolder, AttributeBuffer &holderBuf) |
sizeControlFunction, called by the WorldCanvasHolder to setup the WorldCanvas linear coordinate system More... | |
virtual void | positionEH (const WCPositionEvent &ev) |
Position event handler, called by the WorldCanvasHolder. More... | |
virtual void | motionEH (const WCMotionEvent &ev) |
Motion event handler, called by the WorldCanvasHolder. More... | |
virtual void | refreshEH (const WCRefreshEvent &ev) |
refresh handler, called by the WorldCanvasHolder More... | |
virtual casacore::Bool | labelAxes (const WCRefreshEvent &ev) |
label/draw the axes More... | |
virtual casacore::Bool | canLabelAxes () const |
virtual void | cleanup () |
required function to tidy up our elements, primarily More... | |
virtual casacore::Bool | setLabellerOptions (casacore::Record &rec, casacore::Record &recout) |
distribute options to all the axis labellers More... | |
virtual casacore::Record | getLabellerOptions (bool scrub=false) const |
retrieve options from the axis labellers More... | |
virtual void | setAxes (const casacore::uInt xAxis, const casacore::uInt yAxis, const casacore::uInt mAxis, const casacore::IPosition fixedPos, casacore::Bool reset=true) |
Sets which axes are on display and animator, and positions for animator and sliders. More... | |
virtual casacore::uInt | nDim () |
query the number of dimensions in the data More... | |
DisplayCoordinateSystem | coordinateSystem () const |
retrieve the DisplayCoordinateSystem More... | |
DisplayCoordinateSystem | originalCoordinateSystem () const |
retrieve the original DisplayCoordinateSystem More... | |
void | setCoordinateSystem (const DisplayCoordinateSystem &coordsys) |
set the DisplayCoordinateSystem and the original DisplayCoordinateSystem More... | |
void | restoreCoordinateSystem () |
set the DisplayCoordinateSystem to be the same as the original DisplayCoordinateSystem More... | |
void | installFakeCoordinateSystem () |
set a Linear casacore::Coordinate in case of pixToWorld undefined for the blc/trc More... | |
void | removeFakeCoordinateSystem () |
virtual casacore::String | className () |
Return the class name of this DisplayData; useful mostly for debugging purposes, and perhaps future use in the glish widget interface. More... | |
virtual casacore::IPosition | fixedPosition () const |
Get the current fixed position. More... | |
virtual std::vector< int > | displayAxes () const |
Get the current display axis numbers. More... | |
virtual casacore::String | pixelTreatment () const |
Get the current setting of pixel treatment mode. More... | |
virtual casacore::Bool | getFullCoord (casacore::Vector< casacore::Double > &fullWorld, casacore::Vector< casacore::Double > &fullPixel, const casacore::Vector< casacore::Double > &world) |
Convert a 2D worldCoordinate of the WorldCanvas to a full worldcoordinate and full pixel position. More... | |
virtual void | notifyUnregister (WorldCanvasHolder &wcHolder, casacore::Bool ignoreRefresh=false) |
ignoreRefresh tells the DD not to refresh just to clean up DMs More... | |
casacore::Int | xlatePixelAxes (casacore::Int idx) const |
allow external functions to translate axes... More... | |
casacore::Int | xlateFixedPixelAxes (casacore::Int idx) const |
const casacore::String & | xaxisStr () const |
const casacore::String & | yaxisStr () const |
const casacore::String & | zaxisStr () const |
const casacore::String & | spectStr () const |
casacore::Vector < casacore::String > | worldToPixelAxisNames (const DisplayCoordinateSystem &cSys) const |
Convert list of world axis names to pixel axis names. More... | |
const casacore::String & | spectralunitStr () const |
bool | hasMovieDimension () const |
std::string | errorMessage () const |
Public Member Functions inherited from casa::DisplayData | |
DisplayData () | |
(Required) default constructor. More... | |
virtual | ~DisplayData () |
required destructor More... | |
virtual void | setDisplayState (DisplayState s) |
virtual DisplayState | getDisplayState () const |
virtual bool | isDisplayable () const |
virtual void | addRestrictions (AttributeBuffer &otherBuf) |
Add general restrictions or a restriction for item itemNum of this DisplayData. More... | |
virtual void | addRestriction (Attribute &newRestriction, casacore::Bool permanent) |
virtual void | addElementRestrictions (const casacore::uInt itemNum, AttributeBuffer &other) |
virtual void | addElementRestriction (const casacore::uInt itemNum, Attribute &newRestriction, casacore::Bool permanent) |
virtual void | setRestrictions (AttributeBuffer &otherBuf) |
Set general restrictions or a restriction for item itemNum of this DisplayData. More... | |
virtual void | setRestriction (Attribute &newRestriction) |
virtual void | setElementRestrictions (const casacore::uInt itemNum, AttributeBuffer &other) |
virtual void | setElementRestriction (const casacore::uInt itemNum, Attribute &newRestriction) |
virtual void | removeRestriction (const casacore::String &name) |
Remove a general restriction or a restriction from item itemNum More... | |
virtual void | removeElementRestriction (const casacore::uInt itemNum, const casacore::String &name) |
virtual void | clearRestrictions () |
Clear all general restrictions or all restrictions of item itemNum (except the ones that are permanent of course...) More... | |
virtual void | clearElementRestrictions (const casacore::uInt itemNum) |
virtual casacore::Bool | existRestriction (const casacore::String &name) |
Check if a general restriction or a restriction for item itemNum with name name exists. More... | |
virtual casacore::Bool | existElementRestriction (const casacore::uInt itemNum, const casacore::String &name) |
virtual AttributeBuffer * | restrictionBuffer () |
Get a handle to the buffer of general restrictions or of the buffer of restrictions for item itemNum More... | |
virtual AttributeBuffer * | elementRestrictionBuffer (const casacore::uInt itemNum) |
virtual casacore::Bool | conformsTo (const WorldCanvas *wCanvas) |
Check whether the DD is is compatible with all WC[H] state, including its coordinate state, restrictions, and zIndex (if any). More... | |
virtual casacore::Bool | conformsTo (const WorldCanvas &wc) |
virtual casacore::Bool | conformsToRstrs (const WorldCanvas &wc) |
Determine whether DD restrictions are in conformance with restrictions on the given WCH. More... | |
virtual casacore::Bool | conformsToZIndex (const WorldCanvas &wc) |
Determine whether DD is compatible with the current canvas animation (zIndex) position. More... | |
virtual casacore::Int | activeZIndex (const WorldCanvas *wc=0) |
Retrieve 'Active' zIndex. More... | |
virtual casacore::Bool | getFirstZIndex (int &firstZIndex, casacore::Int axZrng=-1) const |
Set firstZIndex to minimum zIndex setting from all canvases where this DD is registered. More... | |
virtual void | addPositionEventHandler (WCPositionEH *positionHandler) |
Add event handlers on the DisplayData. More... | |
virtual void | addMotionEventHandler (WCMotionEH *motionHandler) |
virtual void | addRefreshEventHandler (WCRefreshEH *refreshHandler) |
virtual void | addDisplayEventHandler (DisplayEH *displayHandler) |
virtual void | removePositionEventHandler (WCPositionEH &positionHandler) |
Remove eventhandlers. More... | |
virtual void | removeMotionEventHandler (WCMotionEH &motionHandler) |
virtual void | removeRefreshEventHandler (WCRefreshEH &refreshHandler) |
virtual void | removeDisplayEventHandler (DisplayEH &displayHandler) |
virtual void | setColormap (Colormap *cmap, casacore::Float weight) |
Set/remove/get a ColourMap (sorry, ColorMap) for this DisplayData setColormap() throw an casacore::AipsError is a null pointer is passed. More... | |
virtual void | removeColormap () |
virtual Colormap * | colormap () const |
void | setAttribute (Attribute &at) |
set an Attribute or Attributes More... | |
void | setAttributes (AttributeBuffer &at) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::uInt &newValue) |
User interface to get value from the attribute buffer. More... | |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Int &newValue) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Float &newValue) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Double &newValue) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Bool &newValue) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::String &newValue) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::uInt > &newValue) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Int > &newValue) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Float > &newValue) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Double > &newValue) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Bool > &newValue) |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::String > &newValue) |
casacore::Bool | existsAttribute (casacore::String &name) |
Check if a certain Attribute exists. More... | |
void | removeAttribute (casacore::String &name) |
Remove an Attribute. More... | |
AttValue::ValueType | attributeType (casacore::String &name) |
Get the type of the Attribute. More... | |
void | setAttributeOnPrimaryWCHs (Attribute &at) |
Set an attribute on any WorldCanvas for which this DD is CS master. More... | |
virtual void | notifyRegister (WorldCanvasHolder *wcHolder) |
virtual void | removeFromAllWCHs () |
remove this DD everywhere–will stop any more refresh handling by the DD. More... | |
virtual void | refresh (casacore::Bool clean=false) |
an explicit refresh: should be called if the DisplayData is changed such that drawing is required. More... | |
virtual ImageAnalysis * | imageanalysis () const |
Get image analyis about images... More... | |
const WorldCanvasHolder * | findHolder (const WorldCanvas *wCanvas) const |
Identify the WorldCanvasHolder for the given WorldCanvas. More... | |
WorldCanvasHolder * | findHolder (const WorldCanvas *wCanvas) |
virtual casacore::Block < casacore::Int > | allZIndices (casacore::Int axZrng=-1) const |
Return a sorted casacore::Block of all animation frame numbers currently set onto all WCHs where this DD is registered. More... | |
virtual casacore::Bool | zIndexHint (casacore::Int &) const |
Will be called just before registering the [GTk]DD on a [GTk]PanelDisplay which has none registered on it yet. More... | |
virtual void | handleEvent (DisplayEvent &ev) |
Overide DisplayEH::handleEvent. More... | |
virtual casacore::Bool | isCSmaster (const WorldCanvasHolder *wch=0) const |
Is this DD the CS master of the passed WCH? Defaulting wch to 0 asks whether this DD is CS master of some WCH on which it is registered. More... | |
virtual casacore::Int | uiBase () const |
DD 'Absolute Pixel Coordinates', e.g. More... | |
virtual void | setUIBase (casacore::Int uibase) |
virtual casacore::Bool | getDelTmpData () |
Get and set method for the flag. More... | |
virtual void | setDelTmpData (casacore::Bool delTmpData) |
Public Member Functions inherited from casa::DisplayOptions | |
DisplayOptions () | |
Constructor. More... | |
virtual | ~DisplayOptions () |
Destructor. More... | |
template<class T > | |
casacore::Bool | readOptionRecord (casacore::Vector< T > &target, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const |
Find the field fieldname in casacore::Record rec , containing the requested type (casacore::Bool, casacore::String, casacore::Float, casacore::Int) in itself or its "value" sub-field, and return the value in target . More... | |
template<class T > | |
casacore::Bool | readOptionRecord (T &target, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const |
virtual casacore::Bool | readOptionRecord (casacore::String &target, casacore::Bool &unsetTarget, casacore::Bool &error, const casacore::Record &rec, const casacore::String &fieldname) const |
Find the field fieldname in casacore::Record rec , containing the requested type (casacore::String) in itself or its "value" sub-field, and return the value in target . More... | |
casacore::Record | unset () const |
Return a casacore::Record which is an "unset" casacore::Record, ie. More... | |
casacore::Bool | isUnset (const casacore::Record &rec) const |
Return true or false indicating if the provided casacore::Record is equal to an "unset" Record. More... | |
Public Member Functions inherited from casa::DisplayEH | |
virtual | ~DisplayEH () |
Public Member Functions inherited from casa::DlTarget | |
DlTarget () | |
DlTarget (const DlTarget &) | |
virtual | ~DlTarget () |
void | reg (DlHandleBase *p) |
void | unreg (DlHandleBase *p) |
Static Public Attributes | |
static const casacore::String | HISTOGRAM_RANGE |
static const casacore::String | COLOR_MODE |
Static Public Attributes inherited from casa::PrincipalAxesDD | |
static const casacore::String | HISTOGRAM_RANGE |
Static Public Attributes inherited from casa::DisplayData | |
static const casacore::String | DATA_MIN |
static const casacore::String | DATA_MAX |
Private Member Functions | |
LatticeAsRaster< T > * | getRasterRed () |
LatticeAsRaster< T > * | getRasterGreen () |
LatticeAsRaster< T > * | getRasterBlue () |
virtual void | setDisplayDataRed (DisplayData *dd) |
virtual void | setDisplayDataBlue (DisplayData *dd) |
virtual void | setDisplayDataGreen (DisplayData *dd) |
void | initializeDataMatrix (int index, casacore::Matrix< T > &datMatrix, casacore::Matrix< casacore::Bool > &mask, const casacore::IPosition &start, const casacore::IPosition &sliceShape, const casacore::IPosition &stride) |
Private Attributes | |
casacore::Vector< casacore::Float > | itsOptionsDataRange |
Storage for the data range parameters. More... | |
casacore::Vector< casacore::Float > | itsOptionsDataDefault |
LatticeAsRaster< T > * | rasterRed |
LatticeAsRaster< T > * | rasterGreen |
LatticeAsRaster< T > * | rasterBlue |
casacore::String | itsOptionsColorMode |
casacore::Float itsOptionsPower; More... | |
WCPowerScaleHandler * | itsPowerScaleHandler |
pointers to scale and resampling handlers More... | |
Friends | |
class | LatticePADMRaster< T > |
allow the corresponding DisplayMethod to access this' private data. More... | |
Additional Inherited Members | |
Public Types inherited from casa::DisplayData | |
enum | DisplayState { DISPLAYED, UNDISPLAYED, LIMBO } |
Static Public Member Functions inherited from casa::LatticePADisplayData< T > | |
static casacore::Bool | useStriding (const casacore::IPosition &shape, casacore::IPosition &stride, casacore::uInt maxPixels=1000000u, casacore::uInt minPerAxis=20u) |
Aids updateHistogram() by computing a stride to use for efficiency when computing histograms (could be used elsewhere too). More... | |
Protected Member Functions inherited from casa::LatticePADisplayData< T > | |
virtual void | SetUpBeamData_ () |
Called by constructors: set up data for beam drawing, if applicable. More... | |
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 casacore::CoordinateSystem is set to sky coordinates). More... | |
Protected Member Functions inherited from casa::PrincipalAxesDD | |
virtual casacore::Bool | setActiveZIndex_ (casacore::Int zindex) |
Set internal index (activeZIndex_) into the list of DMs (which cache individual drawings), according to passed animator index. More... | |
virtual void | setNumImages (const casacore::uInt nimages) |
void | setup (casacore::IPosition fixedPos) |
do some setup work, part of construction and changing dataset More... | |
casacore::Bool | indexInserted (casacore::Int index, casacore::Int length, casacore::Vector< casacore::Int > &testVec) |
Helper routine for setting up the transpose vectors for the coordinate system. More... | |
void | normalToTransposed (casacore::Vector< casacore::Double > &coord, const casacore::Vector< casacore::Int > &transPos) |
helper to transpose coordinates More... | |
void | transposedToNormal (casacore::Vector< casacore::Double > &coord, const casacore::Vector< casacore::Int > &transPos) |
void | setVelocityState (DisplayCoordinateSystem &cSys, const casacore::String &velTypeString, const casacore::String &unitString) |
Set velocity state. More... | |
void | setSpectralFormatting (DisplayCoordinateSystem &cSys, const casacore::String &velTypeString, const casacore::String &unitString, const casacore::String &frequency_system="") |
Set Spectral formatting. More... | |
casacore::Bool | findActiveImage (WorldCanvasHolder &wcHolder) |
Determine the active image (if any). More... | |
PrincipalAxesDD () | |
(Required) default constructor. More... | |
PrincipalAxesDD (const PrincipalAxesDD &other) | |
(Required) copy constructor. More... | |
void | operator= (const PrincipalAxesDD &other) |
(Required) copy assignment. More... | |
Protected Member Functions inherited from casa::DisplayData | |
casacore::Bool | conformed () |
Returns result of last call to conformsTo(WCH&). More... | |
casacore::Bool | isCsAndZIndexConformed () |
Added so that when two images are loaded with no velocity alignment, they can still show their position coordinates without having to be rstrsConformed. More... | |
virtual void | delTmpData (casacore::String &tmpData) |
Delete temporary data. More... | |
virtual const std::list < WCPositionEH * > * | positionEventHandlerList () |
Retrieve position, motion, refresh and display event handler lists. More... | |
virtual const std::list < WCMotionEH * > * | motionEventHandlerList () |
virtual const std::list < WCRefreshEH * > * | refreshEventHandlerList () |
virtual const std::list < DisplayEH * > * | displayEventHandlerList () |
DisplayData (const DisplayData &other) | |
(Required) copy constructor. More... | |
void | operator= (const DisplayData &other) |
(Required) copy assignment. More... | |
Protected Member Functions inherited from casa::DisplayOptions | |
DisplayOptions (const DisplayOptions &other) | |
(Required) copy constructor. More... | |
void | operator= (const DisplayOptions &other) |
(Required) copy assignment. More... | |
Static Protected Member Functions inherited from casa::PrincipalAxesDD | |
static bool | has_nonsingleton_nondegenerate_nondisplayed_axis (const DisplayData &other) |
Protected Attributes inherited from casa::PrincipalAxesDD | |
casacore::Bool | iAmRubbish |
Internal state. More... | |
casacore::Double | datamin |
min and max to use for drawing More... | |
casacore::Double | datamax |
casacore::uInt | nArrayAxes |
internal bookkeeping number of axes More... | |
casacore::uInt | nPixelAxes |
casacore::uInt | nWorldAxes |
casacore::Coordinate::formatType | itsNotation |
format for diplaying numbers in the tracker More... | |
std::string | error_string |
Protected Attributes inherited from casa::DisplayData | |
AttributeBuffer | restrictions |
The Book says that we should not put data members in class that is supposed to only define an interface, but by putting these here, we can implement some of the restriction & eventhandling stuff so that people do not have to repeat it. More... | |
AttributeBuffer | attributes |
buffer for storing Attributes More... | |
casacore::PtrBlock< void * > | DDelement |
list of DisplayDataElements, which are of type DisplayMethod or derived More... | |
casacore::Int | activeZIndex_ |
Indicates the 'current' animation frame, i.e. More... | |
casacore::Bool | delTmpData_ |
Flag indicating that temporary data should be removed when deleting the object. More... | |
casacore::Bool | rstrsConformed_ |
Somewhat limited-use state, saved here for 'efficiency'. More... | |
casacore::Bool | csConformed_ |
casacore::Bool | zIndexConformed_ |
Class to manage the drawing of raster images of slices from AIPS++ Lattices.
Public interface
The purpose of this class is to draw "raster" images of data that is "lattice"-based.
This class should be used to display raster images— ie. filled, pseudo-color pixel images where each screen (or device) pixel is shaded with a color from a look-up table that is assigned to be proportional in some way to the intensity of the data pixel—of two-dimensional slices of data extracted from AIPS++ Lattices or Arrays having two or more dimensions. Thus, this is the class to use to display standard channel maps of position-velocity cubes, or Digitized Sky Survey images, for example.
At construction, any axes in the data can be mapped to the X and Y axes of the display device (see the PrincipalAxesDD class). For data with more than two dimensions, a third axis in the dataset can be selected for generating a sequence of images along: this is known as the "movie" axis. Animation (see the Animator class) will cause different slices of the data to be selected from along this axis. After construction, the axis settings of a LatticeAsRaster object can be modified at a later stage.
The LatticeAsRaster object supports a number of options which can be set or retrieved using the setOptions and getOptions functions. These functions simply accept a casacore::Record, which can be converted from a GlishRecord: this is done in the GTkDisplayData class. The options for the LatticeAsRaster class are: range: a casacore::Vector<casacore::Double> of two elements, being the minimum and maximum data values to map to the minimum and maximum color values. power: a casacore::Float which specifies the deviation from linear of the scaling of the data onto the colormap. Increasingly negative values give increasingly severe logarithmic scaling: this scaling effectively allocates more color cells to the lowest data values (usually corresponding to the thermal noise and low surface brightness emission) in the image. Increasing positive power values give increasingly severe exponential scaling, thereby allocating more and more color cells to the highest data values (ie. signal and interference)in the image. resample: a casacore::String which is either "nearest" for nearest neighbour pixel resampling, or "bilinear" for bilinear interpolation between adjacent groups of four pixels. complexmode: this is a casacore::String, and is only relevant for LatticeAsRaster<casacore::Complex> or LatticeAsRaster<casacore::DComplex> instantantiations. One of "phase", "real", "imaginary" or "magnitude" is appropriate for this option, and indicates how complex data values should be translated to real pixel values.
LatticeAsRaster is templated, and can be used to draw casacore::Complex or Real Images or Arrays. For casacore::Complex data, the default complexmode is "magnitude." LatticeAsRaster objects can be registered on any WorldCanvasHolder, but will only draw on WorldCanvases having an attribute value of Display::Index for "colormodel."
A LatticeAsRaster object could be constructed and used as follows:
Displaying 2-dimensional slices of a lattice-based data volume is a standard display requirement for astronomical data visualization and presentation.
Definition at line 156 of file LatticeAsRaster.h.
casa::LatticeAsRaster< T >::LatticeAsRaster | ( | casacore::Array< T > * | array, |
const casacore::uInt | xAxis, | ||
const casacore::uInt | yAxis, | ||
const casacore::uInt | mAxis, | ||
const casacore::IPosition | fixedPos | ||
) |
casacore::Array-based constructors: >2d and 2d.
xAxis and yAxis specify which axis in the array (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 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 indicate the fixed axis values for axes in the data that are not specified as xAxis, yAxis or mAxis.
casa::LatticeAsRaster< T >::LatticeAsRaster | ( | casacore::Array< T > * | array, |
const casacore::uInt | xAxis, | ||
const casacore::uInt | yAxis | ||
) |
casa::LatticeAsRaster< T >::LatticeAsRaster | ( | std::shared_ptr< casacore::ImageInterface< T > > | image, |
const casacore::uInt | xAxis, | ||
const casacore::uInt | yAxis, | ||
const casacore::uInt | mAxis, | ||
const casacore::IPosition | fixedPos, | ||
viewer::StatusSink * | sink = 0 |
||
) |
Image-based constructors: >2d and 2d.
xAxis and yAxis specify which axis in the image (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 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 image, and indicate the fixed axis values for axes in the data that are not specified as xAxis, yAxis or mAxis.
casa::LatticeAsRaster< T >::LatticeAsRaster | ( | std::shared_ptr< casacore::ImageInterface< T > > | image, |
const casacore::uInt | xAxis, | ||
const casacore::uInt | yAxis | ||
) |
|
virtual |
Destructor.
|
inlinevirtual |
class name
Reimplemented from casa::LatticePADisplayData< T >.
Definition at line 224 of file LatticeAsRaster.h.
|
inlinevirtual |
static casacore::Record getGlobalOption();
Return the DisplayData type; used by the WorldCanvasHolder to determine the order of drawing.
Implements casa::DisplayData.
Definition at line 219 of file LatticeAsRaster.h.
References casa::Display::Raster.
|
virtual |
Retrieve the currently set options, and their types, default values, and any help text associated with each parameter.
This information can be used to generate form-type graphical user interfaces or command-line interfaces to set the options with prompts.
Reimplemented from casa::LatticePADisplayData< T >.
|
private |
|
private |
|
private |
|
private |
|
virtual |
Install the default options for display.
Reimplemented from casa::LatticePADisplayData< T >.
|
privatevirtual |
Reimplemented from casa::DisplayData.
|
privatevirtual |
Reimplemented from casa::DisplayData.
|
privatevirtual |
Reimplemented from casa::DisplayData.
|
virtual |
Apply the options stored in the provided casacore::Record to the LatticeAsRaster object.
If the return value is true, then some options have changed, and a refresh is needed to update the display.
Reimplemented from casa::LatticePADisplayData< T >.
|
virtual |
Create the various elements in the sequence of displayable images.
This is called upon construction as well as whenever the display and/or movie axes are changed via a call to PrincipalAxesDD::setAxes. virtual void setupElements(casacore::IPosition fixedPos = casacore::IPosition(casacore::uInt(2)));
Implements casa::LatticePADisplayData< T >.
|
friend |
allow the corresponding DisplayMethod to access this' private data.
Definition at line 252 of file LatticeAsRaster.h.
|
static |
Definition at line 228 of file LatticeAsRaster.h.
|
static |
Definition at line 227 of file LatticeAsRaster.h.
|
private |
casacore::Float itsOptionsPower;
what colormode the raster should be drawn in, options are "colormap" for normal pseudo-color rasters, and "red", "green" and "blue" for RGB canvases, and "hue", "saturation" and "value" for HSV canvases.
Definition at line 246 of file LatticeAsRaster.h.
|
private |
Definition at line 234 of file LatticeAsRaster.h.
|
private |
Storage for the data range parameters.
Definition at line 233 of file LatticeAsRaster.h.
|
private |
pointers to scale and resampling handlers
Definition at line 249 of file LatticeAsRaster.h.
|
private |
Definition at line 238 of file LatticeAsRaster.h.
|
private |
Definition at line 237 of file LatticeAsRaster.h.
|
private |
Definition at line 236 of file LatticeAsRaster.h.