ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGPUAnisotropicDiffusionFunction.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 itkGPUAnisotropicDiffusionFunction_h
19 #define itkGPUAnisotropicDiffusionFunction_h
20 
22 
23 namespace itk
24 {
37 template< typename TImage >
39  public GPUFiniteDifferenceFunction< TImage >
40 {
41 public:
42  ITK_DISALLOW_COPY_AND_ASSIGN(GPUAnisotropicDiffusionFunction);
43 
49 
52 
54  using ImageType = typename Superclass::ImageType;
55  using PixelType = typename Superclass::PixelType;
61 
63  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
64 
71 
75  void SetTimeStep(const TimeStepType & t)
76  {
77  m_TimeStep = t;
78  }
79 
80  const TimeStepType & GetTimeStep() const
81  {
82  return m_TimeStep;
83  }
84 
86  void SetConductanceParameter(const double & c)
87  {
89  }
90 
91  const double & GetConductanceParameter() const
92  {
94  }
95 
97  const double & GetAverageGradientMagnitudeSquared() const
98  {
100  }
101 
102  void SetAverageGradientMagnitudeSquared(const double & c)
103  {
105  }
106 
109  TimeStepType ComputeGlobalTimeStep( void *itkNotUsed(GlobalData) ) const override
110  {
111  return this->GetTimeStep();
112  }
113 
116  void * GetGlobalDataPointer() const override
117  {
118  return nullptr;
119  }
120 
122  void ReleaseGlobalDataPointer( void *itkNotUsed(GlobalData) ) const override
123  {
124  /* do nothing */
125  }
126 
127 protected:
129  {
131  m_ConductanceParameter = 1.0; // default value
132  m_TimeStep = 0.125f; // default value
133  }
134 
136 
137  void PrintSelf(std::ostream & os, Indent indent) const override
138  {
139  Superclass::PrintSelf(os, indent);
140  os << indent << "TimeStep: " << m_TimeStep << std::endl;
141  os << indent << "ConductanceParameter: " << m_ConductanceParameter
142  << std::endl;
143  }
144 
145  // GPU buffer for Computing Average Squared Gradient Magnitude
148 
149  // GPU Kernel Handles
151 
152 private:
156 };
157 } // end namespace itk
158 
159 #endif
typename Superclass::NeighborhoodType NeighborhoodType
Light weight base class for most itk classes.
typename Superclass::PixelRealType PixelrealType
virtual void GPUCalculateAverageGradientMagnitudeSquared(ImageType *)=0
typename Superclass::NeighborhoodType NeighborhoodType
typename Superclass::FloatOffsetType FloatOffsetType
typename Superclass::FloatOffsetType FloatOffsetType
GPUKernelManager::Pointer m_AnisotropicDiffusionFunctionGPUKernelManager
TimeStepType ComputeGlobalTimeStep(void *) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void PrintSelf(std::ostream &os, Indent indent) const override
void PrintSelf(std::ostream &os, Indent indent) const override