ITK  4.2.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< class TImage >
42 class ITK_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 
76  const RadiusValueType & GetRadiusValueType() const
77  { return m_StencilRadius; }
78 
81  virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood,
82  void *globalData,
83  const FloatOffsetType & offset = FloatOffsetType(0.0)
84  );
85 
86 protected:
89 
92 
95  void InitializeStencilOperator();
96 
97 private:
98  MinMaxCurvatureFlowFunction(const Self &); //purposely not implemented
99  void operator=(const Self &); //purposely not implemented
100 
102 
103  // To control overloaded versions of ComputeThreshold
104  struct DispatchBase {};
105  template< signed int VDimension >
106  struct Dispatch: public DispatchBase {};
107 
110  virtual PixelType ComputeThreshold(const Dispatch< 2 > &,
111  const NeighborhoodType & neighborhood) const;
112 
113  virtual PixelType ComputeThreshold(const Dispatch< 3 > &,
114  const NeighborhoodType & neighborhood) const;
115 
116  virtual PixelType ComputeThreshold(const DispatchBase &,
117  const NeighborhoodType & neighborhood) const;
118 };
119 } // end namespace itk
120 
121 #ifndef ITK_MANUAL_INSTANTIATION
122 #include "itkMinMaxCurvatureFlowFunction.hxx"
123 #endif
124 
125 #endif
126