casa
$Rev:20696$
|
All regions are specified in "linear coordinates", not "pixel coordinates". More...
#include <QtPolygon.qo.h>
Public Member Functions | |
const std::string | name () const |
std::string | lineColor () const |
std::string | centerColor () const |
int | lineWidth () const |
Region::LineStyle | lineStyle () const |
std::string | textColor () const |
std::string | textFont () const |
int | textFontSize () const |
int | textFontStyle () const |
std::string | textValue () const |
Region::TextPosition | textPosition () const |
void | textPositionDelta (int &x, int &y) const |
void | getCoordinatesAndUnits (Region::Coord &c, Region::Units &x_units, Region::Units &y_units, std::string &width_height_units) const |
void | getPositionString (std::string &x, std::string &y, std::string &angle, double &bounding_width, double &bounding_height, Region::Coord coord=Region::DefaultCoord, Region::Units x_units=Region::DefaultUnits, Region::Units y_units=Region::DefaultUnits, const std::string &bounding_units="rad") const |
bool | translateX (const std::string &x, const std::string &x_units, const std::string &coordsys) |
bool | translateY (const std::string &y, const std::string &y_units, const std::string &coordsys) |
bool | resizeX (const std::string &x, const std::string &x_units, const std::string &coordsys) |
bool | resizeY (const std::string &y, const std::string &y_units, const std::string &coordsys) |
int | numFrames () const |
void | zRange (int &min, int &max) const |
int | zIndex () const |
void | updateStateInfo (bool region_modified, RegionChanges change) |
indicates that region movement requires that the statistcs be updated... | |
void | invalidateCenterInfo () |
indicates that the center info is no longer valid | |
void | clearStatistics () |
QtPolygon (QtRegionSourceKernel *factory, WorldCanvas *wc, double x1, double y1, bool hold_signals=false) | |
QtPolygon (QtRegionSourceKernel *factory, WorldCanvas *wc, const std::vector< std::pair< double, double > > &pts, bool hold_signals=false) | |
bool | regionVisible () const |
void | linearCenter (double &x, double &y) const |
void | pixelCenter (double &x, double &y) const |
void | refresh () |
qt-event -> QtRegion -> QtPolygon -> Region::refresh( ) | |
AnnotationBase * | annotation () const |
void | polygonComplete () |
called when polygon region is completely specified... | |
void | selectedInCanvas () |
indicates that the user has selected this rectangle... | |
bool | weaklySelected () const |
is this region weakly or temporarily selected? | |
void | weaklySelect () |
void | weaklyUnselect () |
void | setLabel (const std::string &l) |
set attributes when loading a casa region text file... | |
void | setLabelPosition (TextPosition pos) |
void | setLabelDelta (const std::vector< int > &delta) |
void | setFont (const std::string &font="", int font_size=-1, int font_style=0, const std::string &font_color="") |
void | setLine (const std::string &line_color="", Region::LineStyle line_style=SolidLine, unsigned int line_width=1) |
void | setAnnotation (bool ann) |
void | mark (bool set=true) |
functions added with the introduction of RegionToolManager and the unified selection and manipulation of the various region types... | |
bool | marked () const |
bool | mark_toggle () |
void | status (const std::string &msg, const std::string &type="info") |
bool | markCenter () const |
bool | skyComponent () const |
void | output (ds9writer &out) const |
void | emitUpdate () |
called for existing regions when spectral profile tool is opened... | |
Protected Member Functions | |
std::list< RegionInfo > * | generate_dds_statistics () |
--------------------==================== from old QtRegion ====================-------------------- | |
ImageRegion * | get_image_region (DisplayData *dd) const |
const std::list< Region * > & | get_selected_regions () |
size_t | selected_region_count () |
size_t | marked_region_count () |
virtual Region * | fetch_my_region () |
virtual void | fetch_region_details (RegionTypes &type, std::vector< std::pair< int, int > > &pixel_pts, std::vector< std::pair< double, double > > &world_pts) const |
std::list< RegionInfo > * | generate_dds_centers () |
All regions are specified in "linear coordinates", not "pixel coordinates".
This is necessary because "linear coordinates" scale with zooming whereas "pixel coordinates" do not. Unfortunately, this means that coordinate transformation is required each time the region is drawn.
Key points:
Definition at line 46 of file QtPolygon.qo.h.
casa::viewer::QtPolygon::QtPolygon | ( | QtRegionSourceKernel * | factory, |
WorldCanvas * | wc, | ||
double | x1, | ||
double | y1, | ||
bool | hold_signals = false |
||
) |
casa::viewer::QtPolygon::QtPolygon | ( | QtRegionSourceKernel * | factory, |
WorldCanvas * | wc, | ||
const std::vector< std::pair< double, double > > & | pts, | ||
bool | hold_signals = false |
||
) |
AnnotationBase* casa::viewer::QtPolygon::annotation | ( | ) | const [inline] |
Reimplemented from casa::viewer::Polygon.
Definition at line 105 of file QtPolygon.qo.h.
std::string casa::viewer::QtPolygon::centerColor | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 53 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::clearStatistics | ( | ) | [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 94 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::emitUpdate | ( | ) | [inline] |
called for existing regions when spectral profile tool is opened...
Reimplemented from casa::viewer::QtRegion.
Definition at line 140 of file QtPolygon.qo.h.
virtual Region* casa::viewer::QtPolygon::fetch_my_region | ( | ) | [inline, protected, virtual] |
Definition at line 148 of file QtPolygon.qo.h.
virtual void casa::viewer::QtPolygon::fetch_region_details | ( | RegionTypes & | type, |
std::vector< std::pair< int, int > > & | pixel_pts, | ||
std::vector< std::pair< double, double > > & | world_pts | ||
) | const [inline, protected, virtual] |
Definition at line 149 of file QtPolygon.qo.h.
std::list<RegionInfo>* casa::viewer::QtPolygon::generate_dds_centers | ( | ) | [inline, protected, virtual] |
Reimplemented from casa::viewer::Polygon.
Definition at line 152 of file QtPolygon.qo.h.
std::list<RegionInfo>* casa::viewer::QtPolygon::generate_dds_statistics | ( | ) | [inline, protected, virtual] |
--------------------==================== from old QtRegion ====================--------------------
Reimplemented from casa::viewer::Region.
Definition at line 143 of file QtPolygon.qo.h.
ImageRegion* casa::viewer::QtPolygon::get_image_region | ( | DisplayData * | dd | ) | const [inline, protected] |
Reimplemented from casa::viewer::Polygon.
Definition at line 144 of file QtPolygon.qo.h.
const std::list<Region*>& casa::viewer::QtPolygon::get_selected_regions | ( | ) | [inline, protected, virtual] |
Implements casa::viewer::Region.
Definition at line 145 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::getCoordinatesAndUnits | ( | Region::Coord & | c, |
Region::Units & | x_units, | ||
Region::Units & | y_units, | ||
std::string & | width_height_units | ||
) | const [inline] |
Reimplemented from casa::viewer::Region.
Definition at line 65 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::getPositionString | ( | std::string & | x, |
std::string & | y, | ||
std::string & | angle, | ||
double & | bounding_width, | ||
double & | bounding_height, | ||
Region::Coord | coord = Region::DefaultCoord , |
||
Region::Units | x_units = Region::DefaultUnits , |
||
Region::Units | y_units = Region::DefaultUnits , |
||
const std::string & | bounding_units = "rad" |
||
) | const [inline] |
Reimplemented from casa::viewer::Region.
Definition at line 67 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::invalidateCenterInfo | ( | ) | [inline] |
indicates that the center info is no longer valid
Reimplemented from casa::viewer::QtRegion.
Definition at line 92 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::linearCenter | ( | double & | x, |
double & | y | ||
) | const [inline] |
Reimplemented from casa::viewer::Polygon.
Definition at line 100 of file QtPolygon.qo.h.
std::string casa::viewer::QtPolygon::lineColor | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 52 of file QtPolygon.qo.h.
Region::LineStyle casa::viewer::QtPolygon::lineStyle | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 55 of file QtPolygon.qo.h.
int casa::viewer::QtPolygon::lineWidth | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 54 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::mark | ( | bool | set = true | ) | [inline] |
functions added with the introduction of RegionToolManager and the unified selection and manipulation of the various region types...
Reimplemented from casa::viewer::QtRegion.
Definition at line 128 of file QtPolygon.qo.h.
bool casa::viewer::QtPolygon::mark_toggle | ( | ) | [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 130 of file QtPolygon.qo.h.
bool casa::viewer::QtPolygon::markCenter | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 134 of file QtPolygon.qo.h.
bool casa::viewer::QtPolygon::marked | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 129 of file QtPolygon.qo.h.
size_t casa::viewer::QtPolygon::marked_region_count | ( | ) | [inline, protected] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 147 of file QtPolygon.qo.h.
const std::string casa::viewer::QtPolygon::name | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 50 of file QtPolygon.qo.h.
int casa::viewer::QtPolygon::numFrames | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 84 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::output | ( | ds9writer & | out | ) | const |
Reimplemented from casa::viewer::Polygon.
void casa::viewer::QtPolygon::pixelCenter | ( | double & | x, |
double & | y | ||
) | const [inline, virtual] |
Reimplemented from casa::viewer::Polygon.
Definition at line 101 of file QtPolygon.qo.h.
called when polygon region is completely specified...
used to trigger related region events, e.g. displaying spectra...
Reimplemented from casa::viewer::Polygon.
void casa::viewer::QtPolygon::refresh | ( | ) | [inline] |
qt-event -> QtRegion -> QtPolygon -> Region::refresh( )
Reimplemented from casa::viewer::Region.
Definition at line 104 of file QtPolygon.qo.h.
bool casa::viewer::QtPolygon::regionVisible | ( | ) | const [inline] |
Reimplemented from casa::viewer::Region.
Definition at line 99 of file QtPolygon.qo.h.
bool casa::viewer::QtPolygon::resizeX | ( | const std::string & | x, |
const std::string & | x_units, | ||
const std::string & | coordsys | ||
) | [inline, virtual] |
Implements casa::viewer::QtRegion.
Definition at line 79 of file QtPolygon.qo.h.
bool casa::viewer::QtPolygon::resizeY | ( | const std::string & | y, |
const std::string & | y_units, | ||
const std::string & | coordsys | ||
) | [inline, virtual] |
Implements casa::viewer::QtRegion.
Definition at line 81 of file QtPolygon.qo.h.
size_t casa::viewer::QtPolygon::selected_region_count | ( | ) | [inline, protected] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 146 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::selectedInCanvas | ( | ) | [inline, virtual] |
indicates that the user has selected this rectangle...
Reimplemented from casa::viewer::Region.
Definition at line 111 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::setAnnotation | ( | bool | ann | ) | [inline, virtual] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 124 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::setFont | ( | const std::string & | font = "" , |
int | font_size = -1 , |
||
int | font_style = 0 , |
||
const std::string & | font_color = "" |
||
) | [inline, virtual] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 120 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::setLabel | ( | const std::string & | l | ) | [inline, virtual] |
set attributes when loading a casa region text file...
Reimplemented from casa::viewer::QtRegion.
Definition at line 117 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::setLabelDelta | ( | const std::vector< int > & | delta | ) | [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 119 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::setLabelPosition | ( | TextPosition | pos | ) | [inline, virtual] |
Implements casa::viewer::Region.
Definition at line 118 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::setLine | ( | const std::string & | line_color = "" , |
Region::LineStyle | line_style = SolidLine , |
||
unsigned int | line_width = 1 |
||
) | [inline, virtual] |
Implements casa::viewer::Region.
Definition at line 122 of file QtPolygon.qo.h.
bool casa::viewer::QtPolygon::skyComponent | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 136 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::status | ( | const std::string & | msg, |
const std::string & | type = "info" |
||
) | [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 132 of file QtPolygon.qo.h.
References casa::viewer::Polygon::type().
std::string casa::viewer::QtPolygon::textColor | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 57 of file QtPolygon.qo.h.
std::string casa::viewer::QtPolygon::textFont | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 58 of file QtPolygon.qo.h.
int casa::viewer::QtPolygon::textFontSize | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 59 of file QtPolygon.qo.h.
int casa::viewer::QtPolygon::textFontStyle | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 60 of file QtPolygon.qo.h.
Region::TextPosition casa::viewer::QtPolygon::textPosition | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 62 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::textPositionDelta | ( | int & | x, |
int & | y | ||
) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 63 of file QtPolygon.qo.h.
std::string casa::viewer::QtPolygon::textValue | ( | ) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 61 of file QtPolygon.qo.h.
bool casa::viewer::QtPolygon::translateX | ( | const std::string & | x, |
const std::string & | x_units, | ||
const std::string & | coordsys | ||
) | [inline, virtual] |
Implements casa::viewer::QtRegion.
Definition at line 75 of file QtPolygon.qo.h.
bool casa::viewer::QtPolygon::translateY | ( | const std::string & | y, |
const std::string & | y_units, | ||
const std::string & | coordsys | ||
) | [inline, virtual] |
Implements casa::viewer::QtRegion.
Definition at line 77 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::updateStateInfo | ( | bool | region_modified, |
RegionChanges | change | ||
) | [inline] |
indicates that region movement requires that the statistcs be updated...
Definition at line 89 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::weaklySelect | ( | ) | [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 114 of file QtPolygon.qo.h.
bool casa::viewer::QtPolygon::weaklySelected | ( | ) | const [inline] |
is this region weakly or temporarily selected?
Reimplemented from casa::viewer::QtRegion.
Definition at line 113 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::weaklyUnselect | ( | ) | [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 115 of file QtPolygon.qo.h.
int casa::viewer::QtPolygon::zIndex | ( | ) | const [inline] |
Reimplemented from casa::viewer::Region.
Definition at line 86 of file QtPolygon.qo.h.
void casa::viewer::QtPolygon::zRange | ( | int & | min, |
int & | max | ||
) | const [inline] |
Reimplemented from casa::viewer::QtRegion.
Definition at line 85 of file QtPolygon.qo.h.