ITK  5.2.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  * 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 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 
59 
61  using ImageType = typename Superclass::ImageType;
62  using PixelType = typename Superclass::PixelType;
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 
92  PixelType
93  ComputeUpdate(const NeighborhoodType & it,
94  void * globalData,
95  const FloatOffsetType & offset = FloatOffsetType(0.0)) override;
96 
97 protected:
99  ~MinMaxCurvatureFlowFunction() override = default;
100 
103 
106  void
107  InitializeStencilOperator();
108 
109 private:
111 
112  // To control overloaded versions of ComputeThreshold
114  {};
115  template <signed int VDimension>
116  struct Dispatch : public DispatchBase
117  {};
118 
121  PixelType
122  ComputeThreshold(const Dispatch<2> &, const NeighborhoodType & it) const;
123 
124  PixelType
125  ComputeThreshold(const Dispatch<3> &, const NeighborhoodType & it) const;
126 
127  PixelType
128  ComputeThreshold(const DispatchBase &, const NeighborhoodType & it) const;
129 };
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 # include "itkMinMaxCurvatureFlowFunction.hxx"
134 #endif
135 
136 #endif
itk::FiniteDifferenceFunction< TImage >::RadiusType
typename ConstNeighborhoodIterator< TImage >::RadiusType RadiusType
Definition: itkFiniteDifferenceFunction.h:97
itk::MinMaxCurvatureFlowFunction::m_StencilRadius
RadiusValueType m_StencilRadius
Definition: itkMinMaxCurvatureFlowFunction.h:110
itk::CurvatureFlowFunction::NeighborhoodType
typename Superclass::NeighborhoodType NeighborhoodType
Definition: itkCurvatureFlowFunction.h:67
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::CurvatureFlowFunction::RadiusType
typename Superclass::RadiusType RadiusType
Definition: itkCurvatureFlowFunction.h:64
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:59
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::MinMaxCurvatureFlowFunction::m_StencilOperator
StencilOperatorType m_StencilOperator
Definition: itkMinMaxCurvatureFlowFunction.h:102
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::CurvatureFlowFunction::ImageType
typename Superclass::ImageType ImageType
Definition: itkCurvatureFlowFunction.h:62
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:116
itk::MinMaxCurvatureFlowFunction::GetRadiusValueType
const RadiusValueType & GetRadiusValueType() const
Definition: itkMinMaxCurvatureFlowFunction.h:78
itk::CurvatureFlowFunction::FloatOffsetType
typename Superclass::FloatOffsetType FloatOffsetType
Definition: itkCurvatureFlowFunction.h:69
itk::MinMaxCurvatureFlowFunction
Definition: itkMinMaxCurvatureFlowFunction.h:43
itk::FiniteDifferenceFunction< TImage >
itk::MinMaxCurvatureFlowFunction::PixelType
typename Superclass::PixelType PixelType
Definition: itkMinMaxCurvatureFlowFunction.h:62
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::MinMaxCurvatureFlowFunction::DispatchBase
Definition: itkMinMaxCurvatureFlowFunction.h:113