OpenWalnut
1.4.0
|
Superclass for different ROI (region of interest) types. More...
#include <WROI.h>
Public Types | |
typedef osg::ref_ptr< WROI > | RefPtr |
Ref Pointer type. More... | |
Public Member Functions | |
virtual | ~WROI () |
Need virtual destructor because of virtual function. More... | |
void | setNot (bool isNot=true) |
sets the NOT flag More... | |
bool | isNot () |
getter for NOT flag More... | |
bool | active () |
getter More... | |
void | setActive (bool active) |
setter More... | |
void | hide () |
hides the roi in the scene More... | |
void | unhide () |
unhides the roi in the scene More... | |
bool | dirty () |
Getter for modified flag. More... | |
void | setDirty () |
sets the dirty flag More... | |
boost::shared_ptr< WProperties > | getProperties () |
Getter. More... | |
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. More... | |
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. More... | |
WPropBool | invertProperty () |
Invert property. More... | |
WPropBool | showProperty () |
The property for toggling ROI visibility. More... | |
WPropBool | activeProperty () |
The active property. More... | |
WPropString | nameProperty () |
The name property. More... | |
Protected Member Functions | |
void | properties () |
initializes the roi's properties More... | |
void | propertyChanged () |
callback when a property gets changed More... | |
void | signalRoiChange () |
signals a roi change to all subscribers More... | |
Protected Attributes | |
osg::ref_ptr< WPickHandler > | m_pickHandler |
A pointer to the pick handler used to get gui events for moving the box. More... | |
boost::shared_ptr< WProperties > | m_properties |
the property object for the module More... | |
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 More... | |
WPropBool | m_active |
indicates if the roi is active More... | |
WPropBool | m_show |
indicates if the roi is visible in the scene More... | |
WPropBool | m_not |
indicates if the roi is negated More... | |
WPropString | m_name |
name of the ROI. More... | |
WPropDouble | m_threshold |
threshold for an arbitrary roi More... | |
WPropColor | m_color |
A color for painting the roi in the scene. More... | |
std::list< boost::shared_ptr< boost::function< void() > > > | m_changeNotifiers |
The notifiers connected to added rois by default. More... | |
boost::shared_mutex | m_associatedNotifiersLock |
Lock for associated notifiers set. More... | |
Private Member Functions | |
virtual void | updateGFX ()=0 |
updates the graphics More... | |
typedef osg::ref_ptr< WROI > WROI::RefPtr |
|
virtual |
bool WROI::active | ( | ) |
WPropBool WROI::activeProperty | ( | ) |
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.
notifier | the notifier function |
Definition at line 148 of file WROI.cpp.
References m_associatedNotifiersLock, and m_changeNotifiers.
bool WROI::dirty | ( | ) |
boost::shared_ptr< WProperties > WROI::getProperties | ( | ) |
Getter.
Definition at line 91 of file WROI.cpp.
References m_properties.
Referenced by WRoiProjectFileIO::save().
void WROI::hide | ( | ) |
hides the roi in the scene
Definition at line 129 of file WROI.cpp.
Referenced by propertyChanged().
WPropBool WROI::invertProperty | ( | ) |
bool WROI::isNot | ( | ) |
WPropString WROI::nameProperty | ( | ) |
|
protected |
initializes the roi's properties
Definition at line 41 of file WROI.cpp.
References m_active, m_dirty, m_name, m_not, m_properties, m_show, and propertyChanged().
|
protected |
callback when a property gets changed
Definition at line 74 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.
notifier | the notifier function |
Definition at line 156 of file WROI.cpp.
References m_associatedNotifiersLock, and m_changeNotifiers.
void WROI::setActive | ( | bool | active | ) |
setter
active |
Definition at line 112 of file WROI.cpp.
References m_active, and setDirty().
void WROI::setDirty | ( | ) |
sets the dirty flag
Definition at line 118 of file WROI.cpp.
References m_dirty, and signalRoiChange().
Referenced by WROIArbitrary::propertyChanged(), propertyChanged(), setActive(), setNot(), WROIArbitrary::setThreshold(), WROIBox::updateGFX(), WROIArbitrary::WROIArbitrary(), and WROIBox::WROIBox().
void WROI::setNot | ( | bool | isNot = true | ) |
sets the NOT flag
isNot |
Definition at line 96 of file WROI.cpp.
References m_not, and setDirty().
WPropBool WROI::showProperty | ( | ) |
|
protected |
signals a roi change to all subscribers
Definition at line 139 of file WROI.cpp.
References m_changeNotifiers.
Referenced by setDirty(), and WROISphere::updateGFX().
void WROI::unhide | ( | ) |
unhides the roi in the scene
Definition at line 134 of file WROI.cpp.
Referenced by propertyChanged().
|
privatepure virtual |
updates the graphics
Implemented in WROISphere, WROIBox, and WROIArbitrary.
|
protected |
indicates if the roi is active
Definition at line 187 of file WROI.h.
Referenced by active(), activeProperty(), properties(), and setActive().
|
protected |
Lock for associated notifiers set.
Definition at line 223 of file WROI.h.
Referenced by addROIChangeNotifier(), and removeROIChangeNotifier().
|
protected |
The notifiers connected to added rois by default.
Definition at line 217 of file WROI.h.
Referenced by addROIChangeNotifier(), removeROIChangeNotifier(), and signalRoiChange().
|
protected |
|
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 182 of file WROI.h.
Referenced by dirty(), properties(), setDirty(), WROISphere::setPosition(), WROISphere::setX(), WROISphere::setY(), WROISphere::setZ(), WROIArbitrary::updateGFX(), WROIBox::updateGFX(), WROISphere::updateGFX(), and WROISphere::WROISphere().
|
protected |
name of the ROI.
Definition at line 202 of file WROI.h.
Referenced by nameProperty(), and properties().
|
protected |
indicates if the roi is negated
Definition at line 197 of file WROI.h.
Referenced by invertProperty(), isNot(), properties(), setNot(), WROIBox::updateGFX(), and WROIBox::WROIBox().
|
protected |
A pointer to the pick handler used to get gui events for moving the box.
Definition at line 171 of file WROI.h.
Referenced by WROIBox::WROIBox(), and WROISphere::WROISphere().
|
protected |
the property object for the module
Definition at line 176 of file WROI.h.
Referenced by getProperties(), WROIArbitrary::properties(), properties(), and WROIBox::WROIBox().
|
protected |
indicates if the roi is visible in the scene
Definition at line 192 of file WROI.h.
Referenced by properties(), propertyChanged(), and showProperty().
|
protected |