Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkWeightedPointTransform.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 mitkWeightedPointTransform_h
14 #define mitkWeightedPointTransform_h
15 
16 // EXPORTS
18 
19 // ITK
20 #include <itkMatrix.h>
21 #include <itkVariableSizeMatrix.h>
22 #include <mitkCommon.h>
23 #include <mitkPointSet.h>
24 #include <vector>
25 #include <vtkSmartPointer.h>
26 
27 // forward declarations
28 class vtkPoints;
29 class vtkLandmarkTransform;
30 
31 namespace mitk
32 {
53  {
55  typedef itk::Matrix<double, 3, 3> Matrix3x3;
57  typedef Matrix3x3 WeightMatrix;
59  typedef Matrix3x3 Rotation;
61  typedef itk::Vector<double, 3> Translation;
63  typedef std::vector<WeightMatrix> WeightMatrixList;
65  typedef std::vector<Matrix3x3> CovarianceMatrixList;
66 
67  public:
69  itkFactorylessNewMacro(Self);
70  itkCloneMacro(Self);
71 
73  void ComputeTransformation();
74 
76  itkSetMacro(Threshold, double);
77 
81  itkSetMacro(MaxIterations, double);
82 
87  itkGetMacro(Iterations, int);
88 
92  itkGetMacro(FRE, double);
93 
95  itkSetMacro(FRENormalizationFactor, double);
96 
98  itkGetMacro(FRENormalizationFactor, double);
99 
103  void SetMovingPointSet(vtkSmartPointer<vtkPoints> p);
104 
109  void SetCovarianceMatricesMoving(const CovarianceMatrixList &matrices);
110 
114  void SetFixedPointSet(vtkSmartPointer<vtkPoints> p);
115 
120  void SetCovarianceMatricesFixed(const CovarianceMatrixList &matrices);
121 
126  const Translation &GetTransformT() const { return m_Translation; }
130  const Rotation &GetTransformR() const { return m_Rotation; }
131  protected:
133  ~WeightedPointTransform() override;
134 
136  double m_Threshold;
137 
140 
143 
145  double m_FRE;
146 
149 
152 
155 
158 
160  CovarianceMatrixList m_CovarianceMatricesMoving;
161 
163  CovarianceMatrixList m_CovarianceMatricesFixed;
164 
166  Translation m_Translation;
167 
169  Rotation m_Rotation;
170 
185  void C_maker(vtkPoints *X, const WeightMatrixList &W, itk::VariableSizeMatrix<double> &returnValue);
186 
201  void E_maker(vtkPoints *X, vtkPoints *Y, const WeightMatrixList &W, vnl_vector<double> &returnValue);
202 
214  double CalculateConfigChange(vtkPoints *X, vtkPoints *X_new);
215 
235  void WeightedPointRegister(vtkPoints *X,
236  vtkPoints *Y,
237  const CovarianceMatrixList &Sigma_X,
238  const CovarianceMatrixList &Sigma_Y,
239  double Threshold,
240  int MaxIterations,
241  Rotation &TransformationR,
242  Translation &TransformationT,
243  double &FRE,
244  int &n);
245  };
246 }
247 #endif
mitk::WeightedPointTransform
This class implements an extension of the weighted point based registration algorithm from A....
Definition: mitkWeightedPointTransform.h:52
mitk::WeightedPointTransform::m_FRENormalizationFactor
double m_FRENormalizationFactor
Definition: mitkWeightedPointTransform.h:148
mitk::WeightedPointTransform::m_MaxIterations
int m_MaxIterations
Definition: mitkWeightedPointTransform.h:139
mitk::WeightedPointTransform::GetTransformT
const Translation & GetTransformT() const
Definition: mitkWeightedPointTransform.h:126
vtkSmartPointer< vtkPoints >
MitkAlgorithmsExtExports.h
mitk::WeightedPointTransform::m_FRE
double m_FRE
Definition: mitkWeightedPointTransform.h:145
MITKALGORITHMSEXT_EXPORT
#define MITKALGORITHMSEXT_EXPORT
Definition: MitkAlgorithmsExtExports.h:15
mitk::WeightedPointTransform::m_Rotation
Rotation m_Rotation
Definition: mitkWeightedPointTransform.h:169
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitkPointSet.h
mitk::WeightedPointTransform::m_FixedPointSet
vtkSmartPointer< vtkPoints > m_FixedPointSet
Definition: mitkWeightedPointTransform.h:154
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::WeightedPointTransform::m_MovingPointSet
vtkSmartPointer< vtkPoints > m_MovingPointSet
Definition: mitkWeightedPointTransform.h:157
mitkCommon.h
mitk::WeightedPointTransform::m_CovarianceMatricesFixed
CovarianceMatrixList m_CovarianceMatricesFixed
Definition: mitkWeightedPointTransform.h:163
mitk::WeightedPointTransform::m_Iterations
int m_Iterations
Definition: mitkWeightedPointTransform.h:142
mitk::WeightedPointTransform::m_LandmarkTransform
vtkSmartPointer< vtkLandmarkTransform > m_LandmarkTransform
Definition: mitkWeightedPointTransform.h:151
mitk::WeightedPointTransform::GetTransformR
const Rotation & GetTransformR() const
Definition: mitkWeightedPointTransform.h:130
mitk::WeightedPointTransform::m_Threshold
double m_Threshold
Definition: mitkWeightedPointTransform.h:136
mitk::WeightedPointTransform::m_Translation
Translation m_Translation
Definition: mitkWeightedPointTransform.h:166
mitk::WeightedPointTransform::m_CovarianceMatricesMoving
CovarianceMatrixList m_CovarianceMatricesMoving
Definition: mitkWeightedPointTransform.h:160