go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkMultiInputMultiResolutionImageRegistrationMethodBase.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 __itkMultiInputMultiResolutionImageRegistrationMethodBase_h
15 #define __itkMultiInputMultiResolutionImageRegistrationMethodBase_h
16 
19 #include <vector>
20 
24 #define itkSimpleSetMacro( _name, _type ) \
25  virtual void Set##_name( _type _arg ) \
26  { \
27  this->Set##_name( _arg, 0 ); \
28  }
29 
31 #define itkSetNumberOfMacro( _name ) \
32  virtual void SetNumberOf##_name##s( unsigned int _arg ) \
33  { \
34  if( this->m_##_name##s.size() != _arg ) \
35  { \
36  this->m_##_name##s.resize( _arg ); \
37  this->Modified(); \
38  } \
39  }
40 
42 #define itkGetNumberOfMacro( _name ) \
43  virtual unsigned int GetNumberOf##_name##s( void ) const \
44  { \
45  return this->m_##_name##s.size(); \
46  }
47 
48 namespace itk
49 {
50 
71 template< typename TFixedImage, typename TMovingImage >
73  public MultiResolutionImageRegistrationMethod2< TFixedImage, TMovingImage >
74 {
75 public:
76 
80  TFixedImage, TMovingImage > Superclass;
81  typedef SmartPointer< Self > Pointer;
82  typedef SmartPointer< const Self > ConstPointer;
83 
85  itkNewMacro( Self );
86 
90 
98 
106  typedef typename OptimizerType::Pointer OptimizerPointer;
110  typedef typename
112 
115  typedef typename
117 
120 
121  typedef std::vector< FixedImageRegionPyramidType > FixedImageRegionPyramidVectorType;
122 
127  typedef typename MultiInputMetricType
129  typedef typename MultiInputMetricType
131  typedef typename MultiInputMetricType
133  typedef typename MultiInputMetricType
135  typedef typename MultiInputMetricType
137  typedef typename MultiInputMetricType
139  typedef std::vector< FixedImagePyramidPointer > FixedImagePyramidVectorType;
140  typedef std::vector< MovingImagePyramidPointer > MovingImagePyramidVectorType;
141 
150  virtual void SetFixedImage( const FixedImageType * _arg, unsigned int pos );
151 
152  virtual const FixedImageType * GetFixedImage( unsigned int pos ) const;
153 
154  virtual const FixedImageType * GetFixedImage( void ) const
155  { return this->GetFixedImage( 0 ); }
156  itkSimpleSetMacro( FixedImage, const FixedImageType * );
157  itkSetNumberOfMacro( FixedImage );
158  itkGetNumberOfMacro( FixedImage );
159 
161  virtual void SetFixedImageRegion( FixedImageRegionType _arg, unsigned int pos );
162 
163  virtual const FixedImageRegionType & GetFixedImageRegion( unsigned int pos ) const;
164 
165  virtual const FixedImageRegionType & GetFixedImageRegion( void ) const
166  { return this->GetFixedImageRegion( 0 ); }
167  itkSimpleSetMacro( FixedImageRegion, const FixedImageRegionType );
168  itkSetNumberOfMacro( FixedImageRegion );
169  itkGetNumberOfMacro( FixedImageRegion );
170 
172  virtual void SetFixedImagePyramid( FixedImagePyramidType * _arg, unsigned int pos );
173 
174  virtual FixedImagePyramidType * GetFixedImagePyramid( unsigned int pos ) const;
175 
177  { return this->GetFixedImagePyramid( 0 ); }
178  itkSimpleSetMacro( FixedImagePyramid, FixedImagePyramidType * );
179  itkSetNumberOfMacro( FixedImagePyramid );
180  itkGetNumberOfMacro( FixedImagePyramid );
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 SetMovingImagePyramid( MovingImagePyramidType * _arg, unsigned int pos );
195 
196  virtual MovingImagePyramidType * GetMovingImagePyramid( unsigned int pos ) const;
197 
199  { return this->GetMovingImagePyramid( 0 ); }
200  itkSimpleSetMacro( MovingImagePyramid, MovingImagePyramidType * );
201  itkSetNumberOfMacro( MovingImagePyramid );
202  itkGetNumberOfMacro( MovingImagePyramid );
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 SetFixedImageInterpolator( FixedImageInterpolatorType * _arg, unsigned int pos );
217 
218  virtual FixedImageInterpolatorType * GetFixedImageInterpolator( unsigned int pos ) const;
219 
221  { return this->GetFixedImageInterpolator( 0 ); }
222  itkSimpleSetMacro( FixedImageInterpolator, FixedImageInterpolatorType * );
223  itkSetNumberOfMacro( FixedImageInterpolator );
224  itkGetNumberOfMacro( FixedImageInterpolator );
225 
227  virtual void SetMetric( MetricType * _arg );
228 
230  itkGetObjectMacro( MultiInputMetric, MultiInputMetricType );
231 
235  unsigned long GetMTime( void ) const;
236 
237 protected:
238 
241 
244 
246  void PrintSelf( std::ostream & os, Indent indent ) const;
247 
251  virtual void GenerateData();
252 
257  virtual void Initialize() throw ( ExceptionObject );
258 
260  virtual void PreparePyramids( void );
261 
265  virtual void CheckPyramids( void ) throw ( ExceptionObject );
266 
268  virtual void CheckOnInitialize( void ) throw ( ExceptionObject );
269 
278 
281 
284 
285 private:
286 
287  MultiInputMultiResolutionImageRegistrationMethodBase( const Self & ); // purposely not implemented
288  void operator=( const Self & ); // purposely not implemented
289 
291 
292 };
293 
294 } // end namespace itk
295 
296 #undef itkSetNumberOfMacro
297 #undef itkGetNumberOfMacro
298 #undef itkSimpleSetMacro
299 
300 #ifndef ITK_MANUAL_INSTANTIATION
301 #include "itkMultiInputMultiResolutionImageRegistrationMethodBase.hxx"
302 #endif
303 
304 #endif // end #ifndef __itkMultiInputMultiResolutionImageRegistrationMethodBase_h
Base class for multi-resolution image registration methods.
AdvancedImageToImageMetric< FixedImageType, MovingImageType > MetricType
std::vector< InterpolatorPointer > InterpolatorVectorType
Implements a metric base class that takes multiple inputs.
std::vector< FixedImageConstPointer > FixedImageVectorType
virtual void SetMovingImage(const MovingImageType *_arg, unsigned int pos)
virtual void SetFixedImageRegion(FixedImageRegionType _arg, unsigned int pos)
virtual void SetInterpolator(InterpolatorType *_arg, unsigned int pos)
InterpolateImageFunction< FixedImageType, CoordinateRepresentationType > FixedImageInterpolatorType
itkSimpleSetMacro(FixedImage, const FixedImageType *)
virtual void SetFixedImagePyramid(FixedImagePyramidType *_arg, unsigned int pos)
std::vector< FixedImageRegionType > FixedImageRegionVectorType
void PrintSelf(std::ostream &os, Indent indent) const
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
virtual void SetFixedImage(const FixedImageType *_arg, unsigned int pos)
std::vector< FixedImageInterpolatorPointer > FixedImageInterpolatorVectorType
std::vector< MovingImageConstPointer > MovingImageVectorType
MultiResolutionImageRegistrationMethod2< TFixedImage, TMovingImage > Superclass
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType
virtual void SetFixedImageInterpolator(FixedImageInterpolatorType *_arg, unsigned int pos)
MultiInputImageToImageMetricBase< FixedImageType, MovingImageType > MultiInputMetricType
virtual void SetMovingImagePyramid(MovingImagePyramidType *_arg, unsigned int pos)


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