casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes
casa::viewer::Polyline Class Reference

#include <Polyline.qo.h>

Inheritance diagram for casa::viewer::Polyline:
casa::viewer::Region casa::viewer::dtorNotifier

List of all members.

Public Types

typedef std::pair< double, double > pt
typedef std::vector< ptpoint_list

Public Slots

void setMarkerPosition (int regionId, int segmentIndex, float percentage)
 Position marker.
void setShowMarkerPosition (int regionId, bool show)

Signals

void show1DSliceTool ()

Public Member Functions

 Polyline (WorldCanvas *wc, QtRegionDock *d, double x1, double y1)
 Construction.
 Polyline (WorldCanvas *wc, QtRegionDock *d, const std::vector< std::pair< double, double > > &pts)
 Polyline (QtRegionSourceKernel *, WorldCanvas *wc, const std::vector< std::pair< double, double > > &pts, bool hold_signals=false)
 carry over from QtRegion...
 Polyline (QtRegionSourceKernel *rs, WorldCanvas *wc, double x1, double y1, bool hold_signals=false)
virtual ~Polyline ()
bool clickWithin (double x, double y) const
int clickHandle (double x, double y) const
int moveHandle (int handle, double x, double y)
void move (double dx, double dy)
void resize (double, double)
bool valid_translation (double dx, double dy, double width_delta, double height_delta)
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)
void linearCenter (double &x, double &y) const
void pixelCenter (double &x, double &y) const
void polylineComplete ()
void addVertex (double x, double y, bool rewrite_last_point=false)
AnnotationBaseannotation () const
void boundingRectangle (double &blcx, double &blcy, double &trcx, double &trcy) const
 return the drawing bounding rectangle...
int numVertices () const
void output (ds9writer &out) const
region::RegionTypes type () const
 fetch region type...
void addPlot (QWidget *parent, string label)

Protected Types

enum  YScaleTo {
  ScaleTop,
  ScaleBottom
}
enum  XScaleTo {
  ScaleLeft,
  ScaleRight
}
enum  Tranformations {
  FLIP_X,
  FLIP_Y
}

Protected Member Functions

virtual RegionInfonewInfoObject (ImageInterface< Float > *image, PrincipalAxesDD *)
 newInfoObject(...) is currently only used for PVLine regions, but it should be used for other regions to allow for specialized creation of the region info objects for display in "statistics"...
unsigned int check_handle (double x, double y) const
std::list
< std::tr1::shared_ptr
< RegionInfo > > * 
generate_dds_centers ()
ImageRegionget_image_region (DisplayData *) const
void drawRegion (bool)
void drawText ()
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
const point_listdrawing_points () const

Private Slots

void updatePolyLine (int regionId, viewer::region::RegionChanges, const QList< double > &worldX, const QList< double > &worldY, const QList< int > &pixelX, const QList< int > &pixelY)
void polyLineRegionChanged (viewer::Region *region, std::string changeType)
void polyLineRegionUpdate (int regionId, viewer::region::RegionChanges change, const QList< double > &worldX, const QList< double > &worldY, const QList< int > &pixelX, const QList< int > &pixelY)

Private Member Functions

bool within_vertex_handle (double x, double y) const
int move_sizing_rectangle_handle (int handle, double x, double y)
int move_vertex (int handle, double x, double y)
void update_drawing_bounds_rectangle ()
void update_reference_bounds_rectangle ()
void update_drawing_state ()
void update_reference_state (int transformations, int handle, int new_handle)
virtual void setCenter (double &x, double &y, double &deltx, double &delty)
void initPlot ()
void setPlotLineColor ()
void setPlotLineColor (SlicePlot *plot)
void drawPositionMarker ()
 Slice functionality.

Private Attributes

