go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkMultiResolutionImageRegistrationMethod2.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright UMC Utrecht and contributors
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 
23 /*=========================================================================
24 
25  Program: Insight Segmentation & Registration Toolkit
26  Module: $RCSfile$
27  Language: C++
28  Date: $Date: 2008-06-27 17:50:36 +0200 (Fri, 27 Jun 2008) $
29  Version: $Revision: 1728 $
30 
31  Copyright (c) Insight Software Consortium. All rights reserved.
32  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
33 
34  This software is distributed WITHOUT ANY WARRANTY; without even
35  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
36  PURPOSE. See the above copyright notices for more information.
37 
38 =========================================================================*/
39 #ifndef __itkMultiResolutionImageRegistrationMethod2_h
40 #define __itkMultiResolutionImageRegistrationMethod2_h
41 
42 #include "itkProcessObject.h"
44 #include "itkSingleValuedNonLinearOptimizer.h"
45 #include "itkMultiResolutionPyramidImageFilter.h"
46 #include "itkNumericTraits.h"
47 #include "itkDataObjectDecorator.h"
48 
49 namespace itk
50 {
51 
97 template< typename TFixedImage, typename TMovingImage >
98 class MultiResolutionImageRegistrationMethod2 : public ProcessObject
99 {
100 public:
101 
104  typedef ProcessObject Superclass;
106  typedef SmartPointer< const Self > ConstPointer;
107 
109  itkNewMacro( Self );
110 
112  itkTypeMacro( MultiResolutionImageRegistrationMethod2, ProcessObject );
113 
115  typedef TFixedImage FixedImageType;
116  typedef typename FixedImageType::ConstPointer FixedImageConstPointer;
117  typedef typename FixedImageType::RegionType FixedImageRegionType;
118  typedef std::vector< FixedImageRegionType > FixedImageRegionPyramidType;
119 
121  typedef TMovingImage MovingImageType;
122  typedef typename MovingImageType::ConstPointer MovingImageConstPointer;
123 
126  FixedImageType, MovingImageType > MetricType;
128 
132 
136  typedef DataObjectDecorator< TransformType > TransformOutputType;
137  typedef typename TransformOutputType::Pointer TransformOutputPointer;
138  typedef typename TransformOutputType::ConstPointer TransformOutputConstPointer;
139 
142  typedef typename InterpolatorType::Pointer InterpolatorPointer;
143 
146 
148  typedef MultiResolutionPyramidImageFilter<
150  typedef typename FixedImagePyramidType::Pointer FixedImagePyramidPointer;
151 
153  typedef MultiResolutionPyramidImageFilter<
155  typedef typename MovingImagePyramidType::Pointer MovingImagePyramidPointer;
156 
161 
163  typedef typename DataObject::Pointer DataObjectPointer;
164 
166  virtual void StartRegistration( void );
167 
169  virtual void StopRegistration( void );
170 
172  itkSetConstObjectMacro( FixedImage, FixedImageType );
173  itkGetConstObjectMacro( FixedImage, FixedImageType );
174 
176  itkSetConstObjectMacro( MovingImage, MovingImageType );
177  itkGetConstObjectMacro( MovingImage, MovingImageType );
178 
180  itkSetObjectMacro( Optimizer, OptimizerType );
181  itkGetObjectMacro( Optimizer, OptimizerType );
182 
184  itkSetObjectMacro( Metric, MetricType );
185  itkGetObjectMacro( Metric, MetricType );
186 
188  itkSetMacro( FixedImageRegion, FixedImageRegionType );
189  itkGetConstReferenceMacro( FixedImageRegion, FixedImageRegionType );
190 
192  itkSetObjectMacro( Transform, TransformType );
193  itkGetObjectMacro( Transform, TransformType );
194 
196  itkSetObjectMacro( Interpolator, InterpolatorType );
197  itkGetObjectMacro( Interpolator, InterpolatorType );
198 
200  itkSetObjectMacro( FixedImagePyramid, FixedImagePyramidType );
201  itkGetObjectMacro( FixedImagePyramid, FixedImagePyramidType );
202 
204  itkSetObjectMacro( MovingImagePyramid, MovingImagePyramidType );
205  itkGetObjectMacro( MovingImagePyramid, MovingImagePyramidType );
206 
208  itkSetClampMacro( NumberOfLevels, unsigned long, 1,
210  itkGetMacro( NumberOfLevels, unsigned long );
211 
213  itkGetMacro( CurrentLevel, unsigned long );
214 
216  itkSetMacro( InitialTransformParameters, ParametersType );
217  itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
218 
223  itkSetMacro( InitialTransformParametersOfNextLevel, ParametersType );
224  itkGetConstReferenceMacro( InitialTransformParametersOfNextLevel, ParametersType );
225 
229  itkGetConstReferenceMacro( LastTransformParameters, ParametersType );
230 
232  const TransformOutputType * GetOutput( void ) const;
233 
237  virtual DataObjectPointer MakeOutput( unsigned int idx );
238 
242  unsigned long GetMTime( void ) const;
243 
244 protected:
245 
248 
251 
253  virtual void PrintSelf( std::ostream & os, Indent indent ) const;
254 
258  virtual void GenerateData( void );
259 
264  virtual void Initialize() throw ( ExceptionObject );
265 
267  virtual void PreparePyramids( void );
268 
270  itkSetMacro( CurrentLevel, unsigned long );
271 
276  ParametersType m_LastTransformParameters;
277  bool m_Stop;
278 
279 private:
280 
281  MultiResolutionImageRegistrationMethod2( const Self & ); // purposely not implemented
282  void operator=( const Self & ); // purposely not implemented
283 
285  MetricPointer m_Metric;
286  OptimizerType::Pointer m_Optimizer;
287  TransformPointer m_Transform;
288  InterpolatorPointer m_Interpolator;
289 
292 
293  MovingImageConstPointer m_MovingImage;
294  FixedImageConstPointer m_FixedImage;
295  MovingImagePyramidPointer m_MovingImagePyramid;
296  FixedImagePyramidPointer m_FixedImagePyramid;
297 
298  FixedImageRegionType m_FixedImageRegion;
299  FixedImageRegionPyramidType m_FixedImageRegionPyramid;
300 
301  unsigned long m_NumberOfLevels;
302  unsigned long m_CurrentLevel;
303 
304 };
305 
306 } // end namespace itk
307 
308 #ifndef ITK_MANUAL_INSTANTIATION
309 #include "itkMultiResolutionImageRegistrationMethod2.hxx"
310 #endif
311 
312 #endif // end #ifndef __itkMultiResolutionImageRegistrationMethod2_h
Base class for multi-resolution image registration methods.
virtual void PrintSelf(std::ostream &os, Indent indent) const
AdvancedImageToImageMetric< FixedImageType, MovingImageType > MetricType
Superclass::TransformParametersType TransformParametersType
virtual DataObjectPointer MakeOutput(unsigned int idx)
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics...
Transform maps points, vectors and covariant vectors from an input space to an output space...
int max(int a, int b)
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
Superclass::InterpolatorType InterpolatorType
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType
const TransformOutputType * GetOutput(void) const


Generated on 24-08-2017 for elastix by doxygen 1.8.13 elastix logo