OpenWalnut
1.5.0dev
|
Class to store and manage different ROI's for fiber selection. More...
#include <WROIManager.h>
Public Types | |
typedef std::vector< osg::ref_ptr< WROI > > | ROIs |
ROI list. More... | |
typedef std::vector< std::shared_ptr< WRMBranch > > | Branches |
Branches list. More... | |
Public Member Functions | |
WROIManager () | |
standard constructor More... | |
~WROIManager () | |
destructor More... | |
std::shared_ptr< WRMBranch > | addBranch () |
Add a new branch. More... | |
void | addRoi (osg::ref_ptr< WROI > newRoi) |
Adds a new main ROI. More... | |
void | addRoi (osg::ref_ptr< WROI > newRoi, osg::ref_ptr< WROI > parentRoi) |
Adds a new ROI below a main ROI. More... | |
void | addRoi (osg::ref_ptr< WROI > newRoi, std::shared_ptr< WRMBranch > toBranch) |
Add a ROI to a branch. More... | |
void | removeRoi (osg::ref_ptr< WROI > roi) |
removes a roi More... | |
void | removeBranch (osg::ref_ptr< WROI > roi) |
removes a branch More... | |
std::shared_ptr< WRMBranch > | getBranch (osg::ref_ptr< WROI > roi) |
getter returns the branch item the roi is in More... | |
void | setDirty () |
sets the dirty flag which will cause recalculation of the bit field More... | |
bool | dirty (bool reset=false) |
getter More... | |
void | setSelectedRoi (osg::ref_ptr< WROI > roi) |
setter More... | |
osg::ref_ptr< WROI > | getSelectedRoi () |
getter More... | |
std::shared_ptr< WProperties > | getProperties () |
getter for the properties object More... | |
ROIs | getRois () const |
getter More... | |
Branches | getBranches () const |
Get a copy of the current branch list. More... | |
Private Attributes | |
std::list< std::shared_ptr< WRMBranch > > | m_branches |
list of branches in the logical tree structure More... | |
std::shared_mutex | m_associatedNotifiersLock |
Lock for associated notifiers set. More... | |
std::list< std::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > > | m_addNotifiers |
The notifiers connected to added rois by default. More... | |
std::list< std::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > > | m_removeNotifiers |
The notifiers connected to removed rois by default. More... | |
std::list< std::shared_ptr< boost::function< void(std::shared_ptr< WRMBranch >) > > > | m_removeBranchNotifiers |
The notifiers connected to removed rois by default. More... | |
osg::ref_ptr< WROI > | m_selectedRoi |
stores a pointer to the currently selected roi More... | |
std::shared_ptr< WProperties > | m_properties |
The property object for the module. More... | |
WPropBool | m_dirty |
dirty flag More... | |
Class to store and manage different ROI's for fiber selection.
Definition at line 38 of file WROIManager.h.
typedef std::vector< std::shared_ptr< WRMBranch > > WROIManager::Branches |
Branches list.
Definition at line 194 of file WROIManager.h.
typedef std::vector< osg::ref_ptr< WROI > > WROIManager::ROIs |
ROI list.
Definition at line 183 of file WROIManager.h.
WROIManager::WROIManager | ( | ) |
standard constructor
Definition at line 33 of file WROIManager.cpp.
References m_dirty, and m_properties.
WROIManager::~WROIManager | ( | ) |
destructor
Definition at line 39 of file WROIManager.cpp.
std::shared_ptr< WRMBranch > WROIManager::addBranch | ( | ) |
Add a new branch.
Definition at line 60 of file WROIManager.cpp.
References m_branches.
Referenced by addRoi().
void WROIManager::addRoi | ( | osg::ref_ptr< WROI > | newRoi | ) |
Adds a new main ROI.
newRoi |
Definition at line 55 of file WROIManager.cpp.
References addBranch().
Adds a new ROI below a main ROI.
newRoi | |
parentRoi |
Definition at line 71 of file WROIManager.cpp.
References m_addNotifiers, and m_branches.
Add a ROI to a branch.
newRoi | the new ROI to add |
toBranch | the branch to add the ROI to. |
Definition at line 43 of file WROIManager.cpp.
References m_addNotifiers.
|
inline |
getter
reset | if true the dirty flag will be set to false |
Definition at line 241 of file WROIManager.h.
References m_dirty.
getter returns the branch item the roi is in
roi |
Definition at line 149 of file WROIManager.cpp.
References m_branches.
WROIManager::Branches WROIManager::getBranches | ( | ) | const |
Get a copy of the current branch list.
Please note that after getting the list, it might already have been changed by another thread.
Definition at line 254 of file WROIManager.cpp.
References m_branches.
|
inline |
getter for the properties object
Definition at line 251 of file WROIManager.h.
References m_properties.
WROIManager::ROIs WROIManager::getRois | ( | ) | const |
getter
Definition at line 243 of file WROIManager.cpp.
References m_branches.
osg::ref_ptr< WROI > WROIManager::getSelectedRoi | ( | ) |
getter
Definition at line 238 of file WROIManager.cpp.
References m_selectedRoi.
void WROIManager::removeBranch | ( | osg::ref_ptr< WROI > | roi | ) |
removes a branch
roi | the first roi in the branch |
Definition at line 124 of file WROIManager.cpp.
References m_branches, m_removeBranchNotifiers, and setDirty().
void WROIManager::removeRoi | ( | osg::ref_ptr< WROI > | roi | ) |
removes a roi
roi |
Definition at line 92 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 163 of file WROIManager.cpp.
References m_dirty.
Referenced by removeBranch(), and removeRoi().
void WROIManager::setSelectedRoi | ( | osg::ref_ptr< WROI > | roi | ) |
|
private |
The notifiers connected to added rois by default.
Definition at line 215 of file WROIManager.h.
Referenced by addRoi().
|
private |
Lock for associated notifiers set.
Definition at line 210 of file WROIManager.h.
|
private |
list of branches in the logical tree structure
Definition at line 205 of file WROIManager.h.
Referenced by addBranch(), addRoi(), getBranch(), getBranches(), getRois(), removeBranch(), and removeRoi().
|
private |
dirty flag
Definition at line 238 of file WROIManager.h.
Referenced by dirty(), setDirty(), and WROIManager().
|
private |
The property object for the module.
Definition at line 233 of file WROIManager.h.
Referenced by getProperties(), and WROIManager().
|
private |
The notifiers connected to removed rois by default.
Definition at line 225 of file WROIManager.h.
Referenced by removeBranch(), and removeRoi().
|
private |
The notifiers connected to removed rois by default.
Definition at line 220 of file WROIManager.h.
Referenced by removeRoi().
|
private |
stores a pointer to the currently selected roi
Definition at line 228 of file WROIManager.h.
Referenced by getSelectedRoi(), and setSelectedRoi().