OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimROIEvent.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Scott Bortman
6 //
7 // Description: Region Of Interest (ROI) Event
8 //
9 // $Id: ossimROIEvent.h 9094 2006-06-13 19:12:40Z dburken $
10 //----------------------------------------------------------------------------
11 #ifndef ossimROIEvent_HEADER
12 #define ossimROIEvent_HEADER
13 
14 #include <ossim/base/ossimEvent.h>
15 #include <ossim/base/ossimIpt.h>
16 #include <vector>
17 
18 class ossimPolygon;
19 class ossimPolyLine;
20 class ossimIrect;
22 {
23 public:
24  ossimROIEvent( ossimObject* object=NULL,
25  long id=OSSIM_EVENT_NULL_ID );
26  ossimROIEvent( const ossimROIEvent& rhs );
27  virtual ossimObject* dup() const;
28 
30  {
31  OSSIM_RECTANGLE_ROI = 0,
32  OSSIM_POLYGON_ROI = 1,
33  OSSIM_POLYLINE_ROI = 2
34  };
35 
36  const std::vector<ossimIpt>& getPoints()const;
37  void getPoint(std::vector<ossimIpt>& points)const ;
38  void setPoints( const std::vector<ossimIpt>& points );
39  void setRect(const ossimIrect& rect);
40  void setEventType( ossimRegionType eventType );
41  ossimRegionType getEventType()const;
42  void setTypeToPolygon();
43  void setTypeToRectangle();
44  void setTypeToPolyline();
45  bool isRectangleRegion()const;
46  bool isPolygonRegion()const;
47  bool isPolylineRegion()const;
48  void getRect(ossimIrect& rect)const;
49  void getPolygon(ossimPolygon& polygon)const;
50  void getPolyLine(ossimPolyLine& polyline)const;
51 
56  void setMovingFlag(bool flag);
57 
62  bool getMovingFlag() const;
63 
64  protected:
65  std::vector<ossimIpt> thePoints;
67 
68  // Indicates moving so keep the same size on a redraw.
70 
72 };
73 
74 #endif
#define OSSIMDLLEXPORT
#define OSSIM_EVENT_NULL_ID
Definition: ossimEventIds.h:14
std::vector< ossimIpt > thePoints
Definition: ossimROIEvent.h:65
#define TYPE_DATA
Definition: ossimRtti.h:339
void getRect(const kdu_core::kdu_dims &dims, ossimIrect &rect)
Convenience method to convert kdu_core::kdu_dims to ossimIrect.
virtual ossimObject * dup() const
Definition: ossimObject.cpp:29
ossimRegionType theType
Definition: ossimROIEvent.h:66