Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
itkImageToImageRegistrationMethod.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 itkImageToImageRegistrationMethod_h
19 #define itkImageToImageRegistrationMethod_h
20 
21 #include "itkSpatialObject.h"
22 #include "itkImageRegistrationMethod.h"
23 
24 namespace itk
25 {
26 
38 template <class TImage>
40  : public ProcessObject
41 {
42 
43 public:
44 
46  typedef ProcessObject Superclass;
47  typedef SmartPointer<Self> Pointer;
48  typedef SmartPointer<const Self> ConstPointer;
49 
51 
52  itkNewMacro( Self );
53 
54  //
55  // Custom Typedefs
56  //
57  itkStaticConstMacro( ImageDimension, unsigned int,
58  TImage::ImageDimension );
59 
60  typedef Transform<double,
61  itkGetStaticConstMacro( ImageDimension ),
62  itkGetStaticConstMacro( ImageDimension )>
64 
65  typedef DataObjectDecorator<TransformType> TransformOutputType;
66 
67  typedef typename DataObject::Pointer DataObjectPointer;
68  typedef Superclass::DataObjectPointerArraySizeType
70 
71  typedef TImage ImageType;
72 
73  typedef typename TImage::PointType PointType;
74 
75  typedef SpatialObject<itkGetStaticConstMacro( ImageDimension )>
77 
78  //
79  // Custom Methods
80  //
81  itkSetMacro( RegistrationNumberOfThreads, unsigned int );
82  itkGetMacro( RegistrationNumberOfThreads, unsigned int );
83 
84  itkSetObjectMacro( Observer, Command );
85  itkGetObjectMacro( Observer, Command );
86 
87  void SetFixedImage( const ImageType * fixedImage );
88 
89  itkGetConstObjectMacro( FixedImage, ImageType );
90 
91  void SetMovingImage( const ImageType * movingImage );
92 
93  itkGetConstObjectMacro( MovingImage, ImageType );
94 
95  void SetRegionOfInterest( const PointType & point1, const PointType & point2 );
96 
97  itkSetMacro(UseRegionOfInterest, bool);
98  itkGetMacro(UseRegionOfInterest, bool);
99  itkSetMacro(RegionOfInterestPoint1, PointType);
100  itkGetMacro(RegionOfInterestPoint1, PointType);
101  itkSetMacro(RegionOfInterestPoint2, PointType);
102  itkGetMacro(RegionOfInterestPoint2, PointType);
103 
104  void SetFixedImageMaskObject( const MaskObjectType * maskObject );
105 
106  itkGetConstObjectMacro( FixedImageMaskObject, MaskObjectType );
107 
108  itkSetMacro( UseFixedImageMaskObject, bool );
109  itkGetMacro( UseFixedImageMaskObject, bool );
110 
111  void SetMovingImageMaskObject( const MaskObjectType * maskObject );
112 
113  itkGetConstObjectMacro( MovingImageMaskObject, MaskObjectType );
114 
115  itkSetMacro( UseMovingImageMaskObject, bool );
116  itkGetMacro( UseMovingImageMaskObject, bool );
117 
118  itkSetMacro( ReportProgress, bool );
119  itkGetMacro( ReportProgress, bool );
120  itkBooleanMacro( ReportProgress );
121 
123  const TransformOutputType * GetOutput( void ) const;
124 
125 protected:
126 
128  virtual ~ImageToImageRegistrationMethod( void );
129 
130  virtual void Initialize( void );
131 
135  void GenerateData( void ) ITK_OVERRIDE;
136 
137  void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
138 
140  itkSetObjectMacro( Transform, TransformType );
141  itkGetObjectMacro( Transform, TransformType );
143 
144  using Superclass::MakeOutput;
145  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType idx ) ITK_OVERRIDE;
146 
147  unsigned long GetMTime( void ) const ITK_OVERRIDE;
148 
149 protected:
150 
151  typename TransformType::Pointer m_Transform;
152 private:
153 
154  ImageToImageRegistrationMethod( const Self & ); // Purposely not implemented
155  void operator =( const Self & ); // Purposely not implemented
156 
157  unsigned int m_RegistrationNumberOfThreads;
158 
159  Command::Pointer m_Observer;
160 
161  typename ImageType::ConstPointer m_FixedImage;
162  typename ImageType::ConstPointer m_MovingImage;
163 
164  bool m_UseRegionOfInterest;
165  PointType m_RegionOfInterestPoint1;
166  PointType m_RegionOfInterestPoint2;
167 
168  bool m_UseFixedImageMaskObject;
169  typename MaskObjectType::ConstPointer m_FixedImageMaskObject;
170 
171  bool m_UseMovingImageMaskObject;
172  typename MaskObjectType::ConstPointer m_MovingImageMaskObject;
173 
174  bool m_ReportProgress;
175 
176 };
177 
178 }
179 
180 #ifndef ITK_MANUAL_INSTANTIATION
181 #include "itkImageToImageRegistrationMethod.txx"
182 #endif
183 
184 #endif
Superclass::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
unsigned long GetMTime(void) const ITK_OVERRIDE
itkSetMacro(RegistrationNumberOfThreads, unsigned int)
void GenerateData(void) ITK_OVERRIDE
Simplified inverse ITK transforms.
const TransformOutputType * GetOutput(void) const
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
Transform< double, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension)> TransformType
itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension)
void SetMovingImageMaskObject(const MaskObjectType *maskObject)
void SetMovingImage(const ImageType *movingImage)
DataObjectDecorator< TransformType > TransformOutputType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE
void SetFixedImageMaskObject(const MaskObjectType *maskObject)
void SetFixedImage(const ImageType *fixedImage)
itkGetMacro(RegistrationNumberOfThreads, unsigned int)
itkSetObjectMacro(Observer, Command)
void SetRegionOfInterest(const PointType &point1, const PointType &point2)
itkTypeMacro(ImageToImageRegistrationMethod, ProcessObject)
SpatialObject< itkGetStaticConstMacro(ImageDimension)> MaskObjectType
itkGetConstObjectMacro(FixedImage, ImageType)
itkGetObjectMacro(Observer, Command)