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: 2007/02/07 13:58:42 $
00007   Version:   $Revision: 1.10 $
00008 
00009   Copyright (c) Insight Software 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:
00045 
00047   typedef NeighborhoodBinaryThresholdImageFunction Self;
00048   typedef BinaryThresholdImageFunction<TInputImage,TCoordRep> Superclass;
00049   typedef SmartPointer<Self> Pointer;
00050   typedef SmartPointer<const Self>  ConstPointer;
00051 
00053   itkTypeMacro(NeighborhoodBinaryThresholdImageFunction, BinaryThresholdImageFunction);
00054 
00056   itkNewMacro(Self);
00057 
00059   typedef TInputImage InputImageType;
00060 
00062   typedef typename Superclass::OutputType OutputType;
00063 
00065   typedef typename Superclass::IndexType IndexType;
00066 
00068   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00069 
00071   typedef typename Superclass::PointType PointType;
00072 
00074   typedef typename Superclass::PixelType PixelType;
00075 
00077   itkStaticConstMacro(ImageDimension, unsigned int,
00078                       InputImageType::ImageDimension);
00079 
00081   typedef typename InputImageType::SizeType InputSizeType;
00082 
00084   itkSetMacro(Radius, InputSizeType);
00085 
00087   itkGetConstReferenceMacro(Radius, InputSizeType);
00088 
00090   virtual bool EvaluateAtIndex( const IndexType& index ) const;
00091 
00093   virtual bool Evaluate( const PointType& point ) const
00094     { 
00095       IndexType index;
00096       this->ConvertPointToNearestIndex( point, index );
00097       return this->EvaluateAtIndex( index ); 
00098     }
00099   virtual bool EvaluateAtContinuousIndex( 
00100     const ContinuousIndexType& cindex ) const
00101     { 
00102       IndexType index;
00103       this->ConvertContinuousIndexToNearestIndex( cindex, index );
00104       return this->EvaluateAtIndex( index ) ; 
00105     }
00107 
00108 protected:
00109   NeighborhoodBinaryThresholdImageFunction();
00110   ~NeighborhoodBinaryThresholdImageFunction(){};
00111   void PrintSelf(std::ostream& os, Indent indent) const;
00112 
00113 private:
00114   NeighborhoodBinaryThresholdImageFunction( const Self& ); //purposely not implemented
00115   void operator=( const Self& ); //purposely not implemented
00116 
00117   InputSizeType m_Radius;
00118 };
00119 
00120 } // end namespace itk
00121 
00122 // Define instantiation macro for this template.
00123 #define ITK_TEMPLATE_NeighborhoodBinaryThresholdImageFunction(_, EXPORT, x, y) namespace itk { \
00124   _(2(class EXPORT NeighborhoodBinaryThresholdImageFunction< ITK_TEMPLATE_2 x >)) \
00125   namespace Templates { typedef NeighborhoodBinaryThresholdImageFunction< ITK_TEMPLATE_2 x > \
00126                                          NeighborhoodBinaryThresholdImageFunction##y; } \
00127   }
00128 
00129 #if ITK_TEMPLATE_EXPLICIT
00130 # include "Templates/itkNeighborhoodBinaryThresholdImageFunction+-.h"
00131 #endif
00132 
00133 #if ITK_TEMPLATE_TXX
00134 # include "itkNeighborhoodBinaryThresholdImageFunction.txx"
00135 #endif
00136 
00137 /*
00138 #ifndef ITK_MANUAL_INSTANTIATION
00139 #include "itkNeighborhoodBinaryThresholdImageFunction.txx"
00140 #endif
00141 */
00142 
00143 #endif
00144 
00145 

Generated at Tue Jul 29 21:29:19 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000