Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
Medical Imaging Interaction Toolkit
mitkCovarianceMatrixCalculator.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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef __MITK_COVARIANCEMATRIXCALCULATOR_H__
14 #define __MITK_COVARIANCEMATRIXCALCULATOR_H__
15 
16 // exports
18 
19 #include <mitkCommon.h>
20 
21 #include <itkMatrix.h>
22 #include <itkObjectFactory.h>
23 #include <vector>
24 
25 namespace mitk
26 {
27  // forward declarations
28  class Surface;
29  struct CovarianceMatrixCalculatorData;
30 
47  {
48  private:
50  CovarianceMatrixCalculatorData *d;
51 
52  protected:
53  // local typedefs
54 
56  typedef itk::Matrix<double, 3, 3> CovarianceMatrix;
58  typedef std::vector<CovarianceMatrix> CovarianceMatrixList;
59  typedef double Vertex[3];
60 
62  CovarianceMatrixList m_CovarianceMatrixList;
63 
76  void ComputeOrthonormalCoordinateSystem(
77  const int index, Vertex normal, CovarianceMatrix &principalComponents, Vertex variances, Vertex curVertex);
79  ~CovarianceMatrixCalculator() override;
80 
81  public:
83  itkFactorylessNewMacro(Self);
84  itkCloneMacro(Self);
85 
89  void SetVoronoiScalingFator(const double factor);
90 
94  void EnableNormalization(bool state);
95 
99  double GetMeanVariance() const;
100 
104  const CovarianceMatrixList &GetCovarianceMatrices() const;
105 
109  void SetInputSurface(Surface *input);
110 
114  void ComputeCovarianceMatrices();
115  };
116 }
117 
118 #endif
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:28
std::vector< CovarianceMatrix > CovarianceMatrixList
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKALGORITHMSEXT_EXPORT
Class that computes the covariance matrices for every point in a Surface used in the A-ICP algorithm...
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45