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 
15 
20 /*=========================================================================
21 
22  Program: Insight Segmentation & Registration Toolkit
23  Module: $RCSfile$
24  Language: C++
25  Date: $Date: 2008-06-27 17:50:36 +0200 (Fri, 27 Jun 2008) $
26  Version: $Revision: 1728 $
27 
28  Copyright (c) Insight Software Consortium. All rights reserved.
29  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
30 
31  This software is distributed WITHOUT ANY WARRANTY; without even
32  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
33  PURPOSE. See the above copyright notices for more information.
34 
35 =========================================================================*/
36 
37 #ifndef __itkMultiResolutionImageRegistrationMethod2_h
38 #define __itkMultiResolutionImageRegistrationMethod2_h
39 
40 #include "itkProcessObject.h"
42 #include "itkSingleValuedNonLinearOptimizer.h"
43 #include "itkMultiResolutionPyramidImageFilter.h"
44 #include "itkNumericTraits.h"
45 #include "itkDataObjectDecorator.h"
46 
47 namespace itk
48 {
49 
95 template <typename TFixedImage, typename TMovingImage>
96 class MultiResolutionImageRegistrationMethod2 : public ProcessObject
97 {
98 public:
101  typedef ProcessObject Superclass;
102  typedef SmartPointer<Self> Pointer;
103  typedef SmartPointer<const Self> ConstPointer;
104 
106  itkNewMacro( Self );
107 
109  itkTypeMacro( MultiResolutionImageRegistrationMethod2, ProcessObject );
110 
112  typedef TFixedImage FixedImageType;
113  typedef typename FixedImageType::ConstPointer FixedImageConstPointer;
114  typedef typename FixedImageType::RegionType FixedImageRegionType;
115  typedef std::vector<FixedImageRegionType> FixedImageRegionPyramidType;
116 
118  typedef TMovingImage MovingImageType;
119  typedef typename MovingImageType::ConstPointer MovingImageConstPointer;
120 
125 
129 
133  typedef DataObjectDecorator< TransformType > TransformOutputType;
134  typedef typename TransformOutputType::Pointer TransformOutputPointer;
135  typedef typename TransformOutputType::ConstPointer TransformOutputConstPointer;
136 
139  typedef typename InterpolatorType::Pointer InterpolatorPointer;
140 
143 
145  typedef MultiResolutionPyramidImageFilter<
147  typedef typename FixedImagePyramidType::Pointer FixedImagePyramidPointer;
148 
150  typedef MultiResolutionPyramidImageFilter<
152  typedef typename MovingImagePyramidType::Pointer MovingImagePyramidPointer;
153 
158 
160  typedef typename DataObject::Pointer DataObjectPointer;
161 
163  virtual void StartRegistration( void );
164 
166  virtual void StopRegistration( void );
167 
169  itkSetConstObjectMacro( FixedImage, FixedImageType );
170  itkGetConstObjectMacro( FixedImage, FixedImageType );
171 
173  itkSetConstObjectMacro( MovingImage, MovingImageType );
174  itkGetConstObjectMacro( MovingImage, MovingImageType );
175 
177  itkSetObjectMacro( Optimizer, OptimizerType );
178  itkGetObjectMacro( Optimizer, OptimizerType );
179 
181  itkSetObjectMacro( Metric, MetricType );
182  itkGetObjectMacro( Metric, MetricType );
183 
185  itkSetMacro( FixedImageRegion, FixedImageRegionType );
186  itkGetConstReferenceMacro( FixedImageRegion, FixedImageRegionType );
187 
189  itkSetObjectMacro( Transform, TransformType );
190  itkGetObjectMacro( Transform, TransformType );
191 
193  itkSetObjectMacro( Interpolator, InterpolatorType );
194  itkGetObjectMacro( Interpolator, InterpolatorType );
195 
197  itkSetObjectMacro( FixedImagePyramid, FixedImagePyramidType );
198  itkGetObjectMacro( FixedImagePyramid, FixedImagePyramidType );
199 
201  itkSetObjectMacro( MovingImagePyramid, MovingImagePyramidType );
202  itkGetObjectMacro( MovingImagePyramid, MovingImagePyramidType );
203 
205  itkSetClampMacro( NumberOfLevels, unsigned long, 1,
207  itkGetMacro( NumberOfLevels, unsigned long );
208 
210  itkGetMacro( CurrentLevel, unsigned long );
211 
213  itkSetMacro( InitialTransformParameters, ParametersType );
214  itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
215 
220  itkSetMacro( InitialTransformParametersOfNextLevel, ParametersType );
221  itkGetConstReferenceMacro( InitialTransformParametersOfNextLevel, ParametersType );
222 
226  itkGetConstReferenceMacro( LastTransformParameters, ParametersType );
227 
229  const TransformOutputType * GetOutput( void ) const;
230 
234  virtual DataObjectPointer MakeOutput( unsigned int idx );
235 
239  unsigned long GetMTime( void ) const;
240 
241 protected:
242 
245 
248 
250  virtual void PrintSelf(std::ostream& os, Indent indent) const;
251 
255  virtual void GenerateData( void );
256 
261  virtual void Initialize() throw (ExceptionObject);
262 
264  virtual void PreparePyramids( void );
265 
267  itkSetMacro( CurrentLevel, unsigned long );
268 
274  bool m_Stop;
275 
276 private:
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 }; // end class MultiResolutionImageRegistrationMethod2
301 
302 
303 } // end namespace itk
304 
305 
306 #ifndef ITK_MANUAL_INSTANTIATION
307 #include "itkMultiResolutionImageRegistrationMethod2.txx"
308 #endif
309 
310 #endif // end #ifndef __itkMultiResolutionImageRegistrationMethod2_h
311 
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 04-01-2014 for elastix by doxygen 1.8.5 elastix logo