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 * 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 __itkMultiMetricMultiResolutionImageRegistrationMethod_h
19#define __itkMultiMetricMultiResolutionImageRegistrationMethod_h
20
23#include <vector>
24
27#define elxOverrideSimpleSetMacro( _name, _type ) \
28 void Set##_name( _type _arg ) override \
29 { \
30 this->Set##_name( _arg, 0 ); \
31 }
32
34#define itkSetNumberOfMacro( _name ) \
35 virtual void SetNumberOf##_name##s( unsigned int _arg ) \
36 { \
37 if( this->m_##_name##s.size() != _arg ) \
38 { \
39 this->m_##_name##s.resize( _arg ); \
40 this->Modified(); \
41 } \
42 }
43
45#define itkGetNumberOfMacro( _name ) \
46 virtual unsigned int GetNumberOf##_name##s( void ) const \
47 { \
48 return this->m_##_name##s.size(); \
49 }
50
51namespace itk
52{
53
82template< typename TFixedImage, typename TMovingImage >
84 public MultiResolutionImageRegistrationMethod2< TFixedImage, TMovingImage >
85{
86public:
87
91 TFixedImage, TMovingImage > Superclass;
93 typedef SmartPointer< const Self > ConstPointer;
94
96 itkNewMacro( Self );
97
101
108
116 typedef typename OptimizerType::Pointer OptimizerPointer;
120 typedef typename
122
125 typedef typename
127
130
135
140 virtual void StopMultiMetricRegistration( void )
141 {
142 this->m_Stop = true;
143 }
144
145
152 void SetMetric( MetricType * _arg ) override;
153
159 {
160 return this->m_CombinationMetric.GetPointer();
161 }
162
163
172 virtual void SetFixedImage( const FixedImageType * _arg, unsigned int pos );
173
174 virtual const FixedImageType * GetFixedImage( unsigned int pos ) const;
175
176 const FixedImageType * GetFixedImage( void ) const override
177 {
178 return this->GetFixedImage( 0 );
179 }
180
181
183 itkSetNumberOfMacro( FixedImage );
184 itkGetNumberOfMacro( FixedImage );
185
187 virtual void SetMovingImage( const MovingImageType * _arg, unsigned int pos );
188
189 virtual const MovingImageType * GetMovingImage( unsigned int pos ) const;
190
191 const MovingImageType * GetMovingImage( void ) const override
192 { return this->GetMovingImage( 0 ); }
194 itkSetNumberOfMacro( MovingImage );
195 itkGetNumberOfMacro( MovingImage );
196
198 virtual void SetFixedImageRegion( FixedImageRegionType _arg, unsigned int pos );
199
200 virtual const FixedImageRegionType & GetFixedImageRegion( unsigned int pos ) const;
201
202 const FixedImageRegionType & GetFixedImageRegion( void ) const override
203 { return this->GetFixedImageRegion( 0 ); }
205 itkSetNumberOfMacro( FixedImageRegion );
206 itkGetNumberOfMacro( FixedImageRegion );
207
209 virtual void SetInterpolator( InterpolatorType * _arg, unsigned int pos );
210
211 virtual InterpolatorType * GetInterpolator( unsigned int pos ) const;
212
214 { return this->GetInterpolator( 0 ); }
216 itkSetNumberOfMacro( Interpolator );
217 itkGetNumberOfMacro( Interpolator );
218
220 virtual void SetFixedImagePyramid( FixedImagePyramidType * _arg, unsigned int pos );
221
222 virtual FixedImagePyramidType * GetFixedImagePyramid( unsigned int pos ) const;
223
225 { return this->GetFixedImagePyramid( 0 ); }
227 itkSetNumberOfMacro( FixedImagePyramid );
228 itkGetNumberOfMacro( FixedImagePyramid );
229
231 virtual void SetMovingImagePyramid( MovingImagePyramidType * _arg, unsigned int pos );
232
233 virtual MovingImagePyramidType * GetMovingImagePyramid( unsigned int pos ) const;
234
236 { return this->GetMovingImagePyramid( 0 ); }
238 itkSetNumberOfMacro( MovingImagePyramid );
239 itkGetNumberOfMacro( MovingImagePyramid );
240
244 ModifiedTimeType GetMTime( void ) const override;
245
250 const ParametersType & GetLastTransformParameters( void ) const override
251 {
252 return this->m_LastTransformParameters;
253 }
254
255
256protected:
257
260 void PrintSelf( std::ostream & os, Indent indent ) const override;
261
262 typedef std::vector< FixedImageRegionType > FixedImageRegionPyramidType;
263
267 void GenerateData( void ) override;
268
273 void Initialize( void ) override;
274
279 virtual void PrepareAllPyramids( void );
280
284 virtual void CheckPyramids( void );
285
289 virtual void CheckOnInitialize( void );
290
292 bool m_Stop;
294
297
299 std::vector< FixedImageConstPointer > m_FixedImages;
300 std::vector< MovingImageConstPointer > m_MovingImages;
301 std::vector< FixedImageRegionType > m_FixedImageRegions;
302 std::vector< FixedImagePyramidPointer > m_FixedImagePyramids;
303 std::vector< MovingImagePyramidPointer > m_MovingImagePyramids;
304 std::vector< InterpolatorPointer > m_Interpolators;
305
307 std::vector< FixedImageRegionPyramidType > m_FixedImageRegionPyramids;
308
311
312private:
313
314 MultiMetricMultiResolutionImageRegistrationMethod( const Self & ); // purposely not implemented
315 void operator=( const Self & ); // purposely not implemented
316
317};
318
319} // end namespace itk
320
321#undef itkSetNumberOfMacro
322#undef itkGetNumberOfMacro
323#undef elxOverrideSimpleSetMacro
324
325#ifndef ITK_MANUAL_INSTANTIATION
326#include "itkMultiMetricMultiResolutionImageRegistrationMethod.hxx"
327#endif
328
329#endif
virtual MovingImagePyramidType * GetMovingImagePyramid(unsigned int pos) const
elxOverrideSimpleSetMacro(MovingImage, const MovingImageType *)
virtual FixedImagePyramidType * GetFixedImagePyramid(unsigned int pos) const
ModifiedTimeType GetMTime(void) const override
virtual void SetFixedImageRegion(FixedImageRegionType _arg, unsigned int pos)
virtual void SetMovingImagePyramid(MovingImagePyramidType *_arg, unsigned int pos)
MultiResolutionImageRegistrationMethod2< TFixedImage, TMovingImage > Superclass
virtual void SetFixedImage(const FixedImageType *_arg, unsigned int pos)
virtual void SetFixedImagePyramid(FixedImagePyramidType *_arg, unsigned int pos)
virtual void SetMovingImage(const MovingImageType *_arg, unsigned int pos)
elxOverrideSimpleSetMacro(FixedImage, const FixedImageType *)
elxOverrideSimpleSetMacro(Interpolator, InterpolatorType *)
virtual const FixedImageRegionType & GetFixedImageRegion(unsigned int pos) const
elxOverrideSimpleSetMacro(FixedImagePyramid, FixedImagePyramidType *)
virtual const FixedImageType * GetFixedImage(unsigned int pos) const
virtual void SetInterpolator(InterpolatorType *_arg, unsigned int pos)
virtual InterpolatorType * GetInterpolator(unsigned int pos) const
CombinationImageToImageMetric< FixedImageType, MovingImageType > CombinationMetricType
void PrintSelf(std::ostream &os, Indent indent) const override
virtual const MovingImageType * GetMovingImage(unsigned int pos) const
elxOverrideSimpleSetMacro(FixedImageRegion, const FixedImageRegionType)
elxOverrideSimpleSetMacro(MovingImagePyramid, MovingImagePyramidType *)
Base class for multi-resolution image registration methods.
AdvancedImageToImageMetric< FixedImageType, MovingImageType > MetricType
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo