25 #ifndef WMCALCULATEGFA_H
26 #define WMCALCULATEGFA_H
32 #include "core/common/WThreadedFunction.h"
33 #include "core/common/math/WMatrix.h"
34 #include "core/dataHandler/WDataSetScalar.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< WDataSetScalar > >
m_output;
151 std::shared_ptr< WModuleInputData< WDataSetSphericalHarmonics > >
m_input;
A module that calculates the generalized fractional anisotropy for every voxel of the input dataset.
virtual ~WMCalculateGFA()
Destructor.
std::shared_ptr< WCondition > m_exceptionCondition
Condition indicating if any exception was thrown.
void resetProgress(std::size_t todo)
Reset the progress indicator in the ui.
std::shared_ptr< WException > m_lastException
The last exception thrown by any worker thread.
std::shared_ptr< WModuleInputData< WDataSetSphericalHarmonics > > m_input
The input Connector for the SH data.
std::shared_ptr< WProgress > m_currentProgress
The object that keeps track of the current progress.
WThreadedFunction< GFAFuncType > GFAPoolType
the threadpool
virtual void connectors()
Initialize the connectors this module is using.
virtual const std::string getDescription() const
Gives back a description of this module.
WMatrix< double > m_BMat
A matrix of SH base function values for various gradients.
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...
virtual void properties()
Initialize the properties for this module.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
virtual void moduleMain()
Entry point after loading the module.
void resetGFAPool()
Reset the threaded functions.
WMCalculateGFA()
Standard constructor.
boost::array< double, 1 > perVoxelGFAFunc(WValueSet< double >::SubArray const &s)
A function that gets called for every voxel in the input SH-dataset.
WMCalculateGFA This
a conveniance typedef
std::shared_ptr< GFAFuncType > m_gfaFunc
The threaded function object.
std::shared_ptr< WDataSetScalar > m_result
The output dataset.
std::shared_ptr< WModuleOutputData< WDataSetScalar > > m_output
The output Connector.
WThreadedPerVoxelOperation< double, 15, double, 1 > GFAFuncType
the threaded function type for gfa computation
std::shared_ptr< WDataSetSphericalHarmonics > m_dataSet
A pointer to the input dataset.
std::shared_ptr< GFAPoolType > m_gfaPool
The threadpool.
virtual const std::string getName() const
Gives back the name of this module.
void handleException(WException const &e)
Handle an exception thrown by a worker thread.
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.