28 #ifndef TRIALDISPLAY_DISPLAYDATA_H
29 #define TRIALDISPLAY_DISPLAYDATA_H
47 template <
class T>
class ImageInterface;
53 class AttributeBuffer;
59 class WCPositionEvent;
498 firstZIndex=zInds[0];
615 return "not available";
636 virtual std::shared_ptr<casacore::ImageInterface<casacore::Float> >
imageinterface( ) {
637 return std::shared_ptr<casacore::ImageInterface<casacore::Float> >();
693 if(uibase==0 || uibase==1)
uiBase_ = uibase;
A Vector of integers, for indexing into Array<T> objects.
virtual void setSubstituteTitleText(const casacore::String)
std::list< DisplayEH * > itsDisplayEHList
Class to provide option parsing routines for display classes.
Class which stores WorldCanvas refresh event information.
virtual void addRefreshEventHandler(WCRefreshEH *refreshHandler)
AttributeBuffer attributes
buffer for storing Attributes
virtual void removeFromAllWCHs()
remove this DD everywhere–will stop any more refresh handling by the DD.
virtual std::vector< int > displayAxes() const =0
casacore::Bool exists(const casacore::String &name) const
Check if an Attribute with name name exists.
virtual casacore::String showValue(const casacore::Vector< casacore::Double > &world)=0
casacore::Format a string containing value information at the given world coordinate ...
virtual void setDisplayDataRed(DisplayData *)
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 ...
virtual void setRestrictions(AttributeBuffer &otherBuf)
Set general restrictions or a restriction for item itemNum of this DisplayData.
virtual casacore::Bool existElementRestriction(const casacore::uInt itemNum, const casacore::String &name)
virtual void addRestrictions(AttributeBuffer &otherBuf)
Add general restrictions or a restriction for item itemNum of this DisplayData.
casacore::Bool rstrsConformed_
Somewhat limited-use state, saved here for 'efficiency'.
virtual DisplayState getDisplayState() const
virtual ~DisplayData()
required destructor
virtual casacore::String className() const
Return the class name of this DisplayData; useful mostly for debugging purposes, and perhaps future u...
Colormap * itsColormap
Colormap for this DisplayData, and its weight.
DisplayDataType
WorldCanvasHolder - what type of DisplayData is this, need to know for drawing order.
Buffer for storing Attributes.
Base class for handling WorldCanvas motion events.
virtual void setDelTmpData(casacore::Bool delTmpData)
std::list< WorldCanvasHolder * > itsWCHList
A list of WorldCanvasHolders for which this DisplayData works.
virtual void setElementRestriction(const casacore::uInt itemNum, Attribute &newRestriction)
virtual void motionEH(const WCMotionEvent &ev)
virtual casacore::String showPosition(const casacore::Vector< casacore::Double > &world, const casacore::Bool &displayAxesOnly=false)=0
casacore::Format a string containing coordinate information at the given world coordinate ...
static const casacore::String DATA_MAX
size_t nelements() const
The number of elements contained in this Block<T>.
DisplayData()
(Required) default constructor.
virtual void handleEvent(DisplayEvent &ev)
Overide DisplayEH::handleEvent.
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.
virtual void setUIBase(casacore::Int uibase)
WorldCanvasHolder * oldWCHolder
virtual bool isDisplayable() const
casacore::Float itsColormapWeight
virtual casacore::String dataType() const =0
virtual void addPositionEventHandler(WCPositionEH *positionHandler)
Add event handlers on the DisplayData.
virtual const std::list< WCMotionEH * > * motionEventHandlerList()
virtual void addElementRestrictions(const casacore::uInt itemNum, AttributeBuffer &other)
virtual void addRestriction(Attribute &newRestriction, casacore::Bool permanent)
DisplayState displaystate
is this data currently being displayed?
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
void removeAttribute(casacore::String &name)
Remove an Attribute.
virtual Colormap * colormap() const
class for handling any type of DisplayEvent.
virtual AttributeBuffer * elementRestrictionBuffer(const casacore::uInt itemNum)
Arbitrary name-value pairs used in the display classes.
virtual const std::list< WCPositionEH * > * positionEventHandlerList()
Retrieve position, motion, refresh and display event handler lists.
void setAttributes(AttributeBuffer &at)
virtual casacore::Bool canLabelAxes() const
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...
ValueType
The possible value types.
virtual casacore::String description() const
const WorldCanvasHolder * findHolder(const WorldCanvas *wCanvas) const
Identify the WorldCanvasHolder for the given WorldCanvas.
Base class for handling WorldCanvas refresh events.
virtual void notifyRegister(WorldCanvasHolder *wcHolder)
casacore::PtrBlock< void * > DDelement
list of DisplayDataElements, which are of type DisplayMethod or derived
void setAttributeOnPrimaryWCHs(Attribute &at)
Set an attribute on any WorldCanvas for which this DD is CS master.
virtual void refresh(casacore::Bool clean=false)
an explicit refresh: should be called if the DisplayData is changed such that drawing is required...
virtual casacore::Bool linToWorld(casacore::Vector< casacore::Double > &world, const casacore::Vector< casacore::Double > &lin)=0
casacore::Coordinate transformations, called by WorldCanvasHolder (casacore::Matrix versions not impl...
Class which stores WorldCanvas motion event information.
virtual const std::list< DisplayEH * > * displayEventHandlerList()
virtual void removePositionEventHandler(WCPositionEH &positionHandler)
Remove eventhandlers.
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > imageinterface()
Returns a pointer that should not be deleted...
virtual void setRestriction(Attribute &newRestriction)
virtual void clearRestrictions()
Clear all general restrictions or all restrictions of item itemNum (except the ones that are permanen...
AttributeBuffer restrictions
The Book says that we should not put data members in class that is supposed to only define an interfa...
virtual casacore::uInt nelements() const =0
and non-specific
virtual const casacore::Unit dataUnit() const =0
Class describing the most basic event information in the display classes.
casacore::Bool existsAttribute(casacore::String &name)
Check if a certain Attribute exists.
virtual void setDefaultOptions()
install the default options for this DisplayData
virtual casacore::Bool labelAxes(const WCRefreshEvent &ev)
an explicit request to draw the axes and/or labels.
casacore::Bool isCsAndZIndexConformed()
Added so that when two images are loaded with no velocity alignment, they can still show their positi...
virtual AttributeBuffer * restrictionBuffer()
Get a handle to the buffer of general restrictions or of the buffer of restrictions for item itemNum ...
virtual void addElementRestriction(const casacore::uInt itemNum, Attribute &newRestriction, casacore::Bool permanent)
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...
virtual casacore::Vector< casacore::String > worldAxisUnits() const =0
A hierarchical collection of named fields of various types.
virtual void setElementRestrictions(const casacore::uInt itemNum, AttributeBuffer &other)
bool Bool
Define the standard types used by Casacore.
virtual void refreshEH(const WCRefreshEvent &ev)=0
std::list< WCPositionEH * > itsPositionEHList
Lists of position, motion, refresh and display event handlers.
virtual casacore::Int uiBase() const
DD 'Absolute Pixel Coordinates', e.g.
virtual void removeRestriction(const casacore::String &name)
Remove a general restriction or a restriction from item itemNum
virtual casacore::Bool conformsToCS(const WorldCanvas &)
Determine whether DD is compatible with the WC[H]'s current world coordinates.
casacore::Int uiBase_
DD 'Absolute Pixel Coordinates', e.g.
virtual std::string errorMessage() const =0
virtual void setColormap(Colormap *cmap, casacore::Float weight)
Set/remove/get a ColourMap (sorry, ColorMap) for this DisplayData setColormap() throw an casacore::Ai...
virtual casacore::uInt dataDim() const =0
virtual const casacore::IPosition dataShape() const =0
casacore::Bool zIndexConformed_
virtual void removeRefreshEventHandler(WCRefreshEH &refreshHandler)
virtual casacore::Bool sizeControl(WorldCanvasHolder &wcHolder, AttributeBuffer &holderBuf)=0
Set (coordinate) state of WCH's WC.
virtual void clearElementRestrictions(const casacore::uInt itemNum)
Class which stores WorldCanvas position event information.
virtual void notifyUnregister(WorldCanvasHolder &wcHolder, casacore::Bool ignoreRefresh=false)
ignoreRefresh tells the DD not to refresh just to clean up DMs
virtual casacore::Bool getDelTmpData()
Get and set method for the flag.
Describes a method of generating a table of colors.
virtual void removeColormap()
void operator=(const DisplayData &other)
(Required) copy assignment.
casacore::Bool delTmpData_
Flag indicating that temporary data should be removed when deleting the object.
A holder to interface between DisplayDatas and a WorldCanvas.
Implementation of drawing in world coordinates on top of a PixelCanvas.
virtual void setDisplayDataGreen(DisplayData *)
virtual void cleanup()=0
clean up the memory used by this DisplayData
std::list< WCRefreshEH * > itsRefreshEHList
virtual Display::DisplayDataType classType()=0
Return the DisplayData type; used by the WorldCanvasHolder to determine the order of drawing...
virtual casacore::Bool conformsToZIndex(const WorldCanvas &wc)
Determine whether DD is compatible with the current canvas animation (zIndex) position.
virtual void addDisplayEventHandler(DisplayEH *displayHandler)
virtual void removeElementRestriction(const casacore::uInt itemNum, const casacore::String &name)
String: the storage and methods of handling collections of characters.
virtual casacore::Bool zIndexHint(casacore::Int &) const
Will be called just before registering the [GTk]DD on a [GTk]PanelDisplay which has none registered o...
casacore::Int activeZIndex_
Indicates the 'current' animation frame, i.e.
virtual casacore::Bool conformsToRstrs(const WorldCanvas &wc)
Determine whether DD restrictions are in conformance with restrictions on the given WCH...
Base class for handling WorldCanvas position events.
void setAttribute(Attribute &at)
set an Attribute or Attributes
virtual casacore::Record getOptions(bool scrub=false) const
retrieve the current and default options and parameter types.
Base class for display objects.
static const casacore::String DATA_MIN
virtual const std::list< WCRefreshEH * > * refreshEventHandlerList()
virtual casacore::Bool worldToLin(casacore::Vector< casacore::Double > &lin, const casacore::Vector< casacore::Double > &world)=0
casacore::Bool getAttributeValue(const casacore::String &name, casacore::uInt &newValue)
User interface to get value from the attribute buffer.
virtual casacore::Int activeZIndex(const WorldCanvas *wc=0)
Retrieve 'Active' zIndex.
virtual casacore::Bool setActiveZIndex_(casacore::Int zindex)
DDs may override to adjust the internal stored current animation index (activeZIndex_) if necessary...
std::list< WCMotionEH * > itsMotionEHList
virtual casacore::Bool conformsTo(const WorldCanvas *wCanvas)
Check whether the DD is is compatible with all WC[H] state, including its coordinate state...
virtual void removeMotionEventHandler(WCMotionEH &motionHandler)
virtual casacore::Bool existRestriction(const casacore::String &name)
Check if a general restriction or a restriction for item itemNum with name name exists.
virtual casacore::Vector< casacore::String > worldAxisNames() const =0
Some routines that give info on the axes names, units etc.
virtual void delTmpData(casacore::String &tmpData)
Delete temporary data.
virtual void positionEH(const WCPositionEvent &ev)
Position, motion and refresh event handlers that will generally be called by a WorldCanvasHolder.
casacore::Bool conformed()
Returns result of last call to conformsTo(WCH&).
const AttributeBuffer * restrictionBuffer() const
Return the buffer of restrictions installed on this WorldCanvas.
casacore::Bool csConformed_
virtual void removeDisplayEventHandler(DisplayEH &displayHandler)
virtual void setDisplayDataBlue(DisplayData *)
virtual casacore::Bool conformsTo(const WorldCanvas &wc)
virtual void addMotionEventHandler(WCMotionEH *motionHandler)
casacore::Bool getValue(const casacore::String &name, casacore::Vector< T > &value) const
Get tha value of the named Attribute.
virtual void setDisplayState(DisplayState s)
virtual ImageAnalysis * imageanalysis() const
Get image analyis about images...
AttValue::ValueType attributeType(casacore::String &name)
Get the type of the Attribute.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.