ANIMA  4.0
animaDTIProbabilisticTractographyImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <itkVectorImage.h>
5 
6 #include <random>
7 
8 #include "AnimaTractographyExport.h"
9 
10 namespace anima
11 {
12 
13 class ANIMATRACTOGRAPHY_EXPORT DTIProbabilisticTractographyImageFilter : public BaseProbabilisticTractographyImageFilter < itk::VectorImage <double, 3> >
14 {
15 public:
19 
20  typedef itk::SmartPointer<Self> Pointer;
21  typedef itk::SmartPointer<const Self> ConstPointer;
22 
23  itkNewMacro(Self)
25 
26  void SetKappaPolynomialCoefficients(std::vector <double> &coefs);
27 
28  itkSetMacro(FAThreshold,double)
29  itkSetMacro(ThresholdForProlateTensor,double)
30 
31 protected:
34 
35  double GetKappaFromFA(double FA);
36  void GetDTIPrincipalDirection(const VectorType &modelValue, Vector3DType &resVec, bool is2d);
37  void GetDTIMinorDirection(VectorType &modelValue, Vector3DType &resVec);
38 
39  virtual Vector3DType ProposeNewDirection(Vector3DType &oldDirection, VectorType &modelValue,
40  Vector3DType &sampling_direction, double &log_prior,
41  double &log_proposal, std::mt19937 &random_generator,
42  unsigned int threadId) ITK_OVERRIDE;
43 
44  virtual double ComputeLogWeightUpdate(double b0Value, double noiseValue, Vector3DType &newDirection, VectorType &modelValue,
45  double &log_prior, double &log_proposal, unsigned int threadId) ITK_OVERRIDE;
46 
47  virtual void ComputeModelValue(InterpolatorPointer &modelInterpolator, ContinuousIndexType &index, VectorType &modelValue) ITK_OVERRIDE;
48 
49  virtual Vector3DType InitializeFirstIterationFromModel(Vector3DType &colinearDir,
50  VectorType &modelValue, unsigned int threadId) ITK_OVERRIDE;
51  virtual bool CheckModelProperties(double estimatedB0Value, double estimatedNoiseValue,
52  VectorType &modelValue, unsigned int threadId) ITK_OVERRIDE;
53 
54  double GetLinearCoefficient(VectorType &modelValue);
55  double GetFractionalAnisotropy(VectorType &modelValue);
56  void GetEigenValueCombinations(VectorType &modelValue, double &meanLambda, double &perpLambda);
57 
58  void ComputeAdditionalScalarMaps() ITK_OVERRIDE;
59 
60 private:
61  ITK_DISALLOW_COPY_AND_ASSIGN(DTIProbabilisticTractographyImageFilter);
62 
63  double m_ThresholdForProlateTensor;
64  double m_FAThreshold;
65 
66  std::vector <double> m_KappaPolynomialCoefficients;
67 };
68 
69 } // end of namespace anima
STL namespace.
BaseProbabilisticTractographyImageFilter< itk::VectorImage< double, 3 > > Superclass