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  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
19 /*=========================================================================
20 
21  Program: Insight Segmentation & Registration Toolkit
22  Module: $RCSfile$
23  Language: C++
24  Date: $Date: 2008-06-27 17:50:36 +0200 (Fri, 27 Jun 2008) $
25  Version: $Revision: 1728 $
26 
27  Copyright (c) Insight Software Consortium. All rights reserved.
28  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
29 
30  This software is distributed WITHOUT ANY WARRANTY; without even
31  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
32  PURPOSE. See the above copyright notices for more information.
33 
34 =========================================================================*/
35 #ifndef __itkMultiResolutionImageRegistrationMethod2_h
36 #define __itkMultiResolutionImageRegistrationMethod2_h
37 
38 #include "itkProcessObject.h"
40 #include "itkSingleValuedNonLinearOptimizer.h"
41 #include "itkMultiResolutionPyramidImageFilter.h"
42 #include "itkNumericTraits.h"
43 #include "itkDataObjectDecorator.h"
44 
45 namespace itk
46 {
47 
93 template< typename TFixedImage, typename TMovingImage >
94 class MultiResolutionImageRegistrationMethod2 : public ProcessObject
95 {
96 public:
97 
100  typedef ProcessObject Superclass;
101  typedef SmartPointer< Self > Pointer;
102  typedef SmartPointer< const Self > ConstPointer;
103 
105  itkNewMacro( Self );
106 
108  itkTypeMacro( MultiResolutionImageRegistrationMethod2, ProcessObject );
109 
111  typedef TFixedImage FixedImageType;
112  typedef typename FixedImageType::ConstPointer FixedImageConstPointer;
113  typedef typename FixedImageType::RegionType FixedImageRegionType;
114  typedef std::vector< FixedImageRegionType > FixedImageRegionPyramidType;
115 
117  typedef TMovingImage MovingImageType;
118  typedef typename MovingImageType::ConstPointer MovingImageConstPointer;
119 
124 
128 
132  typedef DataObjectDecorator< TransformType > TransformOutputType;
133  typedef typename TransformOutputType::Pointer TransformOutputPointer;
134  typedef typename TransformOutputType::ConstPointer TransformOutputConstPointer;
135 
138  typedef typename InterpolatorType::Pointer InterpolatorPointer;
139 
142 
144  typedef MultiResolutionPyramidImageFilter<
146  typedef typename FixedImagePyramidType::Pointer FixedImagePyramidPointer;
147 
149  typedef MultiResolutionPyramidImageFilter<
151  typedef typename MovingImagePyramidType::Pointer MovingImagePyramidPointer;
152 
157 
159  typedef typename DataObject::Pointer DataObjectPointer;
160 
162  virtual void StartRegistration( void );
163 
165  virtual void StopRegistration( void );
166 
168  itkSetConstObjectMacro( FixedImage, FixedImageType );
169  itkGetConstObjectMacro( FixedImage, FixedImageType );
170 
172  itkSetConstObjectMacro( MovingImage, MovingImageType );
173  itkGetConstObjectMacro( MovingImage, MovingImageType );
174 
176  itkSetObjectMacro( Optimizer, OptimizerType );
177  itkGetObjectMacro( Optimizer, OptimizerType );
178 
180  itkSetObjectMacro( Metric, MetricType );
181  itkGetObjectMacro( Metric, MetricType );
182 
184  itkSetMacro( FixedImageRegion, FixedImageRegionType );
185  itkGetConstReferenceMacro( FixedImageRegion, FixedImageRegionType );
186 
188  itkSetObjectMacro( Transform, TransformType );
189  itkGetObjectMacro( Transform, TransformType );
190 
192  itkSetObjectMacro( Interpolator, InterpolatorType );
193  itkGetObjectMacro( Interpolator, InterpolatorType );
194 
196  itkSetObjectMacro( FixedImagePyramid, FixedImagePyramidType );
197  itkGetObjectMacro( FixedImagePyramid, FixedImagePyramidType );
198 
200  itkSetObjectMacro( MovingImagePyramid, MovingImagePyramidType );
201  itkGetObjectMacro( MovingImagePyramid, MovingImagePyramidType );
202 
204  itkSetClampMacro( NumberOfLevels, unsigned long, 1,
206  itkGetMacro( NumberOfLevels, unsigned long );
207 
209  itkGetMacro( CurrentLevel, unsigned long );
210 
212  itkSetMacro( InitialTransformParameters, ParametersType );
213  itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
214 
219  itkSetMacro( InitialTransformParametersOfNextLevel, ParametersType );
220  itkGetConstReferenceMacro( InitialTransformParametersOfNextLevel, ParametersType );
221 
225  itkGetConstReferenceMacro( LastTransformParameters, ParametersType );
226 
228  const TransformOutputType * GetOutput( void ) const;
229 
233  virtual DataObjectPointer MakeOutput( unsigned int idx );
234 
238  unsigned long GetMTime( void ) const;
239 
240 protected:
241 
244 
247 
249  virtual void PrintSelf( std::ostream & os, Indent indent ) const;
250 
254  virtual void GenerateData( void );
255 
260  virtual void Initialize() throw ( ExceptionObject );
261 
263  virtual void PreparePyramids( void );
264 
266  itkSetMacro( CurrentLevel, unsigned long );
267 
273  bool m_Stop;
274 
275 private:
276 
277  MultiResolutionImageRegistrationMethod2( const Self & ); // purposely not implemented
278  void operator=( const Self & ); // purposely not implemented
279 
285 
288 
293 
296 
297  unsigned long m_NumberOfLevels;
298  unsigned long m_CurrentLevel;
299 
300 };
301 
302 } // end namespace itk
303 
304 #ifndef ITK_MANUAL_INSTANTIATION
305 #include "itkMultiResolutionImageRegistrationMethod2.hxx"
306 #endif
307 
308 #endif // end #ifndef __itkMultiResolutionImageRegistrationMethod2_h
Base class for multi-resolution image registration methods.
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...
virtual void PrintSelf(std::ostream &os, Indent indent) const
const TransformOutputType * GetOutput(void) const
SmartPointer< Self > Pointer
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


Generated on 27-04-2014 for elastix by doxygen 1.8.6 elastix logo