Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
itkInitialImageToImageRegistrationMethod.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: RigidRegistrator.h,v $
5  Language: C++
6  Date: $Date: 2006/11/06 14:39:34 $
7  Version: $Revision: 1.15 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef itkInitialImageToImageRegistrationMethod_h
19 #define itkInitialImageToImageRegistrationMethod_h
20 
21 #include "itkImage.h"
22 #include "itkCommand.h"
23 
25 
26 #include "itkAffineTransform.h"
27 
30 
31 namespace itk
32 {
33 
34 template <class TImage>
36  : public ImageToImageRegistrationMethod<TImage>
37 {
38 
39 public:
40 
43  typedef SmartPointer<Self> Pointer;
44  typedef SmartPointer<const Self> ConstPointer;
45 
48 
49  itkNewMacro( Self );
50 
51  //
52  // Typedefs from Superclass
53  //
54  itkStaticConstMacro( ImageDimension, unsigned int,
55  TImage::ImageDimension );
56 
57  typedef AffineTransform<double, itkGetStaticConstMacro( ImageDimension )>
59 
60  typedef typename TransformType::Pointer TransformPointer;
61 
62  //
63  // Local Typedefs
64  //
65  typedef Point<double, itkGetStaticConstMacro(ImageDimension)>
67  typedef std::vector<LandmarkPointType> LandmarkPointContainer;
68 
69  //
70  // Custom Methods
71  //
72 
80 
81  const TransformType * GetTypedTransform( void ) const;
82 
88  TransformPointer GetAffineTransform( void ) const;
89 
90  itkSetMacro( NumberOfMoments, unsigned int );
91  itkGetConstMacro( NumberOfMoments, unsigned int );
92 
93  itkSetMacro( ComputeCenterOfRotationOnly, bool );
94  itkGetConstMacro( ComputeCenterOfRotationOnly, bool );
95 
96  itkSetMacro( UseLandmarks, bool );
97  itkGetConstMacro( UseLandmarks, bool );
98 
99  void SetFixedLandmarks( const LandmarkPointContainer& fixedLandmarks );
100 
101  void SetMovingLandmarks( const LandmarkPointContainer& movingLandmarks );
102 
103 protected:
104 
107 
108  void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
109 
110  //
111  // Methods from Superclass. Only the GenerateData() method should be
112  // overloaded. The Update() method must not be overloaded.
113  //
114  void GenerateData() ITK_OVERRIDE;
115 
116 private:
117 
118  InitialImageToImageRegistrationMethod( const Self & ); // Purposely not implemented
119  void operator =( const Self & ); // Purposely not implemented
120 
121  unsigned int m_NumberOfMoments;
122  bool m_ComputeCenterOfRotationOnly;
123  bool m_UseLandmarks;
124  LandmarkPointContainer m_FixedLandmarks;
125  LandmarkPointContainer m_MovingLandmarks;
126 };
127 
128 } // end namespace itk
129 
130 #ifndef ITK_MANUAL_INSTANTIATION
131 #include "itkInitialImageToImageRegistrationMethod.txx"
132 #endif
133 
134 #endif // __ImageToImageRegistrationMethod_h
Simplified inverse ITK transforms.
TransformPointer GetAffineTransform(void) const
void SetFixedLandmarks(const LandmarkPointContainer &fixedLandmarks)
AffineTransform< double, itkGetStaticConstMacro(ImageDimension)> TransformType
Transform< double, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension)> TransformType
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
itkTypeMacro(InitialImageToImageRegistrationMethod, ImageToImageRegistrationMethod)
void SetMovingLandmarks(const LandmarkPointContainer &movingLandmarks)
Point< double, itkGetStaticConstMacro(ImageDimension)> LandmarkPointType
itkSetMacro(NumberOfMoments, unsigned int)
itkGetConstMacro(NumberOfMoments, unsigned int)
itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension)