Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkBinaryThresholdSpatialFunction_h
00018 #define __itkBinaryThresholdSpatialFunction_h
00019
00020 #include "itkSpatialFunction.h"
00021 #include "itkImageBase.h"
00022
00023 namespace itk
00024 {
00025
00040 template <typename TFunction>
00041 class ITK_EXPORT BinaryThresholdSpatialFunction :
00042 public SpatialFunction< bool,
00043 ::itk::GetImageDimension<TFunction>::ImageDimension,
00044 ITK_TYPENAME TFunction::InputType >
00045 {
00046 public:
00048 typedef BinaryThresholdSpatialFunction Self;
00049 typedef SpatialFunction< bool,
00050 ::itk::GetImageDimension<TFunction>::ImageDimension,
00051 ITK_TYPENAME TFunction::InputType > Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00056 itkTypeMacro(BinaryThresholdSpatialFunction, SpatialFunction);
00057
00059 itkNewMacro( Self );
00060
00062 typedef typename Superclass::OutputType OutputType;
00063
00065 typedef typename TFunction::InputType InputType;
00066
00068 typedef TFunction FunctionType;
00069
00071 typedef typename TFunction::OutputType FunctionOutputType;
00072
00074 itkSetMacro( LowerThreshold, FunctionOutputType );
00075 itkGetConstReferenceMacro( LowerThreshold, FunctionOutputType );
00077
00079 itkSetMacro( UpperThreshold, FunctionOutputType );
00080 itkGetConstReferenceMacro( UpperThreshold, FunctionOutputType );
00082
00084 itkSetObjectMacro( Function, FunctionType );
00085 itkGetConstObjectMacro( Function, FunctionType );
00087
00089 virtual OutputType Evaluate( const InputType& point ) const;
00090
00091 protected:
00092
00093 BinaryThresholdSpatialFunction();
00094 ~BinaryThresholdSpatialFunction();
00095 void PrintSelf(std::ostream& os, Indent indent) const;
00096
00097 FunctionOutputType m_LowerThreshold;
00098 FunctionOutputType m_UpperThreshold;
00099 typename FunctionType::Pointer m_Function;
00100
00101 private:
00102 BinaryThresholdSpatialFunction( const Self& );
00103 void operator=( const Self& );
00104
00105 };
00106
00107 }
00108
00109 #ifndef ITK_MANUAL_INSTANTIATION
00110 #include "itkBinaryThresholdSpatialFunction.txx"
00111 #endif
00112
00113 #endif
00114