ITK  5.2.0
Insight Toolkit
itkGPUAnisotropicDiffusionFunction.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  * 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 itkGPUAnisotropicDiffusionFunction_h
19 #define itkGPUAnisotropicDiffusionFunction_h
20 
22 
23 namespace itk
24 {
37 template <typename TImage>
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_MOVE(GPUAnisotropicDiffusionFunction);
42 
48 
51 
53  using ImageType = typename Superclass::ImageType;
54  using PixelType = typename Superclass::PixelType;
60 
62  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
63 
69  virtual void
71 
75  void
77  {
78  m_TimeStep = t;
79  }
80 
81  const TimeStepType &
82  GetTimeStep() const
83  {
84  return m_TimeStep;
85  }
86 
88  void
89  SetConductanceParameter(const double & c)
90  {
92  }
93 
94  const double &
96  {
98  }
99 
101  const double &
103  {
105  }
106 
107  void
109  {
111  }
112 
116  ComputeGlobalTimeStep(void * itkNotUsed(GlobalData)) const override
117  {
118  return this->GetTimeStep();
119  }
120 
123  void *
124  GetGlobalDataPointer() const override
125  {
126  return nullptr;
127  }
128 
130  void
131  ReleaseGlobalDataPointer(void * itkNotUsed(GlobalData)) const override
132  {
133  /* do nothing */
134  }
135 
136 protected:
138  {
140  m_ConductanceParameter = 1.0; // default value
141  m_TimeStep = 0.125f; // default value
142  }
143 
144  ~GPUAnisotropicDiffusionFunction() override = default;
145 
146  void
147  PrintSelf(std::ostream & os, Indent indent) const override
148  {
149  Superclass::PrintSelf(os, indent);
150  os << indent << "TimeStep: " << m_TimeStep << std::endl;
151  os << indent << "ConductanceParameter: " << m_ConductanceParameter << std::endl;
152  }
153 
154  // GPU buffer for Computing Average Squared Gradient Magnitude
157 
158  // GPU Kernel Handles
160 
161 private:
165 };
166 } // end namespace itk
167 
168 #endif
itk::GPUAnisotropicDiffusionFunction::PixelType
typename Superclass::PixelType PixelType
Definition: itkGPUAnisotropicDiffusionFunction.h:54
itk::GPUAnisotropicDiffusionFunction::SetTimeStep
void SetTimeStep(const TimeStepType &t)
Definition: itkGPUAnisotropicDiffusionFunction.h:76
itk::GPUAnisotropicDiffusionFunction::GetAverageGradientMagnitudeSquared
const double & GetAverageGradientMagnitudeSquared() const
Definition: itkGPUAnisotropicDiffusionFunction.h:102
itk::GPUAnisotropicDiffusionFunction::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
Definition: itkGPUAnisotropicDiffusionFunction.h:147
itk::GPUAnisotropicDiffusionFunction::ImageType
typename Superclass::ImageType ImageType
Definition: itkGPUAnisotropicDiffusionFunction.h:53
itk::GPUAnisotropicDiffusionFunction::PixelrealType
typename Superclass::PixelRealType PixelrealType
Definition: itkGPUAnisotropicDiffusionFunction.h:55
itk::GPUAnisotropicDiffusionFunction::m_AnisotropicDiffusionFunctionGPUKernelManager
GPUKernelManager::Pointer m_AnisotropicDiffusionFunctionGPUKernelManager
Definition: itkGPUAnisotropicDiffusionFunction.h:156
itk::GPUAnisotropicDiffusionFunction::TimeStepType
typename Superclass::TimeStepType TimeStepType
Definition: itkGPUAnisotropicDiffusionFunction.h:58
itkGPUFiniteDifferenceFunction.h
itk::GPUAnisotropicDiffusionFunction
Definition: itkGPUAnisotropicDiffusionFunction.h:38
itk::GPUAnisotropicDiffusionFunction::SetConductanceParameter
void SetConductanceParameter(const double &c)
Definition: itkGPUAnisotropicDiffusionFunction.h:89
itk::GPUAnisotropicDiffusionFunction::ComputeGlobalTimeStep
TimeStepType ComputeGlobalTimeStep(void *) const override
Definition: itkGPUAnisotropicDiffusionFunction.h:116
itk::GPUAnisotropicDiffusionFunction::~GPUAnisotropicDiffusionFunction
~GPUAnisotropicDiffusionFunction() override=default
itk::GPUFiniteDifferenceFunction< TImage >::ImageType
typename Superclass::ImageType ImageType
Definition: itkGPUFiniteDifferenceFunction.h:63
itk::GPUFiniteDifferenceFunction< TImage >::TimeStepType
typename Superclass::TimeStepType TimeStepType
Definition: itkGPUFiniteDifferenceFunction.h:71
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::GPUAnisotropicDiffusionFunction::RadiusType
typename Superclass::RadiusType RadiusType
Definition: itkGPUAnisotropicDiffusionFunction.h:56
itk::GPUAnisotropicDiffusionFunction::NeighborhoodType
typename Superclass::NeighborhoodType NeighborhoodType
Definition: itkGPUAnisotropicDiffusionFunction.h:57
itk::GPUAnisotropicDiffusionFunction::m_ConductanceParameter
double m_ConductanceParameter
Definition: itkGPUAnisotropicDiffusionFunction.h:163
itk::GPUAnisotropicDiffusionFunction::m_AverageGradientMagnitudeSquared
double m_AverageGradientMagnitudeSquared
Definition: itkGPUAnisotropicDiffusionFunction.h:162
itk::GPUFiniteDifferenceFunction< TImage >::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkGPUFiniteDifferenceFunction.h:68
itk::GPUAnisotropicDiffusionFunction::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkGPUAnisotropicDiffusionFunction.h:62
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::GPUAnisotropicDiffusionFunction::m_AverageGradientMagnitudeSquaredGPUKernelHandle
int m_AverageGradientMagnitudeSquaredGPUKernelHandle
Definition: itkGPUAnisotropicDiffusionFunction.h:159
itk::GPUAnisotropicDiffusionFunction::SetAverageGradientMagnitudeSquared
void SetAverageGradientMagnitudeSquared(const double &c)
Definition: itkGPUAnisotropicDiffusionFunction.h:108
itk::GPUAnisotropicDiffusionFunction::GetGlobalDataPointer
void * GetGlobalDataPointer() const override
Definition: itkGPUAnisotropicDiffusionFunction.h:124
itk::GPUAnisotropicDiffusionFunction::GetTimeStep
const TimeStepType & GetTimeStep() const
Definition: itkGPUAnisotropicDiffusionFunction.h:82
itk::GPUFiniteDifferenceFunction< TImage >::NeighborhoodType
typename Superclass::NeighborhoodType NeighborhoodType
Definition: itkGPUFiniteDifferenceFunction.h:81
itk::GPUFiniteDifferenceFunction
Definition: itkGPUFiniteDifferenceFunction.h:47
itk::GPUAnisotropicDiffusionFunction::GetConductanceParameter
const double & GetConductanceParameter() const
Definition: itkGPUAnisotropicDiffusionFunction.h:95
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::GPUAnisotropicDiffusionFunction::m_TimeStep
TimeStepType m_TimeStep
Definition: itkGPUAnisotropicDiffusionFunction.h:164
itk::GPUAnisotropicDiffusionFunction::GPUCalculateAverageGradientMagnitudeSquared
virtual void GPUCalculateAverageGradientMagnitudeSquared(ImageType *)=0
itk::GPUAnisotropicDiffusionFunction::GPUAnisotropicDiffusionFunction
GPUAnisotropicDiffusionFunction()
Definition: itkGPUAnisotropicDiffusionFunction.h:137
itk::GPUFiniteDifferenceFunction< TImage >::PixelType
typename Superclass::PixelType PixelType
Definition: itkGPUFiniteDifferenceFunction.h:64
itk::GPUFiniteDifferenceFunction< TImage >::PixelRealType
typename Superclass::PixelRealType PixelRealType
Definition: itkGPUFiniteDifferenceFunction.h:65
itk::FiniteDifferenceFunction< TImage >::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::GPUFiniteDifferenceFunction< TImage >::FloatOffsetType
typename Superclass::FloatOffsetType FloatOffsetType
Definition: itkGPUFiniteDifferenceFunction.h:85
itk::GPUAnisotropicDiffusionFunction::FloatOffsetType
typename Superclass::FloatOffsetType FloatOffsetType
Definition: itkGPUAnisotropicDiffusionFunction.h:59
itk::GPUFiniteDifferenceFunction< TImage >::RadiusType
typename Superclass::RadiusType RadiusType
Definition: itkGPUFiniteDifferenceFunction.h:78
itk::GPUAnisotropicDiffusionFunction::ReleaseGlobalDataPointer
void ReleaseGlobalDataPointer(void *) const override
Definition: itkGPUAnisotropicDiffusionFunction.h:131
itk::GPUAnisotropicDiffusionFunction::m_AnisotropicDiffusionFunctionGPUBuffer
GPUDataManager::Pointer m_AnisotropicDiffusionFunctionGPUBuffer
Definition: itkGPUAnisotropicDiffusionFunction.h:155