25 #ifndef WSELECTORROI_H
26 #define WSELECTORROI_H
31 #include "../dataHandler/WDataSetFibers.h"
32 #include "../graphicsEngine/WROI.h"
48 WSelectorRoi( osg::ref_ptr< WROI > roi, std::shared_ptr< const WDataSetFibers > fibers, std::shared_ptr< WKdTree> kdTree );
67 osg::ref_ptr< WROI >
getRoi();
88 void boxTest(
int left,
int right,
int axis );
implements the computation of a kd tree on a point array
class implements the updating of a bitfield for a roi
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,...
std::shared_ptr< const WDataSetFibers > m_fibers
Pointer to the fiber data set.
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
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,...
WSelectorRoi(osg::ref_ptr< WROI > roi, std::shared_ptr< const WDataSetFibers > fibers, std::shared_ptr< WKdTree > kdTree)
constructor
std::vector< float > m_boxMin
lower boundary of the box, used for boxtest
std::shared_ptr< WKdTree > m_kdTree
Stores a pointer to the kdTree used for fiber selection.
size_t getLineForPoint(size_t point)
getter
osg::ref_ptr< WROI > m_roi
pointer to the roi
std::shared_ptr< std::vector< bool > > getBitField()
getter
size_t m_size
size of the fiber dataset, stored for convinience
std::vector< float > m_boxMax
upper boundary of the box, used for boxtest
~WSelectorRoi()
destructor
std::shared_ptr< boost::function< void() > > m_changeRoiSignal
Signal that can be used to update the selector ROI.
osg::ref_ptr< WROI > getRoi()
getter access to the ROI representation, mainly for delete and update functions
void setDirty()
setter sets the dirty flag
std::shared_ptr< std::vector< bool > > m_bitField
the bitfield that is given to the outside world
std::shared_ptr< std::vector< bool > > m_workerBitfield
the bitfield we work on