OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Types | Public Member Functions | Protected Attributes | List of all members
ossimROIEvent Class Reference

#include <ossimROIEvent.h>

Inheritance diagram for ossimROIEvent:
ossimEvent ossimObject ossimReferenced

Public Types

enum  ossimRegionType { OSSIM_RECTANGLE_ROI = 0, OSSIM_POLYGON_ROI = 1, OSSIM_POLYLINE_ROI = 2 }
 
- Public Types inherited from ossimEvent
enum  PropagationType { PROPAGATION_NONE = 0, PROPAGATION_INPUT = 1, PROPAGATION_OUTPUT = 2 }
 

Public Member Functions

 ossimROIEvent (ossimObject *object=NULL, long id=OSSIM_EVENT_NULL_ID)
 
 ossimROIEvent (const ossimROIEvent &rhs)
 
virtual ossimObjectdup () const
 
const std::vector< ossimIpt > & getPoints () const
 
void getPoint (std::vector< ossimIpt > &points) const
 
void setPoints (const std::vector< ossimIpt > &points)
 
void setRect (const ossimIrect &rect)
 
void setEventType (ossimRegionType eventType)
 
ossimRegionType getEventType () const
 
void setTypeToPolygon ()
 
void setTypeToRectangle ()
 
void setTypeToPolyline ()
 
bool isRectangleRegion () const
 
bool isPolygonRegion () const
 
bool isPolylineRegion () const
 
void getRect (ossimIrect &rect) const
 
void getPolygon (ossimPolygon &polygon) const
 
void getPolyLine (ossimPolyLine &polyline) const
 
void setMovingFlag (bool flag)
 
bool getMovingFlag () const
 
- Public Member Functions inherited from ossimEvent
 ossimEvent (ossimObject *object=NULL, long id=OSSIM_EVENT_NULL_ID)
 
 ossimEvent (const ossimEvent &rhs)
 
long getId () const
 
void setId (long id)
 
bool isConsumed () const
 
void setConsumedFlag (bool flag=true)
 
void consume ()
 
const ossimObjectgetObject () const
 This is the originating object that originally produced the event. More...
 
ossimObjectgetObject ()
 
const ossimObjectgetCurrentObject () const
 
ossimObjectgetCurrentObject ()
 
void setObject (ossimObject *object)
 
void setCurrentObject (ossimObject *object)
 
void setPropagationType (PropagationType type)
 
bool isPropagatingToOutputs () const
 
bool isPropagatingToInputs () const
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Protected Attributes

std::vector< ossimIptthePoints
 
ossimRegionType theType
 
bool theMovingFlag
 
- Protected Attributes inherited from ossimEvent
ossimObjecttheObject
 
ossimObjecttheCurrentObject
 
long theId
 
bool theIsConsumedFlag
 
PropagationType thePropagationType
 

Additional Inherited Members

- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Detailed Description

Definition at line 21 of file ossimROIEvent.h.

Member Enumeration Documentation

◆ ossimRegionType

Enumerator
OSSIM_RECTANGLE_ROI 
OSSIM_POLYGON_ROI 
OSSIM_POLYLINE_ROI 

Definition at line 29 of file ossimROIEvent.h.

Constructor & Destructor Documentation

◆ ossimROIEvent() [1/2]

ossimROIEvent::ossimROIEvent ( ossimObject object = NULL,
long  id = OSSIM_EVENT_NULL_ID 
)

Definition at line 18 of file ossimROIEvent.cpp.

Referenced by dup().

20  : ossimEvent( object, id ),
22  theMovingFlag(false)
23 
24 {
25 }
ossimEvent(ossimObject *object=NULL, long id=OSSIM_EVENT_NULL_ID)
Definition: ossimEvent.cpp:16
ossimRegionType theType
Definition: ossimROIEvent.h:66

◆ ossimROIEvent() [2/2]

ossimROIEvent::ossimROIEvent ( const ossimROIEvent rhs)

Definition at line 27 of file ossimROIEvent.cpp.

28  : ossimEvent ( rhs ),
29  theType ( rhs.theType ),
31 {
32 }
ossimEvent(ossimObject *object=NULL, long id=OSSIM_EVENT_NULL_ID)
Definition: ossimEvent.cpp:16
ossimRegionType theType
Definition: ossimROIEvent.h:66

Member Function Documentation

◆ dup()

ossimObject * ossimROIEvent::dup ( ) const
virtual

Reimplemented from ossimObject.

Definition at line 34 of file ossimROIEvent.cpp.

References ossimROIEvent().

35 {
36  return new ossimROIEvent( *this );
37 }
ossimROIEvent(ossimObject *object=NULL, long id=OSSIM_EVENT_NULL_ID)

◆ getEventType()

ossimROIEvent::ossimRegionType ossimROIEvent::getEventType ( ) const

Definition at line 66 of file ossimROIEvent.cpp.

References theType.

Referenced by ossimROIEventListener::processEvent().

67 {
68  return theType;
69 }
ossimRegionType theType
Definition: ossimROIEvent.h:66

◆ getMovingFlag()

bool ossimROIEvent::getMovingFlag ( ) const
Returns
Returns theMoving flag. If true indicates region of interest is moving and size is not to change.

Definition at line 121 of file ossimROIEvent.cpp.

References theMovingFlag.

122 {
123  return theMovingFlag;
124 }

◆ getPoint()

