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 
15 #ifndef __itkMultiInputMultiResolutionImageRegistrationMethodBase_h
16 #define __itkMultiInputMultiResolutionImageRegistrationMethodBase_h
17 
20 #include <vector>
21 
25 #define itkSimpleSetMacro(_name,_type) \
26  virtual void Set##_name( _type _arg ) \
27  { \
28  this->Set##_name ( _arg, 0 ); \
29  }
30 
32 #define itkSetNumberOfMacro(_name) \
33  virtual void SetNumberOf##_name##s(unsigned int _arg) \
34  { \
35  if ( this->m_##_name##s.size() != _arg ) \
36  { \
37  this->m_##_name##s.resize( _arg ); \
38  this->Modified(); \
39  } \
40  }
41 
43 #define itkGetNumberOfMacro(_name) \
44  virtual unsigned int GetNumberOf##_name##s(void) const \
45  { \
46  return this->m_##_name##s.size(); \
47  }
48 
49 
50 namespace itk
51 {
52 
73 template <typename TFixedImage, typename TMovingImage>
75  public MultiResolutionImageRegistrationMethod2<TFixedImage, TMovingImage>
76 {
77 public:
81  TFixedImage, TMovingImage> Superclass;
82  typedef SmartPointer<Self> Pointer;
83  typedef SmartPointer<const Self> ConstPointer;
84 
86  itkNewMacro( Self );
87 
91 
93  typedef typename Superclass::FixedImageType FixedImageType;
94  typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
95  typedef typename Superclass::FixedImageRegionType FixedImageRegionType;
96  typedef typename Superclass::FixedImageRegionPyramidType FixedImageRegionPyramidType;
97  typedef typename Superclass::MovingImageType MovingImageType;
98  typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
99 
100  typedef typename Superclass::MetricType MetricType;
101  typedef typename Superclass::MetricPointer MetricPointer;
102  typedef typename Superclass::TransformType TransformType;
103  typedef typename Superclass::TransformPointer TransformPointer;
104  typedef typename Superclass::InterpolatorType InterpolatorType;
105  typedef typename Superclass::InterpolatorPointer InterpolatorPointer;
106  typedef typename Superclass::OptimizerType OptimizerType;
107  typedef typename OptimizerType::Pointer OptimizerPointer;
108  typedef typename Superclass::FixedImagePyramidType FixedImagePyramidType;
109  typedef typename Superclass::FixedImagePyramidPointer FixedImagePyramidPointer;
110  typedef typename Superclass::MovingImagePyramidType MovingImagePyramidType;
111  typedef typename
112  Superclass::MovingImagePyramidPointer MovingImagePyramidPointer;
113 
114  typedef typename Superclass::TransformOutputType TransformOutputType;
115  typedef typename Superclass::TransformOutputPointer TransformOutputPointer;
116  typedef typename
117  Superclass::TransformOutputConstPointer TransformOutputConstPointer;
118 
119  typedef typename Superclass::ParametersType ParametersType;
120  typedef typename Superclass::DataObjectPointer DataObjectPointer;
121 
122  typedef std::vector< FixedImageRegionPyramidType > FixedImageRegionPyramidVectorType;
123 
128  typedef typename MultiInputMetricType
130  typedef typename MultiInputMetricType
132  typedef typename MultiInputMetricType
134  typedef typename MultiInputMetricType
136  typedef typename MultiInputMetricType
138  typedef typename MultiInputMetricType
140  typedef std::vector<FixedImagePyramidPointer> FixedImagePyramidVectorType;
141  typedef std::vector<MovingImagePyramidPointer> MovingImagePyramidVectorType;
142 
151  virtual void SetFixedImage( const FixedImageType * _arg, unsigned int pos );
152  virtual const FixedImageType * GetFixedImage( unsigned int pos ) const;
153  virtual const FixedImageType * GetFixedImage( void ) const
154  { return this->GetFixedImage( 0 ); }
155  itkSimpleSetMacro( FixedImage, const FixedImageType * );
156  itkSetNumberOfMacro( FixedImage );
157  itkGetNumberOfMacro( FixedImage );
158 
160  virtual void SetFixedImageRegion( FixedImageRegionType _arg, unsigned int pos );
161  virtual const FixedImageRegionType & GetFixedImageRegion( unsigned int pos ) const;
162  virtual const FixedImageRegionType & GetFixedImageRegion( void ) const
163  { return this->GetFixedImageRegion( 0 ); }
164  itkSimpleSetMacro( FixedImageRegion, const FixedImageRegionType );
165  itkSetNumberOfMacro( FixedImageRegion );
166  itkGetNumberOfMacro( FixedImageRegion );
167 
169  virtual void SetFixedImagePyramid( FixedImagePyramidType * _arg, unsigned int pos );
170  virtual FixedImagePyramidType * GetFixedImagePyramid( unsigned int pos ) const;
172  { return this->GetFixedImagePyramid( 0 ); }
173  itkSimpleSetMacro( FixedImagePyramid, FixedImagePyramidType * );
174  itkSetNumberOfMacro( FixedImagePyramid );
175  itkGetNumberOfMacro( FixedImagePyramid );
176 
178  virtual void SetMovingImage( const MovingImageType * _arg, unsigned int pos );
179  virtual const MovingImageType * GetMovingImage( unsigned int pos ) const;
180  virtual const MovingImageType * GetMovingImage( void ) const
181  { return this->GetMovingImage( 0 ); }
182  itkSimpleSetMacro( MovingImage, const MovingImageType * );
183  itkSetNumberOfMacro( MovingImage );
184  itkGetNumberOfMacro( MovingImage );
185 
187  virtual void SetMovingImagePyramid( MovingImagePyramidType * _arg, unsigned int pos );
188  virtual MovingImagePyramidType * GetMovingImagePyramid( unsigned int pos ) const;
190  { return this->GetMovingImagePyramid( 0 ); }
191  itkSimpleSetMacro( MovingImagePyramid, MovingImagePyramidType * );
192  itkSetNumberOfMacro( MovingImagePyramid );
193  itkGetNumberOfMacro( MovingImagePyramid );
194 
196  virtual void SetInterpolator( InterpolatorType * _arg, unsigned int pos );
197  virtual InterpolatorType * GetInterpolator( unsigned int pos ) const;
199  { return this->GetInterpolator( 0 ); }
200  itkSimpleSetMacro( Interpolator, InterpolatorType * );
201  itkSetNumberOfMacro( Interpolator );
202  itkGetNumberOfMacro( Interpolator );
203 
205  virtual void SetFixedImageInterpolator( FixedImageInterpolatorType * _arg, unsigned int pos );
206  virtual FixedImageInterpolatorType * GetFixedImageInterpolator( unsigned int pos ) const;
208  { return this->GetFixedImageInterpolator( 0 ); }
209  itkSimpleSetMacro( FixedImageInterpolator, FixedImageInterpolatorType * );
210  itkSetNumberOfMacro( FixedImageInterpolator );
211  itkGetNumberOfMacro( FixedImageInterpolator );
212 
214  virtual void SetMetric( MetricType * _arg );
215 
217  itkGetObjectMacro( MultiInputMetric, MultiInputMetricType );
218 
222  unsigned long GetMTime( void ) const;
223 
224 protected:
225 
228 
231 
233  void PrintSelf( std::ostream& os, Indent indent ) const;
234 
238  virtual void GenerateData();
239 
244  virtual void Initialize() throw (ExceptionObject);
245 
247  virtual void PreparePyramids( void );
248 
252  virtual void CheckPyramids( void ) throw (ExceptionObject);
253 
255  virtual void CheckOnInitialize( void ) throw (ExceptionObject);
256 
258  FixedImageVectorType m_FixedImages;
259  MovingImageVectorType m_MovingImages;
260  FixedImageRegionVectorType m_FixedImageRegions;
261  FixedImagePyramidVectorType m_FixedImagePyramids;
262  MovingImagePyramidVectorType m_MovingImagePyramids;
263  InterpolatorVectorType m_Interpolators;
264  FixedImageInterpolatorVectorType m_FixedImageInterpolators;
265 
267  FixedImageRegionPyramidVectorType m_FixedImageRegionPyramids;
268 
270  FixedImageRegionType m_NullFixedImageRegion;
271 
272 private:
273  MultiInputMultiResolutionImageRegistrationMethodBase(const Self&); //purposely not implemented
274  void operator=(const Self&); //purposely not implemented
275 
276  MultiInputMetricPointer m_MultiInputMetric;
277 
278 }; // end class MultiInputMultiResolutionImageRegistrationMethodBase
279 
280 
281 } // end namespace itk
282 
283 #undef itkSetNumberOfMacro
284 #undef itkGetNumberOfMacro
285 #undef itkSimpleSetMacro
286 
287 #ifndef ITK_MANUAL_INSTANTIATION
288 #include "itkMultiInputMultiResolutionImageRegistrationMethodBase.txx"
289 #endif
290 
291 #endif // end #ifndef __itkMultiInputMultiResolutionImageRegistrationMethodBase_h
292 
Base class for multi-resolution image registration methods.
MultiResolutionImageRegistrationMethod2< TFixedImage, TMovingImage > Superclass
std::vector< InterpolatorPointer > InterpolatorVectorType
Implements a metric base class that takes multiple inputs.
std::vector< FixedImageConstPointer > FixedImageVectorType
InterpolateImageFunction< FixedImageType, CoordinateRepresentationType > FixedImageInterpolatorType
std::vector< FixedImageRegionType > FixedImageRegionVectorType
std::vector< FixedImageInterpolatorPointer > FixedImageInterpolatorVectorType
std::vector< MovingImageConstPointer > MovingImageVectorType
MultiInputImageToImageMetricBase< FixedImageType, MovingImageType > MultiInputMetricType


Generated on 05-01-2014 for elastix by doxygen 1.8.5 elastix logo