Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkNeighborhoodBinaryThresholdImageFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkNeighborhoodBinaryThresholdImageFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:57:13 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) 2002 Insight Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef _itkNeighborhoodBinaryThresholdImageFunction_h
00018 #define _itkNeighborhoodBinaryThresholdImageFunction_h
00019 
00020 #include "itkBinaryThresholdImageFunction.h"
00021 
00022 namespace itk
00023 {
00024 
00040 template <class TInputImage, class TCoordRep = float >
00041 class ITK_EXPORT NeighborhoodBinaryThresholdImageFunction :
00042   public BinaryThresholdImageFunction< TInputImage, TCoordRep >
00043 {
00044 public:
00046   typedef NeighborhoodBinaryThresholdImageFunction Self;
00047   typedef BinaryThresholdImageFunction<TInputImage,TCoordRep> Superclass;
00048   typedef SmartPointer<Self> Pointer;
00049   typedef SmartPointer<const Self>  ConstPointer;
00050   
00052   itkTypeMacro(NeighborhoodBinaryThresholdImageFunction, BinaryThresholdImageFunction);
00053 
00055   itkNewMacro(Self);
00056 
00058   typedef TInputImage InputImageType;
00059 
00061   typedef typename Superclass::OutputType OutputType;
00062 
00064   typedef typename Superclass::IndexType IndexType;
00065   
00067   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00068 
00070   typedef typename Superclass::PointType PointType;
00071 
00073   typedef typename Superclass::PixelType PixelType;
00074 
00076   itkStaticConstMacro(ImageDimension, unsigned int,
00077                       InputImageType::ImageDimension);
00078 
00080   typedef typename InputImageType::SizeType InputSizeType;
00081 
00083   itkSetMacro(Radius, InputSizeType);
00084 
00086   itkGetConstReferenceMacro(Radius, InputSizeType);
00087 
00089   virtual bool EvaluateAtIndex( const IndexType& index ) const;
00090   
00092   virtual bool Evaluate( const PointType& point ) const
00093     { 
00094       IndexType index;
00095       this->ConvertPointToNearestIndex( point, index );
00096       return this->EvaluateAtIndex( index ); 
00097     }
00098   virtual bool EvaluateAtContinuousIndex( 
00099     const ContinuousIndexType& cindex ) const
00100     { 
00101       IndexType index;
00102       this->ConvertContinuousIndexToNearestIndex( cindex, index );
00103       return this->EvaluateAtIndex( index ) ; 
00104     }
00105   
00106 protected:
00107   NeighborhoodBinaryThresholdImageFunction();
00108   ~NeighborhoodBinaryThresholdImageFunction(){};
00109   void PrintSelf(std::ostream& os, Indent indent) const;
00110 
00111 private:
00112   NeighborhoodBinaryThresholdImageFunction( const Self& ); //purposely not implemented
00113   void operator=( const Self& ); //purposely not implemented
00114 
00115   InputSizeType m_Radius;
00116 };
00117 
00118 } // namespace itk
00119 
00120 #ifndef ITK_MANUAL_INSTANTIATION
00121 #include "itkNeighborhoodBinaryThresholdImageFunction.txx"
00122 #endif
00123 
00124 #endif
00125 

Generated at Wed Mar 12 01:13:08 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000