29 #include "WPickHandler.h"
46 m_name =
m_properties->addProperty(
"Name",
"The name of this ROI.", std::string(
"ROI" ) );
48 m_show =
m_properties->addProperty(
"Show",
"Toggles visibility of the ROI but does not disable it.",
true,
137 setNodeMask( 0xFFFFFFFF );
142 for( std::list< std::shared_ptr< boost::function<
void() > > >::iterator iter =
m_changeNotifiers.begin();
151 std::unique_lock< std::shared_mutex > lock;
159 std::unique_lock< std::shared_mutex > lock;
161 std::list< std::shared_ptr< boost::function< void() > > >::iterator it;
Class to manage properties of an object and to provide convenience methods for easy access and manipu...
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
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.
WPropBool showProperty()
The property for toggling ROI visibility.
WPropString m_name
name of the ROI.
void setActive(bool active)
setter
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.
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