casa
5.7.0-16
|
Implementation of drawing in world coordinates on top of a PixelCanvas. More...
#include <WorldCanvas.h>
Classes | |
struct | ColorIndexedImage_ |
ColorIndexedImage_ stores the state of a WorldCanvas::drawImage() rendering after the chosen data plane has been resampled to screen (Pixelcanvas) pixels and scaled to indices within a fixed-size Colormap, but prior to mapping to actual colors for display. More... | |
Public Member Functions | |
WorldCanvas (PixelCanvas *pc, casacore::Double xOrigin=0.0, casacore::Double yOrigin=0.0, casacore::Double xSize=1.0, casacore::Double ySize=1.0) | |
Construct a WorldCanvas on the given PixelCanvas, at the given origin (in fractions of the PixelCanvas extent), and having the given size (in the same units). More... | |
virtual | ~WorldCanvas () |
Destructor. More... | |
PixelCanvas * | pixelCanvas () const |
Return a pointer to the PixelCanvas on which this WorldCanvas is installed. More... | |
void | addRefreshEventHandler (DisplayEH &eh) |
Add the given refresh, motion and position event handlers to the WorldCanvas. More... | |
void | addMotionEventHandler (WCMotionEH &eh) |
void | addPositionEventHandler (WCPositionEH &eh) |
void | removeRefreshEventHandler (const DisplayEH &eh) |
Remove the given refresh, motion and position event handlers from the WorldCanvas. More... | |
void | removeMotionEventHandler (const WCMotionEH &eh) |
void | removePositionEventHandler (const WCPositionEH &eh) |
void | callMotionEventHandlers (const WCMotionEvent &ev) |
Call all of the motion and position event handlers that are installed on the WorldCanvas. More... | |
void | callPositionEventHandlers (const WCPositionEvent &ev) |
virtual void | handleEvent (DisplayEvent &ev) |
Handle other, generic types of events. More... | |
void | operator() (const PCRefreshEvent &pev) |
Handle implicit refresh, motion and position events occuring on the PixelCanvas on which this WorldCanvas is installed. More... | |
void | operator() (const PCMotionEvent &pev) |
Default just prints the event to cout. More... | |
void | operator() (const PCPositionEvent &pev) |
Default just prints the event to cout. More... | |
void | refresh (const Display::RefreshReason &reason=Display::UserCommand, const casacore::Bool &explicitrequest=true) |
Refresh the WorldCanvas for the given reason. More... | |
casacore::Bool | refreshAllowed () |
Is a refresh currently allowed? More... | |
void | hold () |
Hold and release response to refreshes requested with the refresh() member function. More... | |
void | release () |
void | setCoordinateHandler (WCCoordinateHandler *ch) |
Set casacore::Coordinate, SizeControl, Resample and DataScale handlers for the WorldCanvas. More... | |
void | setSizeControlHandler (WCSizeControlHandler *sh) |
void | setResampleHandler (WCResampleHandler *rh) |
void | setDataScaleHandler (WCDataScaleHandler *sh) |
void | setWorldCanvasPosition (casacore::Double fracXOffset, casacore::Double fracYOffset, casacore::Double fracXSize, casacore::Double fracYSize) |
Set the location of the WorldCanvas on its PixelCanvas. More... | |
casacore::Bool | pixToLin (casacore::Vector< casacore::Double > &lin, const casacore::Vector< casacore::Double > &pix) |
Pixel, linear and world coordinate transformation functions. More... | |
casacore::Bool | pixToLin (casacore::Matrix< casacore::Double > &lin, casacore::Vector< casacore::Bool > &failures, const casacore::Matrix< casacore::Double > &pix) |
casacore::Bool | linToPix (casacore::Vector< casacore::Double > &pix, const casacore::Vector< casacore::Double > &lin) |
casacore::Bool | linToPix (casacore::Matrix< casacore::Double > &pix, casacore::Vector< casacore::Bool > &failures, const casacore::Matrix< casacore::Double > &lin) |
casacore::Bool | linToWorld (casacore::Vector< casacore::Double > &world, const casacore::Vector< casacore::Double > &lin) |
casacore::Bool | linToWorld (casacore::Matrix< casacore::Double > &world, casacore::Vector< casacore::Bool > &failures, const casacore::Matrix< casacore::Double > &lin) |
casacore::Bool | worldToLin (casacore::Vector< casacore::Double > &lin, const casacore::Vector< casacore::Double > &world) |
casacore::Bool | worldToLin (casacore::Matrix< casacore::Double > &lin, casacore::Vector< casacore::Bool > &failures, const casacore::Matrix< casacore::Double > &world) |
casacore::Bool | pixToWorld (casacore::Vector< casacore::Double > &world, const casacore::Vector< casacore::Double > &pix) |
casacore::Bool | pixToWorld (casacore::Matrix< casacore::Double > &world, casacore::Vector< casacore::Bool > &failures, const casacore::Matrix< casacore::Double > &pix) |
casacore::Bool | worldToPix (casacore::Vector< casacore::Double > &pix, const casacore::Vector< casacore::Double > &world) |
casacore::Bool | worldToPix (casacore::Matrix< casacore::Double > &pix, casacore::Vector< casacore::Bool > &failures, const casacore::Matrix< casacore::Double > &world) |
void | registerColormap (Colormap *cmap, casacore::Float weight=1.0) |
Register/unregister a Colormap on the PixelCanvas. More... | |
void | registerColormap (Colormap *cmap, Colormap *cmapToReplace) |
void | unregisterColormap (Colormap *cmap) |
void | setColormap (Colormap *cmap) |
Set and retrieve the current Colormap on the PixelCanvas. More... | |
Colormap * | colormap () const |
casacore::uInt | newList () |
Display list support functions. More... | |
void | endList () |
void | drawList (casacore::uInt list) |
void | deleteList (casacore::uInt list) |
void | deleteLists () |
casacore::Bool | validList (casacore::uInt list) |
void | setColor (const casacore::String &color) |
Set various graphics attributes. More... | |
void | setClearColor (const casacore::String &color) |
casacore::Bool | setFont (const casacore::String &fontName) |
void | setForeground (casacore::uLong color) |
void | setBackground (casacore::uLong color) |
void | setLineWidth (casacore::Float width) |
void | setLineStyle (Display::LineStyle style) |
void | setCapStyle (Display::CapStyle style) |
void | setJoinStyle (Display::JoinStyle style) |
void | setFillStyle (Display::FillStyle style) |
void | setFillRule (Display::FillRule rule) |
void | setArcMode (Display::ArcMode mode) |
casacore::Bool | setWorldBackgroundColor (const casacore::String color) |
Set/retrieve the background and foreground colors of the WorldCanvas. More... | |
casacore::Bool | setWorldForegroundColor (const casacore::String color) |
casacore::String | getWorldBackgroundColor () |
casacore::String | getWorldForegroundColor () |
virtual void | setDrawBuffer (Display::DrawBuffer buf) |
Set/retrieve the drawing buffer, the target destination for graphics. More... | |
Display::DrawBuffer | drawBuffer () const |
void | setImageCacheStrategy (Display::ImageCacheStrategy strategy) |
Set/retrieve the caching strategy on the PixelCanvas. More... | |
Display::ImageCacheStrategy | imageCacheStrategy () const |
void | clear () |
Clear the WorldCanvas, or just the area on the WorldCanvas but outside the drawing area, ie. More... | |
void | clearNonDrawArea () |
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... | |
void | setAttribute (Attribute &at) |
Set an Attribute or Attributes on the WorldCanvas. More... | |
void | setAttributes (AttributeBuffer &at) |
void | removeAttribute (casacore::String &name) |
Remove an Attribute. More... | |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::uInt &newValue) const |
User interface to get individual values from the attribute buffer. More... | |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Int &newValue) const |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Float &newValue) const |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Double &newValue) const |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Bool &newValue) const |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::String &newValue) const |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::uInt > &newValue) const |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Int > &newValue) const |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Float > &newValue) const |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Double > &newValue) const |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::Bool > &newValue) const |
casacore::Bool | getAttributeValue (const casacore::String &name, casacore::Vector< casacore::String > &newValue) const |
casacore::Bool | existsAttribute (casacore::String &name) const |
Check if a certain Attribute exists. More... | |
AttValue::ValueType | attributeType (casacore::String &name) const |
Get the type of an Attribute. More... | |
virtual void | acquirePGPLOTdevice (const casacore::Bool &linear=true) |
Position the PGPLOT filter on the WorldCanvas. More... | |
virtual void | releasePGPLOTdevice () |
virtual casacore::Int | pgid () const |
Return the PGPLOT device id for external use. More... | |
casacore::Bool | drawText (const casacore::Vector< casacore::Double > &point, const casacore::String &text, Display::TextAlign alignment=Display::AlignCenter, const casacore::Bool &linear=false) |
Draw unrotated text at the given position. More... | |
casacore::Bool | drawPoint (const casacore::Vector< casacore::Double > &point, const casacore::Bool &linear=false) |
Draw a single point using the current color. More... | |
casacore::Bool | drawLine (const casacore::Vector< casacore::Double > &a, const casacore::Vector< casacore::Double > &b, const casacore::Bool &linear=false) |
Draw a single line using the current color. More... | |
casacore::Bool | drawPoints (const casacore::Matrix< casacore::Double > &points, const casacore::Bool &linear=false) |
Draw a bunch of points using the current color. More... | |
casacore::Bool | drawPoints (const casacore::Vector< casacore::Float > &px, const casacore::Vector< casacore::Float > &py, casacore::Bool linear=false) |
Draw a set of points using the current color. More... | |
casacore::Bool | drawTextStrings (const casacore::Vector< casacore::Float > &px, const casacore::Vector< casacore::Float > &py, const casacore::Vector< casacore::String > &strings, const casacore::Float rotation=0.0, const casacore::Float xoffset=0.0, const casacore::Float yoffset=0.0, const casacore::Bool linear=false) |
Draw a set of text strings using the current color. More... | |
casacore::Bool | drawMarkers (const casacore::Vector< casacore::Float > &px, const casacore::Vector< casacore::Float > &py, const Display::Marker=Display::Cross, const casacore::Int size=5, const casacore::Bool &linear=false) |
Draw a set of markers using the current color and a given pixel size . More... | |
casacore::Bool | drawMappedMarkers (const casacore::Vector< casacore::Float > &px, const casacore::Vector< casacore::Float > &py, const casacore::Vector< casacore::Float > &values, const casacore::Int sizemin=1, const casacore::Int sizemax=20, const Display::Marker=Display::Cross, const casacore::Bool &linear=false) |
casacore::Bool | drawLines (const casacore::Matrix< casacore::Double > &vertices, const casacore::Bool &linear=false) |
Draw pairs of lines using the current color. More... | |
casacore::Bool | drawPolyline (const casacore::Matrix< casacore::Double > &vertices, const casacore::Bool &linear=false) |
Draw a polyline (connected line) between the vertices using the current color. More... | |
casacore::Bool | drawPolygon (const casacore::Matrix< casacore::Double > &vertices, const casacore::Bool &linear=false) |
Draw a polygon (closed line, or line loop using the points) using the current color. More... | |
casacore::Bool | drawColormappedPoints (const casacore::Matrix< casacore::Double > &points, const casacore::Vector< casacore::Float > &values, const casacore::Bool &linear=false) |
Draw a set of points in colors which are taken from the current Colormap. More... | |
casacore::Bool | drawColormappedEllipses (const casacore::Matrix< casacore::Double > ¢res, const casacore::Vector< casacore::Float > &smajor, const casacore::Vector< casacore::Float > &sminor, const casacore::Vector< casacore::Float > &pangle, const casacore::Vector< casacore::Float > &colors, const casacore::Float &scale=1.0, const casacore::Bool &outline=true, const casacore::Bool &linear=false) |
Draw a set of colored ellipses, possibly with outlines. More... | |
casacore::Bool | drawBeamEllipse (casacore::Float major, casacore::Float minor, casacore::Float pa, casacore::String majunit="arcsec", casacore::String minunit="arcsec", casacore::String paunit="deg", casacore::Float cx=.1f, casacore::Float cy=.1f, casacore::Bool outline=true) |
This routine is specialized for drawing image restoring-beam ellipses. More... | |
bool | drawContourMap (const casacore::Vector< casacore::Double > &blPos, const casacore::Vector< casacore::Double > &trPos, const casacore::Matrix< casacore::Float > &data, const casacore::Vector< casacore::Float > &levels, const casacore::Bool usePixelEdges=false) |
Draw a contour map at the specified levels, and place the lower left pixel at blPos, and the upper right pixel at trPos. More... | |
bool | drawContourMap (const casacore::Vector< casacore::Double > &blPos, const casacore::Vector< casacore::Double > &trPos, const casacore::Matrix< casacore::Complex > &data, const casacore::Vector< casacore::Float > &levels, const casacore::Bool usePixelEdges=false) |
bool | drawContourMap (const casacore::Vector< casacore::Double > &blPos, const casacore::Vector< casacore::Double > &trPos, const casacore::Matrix< casacore::Float > &data, const casacore::Matrix< casacore::Bool > &mask, const casacore::Vector< casacore::Float > &levels, const casacore::Bool usePixelEdges=false) |
Draw a contour map at the specified levels, and place the lower left pixel at blPos, and the upper right pixel at trPos. More... | |
bool | drawContourMap (const casacore::Vector< casacore::Double > &blPos, const casacore::Vector< casacore::Double > &trPos, const casacore::Matrix< casacore::Complex > &data, const casacore::Matrix< casacore::Bool > &mask, const casacore::Vector< casacore::Float > &levels, const casacore::Bool usePixelEdges=false) |
casacore::Bool | redrawIndexedImage (void *drawObj, Display::RefreshReason reason, casacore::Bool opaqueMask=false) |
Optimization to speed up colormap fiddling in 24bit mode (software Colormap); see images_, below for usage. More... | |
casacore::Bool | removeIndexedImage (void *drawObj) |
Remove image from the colormap change cache, if any (see images_, below). More... | |
void | clearColormapChangeCache () |
Clear the whole colormap change cache (see images_, below). More... | |
void | drawImage (const casacore::Vector< casacore::Double > &blPos, const casacore::Vector< casacore::Double > &trPos, const casacore::Matrix< casacore::Float > &data, const casacore::Bool usePixelEdges=false, void *drawObj=0) |
Draw an image, mapping data values to Colormap entries, and place the lower left pixel at blPos, and the upper right pixel at trPos. More... | |
void | drawImage (const casacore::Vector< casacore::Double > &blPos, const casacore::Vector< casacore::Double > &trPos, const casacore::Matrix< casacore::Complex > &data, const casacore::Bool usePixelEdges=false, void *drawObj=0) |
void | drawImage (const casacore::Vector< casacore::Double > &blc, const casacore::Vector< casacore::Double > &trc, const casacore::Matrix< casacore::Float > &data, const casacore::Matrix< casacore::Float > &dataRed, const casacore::Matrix< casacore::Float > &dataGreen, const casacore::Matrix< casacore::Float > &dataBlue, const casacore::Bool usePixelEdges, void *drawObj=0) |
void | drawImage (const casacore::Vector< casacore::Double > &blc, const casacore::Vector< casacore::Double > &trc, const casacore::Matrix< casacore::Complex > &data, const casacore::Matrix< casacore::Complex > &dataRed, const casacore::Matrix< casacore::Complex > &dataGreen, const casacore::Matrix< casacore::Complex > &dataBlue, const casacore::Bool usePixelEdges, void *drawObj=0) |
void | drawImage (const casacore::Vector< casacore::Double > &blPos, const casacore::Vector< casacore::Double > &trPos, const casacore::Matrix< casacore::Float > &data, const casacore::Matrix< casacore::Bool > &mask, const casacore::Bool usePixelEdges=false, void *drawObj=0, casacore::Bool opaqueMask=false) |
Draw an image, mapping data values to Colormap entries, and place the lower left pixel at blPos, and the upper right pixel at trPos. More... | |
void | drawImage (const casacore::Vector< casacore::Double > &blPos, const casacore::Vector< casacore::Double > &trPos, const casacore::Matrix< casacore::Complex > &data, const casacore::Matrix< casacore::Bool > &mask, const casacore::Bool usePixelEdges=false, void *drawObj=0, casacore::Bool opaqueMask=false) |
void | drawImage (const casacore::Vector< casacore::Double > &blPos, const casacore::Vector< casacore::Double > &trPos, const casacore::Matrix< casacore::Float > &data, const Display::ColorComponent &colorcomponent, const casacore::Bool usePixelEdges=false) |
Draw a component of a multi-channel image, mapping data values to component levels, and place the lower left pixel at blPos, and the upper right pixel at trPos. More... | |
void | drawImage (const casacore::Vector< casacore::Double > &blPos, const casacore::Vector< casacore::Double > &trPos, const casacore::Matrix< casacore::Complex > &data, const Display::ColorComponent &colorcomponent, const casacore::Bool usePixelEdges=false) |
bool | drawVectorMap (const casacore::Vector< casacore::Double > &blc, const casacore::Vector< casacore::Double > &trc, const casacore::Matrix< casacore::Complex > &data, const casacore::Matrix< casacore::Bool > &mask, casacore::Float angleConversionFactor, casacore::Float phasePolarity, casacore::Bool debias, casacore::Float variance, casacore::Int xPixelInc, casacore::Int yPixelInc, casacore::Float scale, casacore::Bool arrow, casacore::Float barb, casacore::Float rotation, casacore::Double xWorldInc, casacore::Double yWorldInc, const casacore::Bool usePixelEdges) |
Draw a vector map. More... | |
bool | drawVectorMap (const casacore::Vector< casacore::Double > &blc, const casacore::Vector< casacore::Double > &trc, const casacore::Matrix< casacore::Float > &data, const casacore::Matrix< casacore::Bool > &mask, casacore::Float angleConversionFactor, casacore::Float phasePolarity, casacore::Bool debias, casacore::Float variance, casacore::Int xPixelInc, casacore::Int yPixelInc, casacore::Float scale, casacore::Bool arrow, casacore::Float barb, casacore::Float rotation, casacore::Double xWorldInc, casacore::Double yWorldInc, const casacore::Bool usePixelEdges) |
bool | drawMarkerMap (const casacore::Vector< casacore::Double > &blc, const casacore::Vector< casacore::Double > &trc, const casacore::Matrix< casacore::Float > &data, const casacore::Matrix< casacore::Bool > &mask, casacore::Int xPixelInc, casacore::Int yPixelInc, casacore::Float scale, casacore::Double xWorldInc, casacore::Double yWorldInc, const casacore::String &markeType, casacore::Bool usePixelEdges) |
Draw marker maps. More... | |
bool | drawMarkerMap (const casacore::Vector< casacore::Double > &blc, const casacore::Vector< casacore::Double > &trc, const casacore::Matrix< casacore::Complex > &data, const casacore::Matrix< casacore::Bool > &mask, casacore::Int xPixelInc, casacore::Int yPixelInc, casacore::Float scale, casacore::Double xWorldInc, casacore::Double yWorldInc, const casacore::String &markerType, casacore::Bool usePixelEdges) |
void | flushComponentImages () |
Flush the component images, ie. More... | |
void | copyBackBufferToFrontBuffer () |
Buffer memory exchanges which operate only on the area of the WorldCanvas. More... | |
void | copyFrontBufferToBackBuffer () |
void | swapBuffers () |
casacore::Double | linXMin () const |
Provide information on the extents of the linear coordinate system. More... | |
casacore::Double | linYMin () const |
casacore::Double | linXMax () const |
casacore::Double | linYMax () const |
casacore::Double | linXMinLimit () const |
Provide information on the limits of the linear coordinate system. More... | |
casacore::Double | linYMinLimit () const |
casacore::Double | linXMaxLimit () const |
casacore::Double | linYMaxLimit () const |
casacore::uInt | canvasXOffset () const |
Provide information on the WorldCanvas offset and size. More... | |
casacore::uInt | canvasYOffset () const |
casacore::uInt | canvasXSize () const |
casacore::uInt | canvasYSize () const |
casacore::uInt | canvasDrawXOffset () const |
Provide information on the WorldCanvas drawable offset and size. More... | |
casacore::uInt | canvasDrawYOffset () const |
casacore::uInt | canvasDrawXSize () const |
casacore::uInt | canvasDrawYSize () const |
void | setZoomRectangleLCS (const casacore::Vector< casacore::Double > &min, const casacore::Vector< casacore::Double > &max) |
Set the zoom rectangle to the specfied linear coordinate range. More... | |
void | moveZoomRectangleLCS (double dx, double dy) |
Move the zoom rectangle across the screen, ie. More... | |
void | resetZoomRectangle () |
Reset the zoom to show the entire allowable range of the linear coordinate system. More... | |
void | setLinearCoordinateSystem (const casacore::Vector< casacore::Double > &blc, const casacore::Vector< casacore::Double > &trc, casacore::Bool resetZoom=true) |
Set the allowable range of the linear coordinate system. More... | |
casacore::Double | dataMin () const |
Functions to set and retrieve the minimum and maximum data values for scaling data that is drawn on the WorldCanvas. More... | |
void | setDataMin (casacore::Double min) |
casacore::Double | dataMax () const |
void | setDataMax (casacore::Double max) |
void | setDataMinMax (casacore::Double min, casacore::Double max) |
Display::ComplexToRealMethod | complexToRealMethod () const |
ComplexToRealMethod defines which real component of a Complex image to extract when it is necessary to convert casacore::Complex data into real data. More... | |
void | setComplexToRealMethod (const Display::ComplexToRealMethod method) |
void | setCoordinateSystem (const DisplayCoordinateSystem &csys) |
Set and retrieve the DisplayCoordinateSystem of this WorldCanvas. More... | |
const DisplayCoordinateSystem & | coordinateSystem () const |
casacore::Bool | hasCS () const |
casacore::Bool | inDrawArea (casacore::Int x, casacore::Int y) const |
Convenience functions returning whether a pixel coordinate is within bounds of the WC's inner draw area, the WC, or the underlying PC. More... | |
casacore::Bool | inWC (casacore::Int x, casacore::Int y) const |
casacore::Bool | inPC (casacore::Int x, casacore::Int y) |
void | setRestriction (const Attribute &restriction) |
Install a single restriction, or a buffer of restrictions, on the WorldCanvas which DisplayData must match in order that they be allowed to draw themselves. More... | |
void | setRestrictions (const AttributeBuffer &resBuff) |
casacore::Bool | existRestriction (const casacore::String &name) const |
Check if a named restriction exists. More... | |
void | removeRestriction (const casacore::String &restrictionName) |
Remove the named restriction, or all restrictions, from the WorldCanvas. More... | |
void | removeRestrictions () |
casacore::Bool | matchesRestriction (const Attribute &restriction) const |
Determine whether the restrictions installed on the WorldCanvas match the given restriction or buffer of restrictions. More... | |
casacore::Bool | matchesRestrictions (const AttributeBuffer &buffer) const |
const AttributeBuffer * | restrictionBuffer () const |
Return the buffer of restrictions installed on this WorldCanvas. More... | |
int | zIndex () const |
convienience function based on "restriction buffer"... More... | |
const DisplayData * | csMaster () const |
The DD in charge of setting WC coordinate state (0 if none). More... | |
DisplayData *& | csMaster () |
casacore::Bool | isCSmaster (const DisplayData *dd) const |
Is the specified DisplayData the one in charge of WC state? (During DD::sizeControl() execution, it means instead that the DD has permission to become CSmaster, if it can). More... | |
bool | removeDD (const DisplayData *dd) |
virtual casacore::Vector < casacore::String > | worldAxisNames () const |
Return the names and units of the world coordinate axes. More... | |
virtual casacore::Vector < casacore::String > | worldAxisUnits () const |
const std::list< DisplayData * > & | displaylist () const |
std::string | errorMessage () const |
Public Member Functions inherited from casa::PCRefreshEH | |
PCRefreshEH () | |
Default Constructor Required. More... | |
PCRefreshEH (const PCRefreshEH &other) | |
virtual | ~PCRefreshEH () |
Destructor. More... | |
Public Member Functions inherited from casa::PCMotionEH | |
PCMotionEH () | |
Default Constructor Required. More... | |
virtual | ~PCMotionEH () |
Destructor. More... | |
Public Member Functions inherited from casa::PCPositionEH | |
PCPositionEH () | |
Default Constructor Required. More... | |
virtual | ~PCPositionEH () |
Destructor. More... | |
Public Member Functions inherited from casa::DisplayEH | |
virtual | ~DisplayEH () |
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... | |
Static Public Attributes | |
static const casacore::String | LEFT_MARGIN_SPACE_PG |
static const casacore::String | RIGHT_MARGIN_SPACE_PG |
static const casacore::String | BOTTOM_MARGIN_SPACE_PG |
static const casacore::String | TOP_MARGIN_SPACE_PG |
Additional Inherited Members | |
Protected Member Functions inherited from casa::DisplayOptions | |
DisplayOptions (const DisplayOptions &other) | |
(Required) copy constructor. More... | |
void | operator= (const DisplayOptions &other) |
(Required) copy assignment. More... | |
Implementation of drawing in world coordinates on top of a PixelCanvas.
WorldCanvas is a canvas on which primitives specified in world coordinates are drawn.
The world canvas manages a portion of a PixelCanvas and provides mechanisms to allow the user to draw images and vectors in world coordinates. The position of the WorldCanvas may be dynamically changed.
The WorldCanvas vector graphics commands assume world coordinates are specified and use a registered coordinate handler to map those coordinates via a linear system to pixel coordinates. The pixel coordinates are then sent on to the PixelCanvas where they are plotted.
Images are drawn by sending a casacore::Matrix and specifying the world-coordinate location of the center of the lower-left pixel. If the dataMin and dataMax values have been set, they will be used to scale the data, otherwise the min and max will be scanned.
Customizable tools associated with the WorldCanvas available to assist with various aspects of display.
The interface for these tools are implemented as abstract base classes, and the tools are implemented by deriving from these classes and overriding the functions contained therein.
The WorldCanvas provides an interface to the PixelCanvas caching mechanism. Clever use of caching and parsing of the reason field of a WCRefreshEvent can reduce unnecessary recomputation needed for refreshing the screen.
The WorldCanvas maintains a set of Attribute s which the user can set on the WorldCanvas. An Attribute is a combination of a name and a value, the value can be of type casacore::uInt, casacore::Int, casacore::Float, casacore::Double, casacore::Bool and casacore::String, and Vectors of these. These Attributes serve two purposes: 1) to allow to place (using the member functions setAttribute
and setAttributes
) more or less arbitrary information on the WorldCanvas that other classes can read from the WorldCanvas. Since the name of an Attribute can be defined at run time, any name can be used (i.e. there is no pre-defined set of names that can only be used), and 2) to have a generic interface to some of the internal variables of the WorldCanvas. Some internal variabels can be set/read with their own interface routine (e.g. linXMin and friends using setZoomRectangleLCS), but they can also be modified/read using the Attribute interface (using getAttributeValue). The use of e.g. SetZoomRectangleLCS() and setAttribute() is equivalent. See AttributeBuffer for more details. The following Attributes (and their types) are pre-defined on the WorldCanvas and can be accessed using the Attribute interface (note: these Attributes cannot be deleted using removeAttribute()):
The WorldCanvas knows three coordinate systems.
Wanted a world-coordinate plotting canvas
See the test programs in Display/test
Definition at line 204 of file WorldCanvas.h.
casa::WorldCanvas::WorldCanvas | ( | PixelCanvas * | pc, |
casacore::Double | xOrigin = 0.0 , |
||
casacore::Double | yOrigin = 0.0 , |
||
casacore::Double | xSize = 1.0 , |
||
casacore::Double | ySize = 1.0 |
||
) |
Construct a WorldCanvas on the given PixelCanvas, at the given origin (in fractions of the PixelCanvas extent), and having the given size (in the same units).
|
virtual |
Destructor.
|
virtual |
Position the PGPLOT filter on the WorldCanvas.
If linear is specified false, then the alignment is done by world coordinates, assuming that a linear approximation is valid. void verifyPGFilterAlignment(const casacore::Bool &linear = true);
Acquire and release a PGPLOT device for this WorldCanvas. This is necessary since PGPLOT generally only supports 8 currently active devices. So refresh cycles on the WorldCanvas acquire a PGPLOT device at the start, and release it at the end. Cycles are counted so that external user-classes can call these functions if necessary in a nested state. If linear
is specified as false
, then the PGPLOT device is aligned by world coordinates, under the assumption that a linear approximation is valid, that is, the curvature is small.
void casa::WorldCanvas::addMotionEventHandler | ( | WCMotionEH & | eh | ) |
void casa::WorldCanvas::addPositionEventHandler | ( | WCPositionEH & | eh | ) |
void casa::WorldCanvas::addRefreshEventHandler | ( | DisplayEH & | eh | ) |
Add the given refresh, motion and position event handlers to the WorldCanvas.
AttValue::ValueType casa::WorldCanvas::attributeType | ( | casacore::String & | name | ) | const |
Get the type of an Attribute.
void casa::WorldCanvas::callMotionEventHandlers | ( | const WCMotionEvent & | ev | ) |
Call all of the motion and position event handlers that are installed on the WorldCanvas.
void casa::WorldCanvas::callPositionEventHandlers | ( | const WCPositionEvent & | ev | ) |
|
private |
Call all registered refresh handlers (public method is refresh()).
|
inline |
Provide information on the WorldCanvas drawable offset and size.
Definition at line 914 of file WorldCanvas.h.
References itsCanvasDrawXOffset.
|
inline |
Definition at line 920 of file WorldCanvas.h.
References itsCanvasDrawXSize.
|
inline |
Definition at line 917 of file WorldCanvas.h.
References itsCanvasDrawYOffset.
|
inline |
Definition at line 923 of file WorldCanvas.h.
References itsCanvasDrawYSize.
|
inline |
Provide information on the WorldCanvas offset and size.
Definition at line 898 of file WorldCanvas.h.
References itsCanvasXOffset.
|
inline |
Definition at line 904 of file WorldCanvas.h.
References itsCanvasXSize.
|
inline |
Definition at line 901 of file WorldCanvas.h.
References itsCanvasYOffset.
|
inline |
Definition at line 907 of file WorldCanvas.h.
References itsCanvasYSize.
|
private |
Convert the given coordinate/s to pixel coordinates.
If linear
is true
, then the input coordinates are linear world coordinates, otherwise they are true world coordinates. This version applies clipping, so that any points in the series which lie outside the linear coordinate range of the WorldCanvas are discarded. Thus the output Vectors can be shorter than the input Vectors. A mask indicating which of the input points were valid is returned for user reference.
|
private |
Convert the given coordinate/s to pixel coordinates.
If linear is true, then the given coordinates are in linear world coordinates, otherwise they are real world coordinates. A return value of false indicates the conversion failed.
|
private |
|
private |
void casa::WorldCanvas::clear | ( | ) |
Clear the WorldCanvas, or just the area on the WorldCanvas but outside the drawing area, ie.
the margins that are normally reserved for axis labels and the like.
void casa::WorldCanvas::clearColormapChangeCache | ( | ) |
Clear the whole colormap change cache (see images_, below).
void casa::WorldCanvas::clearNonDrawArea | ( | ) |
Colormap* casa::WorldCanvas::colormap | ( | ) | const |
|
inline |
ComplexToRealMethod defines which real component of a Complex image to extract when it is necessary to convert casacore::Complex data into real data.
Definition at line 971 of file WorldCanvas.h.
References itsComplexToRealMethod.
const DisplayCoordinateSystem& casa::WorldCanvas::coordinateSystem | ( | ) | const |
Referenced by casa::RSUtils::hasDirectionCoordinate(), and casa::RSUtils::worldSystem().
void casa::WorldCanvas::copyBackBufferToFrontBuffer | ( | ) |
Buffer memory exchanges which operate only on the area of the WorldCanvas.
(Not cacheable yet.)
void casa::WorldCanvas::copyFrontBufferToBackBuffer | ( | ) |
|
inline |
The DD in charge of setting WC coordinate state (0 if none).
Definition at line 1052 of file WorldCanvas.h.
References itsCSmaster.
Referenced by casa::WorldCanvasHolder::csMaster(), isCSmaster(), and removeDD().
|
inline |
Definition at line 1055 of file WorldCanvas.h.
References itsCSmaster.
|
private |
Support for construction.
|
inline |
Definition at line 955 of file WorldCanvas.h.
References itsDataMax.
|
inline |
Functions to set and retrieve the minimum and maximum data values for scaling data that is drawn on the WorldCanvas.
These values are forwarded to the scale handler, when, for example, images are drawn.
Definition at line 949 of file WorldCanvas.h.
References itsDataMin.
void casa::WorldCanvas::deleteList | ( | casacore::uInt | list | ) |
void casa::WorldCanvas::deleteLists | ( | ) |
const std::list<DisplayData*>& casa::WorldCanvas::displaylist | ( | ) | const |
casacore::Bool casa::WorldCanvas::drawBeamEllipse | ( | casacore::Float | major, |
casacore::Float | minor, | ||
casacore::Float | pa, | ||
casacore::String | majunit = "arcsec" , |
||
casacore::String | minunit = "arcsec" , |
||
casacore::String | paunit = "deg" , |
||
casacore::Float | cx = .1f , |
||
casacore::Float | cy = .1f , |
||
casacore::Bool | outline = true |
||
) |
This routine is specialized for drawing image restoring-beam ellipses.
Its parameters are defined so as to require as little conversion as possible of restoring beam information as stored in an image header.
It does nothing unless the axes on display map to the two axes of a casacore::DirectionCoordinate within the WC CS (WorldCanvas::itsDisplayCoordinateSystem). Center location cx,cy is specified as a fraction of WC draw area: (0,0) is blc, (1,1) is trc; they default to (.1,.1).
The unit strings for major,minor are given in in majunit, minunit, and should be valid angular units (they default to "arcsec"). major/minor are the full major and minor axis sizes in terms of relative direction world coordinates.
pa specifies "position angle", in the angular units specified by paunit. pa uses the image header convention "North-to-East"; more precisely, 0 degrees aligns the major axis along increasing DirCoord(1) (commonly Dec), 90 degrees aligns it along increasing DirCoord(0) (commonly RA). (NB: increasing RA commonly means decreasing pixel/casacore::Lattice coordinates). In the common case, this means that pa increases counterclockwise from vertical. Note that this is not the pa convention in some other PixelCanvas/WorldCanvas drawEllipse() routines (where pa is always counterclockwise from horizontal).
Also note: this routine attempts to do the right thing in oddball cases such as displaying Dec on the horizontal axis (pa 0 would also be horizontal in that case), distorted ('flexible') aspect ratio (ellipse also distorted appropriately) or all-sky images in which the beam may be displayed in a canvas area where absolute world coordinates do not exist. It should even take care of uneven coordinate 'increments' (non-square image data pixels). (So far, it does not correctly handle non-identity transformation matrices in the casacore::DirectionCoordinate (e.g. rotated "North")– which I think is true in many other places as well... – for someone's to-do list (not mine, I hope)).
Display::DrawBuffer casa::WorldCanvas::drawBuffer | ( | ) | const |
casacore::Bool casa::WorldCanvas::drawColormappedEllipses | ( | const casacore::Matrix< casacore::Double > & | centres, |
const casacore::Vector< casacore::Float > & | smajor, | ||
const casacore::Vector< casacore::Float > & | sminor, | ||
const casacore::Vector< casacore::Float > & | pangle, | ||
const casacore::Vector< casacore::Float > & | colors, | ||
const casacore::Float & | scale = 1.0 , |
||
const casacore::Bool & | outline = true , |
||
const casacore::Bool & | linear = false |
||
) |
Draw a set of colored ellipses, possibly with outlines.
The x and y locations must given, along with semi-major and semi-minor axes, and position angle measured in degrees positive from the x axis in a counter-clockwise direction. The size of the ellipses is globally scaled by the scale factor, and if outline
is true
, then each ellipse will have an outline in the current pen color.
casacore::Bool casa::WorldCanvas::drawColormappedPoints | ( | const casacore::Matrix< casacore::Double > & | points, |
const casacore::Vector< casacore::Float > & | values, | ||
const casacore::Bool & | linear = false |
||
) |
Draw a set of points in colors which are taken from the current Colormap.
bool casa::WorldCanvas::drawContourMap | ( | const casacore::Vector< casacore::Double > & | blPos, |
const casacore::Vector< casacore::Double > & | trPos, | ||
const casacore::Matrix< casacore::Float > & | data, | ||
const casacore::Vector< casacore::Float > & | levels, | ||
const casacore::Bool | usePixelEdges = false |
||
) |
Draw a contour map at the specified levels, and place the lower left pixel at blPos, and the upper right pixel at trPos.
If usePixelEdges
is true, then the given world positions are the position of the blc and trc of the blc and trc pixels, otherwise they are the positions of the centres of the pixels. Note that the contours are not intrinsically drawn in world coordinates. For complex data, the conversion to real values is done according to the last call to setComplexToRealMethod. Returns true if OK, false if error...
bool casa::WorldCanvas::drawContourMap | ( | const casacore::Vector< casacore::Double > & | blPos, |
const casacore::Vector< casacore::Double > & | trPos, | ||
const casacore::Matrix< casacore::Complex > & | data, | ||
const casacore::Vector< casacore::Float > & | levels, | ||
const casacore::Bool | usePixelEdges = false |
||
) |
bool casa::WorldCanvas::drawContourMap | ( | const casacore::Vector< casacore::Double > & | blPos, |
const casacore::Vector< casacore::Double > & | trPos, | ||
const casacore::Matrix< casacore::Float > & | data, | ||
const casacore::Matrix< casacore::Bool > & | mask, | ||
const casacore::Vector< casacore::Float > & | levels, | ||
const casacore::Bool | usePixelEdges = false |
||
) |
Draw a contour map at the specified levels, and place the lower left pixel at blPos, and the upper right pixel at trPos.
If usePixelEdges
is true, then the given world positions are the position of the blc and trc of the blc and trc pixels, otherwise they are the positions of the centres of the pixels. Note that the contours are not intrinsically drawn in world coordinates. For complex data, the conversion to real values is done according to the last call to setComplexToRealMethod. These functions also have a mask
argument, which is a Boolean pixel mask whose shape must match that of data
, and only pixels in data
where corresponding pixels in mask
are true
will be contoured. Returns true if OK, false if error...
bool casa::WorldCanvas::drawContourMap | ( | const casacore::Vector< casacore::Double > & | blPos, |
const casacore::Vector< casacore::Double > & | trPos, | ||
const casacore::Matrix< casacore::Complex > & | data, | ||
const casacore::Matrix< casacore::Bool > & | mask, | ||
const casacore::Vector< casacore::Float > & | levels, | ||
const casacore::Bool | usePixelEdges = false |
||
) |
void casa::WorldCanvas::drawImage | ( | const casacore::Vector< casacore::Double > & | blPos, |
const casacore::Vector< casacore::Double > & | trPos, | ||
const casacore::Matrix< casacore::Float > & | data, | ||
const casacore::Bool | usePixelEdges = false , |
||
void * | drawObj = 0 |
||
) |
Draw an image, mapping data values to Colormap entries, and place the lower left pixel at blPos, and the upper right pixel at trPos.
If usePixelEdges
is true, then the given world positions are the position of the blc and trc of the blc and trc pixels, otherwise they are the positions of the centres of the pixels. See images_, below, for non-default usage of the drawObj parameter.
void casa::WorldCanvas::drawImage | ( | const casacore::Vector< casacore::Double > & | blPos, |
const casacore::Vector< casacore::Double > & | trPos, | ||
const casacore::Matrix< casacore::Complex > & | data, | ||
const casacore::Bool | usePixelEdges = false , |
||
void * | drawObj = 0 |
||
) |
void casa::WorldCanvas::drawImage | ( | const casacore::Vector< casacore::Double > & | blc, |
const casacore::Vector< casacore::Double > & | trc, | ||
const casacore::Matrix< casacore::Float > & | data, | ||
const casacore::Matrix< casacore::Float > & | dataRed, | ||
const casacore::Matrix< casacore::Float > & | dataGreen, | ||
const casacore::Matrix< casacore::Float > & | dataBlue, | ||
const casacore::Bool | usePixelEdges, | ||
void * | drawObj = 0 |
||
) |
void casa::WorldCanvas::drawImage | ( | const casacore::Vector< casacore::Double > & | blc, |
const casacore::Vector< casacore::Double > & | trc, | ||
const casacore::Matrix< casacore::Complex > & | data, | ||
const casacore::Matrix< casacore::Complex > & | dataRed, | ||
const casacore::Matrix< casacore::Complex > & | dataGreen, | ||
const casacore::Matrix< casacore::Complex > & | dataBlue, | ||
const casacore::Bool | usePixelEdges, | ||
void * | drawObj = 0 |
||
) |
void casa::WorldCanvas::drawImage | ( | const casacore::Vector< casacore::Double > & | blPos, |
const casacore::Vector< casacore::Double > & | trPos, | ||
const casacore::Matrix< casacore::Float > & | data, | ||
const casacore::Matrix< casacore::Bool > & | mask, | ||
const casacore::Bool | usePixelEdges = false , |
||
void * | drawObj = 0 , |
||
casacore::Bool | opaqueMask = false |
||
) |
Draw an image, mapping data values to Colormap entries, and place the lower left pixel at blPos, and the upper right pixel at trPos.
If usePixelEdges
is true, then the given world positions are the position of the blc and trc of the blc and trc pixels, otherwise they are the positions of the centres of the pixels. These functions also have a mask
argument, which is a Boolean pixel mask whose shape must match that of data
, and only pixels in data
where corresponding pixels in mask
are true
will be drawn. Set opaqueMask to true to draw masked pixels in the background color; otherwise they will be transparent (letting whatever was drawn previously at that point show through). See images_, below, for non-default usage of the drawObj parameter.
void casa::WorldCanvas::drawImage | ( | const casacore::Vector< casacore::Double > & | blPos, |
const casacore::Vector< casacore::Double > & | trPos, | ||
const casacore::Matrix< casacore::Complex > & | data, | ||
const casacore::Matrix< casacore::Bool > & | mask, | ||
const casacore::Bool | usePixelEdges = false , |
||
void * | drawObj = 0 , |
||
casacore::Bool | opaqueMask = false |
||
) |
void casa::WorldCanvas::drawImage | ( | const casacore::Vector< casacore::Double > & | blPos, |
const casacore::Vector< casacore::Double > & | trPos, | ||
const casacore::Matrix< casacore::Float > & | data, | ||
const Display::ColorComponent & | colorcomponent, | ||
const casacore::Bool | usePixelEdges = false |
||
) |
Draw a component of a multi-channel image, mapping data values to component levels, and place the lower left pixel at blPos, and the upper right pixel at trPos.
If usePixelEdges
is true, then the given world positions are the position of the blc and trc of the blc and trc pixels, otherwise they are the positions of the centres of the pixels. The components are not drawn until flushComponentImages() is called.
void casa::WorldCanvas::drawImage | ( | const casacore::Vector< casacore::Double > & | blPos, |
const casacore::Vector< casacore::Double > & | trPos, | ||
const casacore::Matrix< casacore::Complex > & | data, | ||
const Display::ColorComponent & | colorcomponent, | ||
const casacore::Bool | usePixelEdges = false |
||
) |
casacore::Bool casa::WorldCanvas::drawLine | ( | const casacore::Vector< casacore::Double > & | a, |
const casacore::Vector< casacore::Double > & | b, | ||
const casacore::Bool & | linear = false |
||
) |
Draw a single line using the current color.
If either of the conversions from world to pixel coordinates fail, then the line is not drawn, and false is returned. If linear is true, then the line endpoints are given in world canvas linear coordinates rather than real world coordinates.
casacore::Bool casa::WorldCanvas::drawLines | ( | const casacore::Matrix< casacore::Double > & | vertices, |
const casacore::Bool & | linear = false |
||
) |
Draw pairs of lines using the current color.
If any points fail to convert then the lines are not drawn and false is returned. If linear is true, then the vertices are given as linear world coordinates rather than true world coordinates.
void casa::WorldCanvas::drawList | ( | casacore::uInt | list | ) |
casacore::Bool casa::WorldCanvas::drawMappedMarkers | ( | const casacore::Vector< casacore::Float > & | px, |
const casacore::Vector< casacore::Float > & | py, | ||
const casacore::Vector< casacore::Float > & | values, | ||
const casacore::Int | sizemin = 1 , |
||
const casacore::Int | sizemax = 20 , |
||
const Display::Marker | = Display::Cross , |
||
const casacore::Bool & | linear = false |
||
) |
bool casa::WorldCanvas::drawMarkerMap | ( | const casacore::Vector< casacore::Double > & | blc, |
const casacore::Vector< casacore::Double > & | trc, | ||
const casacore::Matrix< casacore::Float > & | data, | ||
const casacore::Matrix< casacore::Bool > & | mask, | ||
casacore::Int | xPixelInc, | ||
casacore::Int | yPixelInc, | ||
casacore::Float | scale, | ||
casacore::Double | xWorldInc, | ||
casacore::Double | yWorldInc, | ||
const casacore::String & | markeType, | ||
casacore::Bool | usePixelEdges | ||
) |
Draw marker maps.
Only makerType "square" available presently. The marker holds its shape in screen pixel coordinates. This means a square is always a square regardless of aspect ratio Returns true if OK, false if error...
bool casa::WorldCanvas::drawMarkerMap | ( | const casacore::Vector< casacore::Double > & | blc, |
const casacore::Vector< casacore::Double > & | trc, | ||
const casacore::Matrix< casacore::Complex > & | data, | ||
const casacore::Matrix< casacore::Bool > & | mask, | ||
casacore::Int | xPixelInc, | ||
casacore::Int | yPixelInc, | ||
casacore::Float | scale, | ||
casacore::Double | xWorldInc, | ||
casacore::Double | yWorldInc, | ||
const casacore::String & | markerType, | ||
casacore::Bool | usePixelEdges | ||
) |
casacore::Bool casa::WorldCanvas::drawMarkers | ( | const casacore::Vector< casacore::Float > & | px, |
const casacore::Vector< casacore::Float > & | py, | ||
const Display::Marker | = Display::Cross , |
||
const casacore::Int | size = 5 , |
||
const casacore::Bool & | linear = false |
||
) |
Draw a set of markers using the current color and a given pixel size
.
If any points fail to convert, then those particular points are not marked. markertype
is an Display::Marker
. If linear is true, then the points are given in linear world canvas coordinates rather than true world coordinates.
casacore::Bool casa::WorldCanvas::drawPoint | ( | const casacore::Vector< casacore::Double > & | point, |
const casacore::Bool & | linear = false |
||
) |
Draw a single point using the current color.
If the conversion from world to pixel coordinates fails, the point is not drawn, and false is the return value. If linear is true, then the point position is given in linear world canvas coordinates, not true world coordinates.
casacore::Bool casa::WorldCanvas::drawPoints | ( | const casacore::Matrix< casacore::Double > & | points, |
const casacore::Bool & | linear = false |
||
) |
Draw a bunch of points using the current color.
If any points fail to convert then none of them are drawn, and false is returned. If linear is true, then the vertices are given in linear world canvas coordinates rather than real world coordinates.
casacore::Bool casa::WorldCanvas::drawPoints | ( | const casacore::Vector< casacore::Float > & | px, |
const casacore::Vector< casacore::Float > & | py, | ||
casacore::Bool | linear = false |
||
) |
Draw a set of points using the current color.
Those points which fail to convert, or lie outside the WorldCanvas drawing area, are not drawn.
casacore::Bool casa::WorldCanvas::drawPolygon | ( | const casacore::Matrix< casacore::Double > & | vertices, |
const casacore::Bool & | linear = false |
||
) |
Draw a polygon (closed line, or line loop using the points) using the current color.
If any coordinates fail to convert then the polygon is not drawn. The end point is implicitly connected to the start point. If linear is true, then the provided vertices are actually linear world coordinates.
casacore::Bool casa::WorldCanvas::drawPolyline | ( | const casacore::Matrix< casacore::Double > & | vertices, |
const casacore::Bool & | linear = false |
||
) |
Draw a polyline (connected line) between the vertices using the current color.
If any coordinates fail to convert from world to pixel, then the entire polyline is not drawn and false is returned. The end point is not implicitly connected to the starting point. If linear is true, then the provided vertices are actually linear world canvas coordinates.
casacore::Bool casa::WorldCanvas::drawText | ( | const casacore::Vector< casacore::Double > & | point, |
const casacore::String & | text, | ||
Display::TextAlign | alignment = Display::AlignCenter , |
||
const casacore::Bool & | linear = false |
||
) |
Draw unrotated text at the given position.
If the conversion from world to pixel coordinates fails, the text is not drawn, and false is returned. If linear is true, then the provided position is actually in linear world canvas coordinates, rather than true world coordinates.
casacore::Bool casa::WorldCanvas::drawTextStrings | ( | const casacore::Vector< casacore::Float > & | px, |
const casacore::Vector< casacore::Float > & | py, | ||
const casacore::Vector< casacore::String > & | strings, | ||
const casacore::Float | rotation = 0.0 , |
||
const casacore::Float | xoffset = 0.0 , |
||
const casacore::Float | yoffset = 0.0 , |
||
const casacore::Bool | linear = false |
||
) |
Draw a set of text strings using the current color.
If any points fail to convert, then those particular strings are not drawn. rotation
gives the rotation of the text in degrees counter-clockwise from horizontal. xoffset
and yoffset
can be given to globally shift the labels by the specified amounts (in units of the character height). If linear is true, then the vertices are given in linear world canvas coordinates rather than true world coordinates.
bool casa::WorldCanvas::drawVectorMap | ( | const casacore::Vector< casacore::Double > & | blc, |
const casacore::Vector< casacore::Double > & | trc, | ||
const casacore::Matrix< casacore::Complex > & | data, | ||
const casacore::Matrix< casacore::Bool > & | mask, | ||
casacore::Float | angleConversionFactor, | ||
casacore::Float | phasePolarity, | ||
casacore::Bool | debias, | ||
casacore::Float | variance, | ||
casacore::Int | xPixelInc, | ||
casacore::Int | yPixelInc, | ||
casacore::Float | scale, | ||
casacore::Bool | arrow, | ||
casacore::Float | barb, | ||
casacore::Float | rotation, | ||
casacore::Double | xWorldInc, | ||
casacore::Double | yWorldInc, | ||
const casacore::Bool | usePixelEdges | ||
) |
Draw a vector map.
bool casa::WorldCanvas::drawVectorMap | ( | const casacore::Vector< casacore::Double > & | blc, |
const casacore::Vector< casacore::Double > & | trc, | ||
const casacore::Matrix< casacore::Float > & | data, | ||
const casacore::Matrix< casacore::Bool > & | mask, | ||
casacore::Float | angleConversionFactor, | ||
casacore::Float | phasePolarity, | ||
casacore::Bool | debias, | ||
casacore::Float | variance, | ||
casacore::Int | xPixelInc, | ||
casacore::Int | yPixelInc, | ||
casacore::Float | scale, | ||
casacore::Bool | arrow, | ||
casacore::Float | barb, | ||
casacore::Float | rotation, | ||
casacore::Double | xWorldInc, | ||
casacore::Double | yWorldInc, | ||
const casacore::Bool | usePixelEdges | ||
) |
|
private |
Actually draw the vector field.
All pa * angleConversionFactor must be radians. rotation must be radians. if amp is of dimension 0, amplitude unity is assumed. if mask if dimension 0 all data are assumed good.
void casa::WorldCanvas::endList | ( | ) |
|
inline |
Definition at line 1085 of file WorldCanvas.h.
References error_string.
casacore::Bool casa::WorldCanvas::existRestriction | ( | const casacore::String & | name | ) | const |
Check if a named restriction exists.
Referenced by casa::WorldCanvasHolder::existRestriction().
casacore::Bool casa::WorldCanvas::existsAttribute | ( | casacore::String & | name | ) | const |
Check if a certain Attribute exists.
void casa::WorldCanvas::flushComponentImages | ( | ) |
Flush the component images, ie.
compose a single image from the buffered channel images and place it on the WorldCanvas. This effectively is passed on to the PixelCanvas where the component images are cached.
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::uInt & | newValue | ||
) | const |
User interface to get individual values from the attribute buffer.
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::Int & | newValue | ||
) | const |
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::Float & | newValue | ||
) | const |
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::Double & | newValue | ||
) | const |
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::Bool & | newValue | ||
) | const |
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::String & | newValue | ||
) | const |
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::Vector< casacore::uInt > & | newValue | ||
) | const |
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::Vector< casacore::Int > & | newValue | ||
) | const |
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::Vector< casacore::Float > & | newValue | ||
) | const |
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::Vector< casacore::Double > & | newValue | ||
) | const |
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::Vector< casacore::Bool > & | newValue | ||
) | const |
casacore::Bool casa::WorldCanvas::getAttributeValue | ( | const casacore::String & | name, |
casacore::Vector< casacore::String > & | newValue | ||
) | const |
|
private |
Retrieve an indexed image to write onto.
Used (exclusively) by WC::drawImage(). If one exists in the cache under this objId key, clear it for reuse; otherwise return a new one. If a (non-zero) objId was provided, it will be cached under that key; removeIndexedImage() can be used to remove such cached images explicitly, but the cache is also frequently cleared automatically. If no caching is requested, however, (objId=0), the caller must delete the image himself when finished – that type of call is equivalent to 'new ColorIndexedImage_'.
|
virtual |
Retrieve the current and default options and parameter types.
|
inline |
Definition at line 404 of file WorldCanvas.h.
References itsWorldBackgroundColor.
|
inline |
Definition at line 407 of file WorldCanvas.h.
References itsWorldForegroundColor.
|
virtual |
Handle other, generic types of events.
As with call*Handlers above, WC handles these new events by simply distributing them to event handlers registered on it. However, rather than create any more handler lists in WorldCanvas, generic event handlers (DisplayEHs) piggyback on the RefreshEHList. WorldCanvas is also a DisplayEH, and all DisplayEHs implement handling of these new events by overriding the (null) base class version of this method.
Reimplemented from casa::DisplayEH.
|
inline |
Definition at line 989 of file WorldCanvas.h.
References itsCoordinateSystem.
void casa::WorldCanvas::hold | ( | ) |
Hold and release response to refreshes requested with the refresh()
member function.
Multiple calls to hold()
can be made, and refreshes will not resume until the same number of calls have been made to release()
. Note that these functions do not affect whether internally (implicitly) generated refreshes continue to occur. That is, refresh events due to PixelCanvas resize events, or Colormap changes, for example, will continue to be acted upon.
Display::ImageCacheStrategy casa::WorldCanvas::imageCacheStrategy | ( | ) | const |
|
inline |
Convenience functions returning whether a pixel coordinate is within bounds of the WC's inner draw area, the WC, or the underlying PC.
Definition at line 998 of file WorldCanvas.h.
References itsCanvasDrawXOffset, itsCanvasDrawXSize, itsCanvasDrawYOffset, itsCanvasDrawYSize, itsCanvasXOffset, and itsCanvasYOffset.
casacore::Bool casa::WorldCanvas::inPC | ( | casacore::Int | x, |
casacore::Int | y | ||
) |
|
inline |
Definition at line 1006 of file WorldCanvas.h.
References itsCanvasXOffset, itsCanvasXSize, itsCanvasYOffset, and itsCanvasYSize.
|
inline |
Is the specified DisplayData the one in charge of WC state? (During DD::sizeControl() execution, it means instead that the DD has permission to become CSmaster, if it can).
Definition at line 1062 of file WorldCanvas.h.
References csMaster().
Referenced by casa::MSAsRaster::conformsToCS(), and casa::WorldCanvasHolder::isCSmaster().
casacore::Bool casa::WorldCanvas::linToPix | ( | casacore::Vector< casacore::Double > & | pix, |
const casacore::Vector< casacore::Double > & | lin | ||
) |
casacore::Bool casa::WorldCanvas::linToPix | ( | casacore::Matrix< casacore::Double > & | pix, |
casacore::Vector< casacore::Bool > & | failures, | ||
const casacore::Matrix< casacore::Double > & | lin | ||
) |
casacore::Bool casa::WorldCanvas::linToWorld | ( | casacore::Vector< casacore::Double > & | world, |
const casacore::Vector< casacore::Double > & | lin | ||
) |
casacore::Bool casa::WorldCanvas::linToWorld | ( | casacore::Matrix< casacore::Double > & | world, |
casacore::Vector< casacore::Bool > & | failures, | ||
const casacore::Matrix< casacore::Double > & | lin | ||
) |
|
inline |
Definition at line 871 of file WorldCanvas.h.
References itsLinXMax.
|
inline |
Definition at line 888 of file WorldCanvas.h.
References itsLinXMaxLimit.
|
inline |
Provide information on the extents of the linear coordinate system.
Definition at line 865 of file WorldCanvas.h.
References itsLinXMin.
|
inline |
Provide information on the limits of the linear coordinate system.
Definition at line 882 of file WorldCanvas.h.
References itsLinXMinLimit.
|
inline |
Definition at line 874 of file WorldCanvas.h.
References itsLinYMax.
|
inline |
Definition at line 891 of file WorldCanvas.h.
References itsLinYMaxLimit.
|
inline |
Definition at line 868 of file WorldCanvas.h.
References itsLinYMin.
|
inline |
Definition at line 885 of file WorldCanvas.h.
References itsLinYMinLimit.
|
private |
|
private |
|
private |
Draw a set of ellipses where scaledValues
gives the Colormap index of each point.
Point coordinates ('points') are either linear or world coordinates, as specified by 'linear'.
|
private |
Draw an image where scaledImage
gives the Colormap index of each screen (PixelCanvas) pixel.
'blc' contains X and Y PixelCanvas coordinates. Masked version as well. For masked version, set opaqueMask to true to draw masked pixels in the background color; otherwise they will be transparent (letting whatever was drawn previously at that point show through).
|
private |
|
private |
Draw a set of points where scaledValues
gives the Colormap index of each point.
Point coordinates ('points') are either linear or world coordinates, as specified by 'linear'.
casacore::Bool casa::WorldCanvas::matchesRestriction | ( | const Attribute & | restriction | ) | const |
Determine whether the restrictions installed on the WorldCanvas match the given restriction or buffer of restrictions.
Referenced by casa::WorldCanvasHolder::matchesRestriction().
casacore::Bool casa::WorldCanvas::matchesRestrictions | ( | const AttributeBuffer & | buffer | ) | const |
Referenced by casa::WorldCanvasHolder::matchesRestrictions().
void casa::WorldCanvas::moveZoomRectangleLCS | ( | double | dx, |
double | dy | ||
) |
Move the zoom rectangle across the screen, ie.
pan.
casacore::uInt casa::WorldCanvas::newList | ( | ) |
Display list support functions.
A display list is started with a call to newList()
, finished with a call to endList()
, and drawn with a call to drawList(x)
, with the argument x
being the list number returned by the original call to newList()
. Lists can be deleted individually with deleteList(x)
or in total with deleteLists()
. Requests are forwarded to the PixelCanvas.
|
virtual |
Handle implicit refresh, motion and position events occuring on the PixelCanvas on which this WorldCanvas is installed.
These functions translate PixelCanvas events into WorldCanvas events.
Reimplemented from casa::PCRefreshEH.
|
virtual |
Default just prints the event to cout.
Reimplemented from casa::PCMotionEH.
|
virtual |
Default just prints the event to cout.
Reimplemented from casa::PCPositionEH.
|
virtual |
Return the PGPLOT device id for external use.
|
inline |
Return a pointer to the PixelCanvas on which this WorldCanvas is installed.
Definition at line 223 of file WorldCanvas.h.
References itsPixelCanvas.
casacore::Bool casa::WorldCanvas::pixToLin | ( | casacore::Vector< casacore::Double > & | lin, |
const casacore::Vector< casacore::Double > & | pix | ||
) |
Pixel, linear and world coordinate transformation functions.
For the casacore::Vector versions, the coordinate mapping returns false if the transformation failed. For the casacore::Matrix versions, failures(i) on input should be set to true if the i'th transformation should not be attempted. On output, failures(i) is true if the transformation was not attempted, or failed. If on input the failures vector has zero length, it will be assumed that no prior failures have occurred.
casacore::Bool casa::WorldCanvas::pixToLin | ( | casacore::Matrix< casacore::Double > & | lin, |
casacore::Vector< casacore::Bool > & | failures, | ||
const casacore::Matrix< casacore::Double > & | pix | ||
) |
casacore::Bool casa::WorldCanvas::pixToWorld | ( | casacore::Vector< casacore::Double > & | world, |
const casacore::Vector< casacore::Double > & | pix | ||
) |
casacore::Bool casa::WorldCanvas::pixToWorld | ( | casacore::Matrix< casacore::Double > & | world, |
casacore::Vector< casacore::Bool > & | failures, | ||
const casacore::Matrix< casacore::Double > & | pix | ||
) |
casacore::Bool casa::WorldCanvas::redrawIndexedImage | ( | void * | drawObj, |
Display::RefreshReason | reason, | ||
casacore::Bool | opaqueMask = false |
||
) |
Optimization to speed up colormap fiddling in 24bit mode (software Colormap); see images_, below for usage.
Set opaqueMask to true to draw masked pixels in the background color; otherwise they will be transparent (letting whatever was drawn previously at that point show through).
void casa::WorldCanvas::refresh | ( | const Display::RefreshReason & | reason = Display::UserCommand , |
const casacore::Bool & | explicitrequest = true |
||
) |
Refresh the WorldCanvas for the given reason.
The refresh is prevented from occuring if the PixelCanvas is not yet mapped to the screen, or if the refreshes have been held with earlier call/s to hold() which has/have not been matched with the same number of calls to release().
casacore::Bool casa::WorldCanvas::refreshAllowed | ( | ) |
Is a refresh currently allowed?
void casa::WorldCanvas::registerColormap | ( | Colormap * | cmap, |
casacore::Float | weight = 1.0 |
||
) |
Register/unregister a Colormap on the PixelCanvas.
Registration counts are remembered, so that a particular Colormap is guaranteed to be available as long as that Colormap has been registered more times than it has been unregistered. Requests are forwarded to the PixelCanvas.
void casa::WorldCanvas::release | ( | ) |
|
virtual |
void casa::WorldCanvas::removeAttribute | ( | casacore::String & | name | ) |
Remove an Attribute.
Pre-defined Attributes of the WorldCanvas cannot be removed (although nothing serious will happen if you try).
|
inline |
Definition at line 1066 of file WorldCanvas.h.
References csMaster(), and itsCSmaster.
casacore::Bool casa::WorldCanvas::removeIndexedImage | ( | void * | drawObj | ) |
Remove image from the colormap change cache, if any (see images_, below).
Return value indicates whether there was anything to remove.
void casa::WorldCanvas::removeMotionEventHandler | ( | const WCMotionEH & | eh | ) |
void casa::WorldCanvas::removePositionEventHandler | ( | const WCPositionEH & | eh | ) |
void casa::WorldCanvas::removeRefreshEventHandler | ( | const DisplayEH & | eh | ) |
Remove the given refresh, motion and position event handlers from the WorldCanvas.
void casa::WorldCanvas::removeRestriction | ( | const casacore::String & | restrictionName | ) |
Remove the named restriction, or all restrictions, from the WorldCanvas.
Referenced by casa::WorldCanvasHolder::removeRestriction().
void casa::WorldCanvas::removeRestrictions | ( | ) |
Referenced by casa::WorldCanvasHolder::removeRestrictions().
void casa::WorldCanvas::resetZoomRectangle | ( | ) |
Reset the zoom to show the entire allowable range of the linear coordinate system.
const AttributeBuffer* casa::WorldCanvas::restrictionBuffer | ( | ) | const |
Return the buffer of restrictions installed on this WorldCanvas.
Referenced by casa::DisplayData::conformsToZIndex(), and casa::WorldCanvasHolder::restrictionBuffer().
void casa::WorldCanvas::setArcMode | ( | Display::ArcMode | mode | ) |
void casa::WorldCanvas::setAttribute | ( | Attribute & | at | ) |
Set an Attribute or Attributes on the WorldCanvas.
void casa::WorldCanvas::setAttributes | ( | AttributeBuffer & | at | ) |
void casa::WorldCanvas::setBackground | ( | casacore::uLong | color | ) |
void casa::WorldCanvas::setCapStyle | ( | Display::CapStyle | style | ) |
void casa::WorldCanvas::setClearColor | ( | const casacore::String & | color | ) |
void casa::WorldCanvas::setColor | ( | const casacore::String & | color | ) |
Set various graphics attributes.
All of these requests are passed directly to the PixelCanvas, except for setColor
, which also installs the requested color for subsequent calls to PgPlot functions.
void casa::WorldCanvas::setColormap | ( | Colormap * | cmap | ) |
Set and retrieve the current Colormap on the PixelCanvas.
This function must be called prior to using a WorldCanvas (or PixelCanvas) drawing routines which is expected to use a Colormap. Passing an unregistered Colormap to setColormap will result in an exception being thrown. Requests are forwarded to the PixelCanvas.
|
inline |
Definition at line 974 of file WorldCanvas.h.
References itsComplexToRealMethod.
void casa::WorldCanvas::setCoordinateHandler | ( | WCCoordinateHandler * | ch | ) |
Set casacore::Coordinate, SizeControl, Resample and DataScale handlers for the WorldCanvas.
If the given handler is 0, then resort to using the default handler.
void casa::WorldCanvas::setCoordinateSystem | ( | const DisplayCoordinateSystem & | csys | ) |
Set and retrieve the DisplayCoordinateSystem of this WorldCanvas.
Set with 0 and the WorldCanvas loses its DisplayCoordinateSystem!
|
inline |
Definition at line 958 of file WorldCanvas.h.
References itsDataMax, and max.
|
inline |
Definition at line 952 of file WorldCanvas.h.
References itsDataMin, and min.
|
inline |
Definition at line 961 of file WorldCanvas.h.
References itsDataMax, itsDataMin, max, and min.
void casa::WorldCanvas::setDataScaleHandler | ( | WCDataScaleHandler * | sh | ) |
|
virtual |
Install the default options for this DisplayData.
|
virtual |
Set/retrieve the drawing buffer, the target destination for graphics.
Requests are passed directly to the PixelCanvas.
void casa::WorldCanvas::setFillRule | ( | Display::FillRule | rule | ) |
void casa::WorldCanvas::setFillStyle | ( | Display::FillStyle | style | ) |
casacore::Bool casa::WorldCanvas::setFont | ( | const casacore::String & | fontName | ) |
void casa::WorldCanvas::setForeground | ( | casacore::uLong | color | ) |
void casa::WorldCanvas::setImageCacheStrategy | ( | Display::ImageCacheStrategy | strategy | ) |
Set/retrieve the caching strategy on the PixelCanvas.
Appropriate values are Display::ClientAlways (use client memory to cache images [safer]), Display::ServerAlways (use server memory to cache images [faster]), and Display::ServerMemoryThreshold (use server memory until a threshold is reached [not yet implemented]). Requests are passed to the PixelCanvas.
void casa::WorldCanvas::setJoinStyle | ( | Display::JoinStyle | style | ) |
void casa::WorldCanvas::setLinearCoordinateSystem | ( | const casacore::Vector< casacore::Double > & | blc, |
const casacore::Vector< casacore::Double > & | trc, | ||
casacore::Bool | resetZoom = true |
||
) |
Set the allowable range of the linear coordinate system.
void casa::WorldCanvas::setLineStyle | ( | Display::LineStyle | style | ) |
void casa::WorldCanvas::setLineWidth | ( | casacore::Float | width | ) |
|
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.
void casa::WorldCanvas::setResampleHandler | ( | WCResampleHandler * | rh | ) |
void casa::WorldCanvas::setRestriction | ( | const Attribute & | restriction | ) |
Install a single restriction, or a buffer of restrictions, on the WorldCanvas which DisplayData must match in order that they be allowed to draw themselves.
Referenced by casa::WorldCanvasHolder::setRestriction().
void casa::WorldCanvas::setRestrictions | ( | const AttributeBuffer & | resBuff | ) |
Referenced by casa::WorldCanvasHolder::setRestrictions().
void casa::WorldCanvas::setSizeControlHandler | ( | WCSizeControlHandler * | sh | ) |
casacore::Bool casa::WorldCanvas::setWorldBackgroundColor | ( | const casacore::String | color | ) |
Set/retrieve the background and foreground colors of the WorldCanvas.
These can be different to those for the PixelCanvas. Indeed, they will be used as default colors on the WorldCanvas when necessary.
void casa::WorldCanvas::setWorldCanvasPosition | ( | casacore::Double | fracXOffset, |
casacore::Double | fracYOffset, | ||
casacore::Double | fracXSize, | ||
casacore::Double | fracYSize | ||
) |
Set the location of the WorldCanvas on its PixelCanvas.
casacore::Bool casa::WorldCanvas::setWorldForegroundColor | ( | const casacore::String | color | ) |
void casa::WorldCanvas::setZoomRectangleLCS | ( | const casacore::Vector< casacore::Double > & | min, |
const casacore::Vector< casacore::Double > & | max | ||
) |
Set the zoom rectangle to the specfied linear coordinate range.
void casa::WorldCanvas::swapBuffers | ( | ) |
|
private |
Trim and resample an image, returning the actual world BLC and TRC for drawing, and the resampled image.
|
private |
Trim and resample an image, returning the actual world BLC and TRC for drawing, and the resampled image.
This function takes a mask indicating which pixels should be drawn. This function therefore also trims and resamples the mask.
void casa::WorldCanvas::unregisterColormap | ( | Colormap * | cmap | ) |
|
private |
Update canvas sizes/offsets from the fracOffsets, and vice versa.
|
private |
casacore::Bool casa::WorldCanvas::validList | ( | casacore::uInt | list | ) |
|
virtual |
Return the names and units of the world coordinate axes.
|
virtual |
casacore::Bool casa::WorldCanvas::worldToLin | ( | casacore::Vector< casacore::Double > & | lin, |
const casacore::Vector< casacore::Double > & | world | ||
) |
casacore::Bool casa::WorldCanvas::worldToLin | ( | casacore::Matrix< casacore::Double > & | lin, |
casacore::Vector< casacore::Bool > & | failures, | ||
const casacore::Matrix< casacore::Double > & | world | ||
) |
casacore::Bool casa::WorldCanvas::worldToPix | ( | casacore::Vector< casacore::Double > & | pix, |
const casacore::Vector< casacore::Double > & | world | ||
) |
casacore::Bool casa::WorldCanvas::worldToPix | ( | casacore::Matrix< casacore::Double > & | pix, |
casacore::Vector< casacore::Bool > & | failures, | ||
const casacore::Matrix< casacore::Double > & | world | ||
) |
int casa::WorldCanvas::zIndex | ( | ) | const |
convienience function based on "restriction buffer"...
|
private |
Buffer for Attributes.
Definition at line 1293 of file WorldCanvas.h.
|
static |
Definition at line 1082 of file WorldCanvas.h.
|
private |
Definition at line 1410 of file WorldCanvas.h.
Referenced by errorMessage().
|
private |
Cache of pre-drawn ColorIndexedImage_'s.
When a caller of drawImage() wants to save one, it passes a drawing-object pointer in the 'drawObj' parameter for use as a retrieval key. It should provide the same key to redrawIndexedImage() in order to reuse the image.
Definition at line 1372 of file WorldCanvas.h.
|
private |
***Cached*** blc pixel where the world canvas 'draw area' (inside margins, labels) begins, relative to WC blc.
Definition at line 1236 of file WorldCanvas.h.
Referenced by canvasDrawXOffset(), and inDrawArea().
|
private |
***Cached*** number of pixels in each dimension given to the drawable part of the world canvas
Definition at line 1243 of file WorldCanvas.h.
Referenced by canvasDrawXSize(), and inDrawArea().
|
private |
Definition at line 1237 of file WorldCanvas.h.
Referenced by canvasDrawYOffset(), and inDrawArea().
|
private |
Definition at line 1244 of file WorldCanvas.h.
Referenced by canvasDrawYSize(), and inDrawArea().
|
private |
***Cached*** blc pixel where this world canvas begins = itsPixelCanvas->width()*frac(X|Y)Offset_.
Definition at line 1212 of file WorldCanvas.h.
Referenced by canvasXOffset(), inDrawArea(), and inWC().
|
private |
***Cached*** number of pixels in each dimension given to the world canvas = itsPixelCanvas->width()*(frac(X|Y)Size_.
Definition at line 1219 of file WorldCanvas.h.
Referenced by canvasXSize(), and inWC().
|
private |
Definition at line 1213 of file WorldCanvas.h.
Referenced by canvasYOffset(), inDrawArea(), and inWC().
|
private |
Definition at line 1220 of file WorldCanvas.h.
Referenced by canvasYSize(), and inWC().
|
private |
Method to use to convert complex data into real values.
Definition at line 1267 of file WorldCanvas.h.
Referenced by complexToRealMethod(), and setComplexToRealMethod().
|
private |
Definition at line 1279 of file WorldCanvas.h.
|
private |
The DisplayCoordinateSystem for this WorldCanvas.
New addition, only supported and used by "new" classes.
Definition at line 1312 of file WorldCanvas.h.
Referenced by hasCS().
|
private |
[First] responder to 'sizeControl', responsible for setting WC CS, zoom window and draw area.
It will be 0 initially, and whenever the old master is unregistered (until a new master responds). This is a further attempt toward a coherent sense of 'who's in charge' of WC[H] state (there is more to do).
Some day, the WC CS should be directly responsible for all the Canvas's coordinate conversions. For now at least we'll know that they're done by the DD below (which should be equivalent).
Definition at line 1398 of file WorldCanvas.h.
Referenced by csMaster(), and removeDD().
|
private |
Definition at line 1264 of file WorldCanvas.h.
Referenced by dataMax(), setDataMax(), and setDataMinMax().
|
private |
Dynamic data minimum and maximum for this WorldCanvas.
Definition at line 1264 of file WorldCanvas.h.
Referenced by dataMin(), setDataMin(), and setDataMinMax().
|
private |
Definition at line 1281 of file WorldCanvas.h.
|
private |
Fractional position of world canvas on pixel canvas.
The offset values are always in the range of [0.0,1.0], and sizes must be smaller or equal to (1.0 - offset) for each dimension.
Definition at line 1227 of file WorldCanvas.h.
|
private |
Definition at line 1229 of file WorldCanvas.h.
|
private |
Definition at line 1228 of file WorldCanvas.h.
|
private |
Definition at line 1230 of file WorldCanvas.h.
|
private |
This state is set true when the pointer is in this WC and a pointer button is pressed (with no buttons pressed previously).
When true, all PC motion and pointer button events are propagated to this WC's handlers (only), regardless of whether the pointer has moved off the WC. It is reset to false when all buttons are released. This simulates the 'automatic grab' (implemented in X for whole windows), on the WC level.
Definition at line 1321 of file WorldCanvas.h.
|
private |
Definition at line 1308 of file WorldCanvas.h.
|
private |
Status of hold/release.
Definition at line 1306 of file WorldCanvas.h.
|
private |
itsId & itsRef used to ensure thread-safe execution of pgplot
Definition at line 1402 of file WorldCanvas.h.
|
private |
Definition at line 1251 of file WorldCanvas.h.
Referenced by linXMax().
|
private |
Definition at line 1259 of file WorldCanvas.h.
Referenced by linXMaxLimit().
|
private |
Linear casacore::Coordinate System ranges.
Definition at line 1249 of file WorldCanvas.h.
Referenced by linXMin().
|
private |
Linear casacore::Coordinate System Limits.
Definition at line 1257 of file WorldCanvas.h.
Referenced by linXMinLimit().
|
private |
Definition at line 1252 of file WorldCanvas.h.
Referenced by linYMax().
|
private |
Definition at line 1260 of file WorldCanvas.h.
Referenced by linYMaxLimit().
|
private |
Definition at line 1250 of file WorldCanvas.h.
Referenced by linYMin().
|
private |
Definition at line 1258 of file WorldCanvas.h.
Referenced by linYMinLimit().
|
private |
Definition at line 1273 of file WorldCanvas.h.
|
private |
Definition at line 1287 of file WorldCanvas.h.
|
private |
Definition at line 1289 of file WorldCanvas.h.
|
private |
Definition at line 1288 of file WorldCanvas.h.
|
private |
Store whether we "own" the various handlers.
Definition at line 1286 of file WorldCanvas.h.
|
private |
PGPLOT filter.
Definition at line 1303 of file WorldCanvas.h.
|
private |
|
private |
Definition at line 1272 of file WorldCanvas.h.
|
private |
WorldCanvas::refresh is a recursive function.
itsRef is used to determine when the recursion is over. i.e, when the initial refresh call is exiting
Definition at line 1408 of file WorldCanvas.h.
|
private |
Event handler lists and convenient iterators.
Definition at line 1271 of file WorldCanvas.h.
|
private |
Definition at line 1307 of file WorldCanvas.h.
|
private |
Definition at line 1280 of file WorldCanvas.h.
|
private |
A buffer to contain the restrictions that DisplayDatas must match if they are to be allowed to draw themselves.
Definition at line 1386 of file WorldCanvas.h.
|
private |
Other handler lists.
Definition at line 1278 of file WorldCanvas.h.
|
private |
Background/foreground colors.
Definition at line 1296 of file WorldCanvas.h.
Referenced by getWorldBackgroundColor().
|
private |
Definition at line 1297 of file WorldCanvas.h.
Referenced by getWorldForegroundColor().
|
static |
Definition at line 1080 of file WorldCanvas.h.
|
static |
Definition at line 1081 of file WorldCanvas.h.
|
static |
Definition at line 1083 of file WorldCanvas.h.