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

A DisplayData to draw Profiles. More...

#include <Profile2dDD.h>

Inheritance diagram for casa::Profile2dDD:
casa::ActiveCaching2dDD casa::WCMotionEH casa::WCPositionEH casa::CachingDisplayData casa::DisplayData casa::DisplayOptions casa::DisplayEH casa::DlTarget

Public Member Functions

 Profile2dDD ()
 (Required) default constructor. More...
 
 Profile2dDD (LatticePADisplayData< casacore::Float > *dd)
 Constructor taking a pointer to an already constructed ImageInterface.The Display casacore::Data dd must have atleast 3 World Axes and atleast 2 elements in the profile (3rd) world axis. More...
 
virtual ~Profile2dDD ()
 Destructor. More...
 
virtual casacore::Bool attachDD (LatticePADisplayData< casacore::Float > *dd)
 Attach a Display casacore::Data to this Profile2dDD. More...
 
virtual void detachDD ()
 Detach the currently attached Display Data. More...
 
virtual casacore::Bool sizeControl (WorldCanvasHolder &wcHolder, AttributeBuffer &holderBuf)
 Overloading ActiveCaching2dDD::sizeControl. More...
 
virtual void getDrawData (casacore::Matrix< casacore::Double > &data, const casacore::Bool world=false)
 Store the data to be drawn in the data Matrix. More...
 
virtual void getMaskData (casacore::Vector< casacore::Bool > &mask)
 Store the mask in mask vector. More...
 
virtual void getProfileAsRecord (casacore::Record &rec)
 Store the details of the current profile in rec casacore::Record structure similar to position event structure. More...
 
virtual const casacore::Unit dataUnit ()
 Return the data unit. More...
 
virtual casacore::String showValue (const casacore::Vector< casacore::Double > &world)
 Returns an empty string. More...
 
virtual void operator() (const WCMotionEvent &ev)
 Motion Event Handler. More...
 
virtual void operator() (const WCPositionEvent &ev)
 Position Event Handler. More...
 
virtual void handleEvent (DisplayEvent &ev)
 Display Event Handler. More...
 
virtual void sendDDModEvent ()
 Send out DDModEvents to all DisplayEHs listening. More...
 
virtual casacore::Bool labelAxes (const WCRefreshEvent &ev)
 Draws and labels the axes based on the refresh event. More...
 
virtual casacore::Bool canLabelAxes () const
 
virtual void setDefaultOptions ()
 Install the default options for this DisplayData. More...
 
virtual casacore::Bool setOptions (casacore::Record &rec, casacore::Record &recOut)
 Apply options stored in rec to the DisplayData. More...
 
virtual casacore::Record getOptions (bool scrub=false) const
 Retrieve the current and default options and parameter types. More...
 
virtual Display::DisplayDataType classType ()
 Return the type of this DisplayData. More...
 
virtual CachingDisplayMethodnewDisplayMethod (WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd)
 Create a new CachingDisplayMethod for drawing on the given WorldCanvas when the AttributeBuffers are suitably matched to the current state of this DisplayData and of the WorldCanvas/Holder. More...
 
virtual AttributeBuffer optionsAsAttributes ()
 Return the current options of this DisplayData as an AttributeBuffer. More...
 
virtual void notifyUnregister (WorldCanvasHolder &wcHolder, casacore::Bool ignoreRefresh=false)
 Take actions on removal from WC[H] (notably, deletion of drawlists). More...
 
virtual casacore::String profileColor () const
 Return Profile Color. More...
 
virtual casacore::Float profileLineWidth () const
 Return Profile Line Width. More...
 
virtual Display::LineStyle profileLineStyle ()
 Return Profile LineStyle. More...
 
virtual casacore::Bool isRegionProfile () const
 Return true if the last requested profile was for a region. More...
 
virtual void regionDimensions (casacore::Vector< casacore::Double > &regionBlc, casacore::Vector< casacore::Double > &regionTrc)
 get the region dimensions, in pixels, of the last region submitted to Profile2dDD. More...
 
virtual casacore::Double profileYMin () const
 Return Minimum Y value. More...
 
virtual casacore::Double profileYMax () const
 Return Maximum Y value. More...
 
virtual casacore::Double profileXMin () const
 Return Minimum X value. More...
 
