MITK-IGT
IGT Extension of MITK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mitkNavigationDataLandmarkTransformFilter.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef mitkNavigationDataLandmarkTransformFilter_h
14#define mitkNavigationDataLandmarkTransformFilter_h
15
17#include <mitkPointSet.h>
18#include <itkLandmarkBasedTransformInitializer.h>
19#include <itkQuaternionRigidTransform.h>
20#include <itkImage.h>
21
22
23namespace mitk {
24
43 {
44 public:
48
49 typedef std::vector<mitk::ScalarType> ErrorVector;
50 typedef itk::VersorRigid3DTransform< double > LandmarkTransformType;
51
56 virtual void SetSourceLandmarks(mitk::PointSet::Pointer sourcePointSet);
57
62 virtual void SetTargetLandmarks(mitk::PointSet::Pointer targetPointSet);
63
64 virtual bool IsInitialized() const;
65
70 mitk::ScalarType GetFRE() const;
71
76 mitk::ScalarType GetFREStdDev() const;
77
82 mitk::ScalarType GetRMSError() const;
83
88 mitk::ScalarType GetMinError() const;
89
94 mitk::ScalarType GetMaxError() const;
95
100 mitk::ScalarType GetAbsMaxError() const;
101
106 const ErrorVector& GetErrorVector() const;
107
108 itkSetMacro(UseICPInitialization, bool);
109 itkGetMacro(UseICPInitialization, bool);
110 itkBooleanMacro(UseICPInitialization);
111
113
114 protected:
115 typedef itk::Image< signed short, 3> ImageType; // only because itk::LandmarkBasedTransformInitializer must be templated over two imagetypes
116
117 typedef itk::LandmarkBasedTransformInitializer< LandmarkTransformType, ImageType, ImageType > TransformInitializerType;
118 typedef TransformInitializerType::LandmarkPointContainer LandmarkPointContainer;
119 typedef itk::QuaternionRigidTransform<double> QuaternionTransformType;
120
126
131 void GenerateData() override;
132
146 bool FindCorrespondentLandmarks(LandmarkPointContainer& sources, const LandmarkPointContainer& targets) const;
147
154 void InitializeLandmarkTransform(LandmarkPointContainer& sources, const LandmarkPointContainer& targets);
155
159 void UpdateLandmarkTransform(const LandmarkPointContainer &sources, const LandmarkPointContainer &targets);
160 void AccumulateStatistics(ErrorVector& vector);
161
162 void PrintSelf( std::ostream& os, itk::Indent indent ) const override;
163
164 mitk::ScalarType m_ErrorMean;
165 mitk::ScalarType m_ErrorStdDev;
166 mitk::ScalarType m_ErrorRMS;
167 mitk::ScalarType m_ErrorMin;
168 mitk::ScalarType m_ErrorMax;
169 mitk::ScalarType m_ErrorAbsMax;
170
173 TransformInitializerType::Pointer m_LandmarkTransformInitializer;
174 LandmarkTransformType::Pointer m_LandmarkTransform;
175
176 QuaternionTransformType::Pointer m_QuatLandmarkTransform;
177 QuaternionTransformType::Pointer m_QuatTransform;
178
181 };
182} // namespace mitk
183#endif
NavigationDataLandmarkTransformFilter applies a itk-landmark-transformation defined by source and tar...
QuaternionTransformType::Pointer m_QuatTransform
further transform needed to rotate orientation
TransformInitializerType::Pointer m_LandmarkTransformInitializer
landmark based transform initializer
mitk::ScalarType m_ErrorAbsMax
the absolute maximum registration error
ErrorVector m_Errors
stores the euclidean distance of each transformed source landmark and its respective target landmark
LandmarkPointContainer m_TargetPoints
positions of the target points
itkGetConstObjectMacro(LandmarkTransform, LandmarkTransformType)
returns the current landmark transform
itk::LandmarkBasedTransformInitializer< LandmarkTransformType, ImageType, ImageType > TransformInitializerType
mitk::ScalarType m_ErrorMin
minimum registration error / best fitting landmark distance
TransformInitializerType::LandmarkPointContainer LandmarkPointContainer
mitk::ScalarType m_ErrorStdDev
standard deviation of the Fiducial Registration Error
itkBooleanMacro(UseICPInitialization)
If set to true, source and target point correspondences are established with iterative closest point ...
mitkClassMacro(NavigationDataLandmarkTransformFilter, NavigationDataToNavigationDataFilter)
itkGetMacro(UseICPInitialization, bool)
If set to true, source and target point correspondences are established with iterative closest point ...
LandmarkTransformType::Pointer m_LandmarkTransform
transform calculated from source and target points
QuaternionTransformType::Pointer m_QuatLandmarkTransform
transform needed to rotate orientation
mitk::ScalarType m_ErrorMax
maximum registration error / worst fitting landmark distance
LandmarkPointContainer m_SourcePoints
positions of the source points
itkSetMacro(UseICPInitialization, bool)
If set to true, source and target point correspondences are established with iterative closest point ...
mitk::ScalarType m_ErrorRMS
Root Mean Square of the registration error.
bool m_UseICPInitialization
find source <--> target point correspondences with iterative closest point optimization
NavigationDataToNavigationDataFilter is the base class of all filters that receive NavigationDatas as...
IGT Exceptions.