31 #include "WMDiffTensorScalars.h"
34 #include "WTensorTrace.h"
35 #include "core/kernel/WModuleFactory.h"
40 :
WModuleContainer( "Diffusion Tensor Scalars", "Computes various scalar measures for a given diffusion tensor field (2nd order)." ),
41 m_strategy( "Scalar indices derived from tensors.", "Select one algorithm" )
63 "DataSetDTI storing the tensor field" );
67 "EigenValues from the internal ÉigenSystem module" );
70 "The computed scalar dataset derived from the given tensor dataset" );
102 std::shared_ptr< WModuleOutputConnector > evalConnector =
m_eigenSystem->getOutputConnector(
"evalsOutput" );
104 std::shared_ptr< OCType > evalsOC = std::dynamic_pointer_cast< OCType >( evalConnector );
117 debugLog() <<
"Start computing scalars...";
127 debugLog() <<
"Created scalar data done";
Computes the AD (Axional Diffusivity) of a given Tensor.
virtual void wait() const
Wait for the condition.
void setResetable(bool resetable=true, bool autoReset=true)
Sets the resetable flag.
virtual void add(std::shared_ptr< WCondition > condition)
Adds another condition to the set of conditions to wait for.
Computes the FA (Fractional Anisotropy, see: https://en.wikipedia.org/wiki/Fractional_anisotropy) of ...
Computes the MD (Mean Diffusivity) of a given Tensor.
Computes a scalar dataset for a given tensor dataset.
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< WModule > m_eigenSystem
Submodule doing computation of eigenvalues and eigenvectors.
WStrategyHelper< WObjectNDIP< WDataSetDTIToScalar_I > > m_strategy
the strategy currently active.
std::shared_ptr< WDataSetDTI > m_tensors
Dataset for the Tensors.
virtual void initSubModules()
Create and initialize submodule instances, wires them and forward connectors as well as some properti...
std::shared_ptr< WModuleInputForwardData< WDataSetDTI > > m_tensorsIC
Input connector required by this module.
std::shared_ptr< WModuleInputData< WDataSetVector > > m_evalsIC
Internal input connector for the Eigenvalues computed by the submodule EigenSystem.
virtual void connectors()
Initialize the connectors this module is using.
std::shared_ptr< WModuleOutputData< WDataSetScalar > > m_scalarOC
Output connector for the computed scalars.
WMDiffTensorScalars()
Default constructor.
std::shared_ptr< WDataSetVector > m_evals
Dataset for the Eigenvalues.
virtual void properties()
Initialize the properties for this module.
virtual ~WMDiffTensorScalars()
Destructor.
virtual void moduleMain()
Entry point after loading the module.
Class able to contain other modules.
virtual void add(std::shared_ptr< WModule > module, bool run=true)
Add a module to this container and start it.
static SPtr getModuleFactory()
Returns instance of the module factory to use to create modules.
Class offering an instantiate-able data connection between modules.
static PtrType createAndAdd(std::shared_ptr< WModule > module, std::string name="", std::string description="")
Convenience method to create a new instance of this out data connector with proper type and add it to...
virtual void properties()
Initialize properties in this function.
wlog::WStreamedLogger debugLog() const
Logger instance for comfortable debug logging.
std::shared_ptr< WProperties > m_properties
The property object for the module.
void ready()
Call this whenever your module is ready and can react on property changes.
WConditionSet m_moduleState
The internal state of the module.
std::shared_ptr< WProgressCombiner > m_progress
Progress indicator used as parent for all progress' of this module.
virtual void connectors()
Initialize connectors in this function.
std::shared_ptr< WObjectNDIP > SPtr
Shared ptr to an instance.
Class managing progress inside of modules.
std::shared_ptr< WProgress > SPtr
Shared pointer on a WProgress.
Computes the RA (Relative Anisotropy) of a given Tensor.
Computes the RD (Relative Diffusivity) of a given Tensor.
WProperties::SPtr getProperties() const
Get this strategy selectors properties.
Computes the trace (sum of diagonal elements) of the tensor.
WBoolFlag m_shutdownFlag
Condition getting fired whenever the thread should quit.