25 #ifndef WMCALCULATETENSORS_H
26 #define WMCALCULATETENSORS_H
32 #include "core/common/WThreadedFunction.h"
33 #include "core/common/math/WMatrix.h"
34 #include "core/dataHandler/WDataSetDTI.h"
35 #include "core/dataHandler/WDataSetSphericalHarmonics.h"
36 #include "core/dataHandler/WThreadedPerVoxelOperation.h"
37 #include "core/kernel/WModule.h"
38 #include "core/kernel/WModuleInputData.h"
39 #include "core/kernel/WModuleOutputData.h"
68 virtual const std::string
getName()
const;
82 virtual std::shared_ptr< WModule >
factory()
const;
142 std::shared_ptr< WDataSetSphericalHarmonics >
m_dataSet;
148 std::shared_ptr< WModuleOutputData< WDataSetDTI > >
m_output;
151 std::shared_ptr< WModuleInputData< WDataSetSphericalHarmonics > >
m_input;
A module that calculates tensors from the input SH dataset.
boost::array< double, 6 > perVoxelTensorFunc(WValueSet< double >::SubArray const &s)
A function that gets called for every voxel in the input SH-dataset.
std::shared_ptr< WException > m_lastException
The last exception thrown by any worker thread.
std::shared_ptr< WCondition > m_exceptionCondition
Condition indicating if any exception was thrown.
std::shared_ptr< WDataSetSphericalHarmonics > m_dataSet
A pointer to the input dataset.
virtual const std::string getName() const
Gives back the name of this module.
void resetTensorPool()
Reset the threaded functions.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
virtual void moduleMain()
Entry point after loading the module.
WThreadedPerVoxelOperation< double, 6, double, 6 > TensorFuncType
the threaded function type for tensor computation, order 4 to 2
std::shared_ptr< WModuleOutputData< WDataSetDTI > > m_output
The output Connector.
std::shared_ptr< WModuleInputData< WDataSetSphericalHarmonics > > m_input
The input Connector for the SH data.
WMCalculateTensors()
Standard constructor.
WThreadedFunction< TensorFuncType > TensorPoolType
the threadpool
std::shared_ptr< TensorPoolType > m_tensorPool
The threadpool.
virtual ~WMCalculateTensors()
Destructor.
std::shared_ptr< WProgress > m_currentProgress
The object that keeps track of the current progress.
WMCalculateTensors This
a conveniance typedef
WMatrix< double > m_SHToTensorMat
The sh->tensor conversion.
virtual void properties()
Initialize the properties for this module.
virtual std::shared_ptr< WModule > factory() const
Due to the prototype design pattern used to build modules, this method returns a new instance of this...
std::shared_ptr< TensorFuncType > m_tensorFunc
The threaded function object.
void handleException(WException const &e)
Handle an exception thrown by a worker thread.
std::shared_ptr< WDataSetDTI > m_result
The output dataset.
void resetProgress(std::size_t todo)
Reset the progress indicator in the ui.
virtual void connectors()
Initialize the connectors this module is using.
virtual const std::string getDescription() const
Gives back a description of this module.
Class representing a single module of OpenWalnut.
Creates threads that computes a function in a multithreaded fashion.
A template that performs an operation on a per voxel basis.
A helper class granting safe access to a certain part of the valueset.