double handle_delta_x
double handle_delta_y
point_list _ref_points_
double _ref_blc_x_
double _ref_blc_y_
double _ref_trc_x_
double _ref_trc_y_
double _ref_width_
double _ref_height_
point_list _drawing_points_
double _drawing_blc_x_
double _drawing_blc_y_
double _drawing_trc_x_
double _drawing_trc_y_
double _drawing_width_
double _drawing_height_
double _center_x
double _center_y
double _center_delta_x
double _center_delta_y
XScaleTo _x_origin_
YScaleTo _y_origin_
QMap< QString, SlicePlot * > slicePlots
int markerSegmentIndex
float markerPercentage
bool showPositionMarker

Detailed Description

Definition at line 44 of file Polyline.qo.h.


Member Typedef Documentation

typedef std::vector<pt> casa::viewer::Polyline::point_list

Definition at line 48 of file Polyline.qo.h.

typedef std::pair<double,double> casa::viewer::Polyline::pt

Definition at line 47 of file Polyline.qo.h.


Member Enumeration Documentation

Enumerator:
FLIP_X 
FLIP_Y 

Definition at line 112 of file Polyline.qo.h.

Enumerator:
ScaleLeft 
ScaleRight 

Definition at line 111 of file Polyline.qo.h.

Enumerator:
ScaleTop 
ScaleBottom 

Definition at line 110 of file Polyline.qo.h.


Constructor & Destructor Documentation

casa::viewer::Polyline::Polyline ( WorldCanvas wc,
QtRegionDock d,
double  x1,
double  y1 
)

Construction.

casa::viewer::Polyline::Polyline ( WorldCanvas wc,
QtRegionDock d,
const std::vector< std::pair< double, double > > &  pts 
)
casa::viewer::Polyline::Polyline ( QtRegionSourceKernel ,
WorldCanvas wc,
const std::vector< std::pair< double, double > > &  pts,
bool  hold_signals = false 
)

carry over from QtRegion...

hopefully, removed soon...

casa::viewer::Polyline::Polyline ( QtRegionSourceKernel rs,
WorldCanvas wc,
double  x1,
double  y1,
bool  hold_signals = false 
)
virtual casa::viewer::Polyline::~Polyline ( ) [virtual]

Member Function Documentation

void casa::viewer::Polyline::addPlot ( QWidget *  parent,
string  label 
)
void casa::viewer::Polyline::addVertex ( double  x,
double  y,
bool  rewrite_last_point = false 
)
void casa::viewer::Polyline::boundingRectangle ( double &  blcx,
double &  blcy,
double &  trcx,
double &  trcy 
) const

return the drawing bounding rectangle...

in "linear" coordinates...

unsigned int casa::viewer::Polyline::check_handle ( double  x,
double  y 
) const [protected]
region::PointInfo casa::viewer::Polyline::checkPoint ( double  x,
double  y 
) const [virtual]

returns point state (Region::PointLocation)

Implements casa::viewer::Region.

int casa::viewer::Polyline::clickHandle ( double  x,
double  y 
) const
bool casa::viewer::Polyline::clickWithin ( double  x,
double  y 
) const
const point_list& casa::viewer::Polyline::drawing_points ( ) const [inline, protected]

Definition at line 122 of file Polyline.qo.h.

References _drawing_points_.

Referenced by numVertices().

Slice functionality.

void casa::viewer::Polyline::drawRegion ( bool  ) [protected, virtual]

Implements casa::viewer::Region.

void casa::viewer::Polyline::drawText ( ) [protected, virtual]

Reimplemented from casa::viewer::Region.

virtual void casa::viewer::Polyline::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.

std::list<std::tr1::shared_ptr<RegionInfo> >* casa::viewer::Polyline::generate_dds_centers ( ) [protected, virtual]

Implements casa::viewer::Region.

void casa::viewer::Polyline::linearCenter ( double &  x,
double &  y 
) const
unsigned int casa::viewer::Polyline::mouseMovement ( double  x,
double  y,
bool  other_selected 
)

returns mouse state (Region::MouseState)

