go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxOpenCLResampler.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 __elxOpenCLResampler_h
19 #define __elxOpenCLResampler_h
20 
21 #include "elxIncludes.h" // include first to avoid MSVS warning
22 #include "elxOpenCLSupportedImageTypes.h"
23 
27 
28 namespace elastix
29 {
30 
49 template< class TElastix >
51  public itk::ResampleImageFilter<
52  typename ResamplerBase< TElastix >::InputImageType,
53  typename ResamplerBase< TElastix >::OutputImageType,
54  typename ResamplerBase< TElastix >::CoordRepType >,
55  public ResamplerBase< TElastix >
56 {
57 public:
58 
61 
62  typedef itk::ResampleImageFilter<
67  typedef itk::SmartPointer< Self > Pointer;
68  typedef itk::SmartPointer< const Self > ConstPointer;
69 
71  itkNewMacro( Self );
72 
74  itkTypeMacro( OpenCLResampler, ResampleImageFilter );
75 
80  elxClassNameMacro( "OpenCLResampler" );
81 
83  typedef typename Superclass1::InterpolatorType InterpolatorType;
84  typedef typename Superclass1::TransformType TransformType;
85 
86  typedef typename Superclass1::InputImageType InputImageType;
87  typedef typename InputImageType::PixelType InputImagePixelType;
88 
89  typedef typename Superclass1::OutputImageType OutputImageType;
90  typedef typename OutputImageType::PixelType OutputImagePixelType;
91  typedef typename OutputImageType::RegionType OutputImageRegionType;
92 
100 
106 
108  virtual void SetTransform( const TransformType * _arg );
109 
111  virtual void SetInterpolator( InterpolatorType * _arg );
112 
114  virtual void BeforeRegistration( void );
115 
117  virtual void ReadFromFile( void );
118 
120  virtual void WriteToFile( void ) const;
121 
122 protected:
123 
127  virtual ~OpenCLResampler() {}
128 
130  void BeforeGenerateData( void );
131 
133  virtual void GenerateData( void );
134 
140  OpenCLImageTypes, OpenCLImageDimentions, AdvancedCombinationTransformType, float >
144 
146  typedef typename InterpolatorType::InputImageType InterpolatorInputImageType;
147  typedef typename InterpolatorType::CoordRepType InterpolatorCoordRepType;
148  typedef itk::InterpolateImageFunction< InterpolatorInputImageType, InterpolatorCoordRepType >
150  typedef typename itk::GPUInterpolatorCopier<
151  OpenCLImageTypes, OpenCLImageDimentions, InterpolateImageFunctionType, float >
155 
156 private:
157 
159  OpenCLResampler( const Self & ); // purposely not implemented
161  void operator=( const Self & ); // purposely not implemented
162 
164  void SwitchingToCPUAndReport( const bool configError );
165 
167  void ReportToLog( void );
168 
176 };
177 
178 // end class OpenCLResampler
179 
180 } // end namespace elastix
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
183 #include "elxOpenCLResampler.hxx"
184 #endif
185 
186 #endif // end #ifndef __elxOpenCLResampler_h
elastix::OpenCLResampler::TransformCopierType
itk::GPUAdvancedCombinationTransformCopier< OpenCLImageTypes, OpenCLImageDimentions, AdvancedCombinationTransformType, float > TransformCopierType
Definition: elxOpenCLResampler.h:141
itk::GPUAdvancedCombinationTransformCopier
A helper class which creates an GPU AdvancedCombinationTransform which is perfect copy of the CPU Adv...
Definition: itkGPUAdvancedCombinationTransformCopier.h:65
elastix::OpenCLResampler::m_InterpolatorCopier
InterpolateCopierPointer m_InterpolatorCopier
Definition: elxOpenCLResampler.h:170
elastix::OpenCLResampler::GPUOutputImageType
itk::GPUImage< OutputImagePixelType, OutputImageType::ImageDimension > GPUOutputImageType
Definition: elxOpenCLResampler.h:98
elastix::OpenCLResampler::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: elxOpenCLResampler.h:87
elastix::OpenCLResampler::BeforeGenerateData
void BeforeGenerateData(void)
elastix::ResamplerBase::CoordRepType
ElastixType::CoordRepType CoordRepType
Definition: elxResamplerBase.h:97
itk::GPUInterpolatorCopier
A helper class which creates an GPU interpolator which is perfect copy of the CPU interpolator.
Definition: itkGPUInterpolatorCopier.h:67
itkGPUResampleImageFilter.h
elastix::OpenCLResampler
A resampler based on the itk::GPUResampleImageFilter. The parameters used in this class are:
Definition: elxOpenCLResampler.h:56
itk::GPUImage
Templated n-dimensional image class for the GPU.
Definition: itkGPUImage.h:64
SmartPointer< Self >
elastix::OpenCLResampler::AdvancedCombinationTransformType
itk::AdvancedCombinationTransform< InterpolatorPrecisionType, OutputImageType::ImageDimension > AdvancedCombinationTransformType
Definition: elxOpenCLResampler.h:138
elastix::ResamplerBase
Definition: elxResamplerBase.h:74
elastix::OpenCLResampler::elxClassNameMacro
elxClassNameMacro("OpenCLResampler")
elastix::OpenCLResampler::TransformCopierPointer
TransformCopierType::Pointer TransformCopierPointer
Definition: elxOpenCLResampler.h:142
elastix::OpenCLResampler::TransformType
Superclass1::TransformType TransformType
Definition: elxOpenCLResampler.h:84
elastix::OpenCLResampler::OutputImageType
Superclass1::OutputImageType OutputImageType
Definition: elxOpenCLResampler.h:89
elastix::OpenCLResampler::InterpolateCopierType
itk::GPUInterpolatorCopier< OpenCLImageTypes, OpenCLImageDimentions, InterpolateImageFunctionType, float > InterpolateCopierType
Definition: elxOpenCLResampler.h:152
elastix::OpenCLResampler::SetInterpolator
virtual void SetInterpolator(InterpolatorType *_arg)
elastix::OpenCLResampler::InterpolatorType
Superclass1::InterpolatorType InterpolatorType
Definition: elxOpenCLResampler.h:83
elastix::OpenCLResampler::Pointer
itk::SmartPointer< Self > Pointer
Definition: elxOpenCLResampler.h:67
elastix::OpenCLResampler::BeforeRegistration
virtual void BeforeRegistration(void)
elastix::OpenCLResampler::SetTransform
virtual void SetTransform(const TransformType *_arg)
itkGPUInterpolatorCopier.h
elastix::OpenCLResampler::InterpolatorCoordRepType
InterpolatorType::CoordRepType InterpolatorCoordRepType
Definition: elxOpenCLResampler.h:147
itk::GPUResampleImageFilter
GPU version of ResampleImageFilter.
Definition: itkGPUResampleImageFilter.h:50
elastix::OpenCLResampler::GPUTransformPointer
TransformCopierType::GPUComboTransformPointer GPUTransformPointer
Definition: elxOpenCLResampler.h:143
elastix::OpenCLResampler::ReadFromFile
virtual void ReadFromFile(void)
itk::AdvancedCombinationTransform
This class combines two transforms: an 'initial transform' with a 'current transform'.
Definition: itkAdvancedCombinationTransform.h:58
elastix::OpenCLResampler::m_GPUResamplerCreated
bool m_GPUResamplerCreated
Definition: elxOpenCLResampler.h:173
elastix::OpenCLResampler::GPUExplicitInterpolatorPointer
InterpolateCopierType::GPUExplicitInterpolatorPointer GPUExplicitInterpolatorPointer
Definition: elxOpenCLResampler.h:154
elastix::OpenCLResampler::Superclass1
itk::ResampleImageFilter< typename ResamplerBase< TElastix >::InputImageType, typename ResamplerBase< TElastix >::OutputImageType, typename ResamplerBase< TElastix >::CoordRepType > Superclass1
Definition: elxOpenCLResampler.h:65
elastix::ResamplerBase::OutputImageType
ElastixType::MovingImageType OutputImageType
Definition: elxResamplerBase.h:95
elastix::OpenCLResampler::m_ContextCreated
bool m_ContextCreated
Definition: elxOpenCLResampler.h:174
elastix::OpenCLResampler::m_UseOpenCL
bool m_UseOpenCL
Definition: elxOpenCLResampler.h:175
elastix::OpenCLResampler::GPUResamplerType
itk::GPUResampleImageFilter< GPUInputImageType, GPUOutputImageType, GPUInterpolatorPrecisionType > GPUResamplerType
Definition: elxOpenCLResampler.h:104
elastix::OpenCLResampler::m_GPUResampler
GPUResamplerPointer m_GPUResampler
Definition: elxOpenCLResampler.h:171
elastix::OpenCLResampler::OpenCLResampler
OpenCLResampler()
elastix::OpenCLResampler::GenerateData
virtual void GenerateData(void)
elastix::OpenCLResampler::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: elxOpenCLResampler.h:68
itk::GPUInterpolatorCopier::GPUExplicitInterpolatorPointer
GPUExplicitInterpolatorType::Pointer GPUExplicitInterpolatorPointer
Definition: itkGPUInterpolatorCopier.h:101
itkGPUAdvancedCombinationTransformCopier.h
elastix::OpenCLResampler::InterpolateImageFunctionType
itk::InterpolateImageFunction< InterpolatorInputImageType, InterpolatorCoordRepType > InterpolateImageFunctionType
Definition: elxOpenCLResampler.h:149
elastix::OpenCLResampler::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: elxOpenCLResampler.h:91
elxIncludes.h
elastix::OpenCLResampler::InterpolateCopierPointer
InterpolateCopierType::Pointer InterpolateCopierPointer
Definition: elxOpenCLResampler.h:153
elastix::OpenCLResampler::GPUInputImagePointer
GPUInputImageType::Pointer GPUInputImagePointer
Definition: elxOpenCLResampler.h:96
elastix::OpenCLResampler::m_GPUResamplerReady
bool m_GPUResamplerReady
Definition: elxOpenCLResampler.h:172
elastix::OpenCLResampler::OpenCLResampler
OpenCLResampler(const Self &)
elastix::OpenCLResampler::~OpenCLResampler
virtual ~OpenCLResampler()
Definition: elxOpenCLResampler.h:127
elastix::OpenCLResampler::SwitchingToCPUAndReport
void SwitchingToCPUAndReport(const bool configError)
elastix::OpenCLResampler::ReportToLog
void ReportToLog(void)
elastix::OpenCLResampler::Superclass2
ResamplerBase< TElastix > Superclass2
Definition: elxOpenCLResampler.h:66
elastix::OpenCLResampler::GPUInputImageType
itk::GPUImage< InputImagePixelType, InputImageType::ImageDimension > GPUInputImageType
Definition: elxOpenCLResampler.h:95
elastix::OpenCLResampler::GPUInterpolatorPrecisionType
float GPUInterpolatorPrecisionType
Definition: elxOpenCLResampler.h:99
elastix::OpenCLResampler::InterpolatorInputImageType
InterpolatorType::InputImageType InterpolatorInputImageType
Definition: elxOpenCLResampler.h:146
elastix::OpenCLResampler::m_TransformCopier
TransformCopierPointer m_TransformCopier
Definition: elxOpenCLResampler.h:169
elastix::OpenCLResampler::GPUResamplerPointer
GPUResamplerType::Pointer GPUResamplerPointer
Definition: elxOpenCLResampler.h:105
elastix::OpenCLResampler::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: elxOpenCLResampler.h:90
elastix::OpenCLResampler::WriteToFile
virtual void WriteToFile(void) const
elastix
Definition: elxFixedGenericPyramid.h:25
elastix::OpenCLResampler::InputImageType
Superclass1::InputImageType InputImageType
Definition: elxOpenCLResampler.h:86
elastix::OpenCLResampler::InterpolatorPrecisionType
ResamplerBase< TElastix >::CoordRepType InterpolatorPrecisionType
Definition: elxOpenCLResampler.h:136
elastix::OpenCLResampler::Self
OpenCLResampler Self
Definition: elxOpenCLResampler.h:60
elastix::OpenCLResampler::operator=
void operator=(const Self &)
float
elastix::ResamplerBase::InputImageType
ElastixType::MovingImageType InputImageType
Definition: elxResamplerBase.h:94


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo