OpenWalnut 1.3.1
Public Member Functions | Private Attributes
WROIManager Class Reference

Class to store and manage different ROI's for fiber selection. More...

#include <WROIManager.h>

Inheritance diagram for WROIManager:

List of all members.

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< WRMBranchgetBranch (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< WROIgetSelectedRoi ()
 getter
boost::shared_ptr< WPropertiesgetProperties ()
 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< WROIm_selectedRoi
 stores a pointer to the currently selected roi
boost::shared_ptr< WPropertiesm_properties
 The property object for the module.
WPropBool m_dirty
 dirty flag

Detailed Description

Class to store and manage different ROI's for fiber selection.

Definition at line 40 of file WROIManager.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
notifierthe 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.

Parameters:
notifierthe 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.

Parameters:
notifierthe notifier function

Definition at line 178 of file WROIManager.cpp.

References m_associatedNotifiersLock, and m_removeNotifiers.

void WROIManager::addRoi ( osg::ref_ptr< WROI newRoi,
osg::ref_ptr< WROI parentRoi 
)

adds a new ROI below a master ROI

Parameters:
newRoi
parentRoi
Returns:
ROI representation which can be used to remove the ROI

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

Parameters:
newRoi
Returns:
ROI representation which can be used to remove the ROI

Definition at line 44 of file WROIManager.cpp.

References m_addNotifiers, and m_branches.

bool WROIManager::dirty ( bool  reset = false) [inline]

getter

Parameters:
resetif true the dirty flag will be set to false
Returns:
the dirty flag

Definition at line 212 of file WROIManager.h.

References m_dirty.

boost::shared_ptr< WRMBranch > WROIManager::getBranch ( osg::ref_ptr< WROI roi)

getter returns the branch item the roi is in

Parameters:
roi
Returns:
branch

Definition at line 138 of file WROIManager.cpp.

References m_branches.

boost::shared_ptr< WProperties > WROIManager::getProperties ( ) [inline]

getter for the properties object

Returns:
the properties object

Definition at line 222 of file WROIManager.h.

References m_properties.

std::vector< osg::ref_ptr< WROI > > WROIManager::getRois ( )

getter

Returns:
all existing rois

Definition at line 230 of file WROIManager.cpp.

References m_branches.

osg::ref_ptr< WROI > WROIManager::getSelectedRoi ( )

getter

Returns:
Pointer to the currently (in the ROI manager) selected ROI

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.

Parameters:
notifierthe 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

Parameters:
roithe 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.

Parameters:
notifierthe 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.

Parameters:
notifierthe 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

Parameters:
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)

setter

Parameters:
roi

Definition at line 220 of file WROIManager.cpp.

References m_selectedRoi.


Member Data Documentation

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]
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.


The documentation for this class was generated from the following files: