ITK  4.6.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 >
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,
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  );
89 
90 protected:
93 
96 
100 
101 private:
102  MinMaxCurvatureFlowFunction(const Self &); //purposely not implemented
103  void operator=(const Self &); //purposely not implemented
104 
106 
107  // To control overloaded versions of ComputeThreshold
108  struct DispatchBase {};
109  template< signed int VDimension >
110  struct Dispatch: public DispatchBase {};
111 
114  virtual PixelType ComputeThreshold(const Dispatch< 2 > &,
115  const NeighborhoodType & neighborhood) const;
116 
117  virtual PixelType ComputeThreshold(const Dispatch< 3 > &,
118  const NeighborhoodType & neighborhood) const;
119 
120  virtual PixelType ComputeThreshold(const DispatchBase &,
121  const NeighborhoodType & neighborhood) const;
122 };
123 } // end namespace itk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 #include "itkMinMaxCurvatureFlowFunction.hxx"
127 #endif
128 
129 #endif
Light weight base class for most itk classes.
const RadiusValueType & GetStencilRadius() const
virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0))
virtual PixelType ComputeThreshold(const Dispatch< 2 > &, const NeighborhoodType &neighborhood) const
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
unsigned long SizeValueType
Definition: itkIntTypes.h:143
static const unsigned int ImageDimension
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
void SetStencilRadius(const RadiusValueType radius)
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