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

Class which provides non-linear axis labelling using a DisplayCoordinateSystem. More...

#include <WCCSNLAxisLabeller.h>

Inheritance diagram for casa::WCCSNLAxisLabeller:
casa::WCCSAxisLabeller casa::WCAxisLabeller casa::DisplayOptions

Public Member Functions

 WCCSNLAxisLabeller ()
 Constructor. More...
 
virtual ~WCCSNLAxisLabeller ()
 Destructor. More...
 
virtual casacore::Bool draw (const WCRefreshEvent &ev)
 Draw axis labels for the provided WorldCanvas refresh event. More...
 
virtual void invalidate ()
 Invalidate/return any cached drawing list. More...
 
virtual void setCoordinateSystem (const DisplayCoordinateSystem &coordsys)
 Install the DisplayCoordinateSystem to use. More...
 
void setWorldRanges (const casacore::Vector< casacore::Double > &worldMin, const casacore::Vector< casacore::Double > &worldMax, const casacore::Vector< casacore::String > &units)
 Set the world min and max ranges (and their associated units) to be used by the DisplayCoordinateSystem::toMix computations. More...
 
virtual void setDefaultOptions ()
 install the default options for this DisplayData More...
 
virtual casacore::Bool setOptions (const casacore::Record &rec, casacore::Record &updatedOptions)
 apply options stored in rec to the DisplayData; return value true means a refresh is needed. More...
 
virtual casacore::Record getOptions () const
 retrieve the current and default options and parameter types. More...
 
- Public Member Functions inherited from casa::WCCSAxisLabeller
 WCCSAxisLabeller ()
 Constructor. More...
 
virtual ~WCCSAxisLabeller ()
 Destructor. More...
 
virtual DisplayCoordinateSystem coordinateSystem () const
 Get the DisplayCoordinateSystem. More...
 
casacore::Bool hasCoordinateSystem () const
 Has a CS been set? More...
 
virtual casacore::String xAxisText (WorldCanvas *wc) const
 return the X and Y label text - over-ridden from base class More...
 
virtual casacore::String yAxisText (WorldCanvas *wc) const
 
virtual casacore::String xAxisText () const
 
virtual casacore::String yAxisText () const
 
virtual casacore::String zLabelType () const
 
virtual casacore::String zLabelPos () const
 
virtual void setZIndex (casacore::Int zindex)
 
virtual casacore::Int uiBase () const
 DD 'Absolute Pixel Coordinates', e.g. More...
 
virtual void setUIBase (casacore::Int uibase)
 
const casacore::StringspectralunitStr () const
 
casacore::Int spectralprec () const
 
- Public Member Functions inherited from casa::WCAxisLabeller
 WCAxisLabeller ()
 Constructor. More...
 
virtual ~WCAxisLabeller ()
 Destructor. More...
 
virtual casacore::Bool setAxisLabelSwitch (const casacore::Bool labelswitch=false)
 set/return whether labelling is on or off. More...
 
virtual casacore::Bool axisLabelSwitch () const
 
virtual void setSubstituteTitleText (const casacore::String substituteImageName)
 set/return the title text. More...
 
virtual casacore::String titleText () const
 
virtual casacore::String displayedTitleText () const
 
virtual casacore::Bool setTitleTextColor (const casacore::String color=casacore::String("foreground"))
 set/return the color of the title text. More...
 
virtual casacore::String titleTextColor () const
 
virtual casacore::Bool setXAxisText (const casacore::String text=casacore::String(""))
 set/return the X and Y label text. More...
 
virtual casacore::Bool setYAxisText (const casacore::String text=casacore::String(""))
 
virtual casacore::Bool unsetXAxisText ()
 
virtual casacore::Bool unsetYAxisText ()
 
virtual casacore::Bool isXAxisTextUnset () const
 
virtual casacore::Bool isYAxisTextUnset () const
 
virtual casacore::Bool setXAxisTextColor (const casacore::String color=casacore::String("foreground"))
 set/return the color of the label text. More...
 
virtual casacore::Bool setYAxisTextColor (const casacore::String color=casacore::String("foreground"))
 
virtual casacore::String xAxisTextColor () const
 
virtual casacore::String yAxisTextColor () const
 
virtual casacore::Bool setXGridType (const casacore::String type=casacore::String("None"))
 set/return what type of grid is marked in each direction. More...
 
virtual casacore::Bool setYGridType (const casacore::String type=casacore::String("None"))
 
virtual casacore::String xGridType () const
 
virtual casacore::String yGridType () const
 
virtual casacore::Bool setXGridColor (const casacore::String color=casacore::String("foreground"))
 set/return the color of the grid lines per direction. More...
 
virtual casacore::Bool setYGridColor (const casacore::String color=casacore::String("foreground"))
 
virtual casacore::String xGridColor () const
 
virtual casacore::String yGridColor () const
 
virtual casacore::Bool setTickLength (const casacore::Float length=4.0)
 set/return the tick length in millimetres. More...
 
virtual casacore::Float tickLength () const
 
virtual casacore::Bool setLabelPosition (const casacore::String position=casacore::String("Auto"))
 set/return the position of World label strings More...
 
virtual casacore::String labelPosition () const
 
virtual casacore::Bool setPlotOutline (const casacore::Bool outline=true)
 set/return whether there is a plot outline or not. More...
 
virtual casacore::Bool plotOutline () const
 
virtual casacore::Bool setPlotOutlineColor (const casacore::String color=casacore::String("foreground"))
 set/return the color used for the plot outline. More...
 
virtual casacore::String plotOutlineColor () const
 
virtual casacore::Bool setCharSize (const casacore::Float size=1.2)
 set/return the char size for the plot graphics More...
 
virtual casacore::Float charSize () const
 
virtual casacore::Bool setCharFont (const casacore::String font="normal")
 set/return the char font for the plot graphics More...
 
virtual casacore::String charFont () const
 
virtual casacore::Bool setLineWidth (const casacore::Float width=0.0)
 set/return the line width for the plot graphics. More...
 
virtual casacore::Float lineWidth () const
 
- 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...
 

Private Attributes

casacore::Bool itsValid
 Is the drawlist state below valid? More...
 
casacore::uInt itsDrawListNumber
 our drawlist number More...
 
AttributeBuffer itsDrawStateBuffer
 attribute buffer that suits the drawlist we have made More...
 
WorldCanvasitsLastWorldCanvas
 last WorldCanvas drawn upon More...
 

Additional Inherited Members

- Public Types inherited from casa::WCCSAxisLabeller
enum  SpecAxisType {
  FREQ,
  VELO,
  WAVE,
  AWAV
}
 
- Public Attributes inherited from casa::WCCSAxisLabeller
casacore::Bool useWCCS
 Setting this true allows the labeller to use the WorldCanvas's own CS to draw labels (although itsCoordinateSystem is still needed for certain things at present). More...
 
- Static Public Attributes inherited from casa::WCAxisLabeller
static const casacore::String LABEL_CHAR_SIZE
 
static const casacore::String PLOT_TITLE
 
- Protected Member Functions inherited from casa::WCCSAxisLabeller
void setSpectralState (DisplayCoordinateSystem &cs) const
 Set spectral state onto given CS. More...
 
void setDirectionState (DisplayCoordinateSystem &cs) const
 Set direction state onto given CS. 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...
 
- Protected Attributes inherited from casa::WCCSAxisLabeller
casacore::Bool itsAbsolute
 
casacore::Bool itsWorldAxisLabels
 
WCCSAxisLabeller::SpecAxisType itsSpecAxisType
 
casacore::Int itsZIndex
 
- Protected Attributes inherited from casa::WCAxisLabeller
casacore::Bool titleChanged
 

Detailed Description

Class which provides non-linear axis labelling using a DisplayCoordinateSystem.

Synopsis

This class implements the interface defined in WCCSAxisLabeller to provide arbitrary non-linear axis labelling, using coordinate transformations provided by a supplied DisplayCoordinateSystem.

Definition at line 48 of file WCCSNLAxisLabeller.h.

Constructor & Destructor Documentation

casa::WCCSNLAxisLabeller::WCCSNLAxisLabeller ( )

Constructor.

virtual casa::WCCSNLAxisLabeller::~WCCSNLAxisLabeller ( )
virtual

Destructor.

Member Function Documentation

virtual casacore::Bool casa::WCCSNLAxisLabeller::draw ( const WCRefreshEvent ev)
virtual

Draw axis labels for the provided WorldCanvas refresh event.

Note: it is the responsibility of the caller to assure that this object is invalidated (or destroyed) before the WorldCanvas corresponding to ev gets destroyed, so that any cached axis drawing which the WC is holding for us can be deleted properly.

Implements casa::WCAxisLabeller.

virtual casacore::Record casa::WCCSNLAxisLabeller::getOptions ( ) const
virtual

retrieve the current and default options and parameter types.

Reimplemented from casa::WCCSAxisLabeller.

virtual void casa::WCCSNLAxisLabeller::invalidate ( )
virtual

Invalidate/return any cached drawing list.

Reimplemented from casa::WCAxisLabeller.

virtual void casa::WCCSNLAxisLabeller::setCoordinateSystem ( const DisplayCoordinateSystem coordsys)
virtual

Install the DisplayCoordinateSystem to use.

Reimplemented from casa::WCCSAxisLabeller.

virtual void casa::WCCSNLAxisLabeller::setDefaultOptions ( )
virtual

install the default options for this DisplayData

Reimplemented from casa::WCCSAxisLabeller.

virtual casacore::Bool casa::WCCSNLAxisLabeller::setOptions ( const casacore::Record rec,
casacore::Record updatedOptions 
)
virtual

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

Any fields added to the updatedOptions argument are options which have changed in some way due to the setting of other options - ie. they are context sensitive.

Reimplemented from casa::WCCSAxisLabeller.

void casa::WCCSNLAxisLabeller::setWorldRanges ( const casacore::Vector< casacore::Double > &  worldMin,
const casacore::Vector< casacore::Double > &  worldMax,
const casacore::Vector< casacore::String > &  units 
)

Set the world min and max ranges (and their associated units) to be used by the DisplayCoordinateSystem::toMix computations.

If not specified with this function, -180->180, -90->90 for DirectionCoordinates used (rest don't matter). Specifying this correctly can make the toMix computations much faster (it uses an iterative solution) and avoid solution ambiguities.

Member Data Documentation

casacore::uInt casa::WCCSNLAxisLabeller::itsDrawListNumber
private

our drawlist number

Definition at line 101 of file WCCSNLAxisLabeller.h.

AttributeBuffer casa::WCCSNLAxisLabeller::itsDrawStateBuffer
private

attribute buffer that suits the drawlist we have made

Definition at line 104 of file WCCSNLAxisLabeller.h.

WorldCanvas* casa::WCCSNLAxisLabeller::itsLastWorldCanvas
private

last WorldCanvas drawn upon

Definition at line 107 of file WCCSNLAxisLabeller.h.

casacore::Bool casa::WCCSNLAxisLabeller::itsValid
private

Is the drawlist state below valid?

Definition at line 98 of file WCCSNLAxisLabeller.h.


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