Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkDiffusionFunctionCollection.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef __mitkDiffusionFunctionCollection_h_
18 #define __mitkDiffusionFunctionCollection_h_
19 
20 
22 #include "vnl/vnl_vector.h"
23 #include "vnl/vnl_vector_fixed.h"
24 #include "itkVectorContainer.h"
25 
26 namespace mitk{
27 
29 {
30 public:
31  static double factorial(int number);
32  static void Cart2Sph(double x, double y, double z, double* cart);
33  static double legendre0(int l);
34  static double spherical_harmonic(int m,int l,double theta,double phi, bool complexPart);
35  static double Yj(int m, int k, double theta, double phi);
36 };
37 
39 {
40 private:
41  typedef std::vector<unsigned int> IndiciesVector;
42  typedef std::map<unsigned int, IndiciesVector > BValueMap;
43  typedef itk::VectorContainer< unsigned int, vnl_vector_fixed< double, 3 > > GradientDirectionContainerType;
44  typedef vnl_vector_fixed<double , 3 > GradientDirectionType;
45 
46 public:
47  static std::vector<unsigned int> GetAllUniqueDirections(const BValueMap &bValueMap, GradientDirectionContainerType *refGradientsContainer );
48 
49  static bool CheckForDifferingShellDirections(const BValueMap &bValueMap, GradientDirectionContainerType::ConstPointer refGradientsContainer);
50  static vnl_matrix<double> ComputeSphericalHarmonicsBasis(const vnl_matrix<double> & QBallReference, const unsigned int & LOrder);
51  static vnl_matrix<double> ComputeSphericalFromCartesian(const IndiciesVector & refShell, const GradientDirectionContainerType * refGradientsContainer);
52  static mitk::gradients::GradientDirectionContainerType::Pointer CreateNormalizedUniqueGradientDirectionContainer(const BValueMap &bValueMap, const GradientDirectionContainerType * origninalGradentcontainer);
53 
54 
55  template<typename type>
56  static double dot (vnl_vector_fixed< type ,3> const& v1, vnl_vector_fixed< type ,3 > const& v2 );
57 
58 };
59 
60 }
61 
62 #endif //__mitkDiffusionFunctionCollection_h_
63 
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKDIFFUSIONCORE_EXPORT
itk::SmartPointer< const Self > ConstPointer