OpenWalnut
1.5.0dev
|
TODO(schurade): Document this! More...
#include <WSelectorBranch.h>
Public Member Functions | |
WSelectorBranch (std::shared_ptr< const WDataSetFibers > fibers, std::shared_ptr< WRMBranch > branch) | |
constructor More... | |
~WSelectorBranch () | |
destructor More... | |
std::shared_ptr< std::vector< bool > > | getBitField () |
getter More... | |
std::shared_ptr< WRMBranch > | getBranch () |
getter More... | |
void | addRoi (std::shared_ptr< WSelectorRoi > roi) |
adds a roi to the branch More... | |
std::list< std::shared_ptr< WSelectorRoi > > | getROIs () |
Queries the ROIs. More... | |
void | removeRoi (osg::ref_ptr< WROI > roi) |
Removes a roi fromt he branch. More... | |
bool | empty () |
Checks if empty. More... | |
void | setDirty () |
Sets the dirty flag. More... | |
bool | dirty () |
Checks if branch is dirty. More... | |
WColor | getBranchColor () const |
Return the current branch color. More... | |
Private Member Functions | |
void | recalculate () |
updates the output bitfield with the information from all rois in this branch More... | |
Private Attributes | |
std::shared_ptr< const WDataSetFibers > | m_fibers |
Pointer to the fiber data set. More... | |
size_t | m_size |
size of the fiber dataset, stored for convinience More... | |
bool | m_dirty |
dirty flag More... | |
std::shared_ptr< std::vector< bool > > | m_bitField |
the bitfield given to the outside world More... | |
std::shared_ptr< std::vector< bool > > | m_workerBitfield |
the bitfield we work on More... | |
std::list< std::shared_ptr< WSelectorRoi > > | m_rois |
list of rois in this branch More... | |
std::shared_ptr< WRMBranch > | m_branch |
pointer to the branch object in the roi manager More... | |
std::shared_ptr< boost::function< void() > > | m_changeSignal |
Signal that can be used to update the selector branch. More... | |
std::shared_ptr< boost::function< void() > > | m_changeRoiSignal |
Signal that can be used to update the selector branch. More... | |
TODO(schurade): Document this!
Definition at line 38 of file WSelectorBranch.h.
WSelectorBranch::WSelectorBranch | ( | std::shared_ptr< const WDataSetFibers > | fibers, |
std::shared_ptr< WRMBranch > | branch | ||
) |
constructor
fibers | pointer to the fiber dataset to work on |
branch | pointer to the branch object in the roi manager |
Definition at line 31 of file WSelectorBranch.cpp.
References m_bitField, m_branch, m_changeRoiSignal, m_changeSignal, m_size, and setDirty().
WSelectorBranch::~WSelectorBranch | ( | ) |
destructor
Definition at line 47 of file WSelectorBranch.cpp.
References m_branch, m_changeRoiSignal, m_changeSignal, and m_rois.
void WSelectorBranch::addRoi | ( | std::shared_ptr< WSelectorRoi > | roi | ) |
adds a roi to the branch
roi |
Definition at line 58 of file WSelectorBranch.cpp.
References m_changeRoiSignal, and m_rois.
|
inline |
Checks if branch is dirty.
Definition at line 173 of file WSelectorBranch.h.
References m_dirty.
|
inline |
Checks if empty.
Definition at line 168 of file WSelectorBranch.h.
References m_rois.
|
inline |
getter
Definition at line 154 of file WSelectorBranch.h.
References m_bitField, m_dirty, and recalculate().
|
inline |
getter
Definition at line 163 of file WSelectorBranch.h.
References m_branch.
WColor WSelectorBranch::getBranchColor | ( | ) | const |
Return the current branch color.
Definition at line 142 of file WSelectorBranch.cpp.
References m_branch.
std::list< std::shared_ptr< WSelectorRoi > > WSelectorBranch::getROIs | ( | ) |
Queries the ROIs.
Definition at line 64 of file WSelectorBranch.cpp.
References m_rois.
|
private |
updates the output bitfield with the information from all rois in this branch
Definition at line 87 of file WSelectorBranch.cpp.
References m_bitField, m_branch, m_rois, m_size, and m_workerBitfield.
Referenced by getBitField().
void WSelectorBranch::removeRoi | ( | osg::ref_ptr< WROI > | roi | ) |
Removes a roi fromt he branch.
roi |
Definition at line 74 of file WSelectorBranch.cpp.
References m_changeRoiSignal, and m_rois.
void WSelectorBranch::setDirty | ( | ) |
Sets the dirty flag.
Definition at line 69 of file WSelectorBranch.cpp.
References m_dirty.
Referenced by WSelectorBranch().
|
private |
the bitfield given to the outside world
Definition at line 133 of file WSelectorBranch.h.
Referenced by getBitField(), recalculate(), and WSelectorBranch().
|
private |
pointer to the branch object in the roi manager
Definition at line 148 of file WSelectorBranch.h.
Referenced by getBranch(), getBranchColor(), recalculate(), WSelectorBranch(), and ~WSelectorBranch().
|
private |
Signal that can be used to update the selector branch.
Definition at line 151 of file WSelectorBranch.h.
Referenced by addRoi(), removeRoi(), WSelectorBranch(), and ~WSelectorBranch().
|
private |
Signal that can be used to update the selector branch.
Definition at line 150 of file WSelectorBranch.h.
Referenced by WSelectorBranch(), and ~WSelectorBranch().
|
private |
dirty flag
Definition at line 128 of file WSelectorBranch.h.
Referenced by dirty(), getBitField(), and setDirty().
|
private |
Pointer to the fiber data set.
Definition at line 121 of file WSelectorBranch.h.
|
private |
list of rois in this branch
Definition at line 143 of file WSelectorBranch.h.
Referenced by addRoi(), empty(), getROIs(), recalculate(), removeRoi(), and ~WSelectorBranch().
|
private |
size of the fiber dataset, stored for convinience
Definition at line 126 of file WSelectorBranch.h.
Referenced by recalculate(), and WSelectorBranch().
|
private |
the bitfield we work on
Definition at line 138 of file WSelectorBranch.h.
Referenced by recalculate().