ITK  6.0.0
Insight Toolkit
itkMinMaxCurvatureFlowFunction.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 itkMinMaxCurvatureFlowFunction_h
19 #define itkMinMaxCurvatureFlowFunction_h
20 
23 
24 namespace itk
25 {
42 template <typename TImage>
43 class ITK_TEMPLATE_EXPORT MinMaxCurvatureFlowFunction : public CurvatureFlowFunction<TImage>
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_MOVE(MinMaxCurvatureFlowFunction);
47 
53 
55  itkNewMacro(Self);
56 
58  itkOverrideGetNameOfClassMacro(MinMaxCurvatureFlowFunction);
59 
61  using typename Superclass::ImageType;
62  using typename Superclass::PixelType;
63  using typename Superclass::RadiusType;
64  using typename Superclass::NeighborhoodType;
65  using typename Superclass::FloatOffsetType;
66 
68  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
69 
72 
74  void
75  SetStencilRadius(const RadiusValueType value);
76 
77  const RadiusValueType &
79  {
80  return m_StencilRadius;
81  }
82 
84  const RadiusValueType &
86  {
87  return GetRadiusValueType();
88  }
89 
91  PixelType
92  ComputeUpdate(const NeighborhoodType & it,
93  void * globalData,
94  const FloatOffsetType & offset = FloatOffsetType(0.0)) override;
95 
96 protected:
98  ~MinMaxCurvatureFlowFunction() override = default;
99 
101  StencilOperatorType m_StencilOperator{};
102 
105  void
106  InitializeStencilOperator();
107 
108 private:
109  RadiusValueType m_StencilRadius{};
110 
111  // To control overloaded versions of ComputeThreshold
113  {};
114  template <int VDimension>
115  struct Dispatch : public DispatchBase
116  {};
117 
119  PixelType
120  ComputeThreshold(const Dispatch<2> &, const NeighborhoodType & it) const;
121 
122  PixelType
123  ComputeThreshold(const Dispatch<3> &, const NeighborhoodType & it) const;
124 
125  PixelType
126  ComputeThreshold(const DispatchBase &, const NeighborhoodType & it) const;
127 };
128 } // end namespace itk
129 
130 #ifndef ITK_MANUAL_INSTANTIATION
131 # include "itkMinMaxCurvatureFlowFunction.hxx"
132 #endif
133 
134 #endif
itk::FiniteDifferenceFunction< TImage >::RadiusType
typename ConstNeighborhoodIterator< TImage >::RadiusType RadiusType
Definition: itkFiniteDifferenceFunction.h:97
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::MinMaxCurvatureFlowFunction::GetStencilRadius
const RadiusValueType & GetStencilRadius() const
Definition: itkMinMaxCurvatureFlowFunction.h:85
itkNeighborhoodOperator.h
itk::Neighborhood< PixelType, Self::ImageDimension >
itk::SmartPointer< Self >
itk::FiniteDifferenceFunction< TImage >::ImageType
TImage ImageType
Definition: itkFiniteDifferenceFunction.h:82
itk::MinMaxCurvatureFlowFunction::RadiusValueType
typename RadiusType::SizeValueType RadiusValueType
Definition: itkMinMaxCurvatureFlowFunction.h:71
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itkCurvatureFlowFunction.h
itk::CurvatureFlowFunction
This class encapsulate the finite difference equation which drives a curvature flow denoising algorit...
Definition: itkCurvatureFlowFunction.h:44
itk::FiniteDifferenceFunction< TImage >::PixelType
typename ImageType::PixelType PixelType
Definition: itkFiniteDifferenceFunction.h:83
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ConstNeighborhoodIterator
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Definition: itkConstNeighborhoodIterator.h:51
itk::MinMaxCurvatureFlowFunction::Dispatch
Definition: itkMinMaxCurvatureFlowFunction.h:115
itk::MinMaxCurvatureFlowFunction::GetRadiusValueType
const RadiusValueType & GetRadiusValueType() const
Definition: itkMinMaxCurvatureFlowFunction.h:78
itk::MinMaxCurvatureFlowFunction
Definition: itkMinMaxCurvatureFlowFunction.h:43
itk::FiniteDifferenceFunction< TImage >
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:86
itk::MinMaxCurvatureFlowFunction::DispatchBase
Definition: itkMinMaxCurvatureFlowFunction.h:112