![]() |
OpenWalnut
1.5.0dev
|
A class that encapsulates the data needed to construct a WDataSetFibers. More...
#include <WFiberAccumulator.h>
Collaboration diagram for WFiberAccumulator:Public Member Functions | |
| WFiberAccumulator () | |
| Constructor. More... | |
| virtual | ~WFiberAccumulator () |
| Destructor. More... | |
| void | add (std::vector< WVector3d > const &in) |
| Add a fiber to the dataset. More... | |
| std::shared_ptr< WDataSetFibers > | buildDataSet () |
| Return the dataset that has been accumulated to this point and start a new dataset. More... | |
| void | clear () |
| Clears all data. More... | |
Private Attributes | |
| boost::mutex | m_fiberMutex |
| A mutex needed to guarantee thread-safety. More... | |
| std::shared_ptr< std::vector< float > > | m_points |
| One of the vectors needed to construct a WDataSetFibers. More... | |
| std::shared_ptr< std::vector< size_t > > | m_fiberIndices |
| One of the vectors needed to construct a WDataSetFibers. More... | |
| std::shared_ptr< std::vector< size_t > > | m_fiberLengths |
| One of the vectors needed to construct a WDataSetFibers. More... | |
| std::shared_ptr< std::vector< size_t > > | m_pointToFiber |
| One of the vectors needed to construct a WDataSetFibers. More... | |
A class that encapsulates the data needed to construct a WDataSetFibers.
Definition at line 41 of file WFiberAccumulator.h.
| WFiberAccumulator::WFiberAccumulator | ( | ) |
Constructor.
Definition at line 33 of file WFiberAccumulator.cpp.
|
virtual |
Destructor.
Definition at line 42 of file WFiberAccumulator.cpp.
| void WFiberAccumulator::add | ( | std::vector< WVector3d > const & | in | ) |
Add a fiber to the dataset.
| in | The fiber to add, stored as a vector of Positions. |
This function is threadsafe.
Definition at line 46 of file WFiberAccumulator.cpp.
References m_fiberIndices, m_fiberLengths, m_fiberMutex, m_points, and m_pointToFiber.
Referenced by WMDeterministicFTMori::fiberVis(), WMFiberTranslator::loadExploreDTIFibers(), WMFiberTranslator::mergeFibers(), and WMFiberTranslator::mergeFibersNrrd().
Here is the caller graph for this function:| std::shared_ptr< WDataSetFibers > WFiberAccumulator::buildDataSet | ( | ) |
Return the dataset that has been accumulated to this point and start a new dataset.
The returned shared_ptr is the sole owner of the WDataSetFibers.
Definition at line 66 of file WFiberAccumulator.cpp.
References m_fiberIndices, m_fiberLengths, m_fiberMutex, m_points, and m_pointToFiber.
Referenced by WMFiberTranslator::loadExploreDTIFibers(), WMFiberTranslator::mergeFibers(), WMFiberTranslator::mergeFibersNrrd(), and WMDeterministicFTMori::moduleMain().
Here is the caller graph for this function:| void WFiberAccumulator::clear | ( | ) |
Clears all data.
Definition at line 80 of file WFiberAccumulator.cpp.
References m_fiberIndices, m_fiberLengths, m_points, and m_pointToFiber.
Referenced by WMDeterministicFTMori::moduleMain(), and WMDeterministicFTMori::resetTracking().
Here is the caller graph for this function:
|
private |
One of the vectors needed to construct a WDataSetFibers.
Stores the starting indices (refering to the points vector) of the fibers.
Definition at line 95 of file WFiberAccumulator.h.
Referenced by add(), buildDataSet(), and clear().
|
private |
One of the vectors needed to construct a WDataSetFibers.
Stores the length of the fibers.
Definition at line 101 of file WFiberAccumulator.h.
Referenced by add(), buildDataSet(), and clear().
|
private |
A mutex needed to guarantee thread-safety.
Definition at line 83 of file WFiberAccumulator.h.
Referenced by add(), and buildDataSet().
|
private |
One of the vectors needed to construct a WDataSetFibers.
Stores the points in a vector of floats.
Definition at line 89 of file WFiberAccumulator.h.
Referenced by add(), buildDataSet(), and clear().
|
private |
One of the vectors needed to construct a WDataSetFibers.
Stores information about what fiber a point in the points vector refers to.
Definition at line 107 of file WFiberAccumulator.h.
Referenced by add(), buildDataSet(), and clear().