OpenWalnut
1.5.0dev
|
class implements the updating of a bitfield for a roi More...
#include <WSelectorRoi.h>
Public Member Functions | |
WSelectorRoi (osg::ref_ptr< WROI > roi, std::shared_ptr< const WDataSetFibers > fibers, std::shared_ptr< WKdTree > kdTree) | |
constructor More... | |
~WSelectorRoi () | |
destructor More... | |
std::shared_ptr< std::vector< bool > > | getBitField () |
getter More... | |
osg::ref_ptr< WROI > | getRoi () |
getter access to the ROI representation, mainly for delete and update functions More... | |
void | setDirty () |
setter sets the dirty flag More... | |
Private Member Functions | |
void | recalculate () |
updates the output bitfiel when something with the rois has changed More... | |
void | boxTest (int left, int right, int axis) |
recursive function to check for intersections with the roi More... | |
size_t | getLineForPoint (size_t point) |
getter More... | |
Private Attributes | |
osg::ref_ptr< WROI > | m_roi |
pointer to the roi More... | |
std::shared_ptr< const WDataSetFibers > | m_fibers |
Pointer to the fiber data set. More... | |
std::shared_ptr< WKdTree > | m_kdTree |
Stores a pointer to the kdTree used for fiber selection. 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 that is given to the outside world More... | |
std::shared_ptr< std::vector< bool > > | m_workerBitfield |
the bitfield we work on More... | |
std::shared_ptr< std::vector< float > > | m_currentArray |
pointer to the array that is used for updating this is used for the recurse update function, to reduce the amount of function parameters More... | |
std::shared_ptr< std::vector< size_t > > | m_currentReverse |
pointer to the reverse array that is used for updating this is used for the recurse update function, to reduce the amount of function parameters More... | |
std::vector< float > | m_boxMin |
lower boundary of the box, used for boxtest More... | |
std::vector< float > | m_boxMax |
upper boundary of the box, used for boxtest More... | |
std::shared_ptr< boost::function< void() > > | m_changeRoiSignal |
Signal that can be used to update the selector ROI. More... | |
class implements the updating of a bitfield for a roi
Definition at line 39 of file WSelectorRoi.h.
WSelectorRoi::WSelectorRoi | ( | osg::ref_ptr< WROI > | roi, |
std::shared_ptr< const WDataSetFibers > | fibers, | ||
std::shared_ptr< WKdTree > | kdTree | ||
) |
constructor
roi | the roi representation |
fibers | the fiber dataset to work on |
kdTree | kd tree for fast intersection checks |
Definition at line 34 of file WSelectorRoi.cpp.
References m_bitField, m_changeRoiSignal, m_currentArray, m_currentReverse, m_fibers, m_roi, m_size, and setDirty().
WSelectorRoi::~WSelectorRoi | ( | ) |
|
private |
recursive function to check for intersections with the roi
left | |
right | |
axis |
Definition at line 112 of file WSelectorRoi.cpp.
References getLineForPoint(), m_boxMax, m_boxMin, m_currentArray, and m_kdTree.
Referenced by recalculate().
|
inline |
getter
Definition at line 151 of file WSelectorRoi.h.
References m_bitField, m_dirty, and recalculate().
|
inlineprivate |
getter
point | point to check |
Definition at line 160 of file WSelectorRoi.h.
References m_currentReverse.
Referenced by boxTest(), and recalculate().
|
inline |
getter access to the ROI representation, mainly for delete and update functions
Definition at line 165 of file WSelectorRoi.h.
References m_roi.
|
private |
updates the output bitfiel when something with the rois has changed
Definition at line 61 of file WSelectorRoi.cpp.
References boxTest(), getLineForPoint(), m_bitField, m_boxMax, m_boxMin, m_currentArray, m_dirty, m_roi, m_size, and m_workerBitfield.
Referenced by getBitField().
void WSelectorRoi::setDirty | ( | ) |
setter sets the dirty flag
Definition at line 56 of file WSelectorRoi.cpp.
References m_dirty.
Referenced by WSelectorRoi().
|
private |
the bitfield that is given to the outside world
Definition at line 126 of file WSelectorRoi.h.
Referenced by getBitField(), recalculate(), and WSelectorRoi().
|
private |
upper boundary of the box, used for boxtest
Definition at line 146 of file WSelectorRoi.h.
Referenced by boxTest(), and recalculate().
|
private |
lower boundary of the box, used for boxtest
Definition at line 145 of file WSelectorRoi.h.
Referenced by boxTest(), and recalculate().
|
private |
Signal that can be used to update the selector ROI.
Definition at line 148 of file WSelectorRoi.h.
Referenced by WSelectorRoi(), and ~WSelectorRoi().
|
private |
pointer to the array that is used for updating this is used for the recurse update function, to reduce the amount of function parameters
Definition at line 137 of file WSelectorRoi.h.
Referenced by boxTest(), recalculate(), and WSelectorRoi().
|
private |
pointer to the reverse array that is used for updating this is used for the recurse update function, to reduce the amount of function parameters
Definition at line 143 of file WSelectorRoi.h.
Referenced by getLineForPoint(), and WSelectorRoi().
|
private |
dirty flag
Definition at line 121 of file WSelectorRoi.h.
Referenced by getBitField(), recalculate(), and setDirty().
|
private |
Pointer to the fiber data set.
Definition at line 106 of file WSelectorRoi.h.
Referenced by WSelectorRoi().
|
private |
Stores a pointer to the kdTree used for fiber selection.
Definition at line 111 of file WSelectorRoi.h.
Referenced by boxTest().
|
private |
pointer to the roi
Definition at line 101 of file WSelectorRoi.h.
Referenced by getRoi(), recalculate(), WSelectorRoi(), and ~WSelectorRoi().
|
private |
size of the fiber dataset, stored for convinience
Definition at line 116 of file WSelectorRoi.h.
Referenced by recalculate(), and WSelectorRoi().
|
private |