30 #include <shared_mutex>
33 #include <boost/signals2/connection.hpp>
34 #include <boost/signals2/signal.hpp>
37 #include "../common/WProperties.h"
44 class WROI :
public osg::Geode
Class to handle events with a pick.
Superclass for different ROI (region of interest) types.
void removeROIChangeNotifier(std::shared_ptr< boost::function< void() > > notifier)
Remove a specified notifier from the list of default notifiers which get connected to each roi.
WPropBool activeProperty()
The active property.
WPropBool m_show
indicates if the roi is visible in the scene
void setNot(bool isNot=true)
sets the NOT flag
std::shared_mutex m_associatedNotifiersLock
Lock for associated notifiers set.
void propertyChanged()
callback when a property gets changed
osg::ref_ptr< WPickHandler > m_pickHandler
A pointer to the pick handler used to get gui events for moving the box.
bool dirty()
Getter for modified flag.
std::shared_ptr< WProperties > m_properties
the property object for the module
WPropString nameProperty()
The name property.
void signalRoiChange()
signals a roi change to all subscribers
std::list< std::shared_ptr< boost::function< void() > > > m_changeNotifiers
The notifiers connected to added rois by default.
WPropBool m_not
indicates if the roi is negated
virtual ~WROI()
Need virtual destructor because of virtual function.
WPropDouble m_threshold
threshold for an arbitrary roi
WPropBool showProperty()
The property for toggling ROI visibility.
WPropString m_name
name of the ROI.
osg::ref_ptr< WROI > RefPtr
Ref Pointer type.
void setActive(bool active)
setter
virtual void updateGFX()=0
updates the graphics
void hide()
hides the roi in the scene
WPropBool m_active
indicates if the roi is active
void setDirty()
sets the dirty flag
WPropBool invertProperty()
Invert property.
void addROIChangeNotifier(std::shared_ptr< boost::function< void() > > notifier)
Add a specified notifier to the list of default notifiers which get connected to each roi.
WPropColor m_color
A color for painting the roi in the scene.
WPropBool m_dirty
dirty flag, indicating the graphics needs updating, it is no longer used for bitfield updating since ...
bool isNot()
getter for NOT flag
void unhide()
unhides the roi in the scene
std::shared_ptr< WProperties > getProperties()
Getter.
void properties()
initializes the roi's properties