25 #ifndef WFIBERSELECTOR_H
26 #define WFIBERSELECTOR_H
31 #include "../dataHandler/WDataSetFibers.h"
32 #include "../common/WCondition.h"
34 #include "WSelectorRoi.h"
35 #include "WSelectorBranch.h"
48 typedef boost::shared_ptr< WFiberSelector >
SPtr;
53 typedef boost::shared_ptr< const WFiberSelector >
ConstSPtr;
59 explicit WFiberSelector( boost::shared_ptr< const WDataSetFibers > fibers );
77 boost::shared_ptr< std::vector< bool > >
getBitfield();
92 boost::shared_ptr< std::vector< size_t > >
getStarts();
98 boost::shared_ptr< std::vector< size_t > >
getLengths();
155 boost::shared_ptr< const WDataSetFibers >
m_fibers;
190 return m_fibers->getLineStartIndexes();
198 #endif // WFIBERSELECTOR_H
boost::shared_ptr< boost::function< void(boost::shared_ptr< WRMBranch >) > > m_removeBranchSignal
Signal for updating the selector.
void setDirty()
setter sets the dirty flag
boost::shared_ptr< std::vector< size_t > > getStarts()
getter for the line start index array
boost::shared_ptr< WFiberSelector > SPtr
Fiber selector pointer.
boost::shared_ptr< std::vector< bool > > getBitfield()
getter
boost::shared_ptr< std::vector< bool > > m_outputBitfield
bit field of activated fibers
Adaptor class between the roi manager and the fiber display.
size_t m_size
number of fibers in the dataset
boost::shared_ptr< WKdTree > m_kdTree
Stores a pointer to the kdTree used for fiber selection.
void recalculate()
update the bitfield when there was a change in the roi structure
boost::shared_ptr< const WFiberSelector > ConstSPtr
Const fiber selector pointer.
bool getDirty()
Get the current dirty-state.
void slotRemoveBranch(boost::shared_ptr< WRMBranch > branch)
listener function for removing rois
WCondition::SPtr m_dirtyCondition
Condition that fires on setDirty.
size_t size()
Return the number of fibers in the dataset.
boost::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > m_assocRoiSignal
Signal that can be used to update the selector.
WCondition::SPtr getDirtyCondition()
Condition that fires upon a recalculation of the fiber selection.
boost::shared_ptr< boost::function< void(osg::ref_ptr< WROI >) > > m_removeRoiSignal
Signal that can be used to update the selector.
~WFiberSelector()
destructor
void slotAddRoi(osg::ref_ptr< WROI > roi)
listener function for inserting rois
boost::shared_ptr< const WDataSetFibers > m_fibers
Pointer to the fiber data set.
WFiberSelector(boost::shared_ptr< const WDataSetFibers > fibers)
constructor
boost::shared_ptr< std::vector< float > > m_outputColorMap
Map each fiber to a color.
boost::shared_ptr< std::vector< size_t > > getLengths()
getter for the line length array
void slotRemoveRoi(osg::ref_ptr< WROI > roi)
listener function for removing rois
std::list< boost::shared_ptr< WSelectorBranch > > m_branches
list of branches int he roi structure
bool isNothingFiltered() const
Returns true if no fiber gets filtered out because there is no branch in the ROI tree.
boost::shared_ptr< WCondition > SPtr
Shared pointer type for WCondition.
boost::shared_ptr< boost::function< void() > > m_changeRoiSignal
Signal that can be used to update the selector.
WColor getFiberColor(size_t fidx) const
Get color for fiber with given index.