casa
$Rev:20696$
|
All regions are specified in "linear coordinates", not "pixel coordinates". More...
#include <Rectangle.h>
Public Member Functions | |
~Rectangle () | |
Rectangle (WorldCanvas *wc, QtRegionDock *d, double x1, double y1, double x2, double y2, bool hold_signals=false) | |
Rectangle (QtRegionSourceKernel *rs, WorldCanvas *wc, double x1, double y1, double x2, double y2, bool hold_signals=false) | |
carry over from QtRegion... | |
bool | clickWithin (double x, double y) const |
int | clickHandle (double x, double y) const |
bool | doubleClick (double, double) |
region::PointInfo | checkPoint (double x, double y) const |
returns point state (Region::PointLocation) | |
unsigned int | mouseMovement (double x, double y, bool other_selected) |
returns mouse state (Region::MouseState) | |
int | moveHandle (int handle, double x, double y) |
for rectangles, resizing can change the handle... | |
void | move (double dx, double dy) |
void | resize (double, double) |
bool | valid_translation (double dx, double dy, double width_delta, double height_delta) |
void | linearCenter (double &x, double &y) const |
void | pixelCenter (double &x, double &y) const |
AnnotationBase * | annotation () const |
virtual bool | flag (MSAsRaster *msar) |
void | boundingRectangle (double &blcx, double &blcy, double &trcx, double &trcy) const |
in "linear" coordinates... | |
void | output (ds9writer &out) const |
region::RegionTypes | type () const |
fetch region type... | |
Protected Member Functions | |
Rectangle (const std::string &name, WorldCanvas *wc, QtRegionDock *d, double x1, double y1, double x2, double y2, bool hold_signals=false, QtMouseToolNames::PointRegionSymbols sym=QtMouseToolNames::SYM_UNKNOWN) | |
RegionInfo::stats_t * | get_ms_stats (MSAsRaster *msar, double x, double y) |
void | generate_nonimage_statistics (DisplayData *, std::list< RegionInfo > *) |
std::list < std::tr1::shared_ptr < RegionInfo > > * | generate_dds_centers () |
ImageRegion * | get_image_region (DisplayData *) const |
virtual void | fetch_region_details (region::RegionTypes &type, std::vector< std::pair< int, int > > &pixel_pts, std::vector< std::pair< double, double > > &world_pts) const |
void | drawRegion (bool) |
virtual void | setCenter (double &x, double &y, double &deltx, double &delty) |
Protected Attributes | |
double | blc_x |
double | blc_y |
double | trc_x |
double | trc_y |
double | center_x_ |
double | center_y_ |
double | center_delta_x_ |
double | center_delta_y_ |
double | handle_delta_x |
double | handle_delta_y |
Private Member Functions | |
bool | within_vertex_handle (double x, double y) const |
unsigned int | check_handle (double x, double y) const |
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.
Definition at line 52 of file Rectangle.h.
casa::viewer::Rectangle::Rectangle | ( | WorldCanvas * | wc, |
QtRegionDock * | d, | ||
double | x1, | ||
double | y1, | ||
double | x2, | ||
double | y2, | ||
bool | hold_signals = false |
||
) |
casa::viewer::Rectangle::Rectangle | ( | QtRegionSourceKernel * | rs, |
WorldCanvas * | wc, | ||
double | x1, | ||
double | y1, | ||
double | x2, | ||
double | y2, | ||
bool | hold_signals = false |
||
) |
carry over from QtRegion...
hopefully, removed soon...
casa::viewer::Rectangle::Rectangle | ( | const std::string & | name, |
WorldCanvas * | wc, | ||
QtRegionDock * | d, | ||
double | x1, | ||
double | y1, | ||
double | x2, | ||
double | y2, | ||
bool | hold_signals = false , |
||
QtMouseToolNames::PointRegionSymbols | sym = QtMouseToolNames::SYM_UNKNOWN |
||
) | [inline, protected] |
Definition at line 99 of file Rectangle.h.
References casa::viewer::Region::complete.
Reimplemented in casa::viewer::Point, and casa::viewer::Ellipse.
void casa::viewer::Rectangle::boundingRectangle | ( | double & | blcx, |
double & | blcy, | ||
double & | trcx, | ||
double & | trcy | ||
) | const |
in "linear" coordinates...
unsigned int casa::viewer::Rectangle::check_handle | ( | double | x, |
double | y | ||
) | const [private] |
region::PointInfo casa::viewer::Rectangle::checkPoint | ( | double | x, |
double | y | ||
) | const [virtual] |
returns point state (Region::PointLocation)
Implements casa::viewer::Region.
Reimplemented in casa::viewer::Point.
int casa::viewer::Rectangle::clickHandle | ( | double | x, |
double | y | ||
) | const |
Reimplemented in casa::viewer::Point.
bool casa::viewer::Rectangle::clickWithin | ( | double | x, |
double | y | ||
) | const [inline] |
Reimplemented in casa::viewer::Point.
Definition at line 62 of file Rectangle.h.
bool casa::viewer::Rectangle::doubleClick | ( | double | , |
double | |||
) |
void casa::viewer::Rectangle::drawRegion | ( | bool | ) | [protected, virtual] |
Implements casa::viewer::Region.
Reimplemented in casa::viewer::Point, and casa::viewer::Ellipse.
virtual void casa::viewer::Rectangle::fetch_region_details | ( | region::RegionTypes & | type, |
std::vector< std::pair< int, int > > & | pixel_pts, | ||
std::vector< std::pair< double, double > > & | world_pts | ||
) | const [protected, virtual] |
Reimplemented from casa::viewer::Region.
Reimplemented in casa::viewer::Point, and casa::viewer::Ellipse.
virtual bool casa::viewer::Rectangle::flag | ( | MSAsRaster * | msar | ) | [virtual] |
Reimplemented in casa::viewer::Ellipse.
std::list<std::tr1::shared_ptr<RegionInfo> >* casa::viewer::Rectangle::generate_dds_centers | ( | ) | [protected, virtual] |
Implements casa::viewer::Region.
Reimplemented in casa::viewer::Point, and casa::viewer::Ellipse.
void casa::viewer::Rectangle::generate_nonimage_statistics | ( | DisplayData * | , |
std::list< RegionInfo > * | |||
) | [protected] |
Reimplemented in casa::viewer::Ellipse.
ImageRegion* casa::viewer::Rectangle::get_image_region | ( | DisplayData * | ) | const [protected] |
Reimplemented in casa::viewer::Ellipse.
RegionInfo::stats_t* casa::viewer::Rectangle::get_ms_stats | ( | MSAsRaster * | msar, |
double | x, | ||
double | y | ||
) | [protected] |
void casa::viewer::Rectangle::linearCenter | ( | double & | x, |
double & | y | ||
) | const |
unsigned int casa::viewer::Rectangle::mouseMovement | ( | double | x, |
double | y, | ||
bool | other_selected | ||
) |
returns mouse state (Region::MouseState)
Reimplemented in casa::viewer::Point, and casa::viewer::Ellipse.
void casa::viewer::Rectangle::move | ( | double | dx, |
double | dy | ||
) |
int casa::viewer::Rectangle::moveHandle | ( | int | handle, |
double | x, | ||
double | y | ||
) |
for rectangles, resizing can change the handle...
for rectangles, moving a handle is resizing...
void casa::viewer::Rectangle::output | ( | ds9writer & | out | ) | const |
void casa::viewer::Rectangle::pixelCenter | ( | double & | x, |
double & | y | ||
) | const [virtual] |
Implements casa::viewer::Region.
void casa::viewer::Rectangle::resize | ( | double | , |
double | |||
) |
Reimplemented in casa::viewer::Point.
virtual void casa::viewer::Rectangle::setCenter | ( | double & | x, |
double & | y, | ||
double & | deltx, | ||
double & | delty | ||
) | [inline, protected, virtual] |
Definition at line 116 of file Rectangle.h.
References center_delta_x_, center_delta_y_, center_x_, and center_y_.
region::RegionTypes casa::viewer::Rectangle::type | ( | ) | const [inline, virtual] |
fetch region type...
Implements casa::viewer::Region.
Reimplemented in casa::viewer::Point, and casa::viewer::Ellipse.
Definition at line 96 of file Rectangle.h.
References casa::viewer::region::RectRegion.
bool casa::viewer::Rectangle::valid_translation | ( | double | dx, |
double | dy, | ||
double | width_delta, | ||
double | height_delta | ||
) | [virtual] |
Implements casa::viewer::Region.
bool casa::viewer::Rectangle::within_vertex_handle | ( | double | x, |
double | y | ||
) | const [private] |
double casa::viewer::Rectangle::blc_x [protected] |
Definition at line 116 of file Rectangle.h.
Referenced by clickWithin().
double casa::viewer::Rectangle::blc_y [protected] |
Definition at line 116 of file Rectangle.h.
Referenced by clickWithin().
double casa::viewer::Rectangle::center_delta_x_ [protected] |
Definition at line 121 of file Rectangle.h.
Referenced by setCenter().
double casa::viewer::Rectangle::center_delta_y_ [protected] |
Definition at line 121 of file Rectangle.h.
Referenced by setCenter().
double casa::viewer::Rectangle::center_x_ [protected] |
Definition at line 120 of file Rectangle.h.
Referenced by setCenter().
double casa::viewer::Rectangle::center_y_ [protected] |
Definition at line 120 of file Rectangle.h.
Referenced by setCenter().
double casa::viewer::Rectangle::handle_delta_x [protected] |
Definition at line 122 of file Rectangle.h.
double casa::viewer::Rectangle::handle_delta_y [protected] |
Definition at line 122 of file Rectangle.h.
double casa::viewer::Rectangle::trc_x [protected] |
Definition at line 119 of file Rectangle.h.
double casa::viewer::Rectangle::trc_y [protected] |
Definition at line 119 of file Rectangle.h.
Referenced by clickWithin().