OpenWalnut  1.5.0dev
Public Member Functions | Protected Member Functions | List of all members
WFA Class Reference

Computes the FA (Fractional Anisotropy, see: https://en.wikipedia.org/wiki/Fractional_anisotropy) of a given Tensor. More...

#include <WFA.h>

+ Inheritance diagram for WFA:
+ Collaboration diagram for WFA:

Public Member Functions

 WFA ()
 Creates an object to perform the computation. More...
 
- Public Member Functions inherited from WObjectNDIP< WDataSetDTIToScalar_I >
virtual ~WObjectNDIP ()
 Destructor. More...
 
virtual std::string getName () const
 The name of the object. More...
 
virtual std::string getDescription () const
 The description of this object. More...
 
virtual const char ** getIcon () const
 The icon of this object. More...
 
virtual WProperties::SPtr getProperties ()
 Return the property group of this object. More...
 
- Public Member Functions inherited from WDataSetDTIToScalar_I
virtual WDataSetScalar::SPtr operator() (WProgress::SPtr progress, WBoolFlag const &shutdown, WDataSetDTI::SPtr tensors, WDataSetVector::SPtr evals)
 This runs the given strategy on the given dataset. More...
 
virtual ~WDataSetDTIToScalar_I ()
 Destructor. More...
 

Protected Member Functions

virtual double tensorToScalar (const WVector3d &evals, const WTensorSym< 2, 3, float > &tensor)
 Actual FA computation takes place inhere. More...
 
- Protected Member Functions inherited from WObjectNDIP< WDataSetDTIToScalar_I >
 WObjectNDIP (std::string name, std::string description, const char **icon=NULL)
 Construct a NDIP'ed object. More...
 

Additional Inherited Members

- Public Types inherited from WObjectNDIP< WDataSetDTIToScalar_I >
typedef std::shared_ptr< WObjectNDIPSPtr
 Shared ptr to an instance. More...
 
typedef std::shared_ptr< const WObjectNDIPConstSPtr
 Shared ptr to a const instance. More...
 
- Protected Attributes inherited from WObjectNDIP< WDataSetDTIToScalar_I >
WProperties::SPtr m_properties
 the properties of the object. More...
 

Detailed Description

Computes the FA (Fractional Anisotropy, see: https://en.wikipedia.org/wiki/Fractional_anisotropy) of a given Tensor.

\[ \hat{\lambda} = \frac{1}{3} \sum \lambda_i \]

\[ FA = \sqrt{ \frac{3}{2} \frac{ \left(\lambda_1 - \hat{\lambda} \right)^2 + \left(\lambda_2 - \hat{\lambda} \right)^2 + \left(\lambda_3 - \hat{\lambda} \right)^2 } {\lambda_1^2 + \lambda_2^2 + \lambda_3^2 } } \]

Definition at line 48 of file WFA.h.

Constructor & Destructor Documentation

◆ WFA()

WFA::WFA ( )

Creates an object to perform the computation.

Definition at line 28 of file WFA.cpp.

Member Function Documentation

◆ tensorToScalar()

double WFA::tensorToScalar ( const WVector3d evals,
const WTensorSym< 2, 3, float > &  tensor 
)
protectedvirtual

Actual FA computation takes place inhere.

Parameters
evalsWith the three given Eigenvalues, we may compute the FA. See the wikipedia article above for the formula.
tensorAlthough not needed for FA computation, the API requires us to use the signature.
Returns
The FA of the tensor.

Implements WDataSetDTIToScalar_I.

Definition at line 33 of file WFA.cpp.


The documentation for this class was generated from the following files: