25 #ifndef WMDETERMINISTICFTMORI_H
26 #define WMDETERMINISTICFTMORI_H
32 #include <boost/thread.hpp>
34 #include "core/common/WThreadedFunction.h"
35 #include "core/common/math/linearAlgebra/WVectorFixed.h"
36 #include "core/common/math/WTensorSym.h"
37 #include "core/dataHandler/WFiberAccumulator.h"
38 #include "core/dataHandler/WThreadedPerVoxelOperation.h"
39 #include "core/dataHandler/WThreadedTrackingFunction.h"
40 #include "core/kernel/WModule.h"
48 #define WM_MORI_NUM_CORES W_AUTOMATIC_NB_THREADS
82 virtual std::shared_ptr< WModule >
factory()
const;
95 virtual const std::string
getName()
const;
224 std::shared_ptr< WModuleOutputData< WDataSetFibers > >
m_output;
227 std::shared_ptr< WModuleInputData< WDataSetSingle > >
m_input;
Represents a simple set of WFibers.
A data set consisting of a set of values based on a grid.
A class that encapsulates the data needed to construct a WDataSetFibers.
This module implements the simple fiber tracking algorithm by Mori et al.
wtracking::WThreadedTrackingFunction Tracking
the threaded tracking functor
WThreadedFunction< TPVOFloat > EigenFunctionTypeFloat
the thread pool type for the eigencomputation (float input)
std::shared_ptr< WThreadedFunctionBase > m_eigenPool
The threadpool for the eigenvector and fa computations.
std::shared_ptr< WDataSetSingle > m_dataSet
A pointer to the input tensor dataset.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
WPropDouble m_minCos
The minimum cosine property.
WVector3d getEigenDirection(std::shared_ptr< WDataSetSingle const > ds, wtracking::WTrackingUtility::JobType const &j)
Calculate the direction of the eigenvector with largest magnitude.
boost::array< double, 4 > const computeFaAndEigenVec(WTensorSym< 2, 3, double > const &m) const
The function that does the actual fa and eigenvector computations.
virtual void moduleMain()
The worker function, runs in its own thread.
std::shared_ptr< TPVODouble > m_eigenOperationDouble
the functor used for the calculation of the eigenvectors
WMDeterministicFTMori()
Standard Constructor.
WThreadedPerVoxelOperation< float, 6, double, 4 > TPVOFloat
the threaded per-voxel function for the eigenvector computation (float input)
WThreadedPerVoxelOperation< double, 6, double, 4 > TPVODouble
the threaded per-voxel function for the eigenvector computation (double input)
virtual void properties()
Initialize the module's properties.
TPVODouble::OutTransmitType const eigenFuncDouble(TPVODouble::TransmitType const &input)
The function that computes the eigenvectors from the input tensor field.
virtual const std::string getName() const
Return the name of this module.
WFiberAccumulator m_fiberAccu
The fiber accumulator.
virtual ~WMDeterministicFTMori()
Destructor.
virtual void activate()
Callback.
void resetTracking()
Reset the tracking function and abort the current one, if there is a current one.
double m_currentMinFA
The current minimum FA property.
void pointVis(WVector3d const &)
The point visitor.
WPropDouble m_minFA
The minimum FA property.
double m_currentMinCos
The current minimum cosine property.
std::vector< WVector3d > FiberType
the fiber type
virtual void connectors()
Initialize the module's connectors.
std::size_t m_currentMinPoints
The current minimum number of points property.
std::shared_ptr< TrackingFuncType > m_trackingPool
The threadpool for the tracking.
virtual std::shared_ptr< WModule > factory() const
Returns a new instance of this module.
std::shared_ptr< WModuleOutputData< WDataSetFibers > > m_output
The output Connector.
std::shared_ptr< WCondition > m_propCondition
A condition for property changes.
std::shared_ptr< WProgress > m_currentProgress
the object that keeps track of the current progress
WPropInt m_minPoints
The minimum number of points property.
TPVOFloat::OutTransmitType const eigenFuncFloat(TPVOFloat::TransmitType const &input)
The function that computes the eigenvectors from the input tensor field.
void fiberVis(FiberType const &f)
The fiber visitor.
std::shared_ptr< WDataSetFibers > m_fiberSet
The output dataset. Stores all fibers extracted from the input tensor field.
std::shared_ptr< TPVOFloat > m_eigenOperationFloat
the functor used for the calculation of the eigenvectors
void resetProgress(std::size_t todo)
Resets the current progress to 0.
std::shared_ptr< WModuleInputData< WDataSetSingle > > m_input
The input Connector.
WValueSet< double > FloatValueSetType
the valueset type
WMDeterministicFTMori This
the class itself
WThreadedFunction< TPVODouble > EigenFunctionTypeDouble
the thread pool type for the eigencomputation (double input)
virtual const std::string getDescription() const
Return the description of this module.
std::shared_ptr< WDataSetSingle > m_eigenField
Stores eigenvectors and fractional anisotropy of the input dataset.
WThreadedFunction< Tracking > TrackingFuncType
the tracking threadpool
void resetEigenFunction()
Resets the threaded function/threadpool.
Class offering an instantiate-able data connection between modules.
Class representing a single module of OpenWalnut.
Implements a symmetric tensor that has the same number of components in every direction.
Creates threads that computes a function in a multithreaded fashion.
A template that performs an operation on a per voxel basis.
boost::array< Output_T, numOutputs > OutTransmitType
the output type for the per-voxel operation
ValueSetType::SubArray const TransmitType
the input type for the per-voxel operation
Base Class for all value set types.
Implements a generalized multithreaded tracking algorithm.
std::pair< WVector3d, WVector3d > JobType
define a job type for tracking algorithms