ANIMA  4.0
animaBaseIsotropicCompartment.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <animaBaseCompartment.h>
4 #include <AnimaMCMBaseExport.h>
5 
6 namespace anima
7 {
8 
9 class ANIMAMCMBASE_EXPORT BaseIsotropicCompartment : public BaseCompartment
10 {
11 public:
12  // Useful typedefs
15  typedef Superclass::Pointer BasePointer;
16  typedef itk::SmartPointer<Self> Pointer;
17  typedef itk::SmartPointer<const Self> ConstPointer;
18  typedef Superclass::ModelOutputVectorType ModelOutputVectorType;
19  typedef Superclass::Vector3DType Vector3DType;
21 
24 
25  virtual double GetFourierTransformedDiffusionProfile(double smallDelta, double bigDelta, double gradientStrength, const Vector3DType &gradient) ITK_OVERRIDE;
26  virtual ListType &GetSignalAttenuationJacobian(double smallDelta, double bigDelta, double gradientStrength, const Vector3DType &gradient) ITK_OVERRIDE;
27  virtual double GetLogDiffusionProfile(const Vector3DType &sample) ITK_OVERRIDE;
28 
29  virtual void SetParametersFromVector(const ListType &params) ITK_OVERRIDE;
30  virtual ListType &GetParametersAsVector() ITK_OVERRIDE;
31 
32  // Set constraints
33  void SetEstimateAxialDiffusivity(bool arg);
34  bool GetEstimateAxialDiffusivity() {return m_EstimateAxialDiffusivity;}
35 
36  void SetCompartmentVector(ModelOutputVectorType &compartmentVector) ITK_OVERRIDE;
37 
38  unsigned int GetCompartmentSize() ITK_OVERRIDE;
39  unsigned int GetNumberOfParameters() ITK_OVERRIDE;
40  ModelOutputVectorType &GetCompartmentVector() ITK_OVERRIDE;
41 
43  void Reorient(vnl_matrix <double> &orientationMatrix, bool affineTransform) ITK_OVERRIDE {}
44 
45  const Matrix3DType &GetDiffusionTensor() ITK_OVERRIDE;
46  double GetApparentFractionalAnisotropy() ITK_OVERRIDE;
47  double GetApparentMeanDiffusivity() ITK_OVERRIDE;
48  double GetApparentParallelDiffusivity() ITK_OVERRIDE;
49  double GetApparentPerpendicularDiffusivity() ITK_OVERRIDE;
50 
51 protected:
52  BaseIsotropicCompartment() : Superclass()
53  {
54  m_EstimateAxialDiffusivity = true;
55  m_ChangedConstraints = true;
56 
57  m_NumberOfParameters = this->GetCompartmentSize();
58  }
59 
61 
62 private:
63  bool m_EstimateAxialDiffusivity;
64  bool m_ChangedConstraints;
65  unsigned int m_NumberOfParameters;
66 
67  Matrix3DType m_DiffusionTensor;
68 };
69 
70 } //end namespace anima
71 
std::vector< double > ListType
void Reorient(vnl_matrix< double > &orientationMatrix, bool affineTransform) ITK_OVERRIDE
Reimplements re-orientation, useless in isotropic water compartment.
itk::Matrix< double, 3, 3 > Matrix3DType
itk::SmartPointer< const Self > ConstPointer
Superclass::ModelOutputVectorType ModelOutputVectorType