ITK  4.9.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 
57 
60 
62  typedef typename Superclass::ImageType ImageType;
63  typedef typename Superclass::PixelType PixelType;
65 
67  itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension);
68 
71 
75 
78 
81 
85 
86 #if !defined( ITK_WRAPPING_PARSER )
87 
88  virtual PixelType ComputeUpdate( const NeighborhoodType & itkNotUsed(neighborhood),
89  void *itkNotUsed(globalData),
90  const FloatOffsetType & itkNotUsed(offset = FloatOffsetType(0.0)) )
91  ITK_OVERRIDE
92  {
94  return pix;
95  }
96 #endif
97 
98 
100  virtual void GPUComputeUpdate( const typename TImageType::Pointer output,
101  typename TImageType::Pointer update,
102  void *gd) = 0;
103 
106  virtual void GPUAllocateMetricData(unsigned int itkNotUsed(numPixels)) {}
107 
110  virtual void GPUReleaseMetricData() {}
111 
112 protected:
115  }
117  }
118 
121 
124 
125 private:
126  GPUFiniteDifferenceFunction(const Self &) ITK_DELETE_FUNCTION;
127  void operator=(const Self &) ITK_DELETE_FUNCTION;
128 
129 };
130 } // end namespace itk
131 
132 #endif
Light weight base class for most itk classes.
ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType > NeighborhoodType
virtual void GPUComputeUpdate(const typename TImageType::Pointer output, typename TImageType::Pointer update, void *gd)=0
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
static Pointer New()
Superclass::NeighborhoodType NeighborhoodType
Vector< float, itkGetStaticConstMacro(ImageDimension) > FloatOffsetType
FiniteDifferenceFunction< TImageType > Superclass
Superclass::DefaultBoundaryConditionType DefaultBoundaryConditionType
ZeroFluxNeumannBoundaryCondition< ImageType > DefaultBoundaryConditionType
virtual PixelType ComputeUpdate(const NeighborhoodType &, void *, const FloatOffsetType &) override