30 #include "../graphicsEngine/WGraphicsEngine.h"
31 #include "WRMBranch.h"
32 #include "WROIManager.h"
36 m_roiManager( roiManager )
51 m_name =
m_properties->addProperty(
"Name",
"The name of this branch.", std::string(
"Branch" ) );
53 m_bundleColor =
m_properties->addProperty(
"Bundle color",
"Color the selected fibers using this color.", WColor( 1.0, 0.0, 0.0, 1.0 ),
93 for( std::vector< osg::ref_ptr< WROI > >::iterator iter =
m_rois.begin(); iter !=
m_rois.end(); ++iter )
95 if( ( *iter ) == roi )
106 for( std::vector< osg::ref_ptr< WROI > >::iterator iter =
m_rois.begin(); iter !=
m_rois.end(); ++iter )
108 if( ( *iter ) == roi )
119 for( std::vector< osg::ref_ptr< WROI > >::iterator iter =
m_rois.begin(); iter !=
m_rois.end(); ++iter )
121 roiVec.push_back( ( *iter ) );
128 for( std::vector< osg::ref_ptr< WROI > >::const_iterator iter =
m_rois.begin(); iter !=
m_rois.end(); ++iter )
130 ret.push_back( ( *iter ) );
137 for( std::vector< osg::ref_ptr< WROI > >::iterator iter =
m_rois.begin(); iter !=
m_rois.end(); ++iter )
150 for( std::list< std::shared_ptr< boost::function<
void() > > >::iterator iter =
m_changeNotifiers.begin();
174 std::unique_lock< std::shared_mutex > lock;
182 std::unique_lock< std::shared_mutex > lock;
184 std::list< std::shared_ptr< boost::function< void() > > >::iterator it;
static std::shared_ptr< WGraphicsEngine > getGraphicsEngine()
Returns instance of the graphics engine.
Class to manage properties of an object and to provide convenience methods for easy access and manipu...
std::shared_ptr< WPropertyGroup > SPtr
shared pointer to object of this type
std::list< std::shared_ptr< boost::function< void() > > > m_changeNotifiers
The notifiers connected to added rois by default.
void setDirty()
sets dirty flag true and notifies the branch
WRMBranch(std::shared_ptr< WROIManager > roiManager)
construtor
void addChangeNotifier(std::shared_ptr< boost::function< void() > > notifier)
Add a specified notifier to the list of default notifiers which get connected to each branch.
std::shared_ptr< boost::function< void() > > m_changeRoiSignal
Signal that can be used to update the ROImanager branch.
void removeChangeNotifier(std::shared_ptr< boost::function< void() > > notifier)
Remove a specified notifier from the list of default notifiers which get connected to each branch.
std::vector< osg::ref_ptr< WROI > > m_rois
list of rois in this this branch,
WPropertyGroup::SPtr getProperties() const
Get the properties of this branch as group.
void addRoi(osg::ref_ptr< WROI > roi)
adds a roi to the branch
std::shared_ptr< WProperties > m_properties
the property object for the module
WPropBool invertProperty()
Get the "not" property.
osg::ref_ptr< WROI > getFirstRoi()
returns a pointer to the first roi in the branch
void removeAllRois()
removes all rois from the branch
std::shared_ptr< WROIManager > m_roiManager
stores a pointer to the roi manager
std::shared_ptr< WROIManager > getRoiManager()
getter for roi manager pointer
WPropBool m_isNot
indicates if the branch is negated
std::shared_mutex m_associatedNotifiersLock
Lock for associated notifiers set.
WPropBool m_dirty
dirty flag to indicate if anything has changed within the branch
WPropString nameProperty()
Get name property.
bool contains(osg::ref_ptr< WROI > roi)
checks wether a roi is in this branch
WPropString m_name
Name property.
void propertyChanged()
slot gets called when a property has changed
WPropColor colorProperty()
The branch color property.
WPropColor m_bundleColor
The color used when in isosurface mode for blending.
void properties()
initializes properties
std::vector< osg::ref_ptr< WROI > > getRois() const
Create a list of ROIs of the current point in time.
void removeRoi(osg::ref_ptr< WROI > roi)
removes a roi from the branch
std::vector< osg::ref_ptr< WROI > > ROIs
ROI list.