ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkGPUFiniteDifferenceFunction.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 itkGPUFiniteDifferenceFunction_h
19#define itkGPUFiniteDifferenceFunction_h
20
22#include "itkLightObject.h"
24#include "itkVector.h"
25
26#include "itkGPUDataManager.h"
27#include "itkGPUKernelManager.h"
28
29namespace itk
30{
46template <typename TImageType>
47class ITK_TEMPLATE_EXPORT GPUFiniteDifferenceFunction : public FiniteDifferenceFunction<TImageType>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(GPUFiniteDifferenceFunction);
51
58
60 itkOverrideGetNameOfClassMacro(GPUFiniteDifferenceFunction);
61
63 using typename Superclass::ImageType;
64 using typename Superclass::PixelType;
65 using typename Superclass::PixelRealType;
66
68 static constexpr unsigned int ImageDimension = ImageType::ImageDimension;
69
71 using typename Superclass::TimeStepType;
72
76
78 using typename Superclass::RadiusType;
79
81 using typename Superclass::NeighborhoodType;
82
85 using typename Superclass::FloatOffsetType;
86
87#if !defined(ITK_WRAPPING_PARSER)
90 ComputeUpdate(const NeighborhoodType & itkNotUsed(neighborhood),
91 void * itkNotUsed(globalData),
92 const FloatOffsetType & itkNotUsed(offset) = FloatOffsetType(0.0)) override
93 {
94 PixelType pix{};
95 return pix;
96 }
97#endif
99
101 virtual void
102 GPUComputeUpdate(const typename TImageType::Pointer output, typename TImageType::Pointer update, void * gd) = 0;
103
106 virtual void
107 GPUAllocateMetricData(unsigned int itkNotUsed(numPixels))
108 {}
109
112 virtual void
115
116protected:
118 ~GPUFiniteDifferenceFunction() override = default;
119
122
125};
126} // end namespace itk
127
128#endif
ConstNeighborhoodIterator< TImage, DefaultBoundaryConditionType > NeighborhoodType
ZeroFluxNeumannBoundaryCondition< ImageType > DefaultBoundaryConditionType
Vector< float, Self::ImageDimension > FloatOffsetType
typename ConstNeighborhoodIterator< TImage >::RadiusType RadiusType
ConstNeighborhoodIterator< TImage, DefaultBoundaryConditionType > NeighborhoodType
~GPUFiniteDifferenceFunction() override=default
virtual void GPUAllocateMetricData(unsigned int numPixels)
PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
FiniteDifferenceFunction< TImageType > Superclass
Vector< float, Self::ImageDimension > FloatOffsetType
typename ImageType::PixelType PixelType
virtual void GPUComputeUpdate(const typename TImageType::Pointer output, typename TImageType::Pointer update, void *gd)=0
SmartPointer< Self > Pointer
static Pointer New()
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....