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 {
69 template <class TElastix>
70 class ResamplerBase : public BaseComponentSE<TElastix>
71 {
72 public:
76 
78  itkTypeMacro( ResamplerBase, BaseComponentSE );
79 
81  typedef typename Superclass::ElastixType ElastixType;
87 
90  typedef typename ElastixType::MovingImageType InputImageType;
91  typedef typename ElastixType::MovingImageType OutputImageType;
92  //typedef typename ElastixType::FixedImageType OutputImageType;
93  typedef typename ElastixType::CoordRepType CoordRepType;
94 
96  typedef itk::ResampleImageFilter<
98 
100  typedef typename ITKBaseType::TransformType TransformType;
101  typedef typename ITKBaseType::InterpolatorType InterpolatorType;
102  typedef typename ITKBaseType::SizeType SizeType;
103  typedef typename ITKBaseType::IndexType IndexType;
104  typedef typename ITKBaseType::SpacingType SpacingType;
105  typedef typename ITKBaseType::DirectionType DirectionType;
106  typedef typename ITKBaseType::OriginPointType OriginPointType;
107  typedef typename ITKBaseType::PixelType OutputPixelType;
108 
111 
113  itkStaticConstMacro( ImageDimension, unsigned int,
114  OutputImageType::ImageDimension );
115 
117  virtual ITKBaseType * GetAsITKBaseType( void )
118  {
119  return dynamic_cast<ITKBaseType *>( this );
120  }
121 
123  virtual const ITKBaseType * GetAsITKBaseType( void ) const
124  {
125  return dynamic_cast<const ITKBaseType *>( this );
126  }
127 
131  virtual int BeforeAllTransformix( void ){ return 0;};
132 
139  virtual void BeforeRegistrationBase( void );
140 
144  virtual void AfterEachResolutionBase( void );
145 
149  virtual void AfterEachIterationBase( void );
150 
154  virtual void AfterRegistrationBase( void );
155 
157  virtual void ReadFromFile( void );
158 
160  virtual void WriteToFile( void ) const;
161 
163  virtual void WriteResultImage( const char * filename, const bool & showProgress = true );
164 
165 protected:
166 
170  virtual ~ResamplerBase() {}
171 
173  virtual void SetComponents( void );
174 
175 private:
176 
178  ResamplerBase(const Self&); // purposely not implemented
180  void operator=(const Self&); // purposely not implemented
181 
183  void ReleaseMemory( void );
184 
185 }; // end class ResamplerBase
186 
187 
188 } // end namespace elastix
189 
190 
191 #ifndef ITK_MANUAL_INSTANTIATION
192 #include "elxResamplerBase.hxx"
193 #endif
194 
195 #endif // end #ifndef __elxResamplerBase_h
The BaseComponentSE class is a base class for elastix components that provides some basic functionali...
ElastixType::RegistrationBaseType RegistrationType
ElastixType::ConfigurationPointer ConfigurationPointer
ElastixType::Pointer ElastixPointer
ElastixType::ConfigurationType ConfigurationType
Superclass::ElastixPointer ElastixPointer
virtual int BeforeAllTransformix(void)
virtual void WriteToFile(void) const
ElastixType::CoordRepType CoordRepType
void operator=(const Self &)
Superclass::RegistrationType RegistrationType
ITKBaseType::InterpolatorType InterpolatorType
ElastixType::MovingImageType InputImageType
virtual void AfterEachIterationBase(void)
virtual void ReadFromFile(void)
ElastixType::MovingImageType OutputImageType
Superclass::ElastixType ElastixType
Superclass::RegistrationPointer RegistrationPointer
itk::ResampleImageFilter< InputImageType, OutputImageType, CoordRepType > ITKBaseType
RegistrationType * RegistrationPointer
Superclass::ConfigurationType ConfigurationType
itkStaticConstMacro(ImageDimension, unsigned int, OutputImageType::ImageDimension)
ITKBaseType::SpacingType SpacingType
ITKBaseType::DirectionType DirectionType
virtual void WriteResultImage(const char *filename, const bool &showProgress=true)
virtual void AfterRegistrationBase(void)
virtual void BeforeRegistrationBase(void)
virtual void AfterEachResolutionBase(void)
virtual const ITKBaseType * GetAsITKBaseType(void) const
ITKBaseType::OriginPointType OriginPointType
ITKBaseType::IndexType IndexType
BaseComponentSE< TElastix > Superclass
virtual void SetComponents(void)
virtual ITKBaseType * GetAsITKBaseType(void)
elx::ProgressCommand ProgressCommandType
A specialized Command object for updating the progress of a filter.
Superclass::ConfigurationPointer ConfigurationPointer
ITKBaseType::SizeType SizeType
ITKBaseType::TransformType TransformType
ITKBaseType::PixelType OutputPixelType


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