25 #ifndef WMEIGENSYSTEM_H
26 #define WMEIGENSYSTEM_H
33 #include <Eigen/Eigen>
36 #include "core/common/WThreadedFunction.h"
37 #include "core/common/math/WTensorFunctions.h"
38 #include "core/dataHandler/WThreadedPerVoxelOperation.h"
39 #include "core/dataHandler/WThreadedTrackingFunction.h"
40 #include "core/kernel/WModule.h"
71 virtual const std::string
getName()
const;
85 virtual std::shared_ptr< WModule >
factory()
const;
156 void updateOCs( std::shared_ptr< const WDataSetSingle > es );
199 boost::array< double, 12 >
applyEigenSolver(
const Eigen::Matrix3d& m )
const;
213 std::shared_ptr< WModuleInputData< WDataSetDTI > >
m_tensorIC;
228 std::vector< std::shared_ptr< WModuleOutputData< WDataSetScalar > > >
m_evalOutputs;
Represents a Diffusion-Tensor-Image dataset.
This data set type contains vectors as values.
Computes the eigensystem of a second order tensor field.
void resetProgress(std::size_t todo, std::string name)
Resets the current progress to 0.
std::shared_ptr< WModuleOutputData< WDataSetVector > > EigenOutputConnector
Shortcut for the vector field output connectors.
std::vector< std::shared_ptr< WModuleOutputData< WDataSetScalar > > > m_evalOutputs
Output scalar field , each for an eigenvalue field.
virtual void moduleMain()
Entry point after loading the module.
std::shared_ptr< TPVOFloat > m_eigenOperationFloat
the functor used for the calculation of the eigenvectors
virtual void requirements()
Initialize requirements 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...
WThreadedFunction< TPVOFloat > EigenFunctionTypeFloat
the thread pool type for the eigencomputation (float input)
std::shared_ptr< WProgress > m_currentProgress
Indicating current work progress.
WThreadedPerVoxelOperation< double, 6, double, 12 > TPVODouble
the threaded per-voxel function for the eigenvector computation (double input)
virtual const std::string getDescription() const
Gives back a description of this module.
WValueSet< double > FloatValueSetType
the valueset type
TPVOFloat::OutTransmitType const eigenSolverFloat(TPVOFloat::TransmitType const &input)
Computes the eigen system for double input parameters via using applyEigenSolver.
boost::array< double, 12 > computeEigenSystem(WTensorSym< 2, 3, double > const &m) const
Is used by every thread to compute the eigensystem for the given tensor.
boost::array< double, 12 > applyEigenSolver(const Eigen::Matrix3d &m) const
Copies the eigenvalues and eigenvectors from the libEigen output format into the double array.
virtual void connectors()
Initialize the connectors this module is using.
TPVOFloat::OutTransmitType const eigenFuncFloat(TPVOFloat::TransmitType const &input)
The function that computes the eigenvectors from the input tensor field.
TPVODouble::OutTransmitType const eigenSolverDouble(TPVODouble::TransmitType const &input)
Computes the eigen system for double input parameters via using applyEigenSolver.
virtual ~WMEigenSystem()
Destructs this module.
std::shared_ptr< WModuleInputData< WDataSetDTI > > m_tensorIC
Input tensor field.
std::shared_ptr< WThreadedFunctionBase > m_eigenPool
The threadpool for the eigenvector computation.
WPropSelection m_strategySelector
List for selecting the strategy.
std::vector< EigenOutputConnector > m_evecOutputs
Ouput vector field for principal eigenvectors as well as one for all eigenvalues at once.
WThreadedPerVoxelOperation< float, 6, double, 12 > TPVOFloat
the threaded per-voxel function for the eigenvector computation (float input)
WThreadedFunction< Tracking > TrackingFuncType
the tracking threadpool
virtual const std::string getName() const
Gives back the name of this module.
void resetEigenFunction(std::shared_ptr< WDataSetDTI > tensors)
Resets the threaded function/threadpool.
virtual void properties()
Initialize the properties for this module.
void updateOCs(std::shared_ptr< const WDataSetSingle > es)
Update the output connectors out of the computed eigensystem field.
WMEigenSystem()
Constructs a new module for eigensystem computation.
std::shared_ptr< TPVODouble > m_eigenOperationDouble
the functor used for the calculation of the eigenvectors
wtracking::WThreadedTrackingFunction Tracking
the threaded tracking functor
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
TPVODouble::OutTransmitType const eigenFuncDouble(TPVODouble::TransmitType const &input)
The function that computes the eigenvectors from the input tensor field.
WThreadedFunction< TPVODouble > EigenFunctionTypeDouble
the thread pool type for the eigencomputation (double input)
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.