00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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& );
00113
void operator=(
const Self& );
00114
00115
InputSizeType m_Radius;
00116 };
00117
00118 }
00119
00120
#ifndef ITK_MANUAL_INSTANTIATION
00121
#include "itkNeighborhoodBinaryThresholdImageFunction.txx"
00122
#endif
00123
00124
#endif
00125