Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkImageRegistrationMethod.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 MITKIMAGEREGISTRATIONMETHOD_H
18 #define MITKIMAGEREGISTRATIONMETHOD_H
19 
21 #include "itkImageRegistrationMethod.h"
22 #include "itkSingleValuedNonLinearOptimizer.h"
23 
24 #include "mitkCommon.h"
25 #include "mitkImageAccessByItk.h"
26 #include "mitkImageToImageFilter.h"
28 
29 #include "itkImageMaskSpatialObject.h"
31 
32 namespace mitk
33 {
42  {
43  public:
44  typedef itk::SingleValuedNonLinearOptimizer OptimizerType;
45  typedef itk::ImageMaskSpatialObject<3> MaskType;
46 
48 
49  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
50 
51  static const int LINEARINTERPOLATOR = 0;
52  static const int NEARESTNEIGHBORINTERPOLATOR = 1;
53 
54  void SetObserver(RigidRegistrationObserver::Pointer observer);
55 
56  void SetInterpolator(int interpolator);
57 
58  virtual void GenerateData() override;
59 
60  virtual void SetReferenceImage(Image::Pointer fixedImage);
61 
62  virtual void SetFixedMask(Image::Pointer fixedMask);
63 
64  virtual void SetMovingMask(Image::Pointer movingMask);
65 
66  void SetOptimizerScales(itk::Array<double> scales);
67 
68  void SetTransform(itk::Object::Pointer transform);
69 
70  void SetMetric(itk::Object::Pointer metric);
71 
72  void SetOptimizer(itk::Object::Pointer optimizer);
73 
74  void SetNumberOfLevels(unsigned int levels);
75 
76  protected:
78  virtual ~ImageRegistrationMethod();
79 
81 
83  int m_Interpolator;
84  Image::Pointer m_ReferenceImage;
85  Image::Pointer m_FixedMask;
86  Image::Pointer m_MovingMask;
87 
88  virtual void GenerateOutputInformation() override {}
89  private:
90  itk::Object::Pointer m_Transform;
91  itk::Object::Pointer m_Metric;
92  itk::Object::Pointer m_Optimizer;
93  itk::Array<double> m_OptimizerScales;
94 
95  unsigned int m_MultiResolutionScales;
96  };
97 }
98 
99 #endif // MITKIMAGEREGISTRATIONMETHOD_H
itk::SmartPointer< Self > Pointer
Observer to react on rigid registration optimizer events.
Main class for the rigid registration pipeline.
#define MITKRIGIDREGISTRATION_EXPORT
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
itk::ImageMaskSpatialObject< 3 > MaskType
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Image class for storing images.
Definition: mitkImage.h:76
Superclass of all classes having one or more Images as input and generating Images as output...
itk::SingleValuedNonLinearOptimizer OptimizerType