ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkImageRegistrationMethod.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkImageRegistrationMethod_h
19 #define __itkImageRegistrationMethod_h
20 
21 #include "itkProcessObject.h"
22 #include "itkImage.h"
23 #include "itkImageToImageMetric.h"
25 #include "itkDataObjectDecorator.h"
26 
27 namespace itk
28 {
69 template< typename TFixedImage, typename TMovingImage >
70 class ITK_EXPORT ImageRegistrationMethod:public ProcessObject
71 {
72 public:
78 
80  itkNewMacro(Self);
81 
84 
86  typedef TFixedImage FixedImageType;
87  typedef typename FixedImageType::ConstPointer FixedImageConstPointer;
88 
90  typedef TMovingImage MovingImageType;
91  typedef typename MovingImageType::ConstPointer MovingImageConstPointer;
92 
97 
101 
107 
111 
114 
118 
121 
123  void SetFixedImage(const FixedImageType *fixedImage);
124 
125  itkGetConstObjectMacro(FixedImage, FixedImageType);
126 
128  void SetMovingImage(const MovingImageType *movingImage);
129 
130  itkGetConstObjectMacro(MovingImage, MovingImageType);
131 
133  itkSetObjectMacro(Optimizer, OptimizerType);
134  itkGetObjectMacro(Optimizer, OptimizerType);
136 
138  itkSetObjectMacro(Metric, MetricType);
139  itkGetObjectMacro(Metric, MetricType);
141 
143  itkSetObjectMacro(Transform, TransformType);
144  itkGetObjectMacro(Transform, TransformType);
146 
148  itkSetObjectMacro(Interpolator, InterpolatorType);
149  itkGetObjectMacro(Interpolator, InterpolatorType);
151 
153  virtual void SetInitialTransformParameters(const ParametersType & param);
154 
155  itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
156 
159  itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
160 
168  void SetFixedImageRegion(const FixedImageRegionType & region);
169 
174  itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
175 
178  itkGetConstMacro(FixedImageRegionDefined, bool);
179 
184  itkSetMacro(FixedImageRegionDefined, bool);
185 
187  virtual void Initialize()
188  throw ( ExceptionObject );
189 
191  const TransformOutputType * GetOutput() const;
192 
196  using Superclass::MakeOutput;
197  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
198 
201  unsigned long GetMTime() const;
202 
203 protected:
205  virtual ~ImageRegistrationMethod() {}
206  void PrintSelf(std::ostream & os, Indent indent) const;
209  void GenerateData();
210 
212  itkSetMacro(LastTransformParameters, ParametersType);
213 #ifdef ITKV3_COMPATIBILITY
214 public:
215 #else
216 protected:
217 #endif
218 
234  void StartRegistration(void);
235 
241  void StartOptimization(void);
242 
243 private:
244  ImageRegistrationMethod(const Self &); //purposely not implemented
245  void operator=(const Self &); //purposely not implemented
246 
249 
252 
255 
258 
261 };
262 } // end namespace itk
263 
264 #ifndef ITK_MANUAL_INSTANTIATION
265 #include "itkImageRegistrationMethod.hxx"
266 #endif
267 
268 #endif
269