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<typename ResamplerBase<TElastix>::InputImageType,
52 typename ResamplerBase<TElastix>::OutputImageType,
53 typename ResamplerBase<TElastix>::CoordRepType>
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
73 itkTypeMacro(OpenCLResampler, ResampleImageFilter);
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 InterpolatorCoordRepType = typename InterpolatorType::CoordRepType;
149 itk::InterpolateImageFunction<InterpolatorInputImageType, InterpolatorCoordRepType>;
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
A resampler based on the itk::GPUResampleImageFilter. The parameters used in this class are:
void GenerateData() override
itk::ResampleImageFilter< typename ResamplerBase< TElastix >::InputImageType, typename ResamplerBase< TElastix >::OutputImageType, typename ResamplerBase< TElastix >::CoordRepType > Superclass1
typename GPUResamplerType::Pointer GPUResamplerPointer
typename InterpolatorType::CoordRepType InterpolatorCoordRepType
typename TransformCopierType::GPUComboTransformPointer GPUTransformPointer
typename InterpolateCopierType::GPUExplicitInterpolatorPointer GPUExplicitInterpolatorPointer
ITK_DISALLOW_COPY_AND_MOVE(OpenCLResampler)
typename TransformCopierType::Pointer TransformCopierPointer
ParameterMapType CreateDerivedTransformParametersMap() const override
typename itk::AdvancedCombinationTransform< InterpolatorPrecisionType, OutputImageType::ImageDimension > AdvancedCombinationTransformType
typename ElastixType::ParameterMapType ParameterMapType
typename itk::GPUInterpolatorCopier< OpenCLImageTypes, OpenCLImageDimentions, InterpolateImageFunctionType, float > InterpolateCopierType
TransformCopierPointer m_TransformCopier
typename itk::GPUAdvancedCombinationTransformCopier< OpenCLImageTypes, OpenCLImageDimentions, AdvancedCombinationTransformType, float > TransformCopierType
itk::InterpolateImageFunction< InterpolatorInputImageType, InterpolatorCoordRepType > InterpolateImageFunctionType
void SwitchingToCPUAndReport(const bool configError)
~OpenCLResampler() override=default
elxClassNameMacro("OpenCLResampler")
typename GPUInputImageType::Pointer GPUInputImagePointer
itk::SmartPointer< Self > Pointer
itk::SmartPointer< const Self > ConstPointer
void ReadFromFile() override
void SetInterpolator(InterpolatorType *_arg) override
GPUResamplerPointer m_GPUResampler
typename InputImageType::PixelType InputImagePixelType
void SetTransform(const TransformType *_arg) override
typename OutputImageType::RegionType OutputImageRegionType
typename InterpolateCopierType::Pointer InterpolateCopierPointer
typename InterpolatorType::InputImageType InterpolatorInputImageType
typename ResamplerBase< TElastix >::CoordRepType InterpolatorPrecisionType
void BeforeRegistration() override
InterpolateCopierPointer m_InterpolatorCopier
typename OutputImageType::PixelType OutputImagePixelType
typename ElastixType::MovingImageType OutputImageType
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
SmartPointer< Self > Pointer
Definition: itkGPUImage.h:70
A helper class which creates an GPU interpolator which is perfect copy of the CPU interpolator.
GPU version of ResampleImageFilter.


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo