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