ANIMA  4.0
animaStickCompartment.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <animaBaseCompartment.h>
4 #include <AnimaMCMExport.h>
5 
6 namespace anima
7 {
8 
9 class ANIMAMCM_EXPORT StickCompartment : public BaseCompartment
10 {
11 public:
12  // Useful typedefs
16  typedef itk::SmartPointer<Self> Pointer;
17  typedef itk::SmartPointer<const Self> ConstPointer;
21 
22  // New macro
23  itkNewMacro(Self)
24 
25 
26  itkTypeMacro(StickCompartment, BaseCompartment)
27 
28  DiffusionModelCompartmentType GetCompartmentType() ITK_OVERRIDE {return Stick;}
29 
30  virtual double GetFourierTransformedDiffusionProfile(double smallDelta, double bigDelta, double gradientStrength, const Vector3DType &gradient) ITK_OVERRIDE;
31  virtual ListType &GetSignalAttenuationJacobian(double smallDelta, double bigDelta, double gradientStrength, const Vector3DType &gradient) ITK_OVERRIDE;
32  virtual double GetLogDiffusionProfile(const Vector3DType &sample) ITK_OVERRIDE;
33 
34  virtual void SetParametersFromVector(const ListType &params) ITK_OVERRIDE;
35  virtual ListType &GetParametersAsVector() ITK_OVERRIDE;
36 
37  virtual ListType &GetParameterLowerBounds() ITK_OVERRIDE;
38  virtual ListType &GetParameterUpperBounds() ITK_OVERRIDE;
39 
40  // Set constraints
41  void SetEstimateAxialDiffusivity(bool arg);
42  void SetCompartmentVector(ModelOutputVectorType &compartmentVector) ITK_OVERRIDE;
43 
44  unsigned int GetCompartmentSize() ITK_OVERRIDE;
45  unsigned int GetNumberOfParameters() ITK_OVERRIDE;
46  ModelOutputVectorType &GetCompartmentVector() ITK_OVERRIDE;
47 
48  const Matrix3DType &GetDiffusionTensor() ITK_OVERRIDE;
49  double GetApparentFractionalAnisotropy() ITK_OVERRIDE;
50  double GetApparentMeanDiffusivity() ITK_OVERRIDE;
51  double GetApparentPerpendicularDiffusivity() ITK_OVERRIDE;
52  double GetApparentParallelDiffusivity() ITK_OVERRIDE;
53 
54 protected:
55  StickCompartment() : Superclass()
56  {
57  m_EstimateAxialDiffusivity = true;
58  m_ChangedConstraints = true;
59  m_GradientEigenvector1 = 0;
60  }
61 
62  virtual ~StickCompartment() {}
63 
64 private:
65  bool m_EstimateAxialDiffusivity;
66  bool m_ChangedConstraints;
67  unsigned int m_NumberOfParameters;
68  double m_GradientEigenvector1;
69 };
70 
71 } //end namespace anima
72 
std::vector< double > ListType
itk::SmartPointer< const Self > ConstPointer
Superclass::Pointer BasePointer
itk::VariableLengthVector< double > ModelOutputVectorType
itk::Matrix< double, 3, 3 > Matrix3DType
itk::SmartPointer< Self > Pointer
vnl_vector_fixed< double, 3 > Vector3DType
DiffusionModelCompartmentType
itk::SmartPointer< Self > Pointer
Superclass::Matrix3DType Matrix3DType
Superclass::ModelOutputVectorType ModelOutputVectorType
Superclass::Vector3DType Vector3DType