OpenWalnut  1.2.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
WROI Class Reference

Superclass for different ROI (region of interest) types. More...

#include <WROI.h>

+ Inheritance diagram for WROI:

List of all members.

Public Member Functions

virtual ~WROI ()
 Need virtual destructor because of virtual function.
void setNot (bool isNot=true)
 sets the NOT flag
bool isNot ()
 getter for NOT flag
bool active ()
 getter
void setActive (bool active)
 setter
void hide ()
 hides the roi in the scene
void unhide ()
 unhides the roi in the scene
bool dirty ()
 Getter for modified flag.
void setDirty ()
 sets the dirty flag
boost::shared_ptr< WPropertiesgetProperties ()
 Getter.
void addROIChangeNotifier (boost::shared_ptr< boost::function< void() > > notifier)
 Add a specified notifier to the list of default notifiers which get connected to each roi.
void removeROIChangeNotifier (boost::shared_ptr< boost::function< void() > > notifier)
 Remove a specified notifier from the list of default notifiers which get connected to each roi.

Protected Member Functions

void properties ()
 initializes the roi's properties
void propertyChanged ()
 callback when a property gets changed
void signalRoiChange ()
 signals a roi change to all subscribers

Protected Attributes

osg::ref_ptr< WPickHandlerm_pickHandler
 A pointer to the pick handler used to get gui events for moving the box.
boost::shared_ptr< WPropertiesm_properties
 the property object for the module
WPropBool m_dirty
 dirty flag, indicating the graphics needs updating, it is no longer used for bitfield updating since these customers get the update notification via callback
WPropBool m_active
 indicates if the roi is active
WPropBool m_show
 indicates if the roi is visible in the scene
WPropBool m_not
 indicates if the roi is negated
WPropDouble m_threshold
 threshold for an arbitrary roi
WPropColor m_color
 A color for painting the roi in the scene.
std::list< boost::shared_ptr
< boost::function< void() > > > 
m_changeNotifiers
 The notifiers connected to added rois by default.
boost::shared_mutex m_associatedNotifiersLock
 Lock for associated notifiers set.

Private Member Functions

virtual void updateGFX ()=0
 updates the graphics

Detailed Description

Superclass for different ROI (region of interest) types.

Definition at line 46 of file WROI.h.


Constructor & Destructor Documentation

WROI::~WROI ( )
virtual

Need virtual destructor because of virtual function.

Definition at line 35 of file WROI.cpp.


Member Function Documentation

bool WROI::active ( )

getter

Returns:
the active flag

Definition at line 87 of file WROI.cpp.

References m_active.

void WROI::addROIChangeNotifier ( boost::shared_ptr< boost::function< void() > >  notifier)

Add a specified notifier to the list of default notifiers which get connected to each roi.

Parameters:
notifierthe notifier function

Definition at line 128 of file WROI.cpp.

References m_associatedNotifiersLock, and m_changeNotifiers.

bool WROI::dirty ( )

Getter for modified flag.

Returns:
the dirty flag

Definition at line 104 of file WROI.cpp.

References m_dirty.

boost::shared_ptr< WProperties > WROI::getProperties ( )

Getter.

Returns:
the properties object for this roi

Definition at line 71 of file WROI.cpp.

References m_properties.

void WROI::hide ( )

hides the roi in the scene

Definition at line 109 of file WROI.cpp.

Referenced by propertyChanged().

bool WROI::isNot ( )

getter for NOT flag

Returns:
the flag

Definition at line 82 of file WROI.cpp.

References m_not.

void WROI::properties ( )
protected

initializes the roi's properties

Reimplemented in WROIArbitrary.

Definition at line 39 of file WROI.cpp.

References m_active, m_dirty, m_not, m_properties, m_show, and propertyChanged().

void WROI::propertyChanged ( )
protected

callback when a property gets changed

Reimplemented in WROIArbitrary.

Definition at line 54 of file WROI.cpp.

References hide(), m_show, setDirty(), and unhide().

Referenced by properties().

void WROI::removeROIChangeNotifier ( boost::shared_ptr< boost::function< void() > >  notifier)

Remove a specified notifier from the list of default notifiers which get connected to each roi.

Parameters:
notifierthe notifier function

Definition at line 136 of file WROI.cpp.

References m_associatedNotifiersLock, and m_changeNotifiers.

void WROI::setActive ( bool  active)

setter

Parameters:
active

Definition at line 92 of file WROI.cpp.

References m_active, and setDirty().

void WROI::setDirty ( )
void WROI::setNot ( bool  isNot = true)

sets the NOT flag

Parameters:
isNot

Definition at line 76 of file WROI.cpp.

References m_not, and setDirty().

void WROI::signalRoiChange ( )
protected

signals a roi change to all subscribers

Definition at line 119 of file WROI.cpp.

References m_changeNotifiers.

Referenced by setDirty(), WROIBox::updateGFX(), and WROISphere::updateGFX().

void WROI::unhide ( )

unhides the roi in the scene

Definition at line 114 of file WROI.cpp.

Referenced by propertyChanged().

virtual void WROI::updateGFX ( )
privatepure virtual

updates the graphics

Implemented in WROISphere, WROIArbitrary, and WROIBox.


Member Data Documentation

WPropBool WROI::m_active
protected

indicates if the roi is active

Definition at line 159 of file WROI.h.

Referenced by active(), properties(), and setActive().

boost::shared_mutex WROI::m_associatedNotifiersLock
protected

Lock for associated notifiers set.

Definition at line 190 of file WROI.h.

Referenced by addROIChangeNotifier(), and removeROIChangeNotifier().

std::list< boost::shared_ptr< boost::function< void() > > > WROI::m_changeNotifiers
protected

The notifiers connected to added rois by default.

Definition at line 184 of file WROI.h.

Referenced by addROIChangeNotifier(), removeROIChangeNotifier(), and signalRoiChange().

WPropColor WROI::m_color
protected

A color for painting the roi in the scene.

Reimplemented in WROISphere, WROIArbitrary, and WROIBox.

Definition at line 179 of file WROI.h.

WPropBool WROI::m_dirty
protected

dirty flag, indicating the graphics needs updating, it is no longer used for bitfield updating since these customers get the update notification via callback

Definition at line 154 of file WROI.h.

Referenced by dirty(), properties(), setDirty(), WROISphere::setPosition(), WROISphere::setX(), WROISphere::setY(), WROISphere::setZ(), WROIBox::updateGFX(), WROIArbitrary::updateGFX(), WROISphere::updateGFX(), and WROISphere::WROISphere().

WPropBool WROI::m_not
protected

indicates if the roi is negated

Definition at line 169 of file WROI.h.

Referenced by isNot(), properties(), setNot(), WROIBox::updateGFX(), and WROIBox::WROIBox().

osg::ref_ptr< WPickHandler > WROI::m_pickHandler
protected

A pointer to the pick handler used to get gui events for moving the box.

Definition at line 143 of file WROI.h.

Referenced by WROIBox::WROIBox(), and WROISphere::WROISphere().

boost::shared_ptr< WProperties > WROI::m_properties
protected

the property object for the module

Definition at line 148 of file WROI.h.

Referenced by getProperties(), WROIArbitrary::properties(), and properties().

WPropBool WROI::m_show
protected

indicates if the roi is visible in the scene

Definition at line 164 of file WROI.h.

Referenced by properties(), and propertyChanged().

WPropDouble WROI::m_threshold
protected

threshold for an arbitrary roi

Reimplemented in WROIArbitrary.

Definition at line 174 of file WROI.h.


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