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:
73 
77 
79  itkTypeMacro( ResamplerBase, BaseComponentSE );
80 
82  typedef typename Superclass::ElastixType ElastixType;
88 
91  typedef typename ElastixType::MovingImageType InputImageType;
92  typedef typename ElastixType::MovingImageType OutputImageType;
93  //typedef typename ElastixType::FixedImageType OutputImageType;
94  typedef typename ElastixType::CoordRepType CoordRepType;
95 
97  typedef itk::ResampleImageFilter<
99 
101  typedef typename ITKBaseType::TransformType TransformType;
102  typedef typename ITKBaseType::InterpolatorType InterpolatorType;
103  typedef typename ITKBaseType::SizeType SizeType;
104  typedef typename ITKBaseType::IndexType IndexType;
105  typedef typename ITKBaseType::SpacingType SpacingType;
106  typedef typename ITKBaseType::DirectionType DirectionType;
107  typedef typename ITKBaseType::OriginPointType OriginPointType;
108  typedef typename ITKBaseType::PixelType OutputPixelType;
109 
111  typedef typename ElastixType::ParameterMapType ParameterMapType;
112 
115 
117  itkStaticConstMacro( ImageDimension, unsigned int,
118  OutputImageType::ImageDimension );
119 
121  virtual ITKBaseType * GetAsITKBaseType( void )
122  {
123  return dynamic_cast< ITKBaseType * >( this );
124  }
125 
126 
128  virtual const ITKBaseType * GetAsITKBaseType( void ) const
129  {
130  return dynamic_cast< const ITKBaseType * >( this );
131  }
132 
133 
137  virtual int BeforeAllTransformix( void ){ return 0; }
138 
145  virtual void BeforeRegistrationBase( void );
146 
150  virtual void AfterEachResolutionBase( void );
151 
155  virtual void AfterEachIterationBase( void );
156 
160  virtual void AfterRegistrationBase( void );
161 
163  virtual void ReadFromFile( void );
164 
166  virtual void WriteToFile( void ) const;
167 
169  virtual void CreateTransformParametersMap( ParameterMapType * paramsMap ) const;
170 
172  virtual void WriteResultImage( const char * filename, const bool & showProgress = true );
173 
175  virtual void CreateItkResultImage( void );
176 
177 protected:
178 
182  virtual ~ResamplerBase() {}
183 
185  virtual void SetComponents( void );
186 
187 private:
188 
190  ResamplerBase( const Self & ); // purposely not implemented
192  void operator=( const Self & ); // purposely not implemented
193 
195  void ReleaseMemory( void );
196 
197 };
198 
199 } // end namespace elastix
200 
201 #ifndef ITK_MANUAL_INSTANTIATION
202 #include "elxResamplerBase.hxx"
203 #endif
204 
205 #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
RegistrationType * RegistrationPointer
virtual void CreateItkResultImage(void)
Superclass::ConfigurationType ConfigurationType
itkStaticConstMacro(ImageDimension, unsigned int, OutputImageType::ImageDimension)
BaseComponentSE< TElastix > Superclass
ITKBaseType::SpacingType SpacingType
ITKBaseType::DirectionType DirectionType
virtual void WriteResultImage(const char *filename, const bool &showProgress=true)
virtual void AfterRegistrationBase(void)
ElastixType::ParameterMapType ParameterMapType
virtual void BeforeRegistrationBase(void)
virtual void AfterEachResolutionBase(void)
virtual const ITKBaseType * GetAsITKBaseType(void) const
ITKBaseType::OriginPointType OriginPointType
ITKBaseType::IndexType IndexType
virtual void SetComponents(void)
itk::ResampleImageFilter< InputImageType, OutputImageType, CoordRepType > ITKBaseType
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
virtual void CreateTransformParametersMap(ParameterMapType *paramsMap) const
ITKBaseType::PixelType OutputPixelType


Generated on 11-03-2014 for elastix by doxygen 1.8.6 elastix logo