ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkMinMaxCurvatureFlowFunction.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 itkMinMaxCurvatureFlowFunction_h
19 #define itkMinMaxCurvatureFlowFunction_h
20 
23 
24 namespace itk
25 {
41 template< typename TImage >
42 class ITK_TEMPLATE_EXPORT MinMaxCurvatureFlowFunction:
43  public CurvatureFlowFunction< TImage >
44 {
45 public:
51 
53  itkNewMacro(Self);
54 
56  itkTypeMacro(MinMaxCurvatureFlowFunction,
58 
60  typedef typename Superclass::ImageType ImageType;
61  typedef typename Superclass::PixelType PixelType;
65 
67  itkStaticConstMacro(ImageDimension, unsigned int,
68  Superclass::ImageDimension);
69 
72 
74  void SetStencilRadius(const RadiusValueType radius);
75 
77  { return m_StencilRadius; }
78 
81  { return GetRadiusValueType(); }
82 
85  virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood,
86  void *globalData,
87  const FloatOffsetType & offset = FloatOffsetType(0.0)
88  ) ITK_OVERRIDE;
89 
90 protected:
92  ~MinMaxCurvatureFlowFunction() ITK_OVERRIDE {}
93 
96 
99  void InitializeStencilOperator();
100 
101 private:
102  ITK_DISALLOW_COPY_AND_ASSIGN(MinMaxCurvatureFlowFunction);
103 
105 
106  // To control overloaded versions of ComputeThreshold
107  struct DispatchBase {};
108  template< signed int VDimension >
109  struct Dispatch: public DispatchBase {};
110 
113  PixelType ComputeThreshold(const Dispatch< 2 > &,
114  const NeighborhoodType & neighborhood) const;
115 
116  PixelType ComputeThreshold(const Dispatch< 3 > &,
117  const NeighborhoodType & neighborhood) const;
118 
119  PixelType ComputeThreshold(const DispatchBase &,
120  const NeighborhoodType & neighborhood) const;
121 };
122 } // end namespace itk
123 
124 #ifndef ITK_MANUAL_INSTANTIATION
125 #include "itkMinMaxCurvatureFlowFunction.hxx"
126 #endif
127 
128 #endif
Light weight base class for most itk classes.
const RadiusValueType & GetStencilRadius() const
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
unsigned long SizeValueType
Definition: itkIntTypes.h:143
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
Neighborhood< PixelType, itkGetStaticConstMacro(ImageDimension) > StencilOperatorType
This class encapsulate the finite difference equation which drives a curvature flow denoising algorit...
Superclass::NeighborhoodType NeighborhoodType
Superclass::RadiusType RadiusType
const RadiusValueType & GetRadiusValueType() const
CurvatureFlowFunction< TImage > Superclass