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

Subclass of RegionShape used for drawing markers. More...

#include <RegionShapes.h>

Inheritance diagram for RSMarker:

Public Member Functions

 RSMarker (double x, double y, Display::Marker marker, int pixelHeight, casacore::MDirection::Types worldSystem)
 World Constructor for a single marker type. More...
 
 RSMarker (double x, double y, const std::vector< Display::Marker > &markers, int pixelHeight, casacore::MDirection::Types worldSystem)
 World Constructor for a compound marker type. More...
 
 RSMarker (double x, double y, Display::Marker marker, int pixelHeight)
 Pixel Constructor for a single marker type. More...
 
 RSMarker (double x, double y, const std::vector< Display::Marker > &markers, int pixelHeight)
 Pixel Constructor for a compound marker type. More...
 
 RSMarker (const casacore::RecordInterface &properties)
 casacore::Record Constructor. More...
 
 ~RSMarker ()
 Destructor. More...
 
std::vector< Display::Marker > markers () const
 Gets/sets the markers used for this shape. More...
 
void setMarker (Display::Marker marker)
 
void setMarkers (const std::vector< Display::Marker > &markers)
 
bool drawAndUpdateBoundingBox (WorldCanvasHolder &wch, casacore::String *err=NULL)
 Implements RegionShape::drawAndUpdateBoundingBox. More...
 
casacore::String type () const
 Implements RegionShape::type. More...
 
casacore::String oneWordType () const
 Overrides RegionShape::oneWordType. More...
 
void getMarkerCoordinates (double &x, double &y, int &pixelHeight, casacore::String toSystem="") const
 Gets marker-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known. More...
 
std::vector< double > coordParameterValues () const
 Implements RegionShape::coordParameterValues. More...
 
std::vector< double > coordParameterValues (casacore::String toSystem) const
 Implements RegionShape::coordParameterValues. More...
 
std::vector< casacore::StringcoordParameterNames () const
 Implements RegionShape::coordParameterNames. More...
 
std::vector
< CoordinateParameterType > 
coordParameterTypes () const
 Implements RegionShape::coordParameterPositions. More...
 
void setCoordParameters (const std::vector< double > &vals)
 Implements RegionShape::setCoordParameters. More...
 
void setCoordParameters (const std::vector< double > &vals, casacore::String valSystem)
 Implements RegionShape::setCoordParameters. More...
 
void move (double dx, double dy, casacore::String system="")
 Implements RegionShape::move. More...
 
RSHandle getHandle () const
 Implements RegionShape::getHandle. More...
 
std::vector< casacore::StringoptionNames () const
 Implements RegionShape::optionNames. More...
 
std::vector< OptionType > optionTypes () const
 Implements RegionShape::optionTypes. More...
 
std::vector< std::vector
< casacore::String > > 
optionChoices () const
 Overrides RegionShape::optionChoices. More...
 
std::vector< RSOption > optionValues () const
 Implements RegionShape::optionValues. More...
 
void setOptionValues (const std::vector< RSOption > &options)
 Implements RegionShape::setOptions. More...
 

Protected Member Functions

void getShapeSpecificProperties (casacore::Record &properties) const
 Implements RegionShape::getShapeSpecificProperties. More...
 
void setShapeSpecificProperties (const casacore::RecordInterface &)
 Implements RegionShape::setShapeSpecificProperties. More...
 
bool updateScreenCoordinates (WorldCanvasHolder &wch, casacore::String *err)
 Updates screen coords using world/pixel coords and the given WorldCanvas. More...
 
void updateMinMax ()
 Update m_xMin, m_xMax, m_yMin, and m_yMax. More...
 

Static Protected Member Functions

static casacore::String markerToString (Display::Marker marker)
 
static bool stringToMarker (const casacore::String &str, Display::Marker &marker)
 
static std::vector
< Display::Marker > 
allMarkers ()
 

Protected Attributes

double m_x
 
double m_y
 
double m_screenX
 
double m_screenY
 
vector< Display::Marker > m_markers
 
int m_pixelHeight
 

Detailed Description

Subclass of RegionShape used for drawing markers.

A marker has the following properties in addition to those listed for RegionShape:

Definition at line 722 of file RegionShapes.h.

Constructor & Destructor Documentation

RSMarker::RSMarker ( double  x,
double  y,
Display::Marker  marker,
int  pixelHeight,
casacore::MDirection::Types  worldSystem 
)

World Constructor for a single marker type.

x and y must all be 1) using the same world system as defined by worldSystem, and 2) in the unit RegionShape::UNIT. pixelHeight is in screen pixels.

RSMarker::RSMarker ( double  x,
double  y,
const std::vector< Display::Marker > &  markers,
int  pixelHeight,
casacore::MDirection::Types  worldSystem 
)

World Constructor for a compound marker type.