void ossimROIEvent::getPoint ( std::vector< ossimIpt > &  points) const

Definition at line 44 of file ossimROIEvent.cpp.

References thePoints.

45 {
46  points = thePoints;
47 }
std::vector< ossimIpt > thePoints
Definition: ossimROIEvent.h:65

◆ getPoints()

const vector< ossimIpt > & ossimROIEvent::getPoints ( ) const

Definition at line 39 of file ossimROIEvent.cpp.

References thePoints.

40 {
41  return thePoints;
42 }
std::vector< ossimIpt > thePoints
Definition: ossimROIEvent.h:65

◆ getPolygon()

void ossimROIEvent::getPolygon ( ossimPolygon polygon) const

Definition at line 106 of file ossimROIEvent.cpp.

References thePoints.

107 {
108  polygon = ossimPolygon(thePoints);
109 }
std::vector< ossimIpt > thePoints
Definition: ossimROIEvent.h:65

◆ getPolyLine()

void ossimROIEvent::getPolyLine ( ossimPolyLine polyline) const

Definition at line 111 of file ossimROIEvent.cpp.

References thePoints.

112 {
113  polyline = ossimPolyLine(thePoints);
114 }
std::vector< ossimIpt > thePoints
Definition: ossimROIEvent.h:65

◆ getRect()

void ossimROIEvent::getRect ( ossimIrect rect) const

Definition at line 101 of file ossimROIEvent.cpp.

References thePoints.

102 {
103  rect = ossimIrect(thePoints);
104 }
std::vector< ossimIpt > thePoints
Definition: ossimROIEvent.h:65

◆ isPolygonRegion()

bool ossimROIEvent::isPolygonRegion ( ) const

Definition at line 91 of file ossimROIEvent.cpp.

References OSSIM_POLYGON_ROI, and theType.

92 {
93  return (theType == OSSIM_POLYGON_ROI);
94 }
ossimRegionType theType
Definition: ossimROIEvent.h:66

◆ isPolylineRegion()

bool ossimROIEvent::isPolylineRegion ( ) const

Definition at line 96 of file ossimROIEvent.cpp.

References OSSIM_POLYLINE_ROI, and theType.

97 {
98  return (theType == OSSIM_POLYLINE_ROI);
99 }
ossimRegionType theType
Definition: ossimROIEvent.h:66

◆ isRectangleRegion()

bool ossimROIEvent::isRectangleRegion ( ) const

Definition at line 86 of file ossimROIEvent.cpp.

References OSSIM_RECTANGLE_ROI, and theType.

87 {
88  return (theType == OSSIM_RECTANGLE_ROI);
89 }
ossimRegionType theType
Definition: ossimROIEvent.h:66

◆ setEventType()

void ossimROIEvent::setEventType ( ossimRegionType  eventType)

Definition at line 61 of file ossimROIEvent.cpp.

References theType.

62 {
63  theType = eventType;
64 }
ossimRegionType theType
Definition: ossimROIEvent.h:66

◆ setMovingFlag()

void ossimROIEvent::setMovingFlag ( bool  flag)
Parameters
flagIf true indicates region of interest is moving and size is not to change.

Definition at line 116 of file ossimROIEvent.cpp.

References theMovingFlag.

117 {
118  theMovingFlag = flag;
119 }

◆ setPoints()

void ossimROIEvent::setPoints ( const std::vector< ossimIpt > &  points)

Definition at line 49 of file ossimROIEvent.cpp.

References thePoints.

50 {
51  thePoints = points;
52 }
std::vector< ossimIpt > thePoints
Definition: ossimROIEvent.h:65

◆ setRect()

void ossimROIEvent::setRect ( const ossimIrect rect)

Definition at line 54 of file ossimROIEvent.cpp.

References ossimIrect::lr(), thePoints, and ossimIrect::ul().

55 {
56  thePoints.clear();
57  thePoints.push_back(rect.ul());
58  thePoints.push_back(rect.lr());
59 }
const ossimIpt & ul() const
Definition: ossimIrect.h:274
std::vector< ossimIpt > thePoints
Definition: ossimROIEvent.h:65
const ossimIpt & lr() const
Definition: ossimIrect.h:276

◆ setTypeToPolygon()

void ossimROIEvent::setTypeToPolygon ( )

Definition at line 71 of file ossimROIEvent.cpp.

References OSSIM_POLYGON_ROI, and theType.

◆ setTypeToPolyline()

void ossimROIEvent::setTypeToPolyline ( )

Definition at line 81 of file ossimROIEvent.cpp.

References OSSIM_POLYLINE_ROI, and theType.

◆ setTypeToRectangle()

void ossimROIEvent::setTypeToRectangle ( )

Definition at line 76 of file ossimROIEvent.cpp.

References OSSIM_RECTANGLE_ROI, and theType.

Member Data Documentation

◆ theMovingFlag

bool ossimROIEvent::theMovingFlag
protected

Definition at line 69 of file ossimROIEvent.h.

Referenced by getMovingFlag(), and setMovingFlag().

◆ thePoints

std::vector<ossimIpt> ossimROIEvent::thePoints
protected

Definition at line 65 of file ossimROIEvent.h.

Referenced by getPoint(), getPoints(), getPolygon(), getPolyLine(), getRect(), setPoints(), and setRect().

◆ theType

ossimRegionType ossimROIEvent::theType
protected

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