28 #ifndef TRIALDISPLAY_PRINCIPALAXESDD_H
29 #define TRIALDISPLAY_PRINCIPALAXESDD_H
43 template <
class T>
class Vector;
45 template <
class T>
class ImageInterface;
52 class WorldCanvasHolder;
53 class AttributeBuffer;
54 class WCPositionEvent;
57 class DisplayCoordinateSystem;
58 class WCCSNLAxisLabeller;
59 class PrincipalAxesDM;
casacore::Vector< casacore::Double > itsWorldOutTmp3
A Vector of integers, for indexing into Array<T> objects.
casacore::Coordinate::formatType itsNotation
format for diplaying numbers in the tracker
virtual casacore::Record getLabellerOptions(bool scrub=false) const
retrieve options from the axis labellers
virtual casacore::Vector< casacore::String > worldAxisNames() const
Miscellaneous information supply routines.
casacore::Int xlatePixelAxes(casacore::Int idx) const
allow external functions to translate axes...
virtual void refreshEH(const WCRefreshEvent &ev)
refresh handler, called by the WorldCanvasHolder
casacore::Bool itsUsesAxisLabels
casacore::Int xlateFixedPixelAxes(casacore::Int idx) const
casacore::PtrBlock< void * > itsAxisLabellers
casacore::List of AxisLabellers.
std::vector< double > Vector
virtual casacore::Vector< casacore::String > worldAxisUnits() const
static const casacore::String HISTOGRAM_RANGE
Class which stores WorldCanvas refresh event information.
casacore::Vector< casacore::Bool > itsWorldAxesTmp3
casacore::IPosition itsFixedPosition
const casacore::String & spectralunitStr() const
void transposedToNormal(casacore::Vector< casacore::Double > &coord, const casacore::Vector< casacore::Int > &transPos)
const casacore::String & zaxisStr() const
void setVelocityState(DisplayCoordinateSystem &cSys, const casacore::String &velTypeString, const casacore::String &unitString)
Set velocity state.
casacore::Bool canHaveVelocityUnit(const DisplayCoordinateSystem &cSys) const
Find out if casacore::SpectralCoordinate can have velocity units.
void setSpectralFormatting(DisplayCoordinateSystem &cSys, const casacore::String &velTypeString, const casacore::String &unitString, const casacore::String &frequency_system="")
Set Spectral formatting.
virtual void reset()
Overrides PlotTool::reset().
virtual void setDataMin(casacore::Double datmin)
Set and retrieve the minimum and maximum data values.
casacore::String titleText
void setCoordinateSystem(const DisplayCoordinateSystem &coordsys)
set the DisplayCoordinateSystem and the original DisplayCoordinateSystem
casacore::Int itsXAxisNum
axis numbers IN ORIGINAL COORDINATE SYSTEM; zAxisNum = -1 means no third axis in data set ...
virtual casacore::Bool setLabellerOptions(casacore::Record &rec, casacore::Record &recout)
distribute options to all the axis labellers
casacore::Vector< casacore::Double > itsWorldInTmp1
Temporaries for coordinate conversions.
virtual casacore::uInt nDim()
query the number of dimensions in the data
virtual casacore::String pixelTreatment() const
Get the current setting of pixel treatment mode.
casacore::Vector< casacore::String > worldToPixelAxisNames(const DisplayCoordinateSystem &cSys) const
Convert list of world axis names to pixel axis names.
casacore::Vector< casacore::Double > itsPixelInTmp3
Buffer for storing Attributes.
void removeFakeCoordinateSystem()
virtual void motionEH(const WCMotionEvent &ev)
Motion event handler, called by the WorldCanvasHolder.
virtual Type type()
Return the type enum.
casacore::Vector< casacore::Int > itsTransPixelAxes
how the axes are permuted
casacore::Vector< casacore::Int > itsTransWorldAxes
virtual casacore::String className()
Return the class name of this DisplayData; useful mostly for debugging purposes, and perhaps future u...
virtual std::vector< int > displayAxes() const
Get the current display axis numbers.
casacore::String itsSpectralQuantity
DisplayCoordinateSystem itsCoordSysBackup
virtual casacore::IPosition fixedPosition() const
Get the current fixed position.
virtual void setNumImages(const casacore::uInt nimages)
casacore::Vector< casacore::Bool > itsPixelAxesTmp3
virtual void positionEH(const WCPositionEvent &ev)
Position event handler, called by the WorldCanvasHolder.
PrincipalAxesDD()
(Required) default constructor.
casacore::Bool itsAbsolute
DisplayCoordinateSystem coordinateSystem() const
retrieve the DisplayCoordinateSystem
virtual casacore::Double getDataMin() const
casacore::Vector< casacore::Double > itsFullWorldTmp4
static bool has_nonsingleton_nondegenerate_nondisplayed_axis(const DisplayData &other)
DisplayCoordinateSystem itsOrigCoordSys
This CS is the one we were constructed with.
casacore::Vector< casacore::Double > itsPixelInTmp2
formatType
This enum is used for formatting world values into Strings.
casacore::Bool findActiveImage(WorldCanvasHolder &wcHolder)
Determine the active image (if any).
virtual void setDataMax(casacore::Double datmax)
virtual casacore::Double getDataMax() const
Interface for DisplayDatas which have data arranged in axes.
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.
casacore::String itsOptionsPixelTreatment
treatment of edge pixels
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 ...
casacore::Vector< casacore::Double > itsWorldMin
world ranges for toMix conversions
casacore::Vector< casacore::Double > itsPixelInTmp1
virtual casacore::Vector< casacore::Double > worldAxisIncrements()
virtual casacore::Bool worldToLin(casacore::Vector< casacore::Double > &lin, const casacore::Vector< casacore::Double > &world)
virtual void notifyUnregister(WorldCanvasHolder &wcHolder, casacore::Bool ignoreRefresh=false)
ignoreRefresh tells the DD not to refresh just to clean up DMs
casacore::String itsOptionsYAxis
void normalToTransposed(casacore::Vector< casacore::Double > &coord, const casacore::Vector< casacore::Int > &transPos)
helper to transpose coordinates
virtual casacore::Bool linToFullWorld(casacore::Vector< casacore::Double > &fullWorld, const casacore::Vector< casacore::Double > &lin)
Class which stores WorldCanvas motion event information.
casacore::String itsOptionsAspect
Aspect selection —.
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.
const casacore::String & spectStr() const
casacore::Vector< casacore::Double > itsWorldMax
LatticeExprNode length(const LatticeExprNode &expr, const LatticeExprNode &axis)
2-argument function to get the length of an axis.
casacore::Vector< casacore::Double > itsFullPixelTmp4
void installFakeCoordinateSystem()
set a Linear casacore::Coordinate in case of pixToWorld undefined for the blc/trc ...
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...
viewer::StatusSink * ssink
virtual void setSubstituteTitleText(const casacore::String text)
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.
virtual casacore::Bool canLabelAxes() const
virtual ~PrincipalAxesDD()
destructor
virtual void setupElements()
functions need by above
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
DisplayCoordinateSystem itsPosTrackCoordSys
Position tracking variables This CS is the one we use to set the appropriate state for PositionTracki...
virtual casacore::Bool setOptions(casacore::Record &rec, casacore::Record &recOut)
apply options stored in val to the DisplayData; return value true means a refresh is needed...
virtual casacore::Record getOptions(bool scrub) const
retrieve the current and default options and parameter types.
DisplayCoordinateSystem itsCoordSys
This is the working CS which is transposed and has axes removed all over the place.
virtual casacore::Bool conformsToCS(const WorldCanvas &wc)
Is the DD is capable (in its current state) of drawing in the current DisplayCoordinateSystem of the ...
casacore::Vector< casacore::Double > itsAddPixPos
the coordinates of the axes that do not vary
casacore::uInt itsNumImages
number of elements (images) in this DisplayData
void setup(casacore::IPosition fixedPos)
do some setup work, part of construction and changing dataset
std::string errorMessage() const
DisplayCoordinateSystem originalCoordinateSystem() const
retrieve the original DisplayCoordinateSystem
std::vector< int > itsDisplayAxes
the x (0), y (1) and z/movie (2) axis numbers
Type
This enum lists the types of the derived classes.
virtual casacore::String worldAxisCode(const casacore::uInt &worldaxisnum)
casacore::Vector< casacore::Double > itsPixelOutTmp3
virtual void getMinAndMax()=0
virtual casacore::uInt dataDim() const =0
casacore::Int itsZAxisNum
AttributeBuffer sizeControlBuf
buffer for string sizecontrol done by this ImageDisplayData
Class which stores WorldCanvas position event information.
casacore::Bool iAmRubbish
Internal state.
A holder to interface between DisplayDatas and a WorldCanvas.
Implementation of drawing in world coordinates on top of a PixelCanvas.
casacore::uInt nPixelAxes
casacore::Bool itsFractionalPixels
casacore::uInt nArrayAxes
internal bookkeeping number of axes
virtual casacore::uInt nelements() const
and non-specific
virtual casacore::Bool labelAxes(const WCRefreshEvent &ev)
label/draw the axes
String: the storage and methods of handling collections of characters.
bool hasMovieDimension() const
casacore::String itsSpectralUnit
virtual casacore::Bool sizeControl(WorldCanvasHolder &wcHolder, AttributeBuffer &holderBuf)
sizeControlFunction, called by the WorldCanvasHolder to setup the WorldCanvas linear coordinate syste...
casacore::Vector< casacore::Double > itsFullWorldTmp1
Interface for DisplayMethods which have data arranged in "axes.".
casacore::Vector< casacore::Double > itsWorldInTmp3
virtual void setDefaultOptions()
install the default options for this DisplayData
void operator=(const PrincipalAxesDD &other)
(Required) copy assignment.
Base class for display objects.
casacore::String itsOptionsZAxis
casacore::Vector< casacore::Bool > itsWorldAxesTmp1
virtual void drawBeamEllipse_(WorldCanvas *)
Derived classes will implement if applicable (at present, LatticePADDs may draw if they have an image...
casacore::Vector< casacore::Bool > itsPixelAxesTmp1
casacore::Double datamin
min and max to use for drawing
casacore::String itsOptionsXAxis
Store options: Axis selection —.
virtual void worldAxisType(casacore::Coordinate::Type &type, casacore::Int &coordinate, casacore::Int &axisincoord, const casacore::uInt &worldaxisnum)
void restoreCoordinateSystem()
set the DisplayCoordinateSystem to be the same as the original DisplayCoordinateSystem ...
casacore::uInt nWorldAxes
virtual casacore::Bool linToWorld(casacore::Vector< casacore::Double > &world, const casacore::Vector< casacore::Double > &lin)
casacore::Coordinate transformation handlers, called by WorldCanvasHolder
void removePixelAxes(DisplayCoordinateSystem &cSys, casacore::uInt startAxis, const casacore::IPosition &fixedPosition)
Remove list of pixel axes from CS.
casacore::Int itsYAxisNum
virtual void cleanup()
required function to tidy up our elements, primarily
const casacore::String & xaxisStr() const
const casacore::String & yaxisStr() const
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.