x and y must all be 1) using the same world system as defined by worldSystem, and 2) in the unit RegionShape::UNIT. pixelHeight is in screen pixels.

RSMarker::RSMarker ( double  x,
double  y,
Display::Marker  marker,
int  pixelHeight 
)

Pixel Constructor for a single marker type.

pixelHeight is in screen pixels.

RSMarker::RSMarker ( double  x,
double  y,
const std::vector< Display::Marker > &  markers,
int  pixelHeight 
)

Pixel Constructor for a compound marker type.

pixelHeight is in screen pixels.

RSMarker::RSMarker ( const casacore::RecordInterface properties)

casacore::Record Constructor.

RSMarker::~RSMarker ( )

Destructor.

Member Function Documentation

static std::vector<Display::Marker> RSMarker::allMarkers ( )
inlinestaticprotected
std::vector<casacore::String> RSMarker::coordParameterNames ( ) const

Implements RegionShape::coordParameterNames.

std::vector<CoordinateParameterType> RSMarker::coordParameterTypes ( ) const

Implements RegionShape::coordParameterPositions.

std::vector<double> RSMarker::coordParameterValues ( ) const

Implements RegionShape::coordParameterValues.

std::vector<double> RSMarker::coordParameterValues ( casacore::String  toSystem) const

Implements RegionShape::coordParameterValues.

bool RSMarker::drawAndUpdateBoundingBox ( WorldCanvasHolder &  wch,
casacore::String err = NULL 
)

Implements RegionShape::drawAndUpdateBoundingBox.

RSHandle RSMarker::getHandle ( ) const

Implements RegionShape::getHandle.

void RSMarker::getMarkerCoordinates ( double &  x,
double &  y,
int &  pixelHeight,
casacore::String  toSystem = "" 
) const

Gets marker-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known.

If toSystem is empty, no conversion is done; otherwise see the constraints listed in RegionShape::coordParameterValues(casacore::String).

void RSMarker::getShapeSpecificProperties ( casacore::Record properties) const
inlineprotected

Implements RegionShape::getShapeSpecificProperties.

Definition at line 823 of file RegionShapes.h.

References casacore::RecordInterface::define().

std::vector<Display::Marker> RSMarker::markers ( ) const

Gets/sets the markers used for this shape.

static casacore::String RSMarker::markerToString ( Display::Marker  marker)
inlinestaticprotected
void RSMarker::move ( double  dx,
double  dy,
casacore::String  system = "" 
)

Implements RegionShape::move.

casacore::String RSMarker::oneWordType ( ) const
inline

Overrides RegionShape::oneWordType.

Definition at line 766 of file RegionShapes.h.

std::vector<std::vector<casacore::String> > RSMarker::optionChoices ( ) const

Overrides RegionShape::optionChoices.

std::vector<casacore::String> RSMarker::optionNames ( ) const

Implements RegionShape::optionNames.

std::vector<OptionType> RSMarker::optionTypes ( ) const

Implements RegionShape::optionTypes.

std::vector<RSOption> RSMarker::optionValues ( ) const

Implements RegionShape::optionValues.

void RSMarker::setCoordParameters ( const std::vector< double > &  vals)

Implements RegionShape::setCoordParameters.

void RSMarker::setCoordParameters ( const std::vector< double > &  vals,
casacore::String  valSystem 
)

Implements RegionShape::setCoordParameters.

void RSMarker::setMarker ( Display::Marker  marker)
void RSMarker::setMarkers ( const std::vector< Display::Marker > &  markers)
void RSMarker::setOptionValues ( const std::vector< RSOption > &  options)

Implements RegionShape::setOptions.

void RSMarker::setShapeSpecificProperties ( const casacore::RecordInterface )
inlineprotected

Implements RegionShape::setShapeSpecificProperties.

Definition at line 828 of file RegionShapes.h.

static bool RSMarker::stringToMarker ( const casacore::String str,
Display::Marker &  marker 
)
inlinestaticprotected
casacore::String RSMarker::type ( ) const

Implements RegionShape::type.

void RSMarker::updateMinMax ( )
protected

Update m_xMin, m_xMax, m_yMin, and m_yMax.

bool RSMarker::updateScreenCoordinates ( WorldCanvasHolder &  wch,
casacore::String err 
)
protected

Updates screen coords using world/pixel coords and the given WorldCanvas.

Member Data Documentation

vector<Display::Marker> RSMarker::m_markers
protected

Definition at line 819 of file RegionShapes.h.

int RSMarker::m_pixelHeight
protected

Definition at line 820 of file RegionShapes.h.

double RSMarker::m_screenX
protected

Definition at line 818 of file RegionShapes.h.

double RSMarker::m_screenY
protected

Definition at line 818 of file RegionShapes.h.

double RSMarker::m_x
protected

Definition at line 817 of file RegionShapes.h.

double RSMarker::m_y
protected

Definition at line 817 of file RegionShapes.h.


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