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
mitkNavigationDataLandmarkTransformFilter.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 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 
23 namespace mitk {
24 
43  {
44  public:
46  itkFactorylessNewMacro(Self);
47  itkCloneMacro(Self);
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 
112  itkGetConstObjectMacro(LandmarkTransform, LandmarkTransformType);
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 
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
mitk::NavigationDataLandmarkTransformFilter::m_LandmarkTransformInitializer
TransformInitializerType::Pointer m_LandmarkTransformInitializer
landmark based transform initializer
Definition: mitkNavigationDataLandmarkTransformFilter.h:173
mitk::NavigationDataLandmarkTransformFilter::QuaternionTransformType
itk::QuaternionRigidTransform< double > QuaternionTransformType
Definition: mitkNavigationDataLandmarkTransformFilter.h:119
mitk::NavigationDataLandmarkTransformFilter::m_ErrorMean
mitk::ScalarType m_ErrorMean
Fiducial Registration Error.
Definition: mitkNavigationDataLandmarkTransformFilter.h:164
mitk::NavigationDataLandmarkTransformFilter::ErrorVector
std::vector< mitk::ScalarType > ErrorVector
Definition: mitkNavigationDataLandmarkTransformFilter.h:47
mitk::NavigationDataLandmarkTransformFilter::m_SourcePoints
LandmarkPointContainer m_SourcePoints
positions of the source points
Definition: mitkNavigationDataLandmarkTransformFilter.h:171
itk::SmartPointer< Self >
mitk::NavigationDataLandmarkTransformFilter::LandmarkTransformType
itk::VersorRigid3DTransform< double > LandmarkTransformType
Definition: mitkNavigationDataLandmarkTransformFilter.h:50
mitk::NavigationDataLandmarkTransformFilter::m_ErrorMin
mitk::ScalarType m_ErrorMin
minimum registration error / best fitting landmark distance
Definition: mitkNavigationDataLandmarkTransformFilter.h:167
mitk::NavigationDataToNavigationDataFilter
NavigationDataToNavigationDataFilter is the base class of all filters that receive NavigationDatas as...
Definition: mitkNavigationDataToNavigationDataFilter.h:32
mitk::NavigationDataLandmarkTransformFilter
NavigationDataLandmarkTransformFilter applies a itk-landmark-transformation defined by source and tar...
Definition: mitkNavigationDataLandmarkTransformFilter.h:42
mitkPointSet.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::NavigationDataLandmarkTransformFilter::m_LandmarkTransform
LandmarkTransformType::Pointer m_LandmarkTransform
transform calculated from source and target points
Definition: mitkNavigationDataLandmarkTransformFilter.h:174
mitk::NavigationDataLandmarkTransformFilter::ImageType
itk::Image< signed short, 3 > ImageType
returns the current landmark transform
Definition: mitkNavigationDataLandmarkTransformFilter.h:112
mitk::NavigationDataLandmarkTransformFilter::m_ErrorAbsMax
mitk::ScalarType m_ErrorAbsMax
the absolute maximum registration error
Definition: mitkNavigationDataLandmarkTransformFilter.h:169
mitk::NavigationDataLandmarkTransformFilter::m_ErrorMax
mitk::ScalarType m_ErrorMax
maximum registration error / worst fitting landmark distance
Definition: mitkNavigationDataLandmarkTransformFilter.h:168
mitk::NavigationDataLandmarkTransformFilter::m_UseICPInitialization
bool m_UseICPInitialization
find source <--> target point correspondences with iterative closest point optimization
Definition: mitkNavigationDataLandmarkTransformFilter.h:180
mitk::NavigationDataLandmarkTransformFilter::LandmarkPointContainer
TransformInitializerType::LandmarkPointContainer LandmarkPointContainer
Definition: mitkNavigationDataLandmarkTransformFilter.h:118
mitk::NavigationDataLandmarkTransformFilter::m_ErrorRMS
mitk::ScalarType m_ErrorRMS
Root Mean Square of the registration error.
Definition: mitkNavigationDataLandmarkTransformFilter.h:166
mitk::NavigationDataLandmarkTransformFilter::m_TargetPoints
LandmarkPointContainer m_TargetPoints
positions of the target points
Definition: mitkNavigationDataLandmarkTransformFilter.h:172
mitk::NavigationDataLandmarkTransformFilter::m_ErrorStdDev
mitk::ScalarType m_ErrorStdDev
standard deviation of the Fiducial Registration Error
Definition: mitkNavigationDataLandmarkTransformFilter.h:165
mitk::NavigationDataLandmarkTransformFilter::m_QuatLandmarkTransform
QuaternionTransformType::Pointer m_QuatLandmarkTransform
transform needed to rotate orientation
Definition: mitkNavigationDataLandmarkTransformFilter.h:176
mitkNavigationDataToNavigationDataFilter.h
mitk::NavigationDataLandmarkTransformFilter::m_Errors
ErrorVector m_Errors
stores the euclidean distance of each transformed source landmark and its respective target landmark
Definition: mitkNavigationDataLandmarkTransformFilter.h:179
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::NavigationDataLandmarkTransformFilter::m_QuatTransform
QuaternionTransformType::Pointer m_QuatTransform
further transform needed to rotate orientation
Definition: mitkNavigationDataLandmarkTransformFilter.h:177
mitk::NavigationDataLandmarkTransformFilter::TransformInitializerType
itk::LandmarkBasedTransformInitializer< LandmarkTransformType, ImageType, ImageType > TransformInitializerType
Definition: mitkNavigationDataLandmarkTransformFilter.h:117
mitk::ScalarType
double ScalarType
Definition: mitkNumericConstants.h:20