virtual casacore::Double profileXMax () const
 Return Maximum X value. More...
 
virtual casacore::Bool profileAutoscale () const
 Return the autoscale status (On or Off) More...
 
virtual casacore::Bool showRestFrequency () const
 Return the rest frequency display status (to draw or not to draw) More...
 
virtual casacore::Double restFrequency () const
 Return rest frequency. More...
 
virtual
casacore::LatticeStatsBase::StatisticsTypes 
regionStatType () const
 Return the statistics used for region calculations. More...
 
virtual casacore::Int regionXRadius () const
 Return the x value added to the pixel at a pixel position to create a region. More...
 
virtual casacore::Int regionYRadius () const
 Return the y value added to the pixel at a pixel position to create a region. More...
 
virtual casacore::Int profileAxis ()
 Return the profile axis number (from the original image) More...
 
- Public Member Functions inherited from casa::ActiveCaching2dDD
 ActiveCaching2dDD (const DisplayCoordinateSystem &coordsys, const casacore::Vector< casacore::Double > &pixblc, const casacore::Vector< casacore::Double > &pixtrc)
 Constructor. More...
 
virtual ~ActiveCaching2dDD ()
 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::String showPosition (const casacore::Vector< casacore::Double > &world, const casacore::Bool &displayAxesOnly=false)
 casacore::Format a string containing coordinate information at the given world coordinate. More...
 
virtual casacore::Vector
< casacore::String
worldAxisNames () const
 World axis information suppliers. More...
 
virtual casacore::Vector
< casacore::String
worldAxisUnits () const
 
