go home Home | Main Page | Topics | 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
48
49template <typename TElastix>
51 : public itk::ResampleImageFilter<typename ResamplerBase<TElastix>::InputImageType,
52 typename ResamplerBase<TElastix>::OutputImageType,
53 typename ResamplerBase<TElastix>::CoordinateType>
54 , public ResamplerBase<TElastix>
55{
56public:
58
61
62 using Superclass1 = itk::ResampleImageFilter<typename ResamplerBase<TElastix>::InputImageType,
66 using Pointer = itk::SmartPointer<Self>;
67 using ConstPointer = itk::SmartPointer<const Self>;
68
70 itkNewMacro(Self);
71
74
79 elxClassNameMacro("OpenCLResampler");
80
82 using typename Superclass1::InterpolatorType;
83 using typename Superclass1::TransformType;
84
85 using typename Superclass1::InputImageType;
86 using InputImagePixelType = typename InputImageType::PixelType;
87
88 using typename Superclass1::OutputImageType;
89 using OutputImagePixelType = typename OutputImageType::PixelType;
90 using OutputImageRegionType = typename OutputImageType::RegionType;
91
97
101
102 using typename Superclass2::ParameterMapType;
103
105 void
106 SetTransform(const TransformType * _arg) override;
107
109 void
111
113 void
115
117 void
118 ReadFromFile() override;
119
120protected:
124 ~OpenCLResampler() override = default;
125
127 void
129
131 void
132 GenerateData() override;
133
139 OpenCLImageDimentions,
141 float>;
142 using TransformCopierPointer = typename TransformCopierType::Pointer;
143 using GPUTransformPointer = typename TransformCopierType::GPUComboTransformPointer;
144
146 using InterpolatorInputImageType = typename InterpolatorType::InputImageType;
147 using InterpolatorCoordinateType = typename InterpolatorType::CoordinateType;
149 itk::InterpolateImageFunction<InterpolatorInputImageType, InterpolatorCoordinateType>;
152 using InterpolateCopierPointer = typename InterpolateCopierType::Pointer;
153 using GPUExplicitInterpolatorPointer = typename InterpolateCopierType::GPUExplicitInterpolatorPointer;
154
155private:
157
161
163 void
164 SwitchingToCPUAndReport(const bool configError);
165
167 void
169
177};
178
179// end class OpenCLResampler
180
181} // end namespace elastix
182
183#ifndef ITK_MANUAL_INSTANTIATION
184# include "elxOpenCLResampler.hxx"
185#endif
186
187#endif // end #ifndef elxOpenCLResampler_h
void GenerateData() override
typename GPUResamplerType::Pointer GPUResamplerPointer
itk::GPUImage< OutputImagePixelType, OutputImageType::ImageDimension > GPUOutputImageType
typename TransformCopierType::GPUComboTransformPointer GPUTransformPointer
typename InterpolateCopierType::GPUExplicitInterpolatorPointer GPUExplicitInterpolatorPointer
ParameterMapType CreateDerivedTransformParameterMap() const override
ITK_DISALLOW_COPY_AND_MOVE(OpenCLResampler)
typename TransformCopierType::Pointer TransformCopierPointer
typename ResamplerBase< TElastix >::CoordinateType InterpolatorPrecisionType
itkOverrideGetNameOfClassMacro(OpenCLResampler)
itk::GPUImage< InputImagePixelType, InputImageType::ImageDimension > GPUInputImageType
typename ElastixType::ParameterMapType ParameterMapType
TransformCopierPointer m_TransformCopier
typename itk::GPUAdvancedCombinationTransformCopier< OpenCLImageTypes, OpenCLImageDimentions, AdvancedCombinationTransformType, float > TransformCopierType
void SwitchingToCPUAndReport(const bool configError)
typename itk::AdvancedCombinationTransform< InterpolatorPrecisionType, OutputImageType::ImageDimension > AdvancedCombinationTransformType
typename InterpolatorType::CoordinateType InterpolatorCoordinateType
itk::ResampleImageFilter< typename ResamplerBase< TElastix >::InputImageType, typename ResamplerBase< TElastix >::OutputImageType, typename ResamplerBase< TElastix >::CoordinateType > Superclass1
~OpenCLResampler() override=default
itk::InterpolateImageFunction< InterpolatorInputImageType, InterpolatorCoordinateType > InterpolateImageFunctionType
elxClassNameMacro("OpenCLResampler")
typename GPUInputImageType::Pointer GPUInputImagePointer
itk::SmartPointer< Self > Pointer
itk::SmartPointer< const Self > ConstPointer
void ReadFromFile() override
ResamplerBase< TElastix > Superclass2
void SetInterpolator(InterpolatorType *_arg) override
GPUResamplerPointer m_GPUResampler
typename InputImageType::PixelType InputImagePixelType
void SetTransform(const TransformType *_arg) override
typename itk::GPUInterpolatorCopier< OpenCLImageTypes, OpenCLImageDimentions, InterpolateImageFunctionType, float > InterpolateCopierType
itk::GPUResampleImageFilter< GPUInputImageType, GPUOutputImageType, GPUInterpolatorPrecisionType > GPUResamplerType
typename OutputImageType::RegionType OutputImageRegionType
typename InterpolateCopierType::Pointer InterpolateCopierPointer
typename InterpolatorType::InputImageType InterpolatorInputImageType
void BeforeRegistration() override
InterpolateCopierPointer m_InterpolatorCopier
typename OutputImageType::PixelType OutputImagePixelType
typename ElastixType::MovingImageType OutputImageType
ElastixBase::CoordinateType CoordinateType
typename ElastixType::ParameterMapType ParameterMapType
typename ITKBaseType::TransformType TransformType
typename ITKBaseType::InterpolatorType InterpolatorType
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.
GPU version of ResampleImageFilter.


Generated on 26-02-2026 for elastix by doxygen 1.16.1 (669aeeefca743c148e2d935b3d3c69535c7491e6) elastix logo