ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGPUFiniteDifferenceFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 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 
29 namespace itk
30 {
46 template< typename TImageType >
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_ASSIGN(GPUFiniteDifferenceFunction);
51 
58 
61 
63  using ImageType = typename Superclass::ImageType;
64  using PixelType = typename Superclass::PixelType;
66 
68  static constexpr unsigned int ImageDimension = ImageType::ImageDimension;
69 
72 
76 
79 
82 
86 
87 #if !defined( ITK_WRAPPING_PARSER )
88 
89  virtual PixelType ComputeUpdate( const NeighborhoodType & itkNotUsed(neighborhood),
90  void *itkNotUsed(globalData),
91  const FloatOffsetType & itkNotUsed(offset = FloatOffsetType(0.0)) )
92  override
93  {
94  PixelType pix = itk::NumericTraits<PixelType>::ZeroValue();
95  return pix;
96  }
97 #endif
98 
99 
101  virtual void GPUComputeUpdate( const typename TImageType::Pointer output,
102  typename TImageType::Pointer update,
103  void *gd) = 0;
104 
107  virtual void GPUAllocateMetricData(unsigned int itkNotUsed(numPixels)) {}
108 
111  virtual void GPUReleaseMetricData() {}
112 
113 protected:
116  }
118 
121 
124 };
125 } // end namespace itk
126 
127 #endif
ZeroFluxNeumannBoundaryCondition< ImageType > DefaultBoundaryConditionType
Light weight base class for most itk classes.
FiniteDifferenceFunction< TImageType > Superclass
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
virtual void GPUComputeUpdate(const typename TImageType::Pointer output, typename TImageType::Pointer update, void *gd)=0
Vector< float, Self::ImageDimension > FloatOffsetType
typename ConstNeighborhoodIterator< TDisplacementField >::RadiusType RadiusType
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
static Pointer New()
typename Superclass::FloatOffsetType FloatOffsetType
virtual PixelType ComputeUpdate(const NeighborhoodType &, void *, const FloatOffsetType &) override
ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType > NeighborhoodType
static constexpr unsigned int ImageDimension