ANIMA  4.0
animaODFProbabilisticTractographyImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <itkVectorImage.h>
6 
7 #include "AnimaTractographyExport.h"
8 
9 namespace anima
10 {
11 
12 class ANIMATRACTOGRAPHY_EXPORT ODFProbabilisticTractographyImageFilter : public anima::BaseProbabilisticTractographyImageFilter < itk::VectorImage <double, 3> >
13 {
14 public:
18 
19  typedef itk::SmartPointer<Self> Pointer;
20  typedef itk::SmartPointer<const Self> ConstPointer;
21 
22  itkNewMacro(Self)
23 
25 
26  struct XYZ
27  {
28  double x, y, z;
29  };
30 
31  void SetODFSHOrder(unsigned int num);
32  itkSetMacro(GFAThreshold,double)
33  itkSetMacro(CurvatureScale,double)
34  itkSetMacro(MinimalDiffusionProbability,double)
35 
36 protected:
39 
41  void PrepareTractography() ITK_OVERRIDE;
42 
43  virtual Vector3DType ProposeNewDirection(Vector3DType &oldDirection, VectorType &modelValue,
44  Vector3DType &sampling_direction, double &log_prior,
45  double &log_proposal, std::mt19937 &random_generator, unsigned int threadId) ITK_OVERRIDE;
46 
47  virtual double ComputeLogWeightUpdate(double b0Value, double noiseValue, Vector3DType &newDirection, VectorType &modelValue,
48  double &log_prior, double &log_proposal, unsigned int threadId) ITK_OVERRIDE;
49 
50  virtual void ComputeModelValue(InterpolatorPointer &modelInterpolator, ContinuousIndexType &index, VectorType &modelValue) ITK_OVERRIDE;
51 
52  virtual Vector3DType InitializeFirstIterationFromModel(Vector3DType &colinearDir, VectorType &modelValue,
53  unsigned int threadId) ITK_OVERRIDE;
54  virtual bool CheckModelProperties(double estimatedB0Value, double estimatedNoiseValue,
55  VectorType &modelValue, unsigned int threadId) ITK_OVERRIDE;
56 
57  unsigned int FindODFMaxima(const VectorType &modelValue, DirectionVectorType &maxima, double minVal, bool is2d);
58  double GetGeneralizedFractionalAnisotropy(VectorType &modelValue);
59 
60 private:
61  ITK_DISALLOW_COPY_AND_ASSIGN(ODFProbabilisticTractographyImageFilter);
62 
63  double m_GFAThreshold;
64 
66  double m_MinimalDiffusionProbability;
67 
69  double m_CurvatureScale;
70 
71  unsigned int m_ODFSHOrder;
72  anima::ODFSphericalHarmonicBasis *m_ODFSHBasis;
73 };
74 
75 } // end of namespace anima
STL namespace.
BaseProbabilisticTractographyImageFilter< itk::VectorImage< double, 3 > > Superclass