OpenWalnut 1.2.5
|
Class to store and manage different ROI's for fiber selection. More...
#include <WROIManager.h>
Public Member Functions | |
WROIManager () | |
standard constructor | |
~WROIManager () | |
destructor | |
void | addRoi (osg::ref_ptr< WROI > newRoi) |
adds a new master ROI | |
void | addRoi (osg::ref_ptr< WROI > newRoi, osg::ref_ptr< WROI > parentRoi) |
adds a new ROI below a master ROI | |
void | removeRoi (osg::ref_ptr< WROI > roi) |
removes a roi | |
void | removeBranch (osg::ref_ptr< WROI > roi) |
removes a branch | |
boost::shared_ptr< WRMBranch > | getBranch (osg::ref_ptr< WROI > roi) |
getter returns the branch item the roi is in | |
void | setDirty () |
sets the dirty flag which will cause recalculation of the bit field | |
bool | dirty (bool reset=false) |
getter | |
void | addAddNotifier (boost::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > notifier) |
Add a specified notifier to the list of default notifiers which get connected to each added roi. | |
void | removeAddNotifier (boost::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > notifier) |
Remove a specified notifier from the list of default notifiers which get connected to each added roi. | |
void | addRemoveNotifier (boost::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > notifier) |
Add a specified notifier to the list of default notifiers which get connected to each removed roi. | |
void | removeRemoveNotifier (boost::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > notifier) |
Remove a specified notifier from the list of default notifiers which get connected to each removed roi. | |
void | addRemoveBranchNotifier (boost::shared_ptr< boost::function< void(boost::shared_ptr< WRMBranch >) > > notifier) |
Add a specified notifier to the list of default notifiers which get connected to each removed branch. | |
void | removeRemoveBranchNotifier (boost::shared_ptr< boost::function< void(boost::shared_ptr< WRMBranch >) > > notifier) |
Remove a specified notifier from the list of default notifiers which get connected to each removed branch. | |
void | setSelectedRoi (osg::ref_ptr< WROI > roi) |
setter | |
osg::ref_ptr< WROI > | getSelectedRoi () |
getter | |
boost::shared_ptr< WProperties > | getProperties () |
getter for the properties object | |
std::vector< osg::ref_ptr< WROI > > | getRois () |
getter | |
Private Attributes | |
size_t | m_size |
number of fibers in the dataset | |
std::list< boost::shared_ptr < WRMBranch > > | m_branches |
list of branches in the logical tree structure | |
boost::shared_mutex | m_associatedNotifiersLock |
Lock for associated notifiers set. | |
std::list< boost::shared_ptr < boost::function< void(osg::ref_ptr < WROI >) > > > | m_addNotifiers |
The notifiers connected to added rois by default. | |
std::list< boost::shared_ptr < boost::function< void(osg::ref_ptr < WROI >) > > > | m_removeNotifiers |
The notifiers connected to removed rois by default. | |
std::list< boost::shared_ptr < boost::function< void(boost::shared_ptr < WRMBranch >) > > > | m_removeBranchNotifiers |
The notifiers connected to removed rois by default. | |
osg::ref_ptr< WROI > | m_selectedRoi |
stores a pointer to the currently selected roi | |
boost::shared_ptr< WProperties > | m_properties |
The property object for the module. | |
WPropBool | m_dirty |
dirty flag |
Class to store and manage different ROI's for fiber selection.
Definition at line 40 of file WROIManager.h.
WROIManager::WROIManager | ( | ) |
standard constructor
Definition at line 34 of file WROIManager.cpp.
References m_dirty, and m_properties.
WROIManager::~WROIManager | ( | ) |
destructor
Definition at line 40 of file WROIManager.cpp.
void WROIManager::addAddNotifier | ( | boost::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > | notifier | ) |
Add a specified notifier to the list of default notifiers which get connected to each added roi.
notifier | the notifier function |
Definition at line 157 of file WROIManager.cpp.
References m_addNotifiers, and m_associatedNotifiersLock.
void WROIManager::addRemoveBranchNotifier | ( | boost::shared_ptr< boost::function< void(boost::shared_ptr< WRMBranch >) > > | notifier | ) |
Add a specified notifier to the list of default notifiers which get connected to each removed branch.
notifier | the notifier function |
Definition at line 199 of file WROIManager.cpp.
References m_associatedNotifiersLock, and m_removeBranchNotifiers.
void WROIManager::addRemoveNotifier | ( | boost::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > | notifier | ) |
Add a specified notifier to the list of default notifiers which get connected to each removed roi.
notifier | the notifier function |
Definition at line 178 of file WROIManager.cpp.
References m_associatedNotifiersLock, and m_removeNotifiers.
adds a new ROI below a master ROI
newRoi | |
parentRoi |
Definition at line 60 of file WROIManager.cpp.
References m_addNotifiers, and m_branches.
void WROIManager::addRoi | ( | osg::ref_ptr< WROI > | newRoi | ) |
adds a new master ROI
newRoi |
Definition at line 44 of file WROIManager.cpp.
References m_addNotifiers, and m_branches.
bool WROIManager::dirty | ( | bool | reset = false | ) | [inline] |
getter
reset | if true the dirty flag will be set to false |
Definition at line 212 of file WROIManager.h.
References m_dirty.
getter returns the branch item the roi is in
roi |
Definition at line 138 of file WROIManager.cpp.
References m_branches.
boost::shared_ptr< WProperties > WROIManager::getProperties | ( | ) | [inline] |
getter for the properties object
Definition at line 222 of file WROIManager.h.
References m_properties.
std::vector< osg::ref_ptr< WROI > > WROIManager::getRois | ( | ) |
getter
Definition at line 230 of file WROIManager.cpp.
References m_branches.
osg::ref_ptr< WROI > WROIManager::getSelectedRoi | ( | ) |
getter
Definition at line 225 of file WROIManager.cpp.
References m_selectedRoi.
void WROIManager::removeAddNotifier | ( | boost::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > | notifier | ) |
Remove a specified notifier from the list of default notifiers which get connected to each added roi.
notifier | the notifier function |
Definition at line 165 of file WROIManager.cpp.
References m_addNotifiers, and m_associatedNotifiersLock.
void WROIManager::removeBranch | ( | osg::ref_ptr< WROI > | roi | ) |
removes a branch
roi | the first roi in the branch |
Definition at line 113 of file WROIManager.cpp.
References m_branches, m_removeBranchNotifiers, and setDirty().
void WROIManager::removeRemoveBranchNotifier | ( | boost::shared_ptr< boost::function< void(boost::shared_ptr< WRMBranch >) > > | notifier | ) |
Remove a specified notifier from the list of default notifiers which get connected to each removed branch.
notifier | the notifier function |
Definition at line 207 of file WROIManager.cpp.
References m_associatedNotifiersLock, and m_removeBranchNotifiers.
void WROIManager::removeRemoveNotifier | ( | boost::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > | notifier | ) |
Remove a specified notifier from the list of default notifiers which get connected to each removed roi.
notifier | the notifier function |
Definition at line 186 of file WROIManager.cpp.
References m_associatedNotifiersLock, and m_removeNotifiers.
void WROIManager::removeRoi | ( | osg::ref_ptr< WROI > | roi | ) |
removes a roi
roi |
Definition at line 81 of file WROIManager.cpp.
References WGraphicsEngine::getGraphicsEngine(), m_branches, m_removeBranchNotifiers, m_removeNotifiers, and setDirty().
void WROIManager::setDirty | ( | ) |
sets the dirty flag which will cause recalculation of the bit field
Definition at line 152 of file WROIManager.cpp.
References m_dirty.
Referenced by removeBranch(), and removeRoi().
void WROIManager::setSelectedRoi | ( | osg::ref_ptr< WROI > | roi | ) |
std::list< boost::shared_ptr< boost::function< void( osg::ref_ptr< WROI > ) > > > WROIManager::m_addNotifiers [private] |
The notifiers connected to added rois by default.
Definition at line 186 of file WROIManager.h.
Referenced by addAddNotifier(), addRoi(), and removeAddNotifier().
boost::shared_mutex WROIManager::m_associatedNotifiersLock [private] |
Lock for associated notifiers set.
Definition at line 181 of file WROIManager.h.
Referenced by addAddNotifier(), addRemoveBranchNotifier(), addRemoveNotifier(), removeAddNotifier(), removeRemoveBranchNotifier(), and removeRemoveNotifier().
std::list< boost::shared_ptr< WRMBranch > > WROIManager::m_branches [private] |
list of branches in the logical tree structure
Definition at line 176 of file WROIManager.h.
Referenced by addRoi(), getBranch(), getRois(), removeBranch(), and removeRoi().
WPropBool WROIManager::m_dirty [private] |
dirty flag
Definition at line 209 of file WROIManager.h.
Referenced by dirty(), setDirty(), and WROIManager().
boost::shared_ptr< WProperties > WROIManager::m_properties [private] |
The property object for the module.
Definition at line 204 of file WROIManager.h.
Referenced by getProperties(), and WROIManager().
std::list< boost::shared_ptr< boost::function< void( boost::shared_ptr< WRMBranch > ) > > > WROIManager::m_removeBranchNotifiers [private] |
The notifiers connected to removed rois by default.
Definition at line 196 of file WROIManager.h.
Referenced by addRemoveBranchNotifier(), removeBranch(), removeRemoveBranchNotifier(), and removeRoi().
std::list< boost::shared_ptr< boost::function< void( osg::ref_ptr< WROI > ) > > > WROIManager::m_removeNotifiers [private] |
The notifiers connected to removed rois by default.
Definition at line 191 of file WROIManager.h.
Referenced by addRemoveNotifier(), removeRemoveNotifier(), and removeRoi().
osg::ref_ptr< WROI > WROIManager::m_selectedRoi [private] |
stores a pointer to the currently selected roi
Definition at line 199 of file WROIManager.h.
Referenced by getSelectedRoi(), and setSelectedRoi().
size_t WROIManager::m_size [private] |
number of fibers in the dataset
Definition at line 174 of file WROIManager.h.