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