ANIMA  4.0
animaODFSphericalHarmonicBasis.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include <itkVariableLengthVector.h>
5 #include <vector>
6 #include <AnimaSHToolsExport.h>
7 
8 namespace anima
9 {
10 class ANIMASHTOOLS_EXPORT ODFSphericalHarmonicBasis
11 {
12 public:
13  ODFSphericalHarmonicBasis(unsigned int L);
14  virtual ~ODFSphericalHarmonicBasis() {m_SphericalHarmonics.clear();}
15 
16  // T has to be a vector type with the [] operator
17  template <class T> double getValueAtPosition(const T &coefficients, double theta, double phi);
18 
19  template <class T> double getThetaFirstDerivativeValueAtPosition(const T &coefficients,
20  double theta, double phi);
21 
22  template <class T> double getPhiFirstDerivativeValueAtPosition(const T &coefficients,
23  double theta, double phi);
24 
25  template <class T> double getThetaSecondDerivativeValueAtPosition(const T &coefficients,
26  double theta, double phi);
27 
28  template <class T> double getThetaPhiDerivativeValueAtPosition(const T &coefficients,
29  double theta, double phi);
30 
31  template <class T> double getPhiSecondDerivativeValueAtPosition(const T &coefficients,
32  double theta, double phi);
33 
34  template <class T> double getCurvatureAtPosition(const T &coefficients,
35  double theta, double phi);
36 
37  double getNthSHValueAtPosition(int k, int m, double theta, double phi);
38 
39  template <class T> itk::VariableLengthVector <T>
40  GetSampleValues(itk::VariableLengthVector <T> &data,
41  std::vector < std::vector <double> > &m_SampleDirections);
42 private:
43  unsigned int m_LOrder;
44  std::vector < SphericalHarmonic > m_SphericalHarmonics;
45 };
46 
47 } // end namespace odf
48