go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkMultiMetricMultiResolutionImageRegistrationMethod.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 #ifndef __itkMultiMetricMultiResolutionImageRegistrationMethod_h
15 #define __itkMultiMetricMultiResolutionImageRegistrationMethod_h
16 
19 #include <vector>
20 
23 #define itkSimpleSetMacro( _name, _type ) \
24  virtual void Set##_name( _type _arg ) \
25  { \
26  this->Set##_name( _arg, 0 ); \
27  }
28 
30 #define itkSetNumberOfMacro( _name ) \
31  virtual void SetNumberOf##_name##s( unsigned int _arg ) \
32  { \
33  if( this->m_##_name##s.size() != _arg ) \
34  { \
35  this->m_##_name##s.resize( _arg ); \
36  this->Modified(); \
37  } \
38  }
39 
41 #define itkGetNumberOfMacro( _name ) \
42  virtual unsigned int GetNumberOf##_name##s( void ) const \
43  { \
44  return this->m_##_name##s.size(); \
45  }
46 
47 namespace itk
48 {
49 
78 template< typename TFixedImage, typename TMovingImage >
80  public MultiResolutionImageRegistrationMethod2< TFixedImage, TMovingImage >
81 {
82 public:
83 
87  TFixedImage, TMovingImage > Superclass;
88  typedef SmartPointer< Self > Pointer;
89  typedef SmartPointer< const Self > ConstPointer;
90 
92  itkNewMacro( Self );
93 
97 
104 
112  typedef typename OptimizerType::Pointer OptimizerPointer;
116  typedef typename
118 
121  typedef typename
123 
126 
131 
136  virtual void StopMultiMetricRegistration( void )
137  {
138  this->m_Stop = true;
139  }
140 
141 
148  virtual void SetMetric( MetricType * _arg );
149 
155  {
156  return this->m_CombinationMetric.GetPointer();
157  }
158 
159 
168  virtual void SetFixedImage( const FixedImageType * _arg, unsigned int pos );
169 
170  virtual const FixedImageType * GetFixedImage( unsigned int pos ) const;
171 
172  virtual const FixedImageType * GetFixedImage( void ) const
173  {
174  return this->GetFixedImage( 0 );
175  }
176 
177 
178  itkSimpleSetMacro( FixedImage, const FixedImageType * );
179  itkSetNumberOfMacro( FixedImage );
180  itkGetNumberOfMacro( FixedImage );
181 
183  virtual void SetMovingImage( const MovingImageType * _arg, unsigned int pos );
184 
185  virtual const MovingImageType * GetMovingImage( unsigned int pos ) const;
186 
187  virtual const MovingImageType * GetMovingImage( void ) const
188  { return this->GetMovingImage( 0 ); }
189  itkSimpleSetMacro( MovingImage, const MovingImageType * );
190  itkSetNumberOfMacro( MovingImage );
191  itkGetNumberOfMacro( MovingImage );
192 
194  virtual void SetFixedImageRegion( FixedImageRegionType _arg, unsigned int pos );
195 
196  virtual const FixedImageRegionType & GetFixedImageRegion( unsigned int pos ) const;
197 
198  virtual const FixedImageRegionType & GetFixedImageRegion( void ) const
199  { return this->GetFixedImageRegion( 0 ); }
200  itkSimpleSetMacro( FixedImageRegion, const FixedImageRegionType );
201  itkSetNumberOfMacro( FixedImageRegion );
202  itkGetNumberOfMacro( FixedImageRegion );
203 
205  virtual void SetInterpolator( InterpolatorType * _arg, unsigned int pos );
206 
207  virtual InterpolatorType * GetInterpolator( unsigned int pos ) const;
208 
210  { return this->GetInterpolator( 0 ); }
211  itkSimpleSetMacro( Interpolator, InterpolatorType * );
212  itkSetNumberOfMacro( Interpolator );
213  itkGetNumberOfMacro( Interpolator );
214 
216  virtual void SetFixedImagePyramid( FixedImagePyramidType * _arg, unsigned int pos );
217 
218  virtual FixedImagePyramidType * GetFixedImagePyramid( unsigned int pos ) const;
219 
221  { return this->GetFixedImagePyramid( 0 ); }
222  itkSimpleSetMacro( FixedImagePyramid, FixedImagePyramidType * );
223  itkSetNumberOfMacro( FixedImagePyramid );
224  itkGetNumberOfMacro( FixedImagePyramid );
225 
227  virtual void SetMovingImagePyramid( MovingImagePyramidType * _arg, unsigned int pos );
228 
229  virtual MovingImagePyramidType * GetMovingImagePyramid( unsigned int pos ) const;
230 
232  { return this->GetMovingImagePyramid( 0 ); }
233  itkSimpleSetMacro( MovingImagePyramid, MovingImagePyramidType * );
234  itkSetNumberOfMacro( MovingImagePyramid );
235  itkGetNumberOfMacro( MovingImagePyramid );
236 
240  unsigned long GetMTime( void ) const;
241 
246  virtual const ParametersType & GetLastTransformParameters( void ) const
247  {
248  return this->m_LastTransformParameters;
249  }
250 
251 
252 protected:
253 
256  void PrintSelf( std::ostream & os, Indent indent ) const;
257 
258  typedef std::vector< FixedImageRegionType > FixedImageRegionPyramidType;
259 
263  virtual void GenerateData( void );
264 
269  virtual void Initialize( void ) throw ( ExceptionObject );
270 
275  virtual void PrepareAllPyramids( void );
276 
280  virtual void CheckPyramids( void ) throw ( ExceptionObject );
281 
285  virtual void CheckOnInitialize( void ) throw ( ExceptionObject );
286 
288  bool m_Stop;
290 
293 
301 
304 
307 
308 private:
309 
310  MultiMetricMultiResolutionImageRegistrationMethod( const Self & ); // purposely not implemented
311  void operator=( const Self & ); // purposely not implemented
312 
313 };
314 
315 } // end namespace itk
316 
317 #undef itkSetNumberOfMacro
318 #undef itkGetNumberOfMacro
319 #undef itkSimpleSetMacro
320 
321 #ifndef ITK_MANUAL_INSTANTIATION
322 #include "itkMultiMetricMultiResolutionImageRegistrationMethod.hxx"
323 #endif
324 
325 #endif
virtual void SetFixedImage(const FixedImageType *_arg, unsigned int pos)
Base class for multi-resolution image registration methods.
AdvancedImageToImageMetric< FixedImageType, MovingImageType > MetricType
virtual void SetInterpolator(InterpolatorType *_arg, unsigned int pos)
CombinationImageToImageMetric< FixedImageType, MovingImageType > CombinationMetricType
void PrintSelf(std::ostream &os, Indent indent) const
itkSimpleSetMacro(FixedImage, const FixedImageType *)
virtual void SetMovingImage(const MovingImageType *_arg, unsigned int pos)
MultiResolutionImageRegistrationMethod2< TFixedImage, TMovingImage > Superclass
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
virtual void SetFixedImagePyramid(FixedImagePyramidType *_arg, unsigned int pos)
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType
virtual void SetMovingImagePyramid(MovingImagePyramidType *_arg, unsigned int pos)
virtual void SetFixedImageRegion(FixedImageRegionType _arg, unsigned int pos)


Generated on 11-03-2014 for elastix by doxygen 1.8.6 elastix logo