ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkBinaryMinMaxCurvatureFlowFunction.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkBinaryMinMaxCurvatureFlowFunction_h
00019 #define __itkBinaryMinMaxCurvatureFlowFunction_h
00020 
00021 #include "itkMinMaxCurvatureFlowFunction.h"
00022 #include "itkMacro.h"
00023 
00024 namespace itk
00025 {
00041 template< class TImage >
00042 class ITK_EXPORT BinaryMinMaxCurvatureFlowFunction:
00043   public MinMaxCurvatureFlowFunction< TImage >
00044 {
00045 public:
00047   typedef BinaryMinMaxCurvatureFlowFunction     Self;
00048   typedef MinMaxCurvatureFlowFunction< TImage > Superclass;
00049   typedef SmartPointer< Self >                  Pointer;
00050   typedef SmartPointer< const Self >            ConstPointer;
00051 
00053   itkNewMacro(Self);
00054 
00056   itkTypeMacro(BinaryMinMaxCurvatureFlowFunction,
00057                MinMaxCurvatureFlowFunction);
00058 
00060   typedef typename Superclass::PixelType        PixelType;
00061   typedef typename Superclass::RadiusType       RadiusType;
00062   typedef typename Superclass::NeighborhoodType NeighborhoodType;
00063   typedef typename Superclass::FloatOffsetType  FloatOffsetType;
00064   typedef typename Superclass::ImageType        ImageType;
00065 
00067   itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
00068 
00070   void SetThreshold(const double thresh)
00071   { m_Threshold = thresh; }
00072   const double & GetThreshold() const
00073   { return m_Threshold; }
00075 
00078   virtual PixelType ComputeUpdate(const NeighborhoodType & neighborhood,
00079                                   void *globalData,
00080                                   const FloatOffsetType & offset = FloatOffsetType(0.0)
00081                                   );
00082 
00083 protected:
00084   BinaryMinMaxCurvatureFlowFunction();
00085   ~BinaryMinMaxCurvatureFlowFunction() {}
00086 private:
00087   BinaryMinMaxCurvatureFlowFunction(const Self &); //purposely not implemented
00088   void operator=(const Self &);                    //purposely not implemented
00089 
00090   double m_Threshold;
00091 };
00092 } // end namespace itk
00093 
00094 #ifndef ITK_MANUAL_INSTANTIATION
00095 #include "itkBinaryMinMaxCurvatureFlowFunction.hxx"
00096 #endif
00097 
00098 #endif
00099