virtual casacore::uInt nelements (const WorldCanvasHolder &) const
 Return the number of display elements (ie. More...
 
virtual casacore::uInt nelements () const
 and non-specific More...
 
virtual casacore::Bool conformsToCS (const WorldCanvas &wc)
 Determine whether DD can draw on the current coordinate system of the given WC[H]. More...
 
virtual void cleanup ()
 Tidy up the elements of this DisplayData. More...
 
- Public Member Functions inherited from casa::CachingDisplayData
 CachingDisplayData ()
 Constructor. More...
 
virtual ~CachingDisplayData ()
 Destructor. More...
 
virtual void refreshEH (const WCRefreshEvent &ev)
 Refresh event handler which is called indirectly by the WorldCanvas, via the WorldCanvasHolder. More...
 
virtual void notifyRegister (WorldCanvasHolder *wcHolder)
 
virtual void setColormap (Colormap *cmap, casacore::Float weight)
 Purges cache, to avoid reusing images with the wrong colormap, then calls base class version. More...
 
virtual void purgeCache ()
 Empty cache completely. More...
 
virtual void purgeCache (const WorldCanvasHolder &wch)
 Empty cache of all DMs for a given WCH. More...
 
- Public Member Functions inherited from casa::DisplayData
 DisplayData ()
 (Required) default constructor. More...
 
virtual ~DisplayData ()
 required destructor More...
 
virtual std::string errorMessage () const =0
 
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 AttributeBufferrestrictionBuffer ()
 Get a handle to the buffer of general restrictions or of the buffer of restrictions for item itemNum More...
 
virtual AttributeBufferelementRestrictionBuffer (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 removeColormap ()
 
virtual Colormapcolormap () 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 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 casacore::String className () const
 Return the class name of this DisplayData; useful mostly for debugging purposes, and perhaps future use in the glish widget interface. More...
 
virtual casacore::String description () const
 
virtual casacore::String dataType () const =0
 
virtual const casacore::IPosition dataShape () const =0
 
virtual casacore::uInt dataDim () const =0
 
virtual const casacore::Unit dataUnit () const =0
 
virtual std::vector< int > displayAxes () const =0
 
virtual ImageAnalysis * imageanalysis () const
 Get image analyis about images... More...
 
virtual std::shared_ptr
< casacore::ImageInterface
< casacore::Float > > 
imageinterface ()
 Returns a pointer that should not be deleted... More...
 
virtual void setSubstituteTitleText (const casacore::String)
 
const WorldCanvasHolderfindHolder (const WorldCanvas *wCanvas) const
 Identify the WorldCanvasHolder for the given WorldCanvas. More...
 
WorldCanvasHolderfindHolder (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 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)
 
virtual void setDisplayDataRed (DisplayData *)
 
virtual void setDisplayDataBlue (DisplayData *)
 
virtual void setDisplayDataGreen (DisplayData *)
 
- 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)
 
- Public Member Functions inherited from casa::WCMotionEH
 WCMotionEH ()
 Default Constructor Required. More...
 
virtual ~WCMotionEH ()
 Destructor. More...
 
- Public Member Functions inherited from casa::WCPositionEH
 WCPositionEH ()
 Default Constructor Required. More...
 
virtual ~WCPositionEH ()
 Destructor. More...
 

Protected Member Functions

 Profile2dDD (const Profile2dDD &other)
 (Required) copy constructor. More...
 
void operator= (const Profile2dDD &other)
 (Required) copy assignment. More...
 
- Protected Member Functions inherited from casa::ActiveCaching2dDD
 ActiveCaching2dDD ()
 (Required) default constructor. More...
 
 ActiveCaching2dDD (const ActiveCaching2dDD &other)
 (Required) copy constructor. More...
 
void operator= (const ActiveCaching2dDD &other)
 (Required) copy assignment. More...
 
void setCoordinateSystem (const DisplayCoordinateSystem &coordsys, const casacore::Vector< casacore::Double > &pixblc, const casacore::Vector< casacore::Double > &pixtrc)
 Install a DisplayCoordinateSystem and limits. More...
 
void identifyWorldAxis (casacore::Coordinate::Type &type, casacore::Int &coordinate, casacore::Int &axisincoord, const casacore::uInt worldaxisnum)
 Identify a specified world axis by its casacore::Coordinate type, number, and axis in that coordinate. More...
 
casacore::String codeWorldAxis (const casacore::uInt worldaxisnum)
 Generate a casacore::String code for the specified world axis, describing the coordinate type, number and axis in that coordinate. More...
 
casacore::Vector
< casacore::Double
worldAxisIncrements () const
 Return the world axis increments. More...
 
virtual casacore::Bool worldCoordTracking () const
 Return whether tracking is currently world (T) or pixel (F) coordinates. More...
 
- Protected Member Functions inherited from casa::CachingDisplayData
virtual void setCaching (const casacore::Bool caching)
 Return any additional Attributes to consider when searching the cache. More...
 
 CachingDisplayData (const CachingDisplayData &other)
 (Required) copy constructor. More...
 
void operator= (const CachingDisplayData &other)
 (Required) copy assignment. More...
 
- Protected Member Functions inherited from casa::DisplayData
virtual casacore::Bool setActiveZIndex_ (casacore::Int zindex)
 DDs may override to adjust the internal stored current animation index (activeZIndex_) if necessary, and to set return value false iff the passed zindex won't work for the DD. More...
 
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 ()
 
virtual void positionEH (const WCPositionEvent &ev)
 Position, motion and refresh event handlers that will generally be called by a WorldCanvasHolder. More...
 
virtual void motionEH (const WCMotionEvent &ev)
 
 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...
 

Private Member Functions

casacore::Bool createCoordinateSystem ()
 Helper function. More...
 
casacore::Bool updateCoordinateSys (DisplayCoordinateSystem &cs)
 Update the coordinate system of this Display casacore::Data and the axis labeller. More...
 
casacore::Bool getRegionProfile (casacore::Vector< casacore::Double > &fpixelBlc, casacore::Vector< casacore::Double > &fpixelTrc)
 Extract the profile data from the provided pixel region and place it into itsData. More...
 
casacore::Bool getPointProfile (const casacore::Vector< casacore::Double > &world)
 Extract the profile data from the provided world position and place it into itsData. More...
 
casacore::Bool cropRegion (casacore::Vector< casacore::Double > &fpixelBlc, casacore::Vector< casacore::Double > &fpixelTrc)
 Crop the region so that it does not define areas outside the data. More...
 
virtual void constructParameters ()
 Construct the parameters for getOptions and setOptions. More...
 
virtual void destructParameters ()
 Delete the parameters for getOptions() and setOptions() More...
 

Private Attributes

LatticePADisplayData
< casacore::Float > * 
itsDD
 A pointer to the attached DisplayData. More...
 
casacore::Bool itsIsRegionProfile
 Flag to indicate whether the last drawn profile was for a region or for a single point. More...
 
casacore::Bool itsTrackingState
 A flag to indicate whether tracking is on. More...
 
casacore::Int itsDependentAxis
 The dependent (world) axis of itsDD. More...
 
casacore::Double itsYAxisInc
 Increment value for the linear coordinate on the Y axis. More...
 
casacore::Double itsRestFrequency
 Rest Frequency. More...
 
casacore::Vector
< casacore::Double
itsCurrentBlc
 Minimum and maximum X/Y values. More...
 
casacore::Vector
< casacore::Double
itsCurrentTrc
 
casacore::Vector
< casacore::Double
itsPixelPosition
 
The pixel position on the world canvas when the last

motion' event was received. More...

 
casacore::Vector
< casacore::Double
itsWorldPosition
 The world position on the world canvas when the last motion' event was received. More...
 
casacore::Vector
< casacore::Double
itsRegionBlc
 The region dimensions, in pixels, of the last region event received by Profile2dDD. More...
 
casacore::Vector
< casacore::Double
itsRegionTrc
 
casacore::Matrix
< casacore::Double
itsData
 The Profile Data. More...
 
casacore::Vector< casacore::BoolitsMask
 The Mask Data. More...
 
casacore::Vector< casacore::IntitsWorldAxisMap
 The axis map between input DD's casacore::Coordinate system and itsCompleteCS. More...
 
casacore::Vector< casacore::IntitsPixelAxisMap
 
casacore::Vector
< casacore::String
itsRegionCalcChoices
 The choices for region calculations. More...
 
casacore::Vector
< casacore::String
itsDefaultAxisLabels
 The default x and y axis labels. More...
 
WCCSNLAxisLabeller itsAxisLabeller
 The Axis Labeller used to draw Axes. More...
 
DParameterColorChoiceitsParamColor
 Display Parameters for. More...
 
DParameterRange
< casacore::Float > * 
itsParamLineWidth
 
DParameterMapKeyChoiceitsParamLineStyle
 
DParameterSwitchitsParamAutoscale
 
DParameterSwitchitsParamShowRestFrequency
 
DParameterMapKeyChoiceitsParamRegionStatType
 
DParameterRange< casacore::Int > * itsParamRegionXRadius
 
DParameterRange< casacore::Int > * itsParamRegionYRadius
 

Friends

class Profile2dDM
 

Additional Inherited Members

- Public Types inherited from casa::DisplayData
enum  DisplayState {
  DISPLAYED,
  UNDISPLAYED,
  LIMBO
}
 
- Static Public Attributes inherited from casa::DisplayData
static const casacore::String DATA_MIN
 
static const casacore::String DATA_MAX
 
- Protected Attributes inherited from casa::ActiveCaching2dDD
DisplayCoordinateSystem itsCoordinateSystem
 Store the 2d DisplayCoordinateSystem here. More...
 
casacore::Vector
< casacore::Double
itsPixelBlc
 Store the 2d pixel corners here. More...
 
casacore::Vector
< casacore::Double
itsPixelTrc
 
- Protected Attributes inherited from casa::CachingDisplayData
casacore::Bool restorePCColormap_
 The default is false. More...
 
- 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_
 

Detailed Description

A DisplayData to draw Profiles.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

This Display casacore::Data attaches to itself, another Display casacore::Data whos profile (at a point) is to be extracted and drawn. The Display casacore::Data attached to Profile2dDD must have atleast 3 world Axes and atleast 2 pixels on it's profile axis (3rd axis). An axis from a Linear casacore::Coordinate or casacore::Stokes casacore::Coordinate presently can not be on the profile axis. All other AIPS++ coordinate types are supported.

Profile2dDD is an implements WCMotionEH and WCPositionEH and listens to motion and position events generated by the attached Display Data. A motion event comes with a new world position on the attached Display Data. Profile2dDD uses this world position to extract and draw a profile on its world canvas. A Position event (key press) switches the profiling on and off. The default switch is the space bar.

Profile2dDD is a DisplayEH (all DisplayDatas are) and listens to DisplayEvents sent out by the attached DisplayData. This is so it can listen for Tool events such as Crosshair event.

Each time the profile is refreshed (with new data), Profile2dDD sends out a DDModEvent to all listening DisplayEHs, to indicate that the data has been modified.

Since Profile2dDD inherit's from ActiveCaching2dDD and uses WCCSNLAxisLabeller, all the options such as position tracking and axis labelling are available. Options specific to Profilng, such as profile color, line width, line style and autoscaling are also available.

Example

Motivation

Existing Glish implementation is too slow and limited.

To Do

Definition at line 122 of file Profile2dDD.h.

Constructor & Destructor Documentation

casa::Profile2dDD::Profile2dDD ( )

(Required) default constructor.

casa::Profile2dDD::Profile2dDD ( LatticePADisplayData< casacore::Float > *  dd)

Constructor taking a pointer to an already constructed ImageInterface.The Display casacore::Data dd must have atleast 3 World Axes and atleast 2 elements in the profile (3rd) world axis.

virtual casa::Profile2dDD::~Profile2dDD ( )
virtual

Destructor.

casa::Profile2dDD::Profile2dDD ( const Profile2dDD other)
protected

(Required) copy constructor.

Member Function Documentation

virtual casacore::Bool casa::Profile2dDD::attachDD ( LatticePADisplayData< casacore::Float > *  dd)
virtual

Attach a Display casacore::Data to this Profile2dDD.

The Display casacore::Data dd must have atleast 3 World Axes and atleast 2 elements in the profile (3rd) world axis. If any of the above conditions are not met or a Display casacore::Data is already attached, false is returned. Otherwise true is returned.

virtual casacore::Bool casa::Profile2dDD::canLabelAxes ( ) const
virtual

Reimplemented from casa::DisplayData.

virtual Display::DisplayDataType casa::Profile2dDD::classType ( )
inlinevirtual

Return the type of this DisplayData.

Implements casa::DisplayData.

Definition at line 209 of file Profile2dDD.h.

References casa::Display::Vector.

virtual void casa::Profile2dDD::constructParameters ( )
privatevirtual

Construct the parameters for getOptions and setOptions.

casacore::Bool casa::Profile2dDD::createCoordinateSystem ( )
private

Helper function.

Initialise Profile2dDD with a DisplayCoordinateSystem put together from the parent DD

casacore::Bool casa::Profile2dDD::cropRegion ( casacore::Vector< casacore::Double > &  fpixelBlc,
casacore::Vector< casacore::Double > &  fpixelTrc 
)
private

Crop the region so that it does not define areas outside the data.

Returns false if the entire region is outside image data

virtual const casacore::Unit casa::Profile2dDD::dataUnit ( )
virtual

Return the data unit.

virtual void casa::Profile2dDD::destructParameters ( )
privatevirtual

Delete the parameters for getOptions() and setOptions()

virtual void casa::Profile2dDD::detachDD ( )
virtual

Detach the currently attached Display Data.

virtual void casa::Profile2dDD::getDrawData ( casacore::Matrix< casacore::Double > &  data,
const casacore::Bool  world = false 
)
virtual

Store the data to be drawn in the data Matrix.

If world is false, pixel coordinates are used. If world is true, then world coordinates are used.

virtual void casa::Profile2dDD::getMaskData ( casacore::Vector< casacore::Bool > &  mask)
virtual

Store the mask in mask vector.

virtual casacore::Record casa::Profile2dDD::getOptions ( bool  scrub = false) const
virtual

Retrieve the current and default options and parameter types.

Reimplemented from casa::ActiveCaching2dDD.

casacore::Bool casa::Profile2dDD::getPointProfile ( const casacore::Vector< casacore::Double > &  world)
private

Extract the profile data from the provided world position and place it into itsData.

Also extract the Mask data (if it exists) and place it into itsMask. Return true if new profile data has been extracted (i.e. a refresh is needed) otherwise return false

virtual void casa::Profile2dDD::getProfileAsRecord ( casacore::Record rec)
virtual

Store the details of the current profile in rec casacore::Record structure similar to position event structure.

casacore::Bool casa::Profile2dDD::getRegionProfile ( casacore::Vector< casacore::Double > &  fpixelBlc,
casacore::Vector< casacore::Double > &  fpixelTrc 
)
private

Extract the profile data from the provided pixel region and place it into itsData.

The statistics used is determined by the options. Return true if new profile data has been extracted (i.e. a refresh is needed) otherwise return false

virtual void casa::Profile2dDD::handleEvent ( DisplayEvent ev)
virtual

Display Event Handler.

Reimplemented from casa::DisplayData.

virtual casacore::Bool casa::Profile2dDD::isRegionProfile ( ) const
inlinevirtual

Return true if the last requested profile was for a region.

Return false if the last requested profile was for a single point

Definition at line 248 of file Profile2dDD.h.

References itsIsRegionProfile.

virtual casacore::Bool casa::Profile2dDD::labelAxes ( const WCRefreshEvent ev)
virtual

Draws and labels the axes based on the refresh event.

Reimplemented from casa::DisplayData.

virtual CachingDisplayMethod* casa::Profile2dDD::newDisplayMethod ( WorldCanvas worldCanvas,
AttributeBuffer wchAttributes,
AttributeBuffer ddAttributes,
CachingDisplayData dd 
)
virtual

Create a new CachingDisplayMethod for drawing on the given WorldCanvas when the AttributeBuffers are suitably matched to the current state of this DisplayData and of the WorldCanvas/Holder.

The tag is a unique number used to identify the age of the newly constructed CachingDisplayMethod.

Implements casa::CachingDisplayData.

virtual void casa::Profile2dDD::notifyUnregister ( WorldCanvasHolder wcHolder,
casacore::Bool  ignoreRefresh = false 
)
virtual

Take actions on removal from WC[H] (notably, deletion of drawlists).

Reimplemented from casa::CachingDisplayData.

virtual void casa::Profile2dDD::operator() ( const WCMotionEvent ev)
virtual

Motion Event Handler.

Implements casa::WCMotionEH.

virtual void casa::Profile2dDD::operator() ( const WCPositionEvent ev)
virtual

Position Event Handler.

Implements casa::WCPositionEH.

void casa::Profile2dDD::operator= ( const Profile2dDD other)
protected

(Required) copy assignment.

virtual AttributeBuffer casa::Profile2dDD::optionsAsAttributes ( )
virtual

Return the current options of this DisplayData as an AttributeBuffer.

Reimplemented from casa::ActiveCaching2dDD.

virtual casacore::Bool casa::Profile2dDD::profileAutoscale ( ) const
inlinevirtual

Return the autoscale status (On or Off)

Definition at line 274 of file Profile2dDD.h.

References itsParamAutoscale, and casa::DParameterSwitch::value().

virtual casacore::Int casa::Profile2dDD::profileAxis ( )
virtual

Return the profile axis number (from the original image)

virtual casacore::String casa::Profile2dDD::profileColor ( ) const
inlinevirtual

Return Profile Color.

Definition at line 233 of file Profile2dDD.h.

References itsParamColor, and casa::DParameterChoice::value().

virtual Display::LineStyle casa::Profile2dDD::profileLineStyle ( )
inlinevirtual

Return Profile LineStyle.

Definition at line 241 of file Profile2dDD.h.

References itsParamLineStyle, and casa::DParameterMapKeyChoice::keyValue().

virtual casacore::Float casa::Profile2dDD::profileLineWidth ( ) const
inlinevirtual

Return Profile Line Width.

Definition at line 237 of file Profile2dDD.h.

References itsParamLineWidth, and casa::DParameterRange< T >::value().

virtual casacore::Double casa::Profile2dDD::profileXMax ( ) const
inlinevirtual

Return Maximum X value.

Definition at line 270 of file Profile2dDD.h.

References itsCurrentTrc.

virtual casacore::Double casa::Profile2dDD::profileXMin ( ) const
inlinevirtual

Return Minimum X value.

Definition at line 266 of file Profile2dDD.h.

References itsCurrentBlc.

virtual casacore::Double casa::Profile2dDD::profileYMax ( ) const
inlinevirtual

Return Maximum Y value.

Definition at line 262 of file Profile2dDD.h.

References itsCurrentTrc.

virtual casacore::Double casa::Profile2dDD::profileYMin ( ) const
inlinevirtual

Return Minimum Y value.

Definition at line 258 of file Profile2dDD.h.

References itsCurrentBlc.

virtual void casa::Profile2dDD::regionDimensions ( casacore::Vector< casacore::Double > &  regionBlc,
casacore::Vector< casacore::Double > &  regionTrc 
)
virtual

get the region dimensions, in pixels, of the last region submitted to Profile2dDD.

virtual casacore::LatticeStatsBase::StatisticsTypes casa::Profile2dDD::regionStatType ( ) const
inlinevirtual

Return the statistics used for region calculations.

Definition at line 287 of file Profile2dDD.h.

References itsParamRegionStatType, and casa::DParameterMapKeyChoice::keyValue().

virtual casacore::Int casa::Profile2dDD::regionXRadius ( ) const
inlinevirtual

Return the x value added to the pixel at a pixel position to create a region.

Definition at line 294 of file Profile2dDD.h.

References itsParamRegionXRadius, and casa::DParameterRange< T >::value().

virtual casacore::Int casa::Profile2dDD::regionYRadius ( ) const
inlinevirtual

Return the y value added to the pixel at a pixel position to create a region.

Definition at line 300 of file Profile2dDD.h.

References itsParamRegionYRadius, and casa::DParameterRange< T >::value().

virtual casacore::Double casa::Profile2dDD::restFrequency ( ) const
inlinevirtual

Return rest frequency.

Definition at line 282 of file Profile2dDD.h.

References itsRestFrequency.

virtual void casa::Profile2dDD::sendDDModEvent ( )
virtual

Send out DDModEvents to all DisplayEHs listening.

virtual void casa::Profile2dDD::setDefaultOptions ( )
virtual

Install the default options for this DisplayData.

Reimplemented from casa::ActiveCaching2dDD.

virtual casacore::Bool casa::Profile2dDD::setOptions ( casacore::Record rec,
casacore::Record recOut 
)
virtual

Apply options stored in rec to the DisplayData.

A return value of true means a refresh is needed. recOut contains any fields which were implicitly changed as a result of the call to this function.

Reimplemented from casa::ActiveCaching2dDD.

virtual casacore::Bool casa::Profile2dDD::showRestFrequency ( ) const
inlinevirtual

Return the rest frequency display status (to draw or not to draw)

Definition at line 278 of file Profile2dDD.h.

References itsParamShowRestFrequency, and casa::DParameterSwitch::value().

virtual casacore::String casa::Profile2dDD::showValue ( const casacore::Vector< casacore::Double > &  world)
virtual

Returns an empty string.

Implements casa::DisplayData.

virtual casacore::Bool casa::Profile2dDD::sizeControl ( WorldCanvasHolder wcHolder,
AttributeBuffer holderBuf 
)
virtual

Overloading ActiveCaching2dDD::sizeControl.

Zooming is modified for autoscaling feature.

Reimplemented from casa::ActiveCaching2dDD.

casacore::Bool casa::Profile2dDD::updateCoordinateSys ( DisplayCoordinateSystem cs)
private

Update the coordinate system of this Display casacore::Data and the axis labeller.

Set new minimum and maximum Y values if necessary

Friends And Related Function Documentation

friend class Profile2dDM
friend

Definition at line 310 of file Profile2dDD.h.

Member Data Documentation

WCCSNLAxisLabeller casa::Profile2dDD::itsAxisLabeller
private

The Axis Labeller used to draw Axes.

Definition at line 409 of file Profile2dDD.h.

casacore::Vector<casacore::Double> casa::Profile2dDD::itsCurrentBlc
private

Minimum and maximum X/Y values.

Definition at line 373 of file Profile2dDD.h.

Referenced by profileXMin(), and profileYMin().

casacore::Vector<casacore::Double> casa::Profile2dDD::itsCurrentTrc
private

Definition at line 374 of file Profile2dDD.h.

Referenced by profileXMax(), and profileYMax().

casacore::Matrix<casacore::Double> casa::Profile2dDD::itsData
private

The Profile Data.

Definition at line 392 of file Profile2dDD.h.

LatticePADisplayData<casacore::Float>* casa::Profile2dDD::itsDD
private

A pointer to the attached DisplayData.

Definition at line 352 of file Profile2dDD.h.

casacore::Vector<casacore::String> casa::Profile2dDD::itsDefaultAxisLabels
private

The default x and y axis labels.

The x and y labels change to indicate region profiles.

Definition at line 406 of file Profile2dDD.h.

casacore::Int casa::Profile2dDD::itsDependentAxis
private

The dependent (world) axis of itsDD.

For example, if a RA axis is the profile axis, then the DEC axis will be the dependent axis.

Definition at line 364 of file Profile2dDD.h.

casacore::Bool casa::Profile2dDD::itsIsRegionProfile
private

Flag to indicate whether the last drawn profile was for a region or for a single point.

Definition at line 356 of file Profile2dDD.h.

Referenced by isRegionProfile().

casacore::Vector<casacore::Bool> casa::Profile2dDD::itsMask
private

The Mask Data.

Definition at line 394 of file Profile2dDD.h.

DParameterSwitch* casa::Profile2dDD::itsParamAutoscale
private

Definition at line 415 of file Profile2dDD.h.

Referenced by profileAutoscale().

DParameterColorChoice* casa::Profile2dDD::itsParamColor
private

Display Parameters for.

Definition at line 412 of file Profile2dDD.h.

Referenced by profileColor().

DParameterMapKeyChoice* casa::Profile2dDD::itsParamLineStyle
private

Definition at line 414 of file Profile2dDD.h.

Referenced by profileLineStyle().

DParameterRange<casacore::Float>* casa::Profile2dDD::itsParamLineWidth
private

Definition at line 413 of file Profile2dDD.h.

Referenced by profileLineWidth().

DParameterMapKeyChoice* casa::Profile2dDD::itsParamRegionStatType
private

Definition at line 417 of file Profile2dDD.h.

Referenced by regionStatType().

DParameterRange<casacore::Int>* casa::Profile2dDD::itsParamRegionXRadius
private

Definition at line 418 of file Profile2dDD.h.

Referenced by regionXRadius().

DParameterRange<casacore::Int>* casa::Profile2dDD::itsParamRegionYRadius
private

Definition at line 419 of file Profile2dDD.h.

Referenced by regionYRadius().

DParameterSwitch* casa::Profile2dDD::itsParamShowRestFrequency
private

Definition at line 416 of file Profile2dDD.h.

Referenced by showRestFrequency().

casacore::Vector<casacore::Int> casa::Profile2dDD::itsPixelAxisMap
private

Definition at line 399 of file Profile2dDD.h.

casacore::Vector<casacore::Double> casa::Profile2dDD::itsPixelPosition
private

The pixel position on the world canvas when the last

motion' event was received.

This position is in the format of itsDD, NOT the original image.

Definition at line 379 of file Profile2dDD.h.

casacore::Vector<casacore::Double> casa::Profile2dDD::itsRegionBlc
private

The region dimensions, in pixels, of the last region event received by Profile2dDD.

Definition at line 387 of file Profile2dDD.h.

casacore::Vector<casacore::String> casa::Profile2dDD::itsRegionCalcChoices
private

The choices for region calculations.

eg, mean, median, etc

Definition at line 402 of file Profile2dDD.h.

casacore::Vector<casacore::Double> casa::Profile2dDD::itsRegionTrc
private

Definition at line 388 of file Profile2dDD.h.

casacore::Double casa::Profile2dDD::itsRestFrequency
private

Rest Frequency.

Definition at line 370 of file Profile2dDD.h.

Referenced by restFrequency().

casacore::Bool casa::Profile2dDD::itsTrackingState
private

A flag to indicate whether tracking is on.

If true, a new profile is extracted each time a new motion event is received.

Definition at line 360 of file Profile2dDD.h.

casacore::Vector<casacore::Int> casa::Profile2dDD::itsWorldAxisMap
private

The axis map between input DD's casacore::Coordinate system and itsCompleteCS.

Definition at line 398 of file Profile2dDD.h.

casacore::Vector<casacore::Double> casa::Profile2dDD::itsWorldPosition
private

The world position on the world canvas when the last motion' event was received.

This position is in the format of itsDD, NOT the original image.

Definition at line 383 of file Profile2dDD.h.

casacore::Double casa::Profile2dDD::itsYAxisInc
private

Increment value for the linear coordinate on the Y axis.

Definition at line 367 of file Profile2dDD.h.


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