void casa::viewer::Polyline::move ( double  dx,
double  dy 
)
int casa::viewer::Polyline::move_sizing_rectangle_handle ( int  handle,
double  x,
double  y 
) [private]
int casa::viewer::Polyline::move_vertex ( int  handle,
double  x,
double  y 
) [private]
int casa::viewer::Polyline::moveHandle ( int  handle,
double  x,
double  y 
)
virtual RegionInfo* casa::viewer::Polyline::newInfoObject ( ImageInterface< Float > *  ,
PrincipalAxesDD  
) [protected, virtual]

newInfoObject(...) is currently only used for PVLine regions, but it should be used for other regions to allow for specialized creation of the region info objects for display in "statistics"...

Reimplemented from casa::viewer::Region.

int casa::viewer::Polyline::numVertices ( ) const [inline]

Definition at line 87 of file Polyline.qo.h.

References drawing_points().

void casa::viewer::Polyline::pixelCenter ( double &  x,
double &  y 
) const [virtual]

Implements casa::viewer::Region.

void casa::viewer::Polyline::polyLineRegionChanged ( viewer::Region region,
std::string  changeType 
) [private, slot]
void casa::viewer::Polyline::polyLineRegionUpdate ( int  regionId,
viewer::region::RegionChanges  change,
const QList< double > &  worldX,
const QList< double > &  worldY,
const QList< int > &  pixelX,
const QList< int > &  pixelY 
) [private, slot]
void casa::viewer::Polyline::resize ( double  ,
double   
)
virtual void casa::viewer::Polyline::setCenter ( double &  x,
double &  y,
double &  deltx,
double &  delty 
) [private, virtual]
void casa::viewer::Polyline::setMarkerPosition ( int  regionId,
int  segmentIndex,
float  percentage 
) [slot]

Position marker.

void casa::viewer::Polyline::setShowMarkerPosition ( int  regionId,
bool  show 
) [slot]

fetch region type...

Implements casa::viewer::Region.

Definition at line 92 of file Polyline.qo.h.

References casa::viewer::region::PolylineRegion.

void casa::viewer::Polyline::update_reference_state ( int  transformations,
int  handle,
int  new_handle 
) [private]
void casa::viewer::Polyline::updatePolyLine ( int  regionId,
viewer::region::RegionChanges  ,
const QList< double > &  worldX,
const QList< double > &  worldY,
const QList< int > &  pixelX,
const QList< int > &  pixelY 
) [private, slot]
bool casa::viewer::Polyline::valid_translation ( double  dx,
double  dy,
double  width_delta,
double  height_delta 
) [virtual]

Implements casa::viewer::Region.

bool casa::viewer::Polyline::within_vertex_handle ( double  x,
double  y 
) const [private]

Member Data Documentation

Definition at line 164 of file Polyline.qo.h.

Definition at line 164 of file Polyline.qo.h.

Definition at line 163 of file Polyline.qo.h.

Definition at line 163 of file Polyline.qo.h.

Definition at line 159 of file Polyline.qo.h.

Definition at line 159 of file Polyline.qo.h.

Definition at line 161 of file Polyline.qo.h.

Definition at line 158 of file Polyline.qo.h.

Referenced by drawing_points().

Definition at line 160 of file Polyline.qo.h.

Definition at line 160 of file Polyline.qo.h.

Definition at line 161 of file Polyline.qo.h.

Definition at line 154 of file Polyline.qo.h.

Definition at line 154 of file Polyline.qo.h.

Definition at line 156 of file Polyline.qo.h.

Definition at line 153 of file Polyline.qo.h.

Definition at line 155 of file Polyline.qo.h.

Definition at line 155 of file Polyline.qo.h.

Definition at line 156 of file Polyline.qo.h.

Definition at line 166 of file Polyline.qo.h.

Definition at line 167 of file Polyline.qo.h.

Definition at line 151 of file Polyline.qo.h.

Definition at line 151 of file Polyline.qo.h.

Definition at line 173 of file Polyline.qo.h.

Definition at line 172 of file Polyline.qo.h.

Definition at line 174 of file Polyline.qo.h.

Definition at line 171 of file Polyline.qo.h.


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