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
28namespace elastix
29{
30
49template< 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{
57public:
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
122protected:
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
156private:
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
A resampler based on the itk::GPUResampleImageFilter. The parameters used in this class are:
itk::GPUImage< InputImagePixelType, InputImageType::ImageDimension > GPUInputImageType
ResamplerBase< TElastix >::CoordRepType InterpolatorPrecisionType
InterpolatorType::CoordRepType InterpolatorCoordRepType
itk::AdvancedCombinationTransform< InterpolatorPrecisionType, OutputImageType::ImageDimension > AdvancedCombinationTransformType
GPUInputImageType::Pointer GPUInputImagePointer
itk::GPUAdvancedCombinationTransformCopier< OpenCLImageTypes, OpenCLImageDimentions, AdvancedCombinationTransformType, float > TransformCopierType
itk::ResampleImageFilter< typename ResamplerBase< TElastix >::InputImageType, typename ResamplerBase< TElastix >::OutputImageType, typename ResamplerBase< TElastix >::CoordRepType > Superclass1
TransformCopierType::Pointer TransformCopierPointer
void operator=(const Self &)
virtual void ReadFromFile(void)
Superclass1::InputImageType InputImageType
TransformCopierPointer m_TransformCopier
itk::GPUInterpolatorCopier< OpenCLImageTypes, OpenCLImageDimentions, InterpolateImageFunctionType, float > InterpolateCopierType
void SwitchingToCPUAndReport(const bool configError)
InputImageType::PixelType InputImagePixelType
GPUResamplerType::Pointer GPUResamplerPointer
TransformCopierType::GPUComboTransformPointer GPUTransformPointer
Superclass1::InterpolatorType InterpolatorType
elxClassNameMacro("OpenCLResampler")
Superclass1::OutputImageType OutputImageType
virtual void SetInterpolator(InterpolatorType *_arg)
InterpolateCopierType::Pointer InterpolateCopierPointer
GPUResamplerPointer m_GPUResampler
itk::InterpolateImageFunction< InterpolatorInputImageType, InterpolatorCoordRepType > InterpolateImageFunctionType
InterpolatorType::InputImageType InterpolatorInputImageType
virtual void BeforeRegistration(void)
Superclass1::TransformType TransformType
virtual void WriteToFile(void) const
virtual void SetTransform(const TransformType *_arg)
itk::SmartPointer< const Self > ConstPointer
InterpolateCopierType::GPUExplicitInterpolatorPointer GPUExplicitInterpolatorPointer
itk::GPUImage< OutputImagePixelType, OutputImageType::ImageDimension > GPUOutputImageType
OpenCLResampler(const Self &)
InterpolateCopierPointer m_InterpolatorCopier
OutputImageType::PixelType OutputImagePixelType
OutputImageType::RegionType OutputImageRegionType
ResamplerBase< TElastix > Superclass2
itk::SmartPointer< Self > Pointer
virtual void GenerateData(void)
itk::GPUResampleImageFilter< GPUInputImageType, GPUOutputImageType, GPUInterpolatorPrecisionType > GPUResamplerType
ElastixType::CoordRepType CoordRepType
ElastixType::MovingImageType InputImageType
ElastixType::MovingImageType OutputImageType
This class combines two transforms: an 'initial transform' with a 'current transform'.
A helper class which creates an GPU AdvancedCombinationTransform which is perfect copy of the CPU Adv...
Templated n-dimensional image class for the GPU.
Definition: itkGPUImage.h:64
A helper class which creates an GPU interpolator which is perfect copy of the CPU interpolator.
GPUExplicitInterpolatorType::Pointer GPUExplicitInterpolatorPointer
GPU version of ResampleImageFilter.


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo