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 
34 #define elxOverrideSimpleSetMacro( _name, _type ) \
35  void Set##_name( _type _arg ) override \
36  { \
37  this->Set##_name( _arg, 0 ); \
38  }
39 
41 #define itkSetNumberOfMacro( _name ) \
42  virtual void SetNumberOf##_name##s( unsigned int _arg ) \
43  { \
44  if( this->m_##_name##s.size() != _arg ) \
45  { \
46  this->m_##_name##s.resize( _arg ); \
47  this->Modified(); \
48  } \
49  }
50 
52 #define itkGetNumberOfMacro( _name ) \
53  virtual unsigned int GetNumberOf##_name##s( void ) const \
54  { \
55  return this->m_##_name##s.size(); \
56  }
57 
58 namespace itk
59 {
60 
81 template< typename TFixedImage, typename TMovingImage >
83  public MultiResolutionImageRegistrationMethod2< TFixedImage, TMovingImage >
84 {
85 public:
86 
90  TFixedImage, TMovingImage > Superclass;
91  typedef SmartPointer< Self > Pointer;
92  typedef SmartPointer< const Self > ConstPointer;
93 
95  itkNewMacro( Self );
96 
100 
108 
116  typedef typename OptimizerType::Pointer OptimizerPointer;
120  typedef typename
122 
125  typedef typename
127 
130 
131  typedef std::vector< FixedImageRegionPyramidType > FixedImageRegionPyramidVectorType;
132 
137  typedef typename MultiInputMetricType
139  typedef typename MultiInputMetricType
141  typedef typename MultiInputMetricType
143  typedef typename MultiInputMetricType
145  typedef typename MultiInputMetricType
147  typedef typename MultiInputMetricType
149  typedef std::vector< FixedImagePyramidPointer > FixedImagePyramidVectorType;
150  typedef std::vector< MovingImagePyramidPointer > MovingImagePyramidVectorType;
151 
160  virtual void SetFixedImage( const FixedImageType * _arg, unsigned int pos );
161 
162  virtual const FixedImageType * GetFixedImage( unsigned int pos ) const;
163 
164  const FixedImageType * GetFixedImage( void ) const override
165  { return this->GetFixedImage( 0 ); }
167  itkSetNumberOfMacro( FixedImage );
168  itkGetNumberOfMacro( FixedImage );
169 
171  virtual void SetFixedImageRegion( FixedImageRegionType _arg, unsigned int pos );
172 
173  virtual const FixedImageRegionType & GetFixedImageRegion( unsigned int pos ) const;
174 
175  const FixedImageRegionType & GetFixedImageRegion( void ) const override
176  { return this->GetFixedImageRegion( 0 ); }
178  itkSetNumberOfMacro( FixedImageRegion );
179  itkGetNumberOfMacro( FixedImageRegion );
180 
182  virtual void SetFixedImagePyramid( FixedImagePyramidType * _arg, unsigned int pos );
183 
184  virtual FixedImagePyramidType * GetFixedImagePyramid( unsigned int pos ) const;
185 
187  { return this->GetFixedImagePyramid( 0 ); }
189  itkSetNumberOfMacro( FixedImagePyramid );
190  itkGetNumberOfMacro( FixedImagePyramid );
191 
193  virtual void SetMovingImage( const MovingImageType * _arg, unsigned int pos );
194 
195  virtual const MovingImageType * GetMovingImage( unsigned int pos ) const;
196 
197  const MovingImageType * GetMovingImage( void ) const override
198  { return this->GetMovingImage( 0 ); }
200  itkSetNumberOfMacro( MovingImage );
201  itkGetNumberOfMacro( MovingImage );
202 
204  virtual void SetMovingImagePyramid( MovingImagePyramidType * _arg, unsigned int pos );
205 
206  virtual MovingImagePyramidType * GetMovingImagePyramid( unsigned int pos ) const;
207 
209  { return this->GetMovingImagePyramid( 0 ); }
211  itkSetNumberOfMacro( MovingImagePyramid );
212  itkGetNumberOfMacro( MovingImagePyramid );
213 
215  virtual void SetInterpolator( InterpolatorType * _arg, unsigned int pos );
216 
217  virtual InterpolatorType * GetInterpolator( unsigned int pos ) const;
218 
220  { return this->GetInterpolator( 0 ); }
222  itkSetNumberOfMacro( Interpolator );
223  itkGetNumberOfMacro( Interpolator );
224 
226  virtual void SetFixedImageInterpolator( FixedImageInterpolatorType * _arg, unsigned int pos );
227 
228  virtual FixedImageInterpolatorType * GetFixedImageInterpolator( unsigned int pos ) const;
229 
231  { return this->GetFixedImageInterpolator( 0 ); }
232  itkSimpleSetMacro( FixedImageInterpolator, FixedImageInterpolatorType * );
233  itkSetNumberOfMacro( FixedImageInterpolator );
234  itkGetNumberOfMacro( FixedImageInterpolator );
235 
237  void SetMetric( MetricType * _arg ) override;
238 
241 
245  ModifiedTimeType GetMTime( void ) const override;
246 
247 protected:
248 
251 
254 
256  void PrintSelf( std::ostream & os, Indent indent ) const override;
257 
261  void GenerateData() override;
262 
267  void Initialize() override;
268 
270  void PreparePyramids( void ) override;
271 
275  virtual void CheckPyramids( void );
276 
278  virtual void CheckOnInitialize( void );
279 
288 
291 
294 
295 private:
296 
297  MultiInputMultiResolutionImageRegistrationMethodBase( const Self & ); // purposely not implemented
298  void operator=( const Self & ); // purposely not implemented
299 
301 
302 };
303 
304 } // end namespace itk
305 
306 #undef itkSetNumberOfMacro
307 #undef itkGetNumberOfMacro
308 #undef elxOverrideSimpleSetMacro
309 
310 #ifndef ITK_MANUAL_INSTANTIATION
311 #include "itkMultiInputMultiResolutionImageRegistrationMethodBase.hxx"
312 #endif
313 
314 #endif // end #ifndef __itkMultiInputMultiResolutionImageRegistrationMethodBase_h
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
Implements a metric base class that takes multiple inputs.
std::vector< MovingImageConstPointer > MovingImageVectorType
std::vector< FixedImageRegionType > FixedImageRegionVectorType
std::vector< FixedImageConstPointer > FixedImageVectorType
InterpolateImageFunction< FixedImageType, CoordinateRepresentationType > FixedImageInterpolatorType
std::vector< FixedImageInterpolatorPointer > FixedImageInterpolatorVectorType
std::vector< InterpolatorPointer > InterpolatorVectorType
virtual const FixedImageRegionType & GetFixedImageRegion(unsigned int pos) const
elxOverrideSimpleSetMacro(FixedImage, const FixedImageType *)
virtual MovingImagePyramidType * GetMovingImagePyramid(unsigned int pos) const
elxOverrideSimpleSetMacro(Interpolator, InterpolatorType *)
ModifiedTimeType GetMTime(void) const override
virtual void SetMovingImage(const MovingImageType *_arg, unsigned int pos)
elxOverrideSimpleSetMacro(MovingImagePyramid, MovingImagePyramidType *)
elxOverrideSimpleSetMacro(FixedImagePyramid, FixedImagePyramidType *)
virtual void SetFixedImagePyramid(FixedImagePyramidType *_arg, unsigned int pos)
void PrintSelf(std::ostream &os, Indent indent) const override
MultiInputImageToImageMetricBase< FixedImageType, MovingImageType > MultiInputMetricType
itkGetModifiableObjectMacro(MultiInputMetric, MultiInputMetricType)
virtual FixedImagePyramidType * GetFixedImagePyramid(unsigned int pos) const
itkSimpleSetMacro(FixedImageInterpolator, FixedImageInterpolatorType *)
virtual InterpolatorType * GetInterpolator(unsigned int pos) const
elxOverrideSimpleSetMacro(FixedImageRegion, const FixedImageRegionType)
virtual const FixedImageType * GetFixedImage(unsigned int pos) const
MultiResolutionImageRegistrationMethod2< TFixedImage, TMovingImage > Superclass
virtual const MovingImageType * GetMovingImage(unsigned int pos) const
virtual void SetFixedImage(const FixedImageType *_arg, unsigned int pos)
virtual void SetFixedImageInterpolator(FixedImageInterpolatorType *_arg, unsigned int pos)
virtual FixedImageInterpolatorType * GetFixedImageInterpolator(unsigned int pos) const
virtual void SetInterpolator(InterpolatorType *_arg, unsigned int pos)
elxOverrideSimpleSetMacro(MovingImage, const MovingImageType *)
virtual void SetFixedImageRegion(FixedImageRegionType _arg, unsigned int pos)
virtual void SetMovingImagePyramid(MovingImagePyramidType *_arg, unsigned int pos)
Base class for multi-resolution image registration methods.
AdvancedImageToImageMetric< FixedImageType, MovingImageType > MetricType
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.9.1 elastix logo