PrincipalAxesDD.h
Classes
- PrincipalAxesDD -- Interface for DisplayDatas which have data arranged in axes. (full description)
Interface
- Public Members
- PrincipalAxesDD(uInt xAxis, uInt yAxis, Int mAxis = -1, Bool axisLabels = True)
- virtual ~PrincipalAxesDD()
- virtual Bool linToWorld(Vector<Double> &world, const Vector<Double> &lin)
- virtual Bool worldToLin(Vector<Double> &lin, const Vector<Double> &world)
- virtual Bool linToFullWorld(Vector<Double> &fullWorld, const Vector<Double> &lin)
- virtual String showPosition(const Vector<Double> &world, const Bool &displayAxesOnly = False)
- virtual String showPosition(const Vector<Double> &world, const Bool &showWorld, const Bool &showAbs, const Bool &displayAxesOnly = False)
- virtual Bool setActiveZIndex(Int zindex)
- virtual Bool conformsToCS(const WorldCanvasHolder& wch)
- virtual Vector<String> worldAxisNames()
- virtual Vector<String> worldAxisUnits()
- virtual Vector<Double> worldAxisIncrements()
- virtual void worldAxisType(Coordinate::Type &type, Int &coordinate, Int &axisincoord, const uInt &worldaxisnum)
- virtual String worldAxisCode(const uInt &worldaxisnum)
- virtual const uInt nelements(const WorldCanvasHolder &wcHolder) const
- virtual const uInt nelements() const
- virtual void setDataMin(Double datmin)
- virtual void setDataMax(Double datmax)
- virtual Double getDataMin()
- virtual Double getDataMax()
- virtual Bool sizeControl(WorldCanvasHolder& wcHolder, AttributeBuffer& holderBuf)
- virtual void positionEH(const WCPositionEvent& ev)
- virtual void motionEH(const WCMotionEvent& ev)
- virtual void refreshEH(const WCRefreshEvent& ev)
- virtual Bool labelAxes(const WCRefreshEvent &ev)
- virtual void cleanup()
- virtual void setDefaultOptions()
- virtual Bool setOptions(Record &rec, Record &recOut)
- virtual Record getOptions()
- virtual Bool setLabellerOptions(Record &rec, Record &recout)
- virtual Record getLabellerOptions()
- virtual void setAxes(const uInt xAxis, const uInt yAxis, const uInt mAxis, const IPosition fixedPos, Bool reset=True)
- virtual uInt nDim()
- CoordinateSystem coordinateSystem() const
- CoordinateSystem originalCoordinateSystem() const
- void setCoordinateSystem(const CoordinateSystem &coordsys)
- void restoreCoordinateSystem()
- virtual String className()
- virtual IPosition fixedPosition() const
- virtual Vector<Int> displayAxes() const
- virtual String pixelTreatment() const
- virtual Bool getFullCoord(Vector<Double> &fullWorld, Vector<Double> &fullPixel, const Vector<Double> &world)
- virtual void notifyUnregister(WorldCanvasHolder& wcHolder, Bool ignoreRefresh = False)
- Protected Members
- virtual void setNumImages(const uInt nimages)
- void setup(IPosition fixedPos)
- virtual const IPosition dataShape() = 0
- virtual const uInt dataDim() = 0
- virtual const Unit dataUnit() = 0
- virtual void setupElements()
- virtual void getMinAndMax() = 0
- Bool indexInserted(Int index, Int length, Vector<Int>& testVec)
- void normalToTransposed(Vector<Double>& coord, const Vector<Int>& transPos)
- void transposedToNormal(Vector<Double>& coord, const Vector<Int>& transPos)
- void setVelocityState (CoordinateSystem& cSys, const String& velTypeString, const String& unitString)
- void setSpectralFormatting (CoordinateSystem& cSys, const String& velTypeString, const String& unitString)
- Bool findActiveImage(WorldCanvasHolder &wcHolder)
- PrincipalAxesDD()
- PrincipalAxesDD(const PrincipalAxesDD &other)
- void operator=(const PrincipalAxesDD &other)
- Private Members
- Bool canHaveVelocityUnit (const CoordinateSystem& cSys) const
- void removePixelAxes (CoordinateSystem& cSys, uInt startAxis, const IPosition& fixedPosition)
- Vector<String> worldToPixelAxisNames (const CoordinateSystem& cSys) const
Synopsis
This class adds to the interface defined by DisplayData to
provide the necessary infrastructure for managing data which
is arranged in "axes," ie. lattice or column-based data.
Member Description
PrincipalAxesDD(uInt xAxis, uInt yAxis, Int mAxis = -1, Bool axisLabels = True)
constructor
destructor
virtual Bool linToWorld(Vector<Double> &world, const Vector<Double> &lin)
virtual Bool worldToLin(Vector<Double> &lin, const Vector<Double> &world)
virtual Bool linToFullWorld(Vector<Double> &fullWorld, const Vector<Double> &lin)
Coordinate transformation handlers, called by WorldCanvasHolder
virtual String showPosition(const Vector<Double> &world, const Bool &displayAxesOnly = False)
Format a string containing coordinate and data information at the
given world coordinate
virtual String showPosition(const Vector<Double> &world, const Bool &showWorld, const Bool &showAbs, const Bool &displayAxesOnly = False)
Format a string containing coordinate and data information at the
given world coordinate. This function let's you specify output
conditions (world/pixel and abs/rel)
Set internal index (activeZIndex_) into the list of DMs (which cache
individual drawings), according to passed animator index. This is
called by conformsTo() (via conformsToZIndex()), and serves to
'focus' the DD on the current WCH's zIndex.
Returns True if there is only one frame, in which case activeZIndex_
is set to 0. Thus a single frame is considered to apply to any
canvas zIndex setting (this allows a continuum image to be blinked
with a chosen channel of a spectral image, e.g.).
If there is more than one frame, the passed zindex is stored, and
the return value will indicate whether it lies within the DD's
current number of frames.
Is the DD is capable (in its current state) of drawing
in the current CoordinateSystem of the WCH's WorldCanvas?
Miscellaneous information supply routines
Return the number of display elements (eg. drawable images) in this
DisplayData
virtual void setDataMin(Double datmin)
virtual void setDataMax(Double datmax)
virtual Double getDataMin()
virtual Double getDataMax()
Set and retrieve the minimum and maximum data values
sizeControlFunction, called by the WorldCanvasHolder to setup the
WorldCanvas linear coordinate system
Position event handler, called by the WorldCanvasHolder
Motion event handler, called by the WorldCanvasHolder
refresh handler, called by the WorldCanvasHolder
label/draw the axes
virtual void cleanup()
required function to tidy up our elements, primarily
install the default options for this DisplayData
apply options stored in val to the DisplayData; return value
True means a refresh is needed...
retrieve the current and default options and parameter types.
distribute options to all the axis labellers
retrieve options from the axis labellers
virtual void setAxes(const uInt xAxis, const uInt yAxis, const uInt mAxis, const IPosition fixedPos, Bool reset=True)
Sets which axes are on display and animator, and positions for
animator and sliders. Pass 'reset' as False if you don't need
an unzoom (e.g. when display axes are unchanged).
virtual uInt nDim()
query the number of dimensions in the data
retrieve the CoordinateSystem
retrieve the original CoordinateSystem
set the CoordinateSystem and the original CoordinateSystem
set the CoordinateSystem to be the same as the original
CoordinateSystem
Return the class name of this DisplayData; useful mostly for
debugging purposes, and perhaps future use in the glish widget
interface.
Get the current fixed position
Get the current display axis numbers
Get the current setting of pixel treatment mode
virtual Bool getFullCoord(Vector<Double> &fullWorld, Vector<Double> &fullPixel, const Vector<Double> &world)
Convert a 2D worldCoordinate of the WorldCanvas to a full worldcoordinate
and full pixel position
virtual void setNumImages(const uInt nimages)
do some setup work, part of construction and changing dataset
functions need by above
virtual const uInt dataDim() = 0
Bool indexInserted(Int index, Int length, Vector<Int>& testVec)
Helper routine for setting up the transpose vectors for the coordinate
system.
helper to transpose coordinates
Set velocity state
Set Spectral formatting
Determine the active image (if any).
(Deprecated (7/04). Use confromsToZIndex(wch) instead).
(Required) default constructor.
(Required) copy constructor.
void operator=(const PrincipalAxesDD &other)
(Required) copy assignment.
Find out if SpectralCoordinate can have velocity units
Remove list of pixel axes from CS
Convert list of world axis names to pixel axis names