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  * Copyright UMC Utrecht and contributors
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkMultiInputMultiResolutionImageRegistrationMethodBase_h
19 #define __itkMultiInputMultiResolutionImageRegistrationMethodBase_h
20 
23 #include <vector>
24 
28 #define itkSimpleSetMacro( _name, _type ) \
29  virtual void Set##_name( _type _arg ) \
30  { \
31  this->Set##_name( _arg, 0 ); \
32  }
33 
35 #define itkSetNumberOfMacro( _name ) \
36  virtual void SetNumberOf##_name##s( unsigned int _arg ) \
37  { \
38  if( this->m_##_name##s.size() != _arg ) \
39  { \
40  this->m_##_name##s.resize( _arg ); \
41  this->Modified(); \
42  } \
43  }
44 
46 #define itkGetNumberOfMacro( _name ) \
47  virtual unsigned int GetNumberOf##_name##s( void ) const \
48  { \
49  return this->m_##_name##s.size(); \
50  }
51 
52 namespace itk
53 {
54 
75 template< typename TFixedImage, typename TMovingImage >
77  public MultiResolutionImageRegistrationMethod2< TFixedImage, TMovingImage >
78 {
79 public:
80 
84  TFixedImage, TMovingImage > Superclass;
86  typedef SmartPointer< const Self > ConstPointer;
87 
89  itkNewMacro( Self );
90 
94 
102 
110  typedef typename OptimizerType::Pointer OptimizerPointer;
114  typedef typename
116 
119  typedef typename
121 
124 
125  typedef std::vector< FixedImageRegionPyramidType > FixedImageRegionPyramidVectorType;
126 
131  typedef typename MultiInputMetricType
133  typedef typename MultiInputMetricType
135  typedef typename MultiInputMetricType
137  typedef typename MultiInputMetricType
139  typedef typename MultiInputMetricType
141  typedef typename MultiInputMetricType
143  typedef std::vector< FixedImagePyramidPointer > FixedImagePyramidVectorType;
144  typedef std::vector< MovingImagePyramidPointer > MovingImagePyramidVectorType;
145 
154  virtual void SetFixedImage( const FixedImageType * _arg, unsigned int pos );
155 
156  virtual const FixedImageType * GetFixedImage( unsigned int pos ) const;
157 
158  virtual const FixedImageType * GetFixedImage( void ) const
159  { return this->GetFixedImage( 0 ); }
160  itkSimpleSetMacro( FixedImage, const FixedImageType * );
161  itkSetNumberOfMacro( FixedImage );
162  itkGetNumberOfMacro( FixedImage );
163 
165  virtual void SetFixedImageRegion( FixedImageRegionType _arg, unsigned int pos );
166 
167  virtual const FixedImageRegionType & GetFixedImageRegion( unsigned int pos ) const;
168 
169  virtual const FixedImageRegionType & GetFixedImageRegion( void ) const
170  { return this->GetFixedImageRegion( 0 ); }
171  itkSimpleSetMacro( FixedImageRegion, const FixedImageRegionType );
172  itkSetNumberOfMacro( FixedImageRegion );
173  itkGetNumberOfMacro( FixedImageRegion );
174 
176  virtual void SetFixedImagePyramid( FixedImagePyramidType * _arg, unsigned int pos );
177 
178  virtual FixedImagePyramidType * GetFixedImagePyramid( unsigned int pos ) const;
179 
180  virtual FixedImagePyramidType * GetFixedImagePyramid( void )
181  { return this->GetFixedImagePyramid( 0 ); }
182  itkSimpleSetMacro( FixedImagePyramid, FixedImagePyramidType * );
183  itkSetNumberOfMacro( FixedImagePyramid );
184  itkGetNumberOfMacro( FixedImagePyramid );
185 
187  virtual void SetMovingImage( const MovingImageType * _arg, unsigned int pos );
188 
189  virtual const MovingImageType * GetMovingImage( unsigned int pos ) const;
190 
191  virtual const MovingImageType * GetMovingImage( void ) const
192  { return this->GetMovingImage( 0 ); }
193  itkSimpleSetMacro( MovingImage, const MovingImageType * );
194  itkSetNumberOfMacro( MovingImage );
195  itkGetNumberOfMacro( MovingImage );
196 
198  virtual void SetMovingImagePyramid( MovingImagePyramidType * _arg, unsigned int pos );
199 
200  virtual MovingImagePyramidType * GetMovingImagePyramid( unsigned int pos ) const;
201 
202  virtual MovingImagePyramidType * GetMovingImagePyramid( void )
203  { return this->GetMovingImagePyramid( 0 ); }
204  itkSimpleSetMacro( MovingImagePyramid, MovingImagePyramidType * );
205  itkSetNumberOfMacro( MovingImagePyramid );
206  itkGetNumberOfMacro( MovingImagePyramid );
207 
209  virtual void SetInterpolator( InterpolatorType * _arg, unsigned int pos );
210 
211  virtual InterpolatorType * GetInterpolator( unsigned int pos ) const;
212 
213  virtual InterpolatorType * GetInterpolator( void )
214  { return this->GetInterpolator( 0 ); }
215  itkSimpleSetMacro( Interpolator, InterpolatorType * );
216  itkSetNumberOfMacro( Interpolator );
217  itkGetNumberOfMacro( Interpolator );
218 
220  virtual void SetFixedImageInterpolator( FixedImageInterpolatorType * _arg, unsigned int pos );
221 
222  virtual FixedImageInterpolatorType * GetFixedImageInterpolator( unsigned int pos ) const;
223 
224  virtual FixedImageInterpolatorType * GetFixedImageInterpolator( void )
225  { return this->GetFixedImageInterpolator( 0 ); }
226  itkSimpleSetMacro( FixedImageInterpolator, FixedImageInterpolatorType * );
227  itkSetNumberOfMacro( FixedImageInterpolator );
228  itkGetNumberOfMacro( FixedImageInterpolator );
229 
231  virtual void SetMetric( MetricType * _arg );
232 
234  itkGetObjectMacro( MultiInputMetric, MultiInputMetricType );
235 
239  unsigned long GetMTime( void ) const;
240 
241 protected:
242 
245 
248 
250  void PrintSelf( std::ostream & os, Indent indent ) const;
251 
255  virtual void GenerateData();
256 
261  virtual void Initialize() throw ( ExceptionObject );
262 
264  virtual void PreparePyramids( void );
265 
269  virtual void CheckPyramids( void ) throw ( ExceptionObject );
270 
272  virtual void CheckOnInitialize( void ) throw ( ExceptionObject );
273 
275  FixedImageVectorType m_FixedImages;
276  MovingImageVectorType m_MovingImages;
277  FixedImageRegionVectorType m_FixedImageRegions;
278  FixedImagePyramidVectorType m_FixedImagePyramids;
279  MovingImagePyramidVectorType m_MovingImagePyramids;
280  InterpolatorVectorType m_Interpolators;
281  FixedImageInterpolatorVectorType m_FixedImageInterpolators;
282 
284  FixedImageRegionPyramidVectorType m_FixedImageRegionPyramids;
285 
287  FixedImageRegionType m_NullFixedImageRegion;
288 
289 private:
290 
291  MultiInputMultiResolutionImageRegistrationMethodBase( const Self & ); // purposely not implemented
292  void operator=( const Self & ); // purposely not implemented
293 
294  MultiInputMetricPointer m_MultiInputMetric;
295 
296 };
297 
298 } // end namespace itk
299 
300 #undef itkSetNumberOfMacro
301 #undef itkGetNumberOfMacro
302 #undef itkSimpleSetMacro
303 
304 #ifndef ITK_MANUAL_INSTANTIATION
305 #include "itkMultiInputMultiResolutionImageRegistrationMethodBase.hxx"
306 #endif
307 
308 #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 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo