ITK  5.4.0
Insight Toolkit
itkGPUPDEDeformableRegistrationFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkGPUPDEDeformableRegistrationFilter_h
19#define itkGPUPDEDeformableRegistrationFilter_h
20
24
25namespace itk
26{
76itkGPUKernelClassMacro(GPUPDEDeformableRegistrationFilterKernel);
77
78template <typename TFixedImage,
79 typename TMovingImage,
80 typename TDisplacementField,
82class ITK_TEMPLATE_EXPORT GPUPDEDeformableRegistrationFilter
83 : public GPUDenseFiniteDifferenceImageFilter<TDisplacementField, TDisplacementField, TParentImageFilter>
84{
85public:
86 ITK_DISALLOW_COPY_AND_MOVE(GPUPDEDeformableRegistrationFilter);
87
91 using CPUSuperclass = TParentImageFilter;
94
96 itkNewMacro(Self);
97
99 itkOverrideGetNameOfClassMacro(GPUPDEDeformableRegistrationFilter);
100
102 using FixedImageType = TFixedImage;
105
107 using MovingImageType = TMovingImage;
110
112 using DisplacementFieldType = TDisplacementField;
114 using DeformationVectorType = typename TDisplacementField::PixelType;
115 using DeformationScalarType = typename TDisplacementField::PixelType::ValueType;
116
119
122
128
130 static constexpr unsigned int ImageDimension = GPUSuperclass::ImageDimension;
131
133 itkGetOpenCLSourceFromKernelMacro(GPUPDEDeformableRegistrationFilterKernel);
134
138 {
139 return this->GetOutput();
140 }
141
143
144protected:
147
148 void
149 PrintSelf(std::ostream & os, Indent indent) const override;
150
154 void
156
159 void
161
165 void
167
172 virtual void
174 typename GPUDataManager::Pointer GPUSmoothingKernels[],
175 int GPUSmoothingKernelSizes[]);
176
177 virtual void
179
183 void
185
190 void
192
197 void
198 Initialize() override;
199
204 void
206
213 void
215
216private:
220
221private:
223 int m_SmoothingKernelSizes[ImageDimension]{};
224 DeformationScalarType * m_SmoothingKernels[ImageDimension]{};
225 typename GPUDataManager::Pointer m_GPUSmoothingKernels[ImageDimension]{};
226
228 int m_UpdateFieldSmoothingKernelSizes[ImageDimension]{};
229 DeformationScalarType * m_UpdateFieldSmoothingKernels[ImageDimension]{};
230 typename GPUDataManager::Pointer m_UpdateFieldGPUSmoothingKernels[ImageDimension]{};
231
232 int * m_ImageSizes{};
233 typename GPUDataManager::Pointer m_GPUImageSizes{};
234
235 /* GPU kernel handle for GPUSmoothDisplacementField */
236 int m_SmoothDisplacementFieldGPUKernelHandle{};
237};
238} // end namespace itk
239
240#ifndef ITK_MANUAL_INSTANTIATION
241# include "itkGPUPDEDeformableRegistrationFilter.hxx"
242#endif
243
244#endif
typename GPUSuperclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
typename GPUSuperclass::OutputImageType OutputImageType
Deformably register two images using a PDE algorithm.
typename GPUSuperclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
void PrintSelf(std::ostream &os, Indent indent) const override
typename GPUSuperclass::OutputImageType OutputImageType
typename TDisplacementField::PixelType::ValueType DeformationScalarType
virtual void GPUSmoothVectorField(DisplacementFieldPointer field, typename GPUDataManager::Pointer GPUSmoothingKernels[], int GPUSmoothingKernelSizes[])
itkGetOpenCLSourceFromKernelMacro(GPUPDEDeformableRegistrationFilterKernel)
~GPUPDEDeformableRegistrationFilter() override=default
typename TDisplacementField::PixelType DeformationVectorType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Deformably register two images using a PDE algorithm.
typename FixedImageType::ConstPointer FixedImageConstPointer
typename DisplacementFieldType::Pointer DisplacementFieldPointer
typename MovingImageType::Pointer MovingImagePointer
typename MovingImageType::ConstPointer MovingImageConstPointer
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
itkGPUKernelClassMacro(GPUImageOpsKernel)