OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WFiberAccumulator Class Reference

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< WDataSetFibersbuildDataSet ()
 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...
 

Detailed Description

A class that encapsulates the data needed to construct a WDataSetFibers.

Definition at line 41 of file WFiberAccumulator.h.

Constructor & Destructor Documentation

◆ WFiberAccumulator()

WFiberAccumulator::WFiberAccumulator ( )

Constructor.

Definition at line 33 of file WFiberAccumulator.cpp.

◆ ~WFiberAccumulator()

WFiberAccumulator::~WFiberAccumulator ( )
virtual

Destructor.

Definition at line 42 of file WFiberAccumulator.cpp.

Member Function Documentation

◆ add()

void WFiberAccumulator::add ( std::vector< WVector3d > const &  in)

Add a fiber to the dataset.

Parameters
inThe 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:

◆ buildDataSet()

std::shared_ptr< WDataSetFibers > WFiberAccumulator::buildDataSet ( )

Return the dataset that has been accumulated to this point and start a new dataset.

Returns
A shared_ptr pointing to the WDataSetFibers that has been accumulated.

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:

◆ clear()

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:

Member Data Documentation

◆ m_fiberIndices

std::shared_ptr< std::vector< size_t > > WFiberAccumulator::m_fiberIndices
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().

◆ m_fiberLengths

std::shared_ptr< std::vector< size_t > > WFiberAccumulator::m_fiberLengths
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().

◆ m_fiberMutex

boost::mutex WFiberAccumulator::m_fiberMutex
private

A mutex needed to guarantee thread-safety.

Definition at line 83 of file WFiberAccumulator.h.

Referenced by add(), and buildDataSet().

◆ m_points

std::shared_ptr< std::vector< float > > WFiberAccumulator::m_points
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().

◆ m_pointToFiber

std::shared_ptr< std::vector< size_t > > WFiberAccumulator::m_pointToFiber
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().


The documentation for this class was generated from the following files: