go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxResamplerBase.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 __elxResamplerBase_h
16 #define __elxResamplerBase_h
17 
19 #include "elxMacro.h"
20 
21 #include "elxBaseComponentSE.h"
22 #include "itkResampleImageFilter.h"
23 #include "elxProgressCommand.h"
24 
25 namespace elastix
26 {
27  using namespace itk;
28 
66  template <class TElastix>
67  class ResamplerBase : public BaseComponentSE<TElastix>
68  {
69  public:
70 
74 
76  itkTypeMacro( ResamplerBase, BaseComponentSE );
77 
79  typedef typename Superclass::ElastixType ElastixType;
85 
88  typedef typename ElastixType::MovingImageType InputImageType;
89  typedef typename ElastixType::MovingImageType OutputImageType;
90  //typedef typename ElastixType::FixedImageType OutputImageType;
91  typedef typename ElastixType::CoordRepType CoordRepType;
92 
94  typedef ResampleImageFilter<
96 
98  typedef typename ITKBaseType::TransformType TransformType;
99  typedef typename ITKBaseType::InterpolatorType InterpolatorType;
100  typedef typename ITKBaseType::SizeType SizeType;
101  typedef typename ITKBaseType::IndexType IndexType;
102  typedef typename ITKBaseType::SpacingType SpacingType;
103  typedef typename ITKBaseType::DirectionType DirectionType;
104  typedef typename ITKBaseType::OriginPointType OriginPointType;
105  typedef typename ITKBaseType::PixelType OutputPixelType;
106 
109 
111  itkStaticConstMacro( ImageDimension, unsigned int,
112  OutputImageType::ImageDimension );
113 
115  virtual ITKBaseType * GetAsITKBaseType( void )
116  {
117  return dynamic_cast<ITKBaseType *>( this );
118  }
119 
121  virtual const ITKBaseType * GetAsITKBaseType( void ) const
122  {
123  return dynamic_cast<const ITKBaseType *>( this );
124  }
125 
129  virtual int BeforeAllTransformix( void ){ return 0;};
130 
137  virtual void BeforeRegistrationBase( void );
138 
142  virtual void AfterEachResolutionBase( void );
143 
147  virtual void AfterRegistrationBase( void );
148 
150  virtual void ReadFromFile( void );
151 
153  virtual void WriteToFile( void ) const;
154 
156  virtual void WriteResultImage( const char * filename );
157 
158  protected:
159 
163  virtual ~ResamplerBase() {}
164 
166  virtual void SetComponents(void);
167 
168  private:
169 
171  ResamplerBase(const Self&); // purposely not implemented
173  void operator=(const Self&); // purposely not implemented
174 
176  void ReleaseMemory( void );
177 
178  }; // end class ResamplerBase
179 
180 
181 } // end namespace elastix
182 
183 
184 #ifndef ITK_MANUAL_INSTANTIATION
185 #include "elxResamplerBase.hxx"
186 #endif
187 
188 #endif // end #ifndef __elxResamplerBase_h


Generated on 21-03-2014 for elastix by doxygen 1.8.1.2 elastix logo