Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __itkLimiterFunctionBase_h
00016 #define __itkLimiterFunctionBase_h
00017
00018 #include "itkFunctionBase.h"
00019 #include "itkExceptionObject.h"
00020
00021
00022 namespace itk
00023 {
00024
00047 template < class TInput, unsigned int NDimension >
00048 class LimiterFunctionBase :
00049 public FunctionBase<TInput, ITK_TYPENAME NumericTraits<TInput>::RealType>
00050 {
00051 public:
00053 typedef LimiterFunctionBase Self;
00054 typedef FunctionBase< TInput,
00055 typename NumericTraits< TInput >::RealType > Superclass;
00056 typedef SmartPointer<Self> Pointer;
00057 typedef SmartPointer<const Self> ConstPointer;
00058
00060 itkTypeMacro( LimiterFunctionBase, FunctionBase );
00061
00062 itkStaticConstMacro( Dimension, unsigned int, NDimension );
00063
00065 typedef typename Superclass::InputType InputType;
00066 typedef typename Superclass::OutputType OutputType;
00067
00068 typedef OutputType DerivativeValueType;
00069 typedef CovariantVector<
00070 DerivativeValueType,
00071 itkGetStaticConstMacro(Dimension)> DerivativeType;
00072
00074 virtual OutputType Evaluate( const InputType & input ) const = 0;
00075
00077 virtual OutputType Evaluate( const InputType & input, DerivativeType & derivative) const = 0;
00078
00081 itkSetMacro( UpperBound, OutputType );
00082 itkGetConstMacro( UpperBound, OutputType );
00083
00086 itkSetMacro( LowerBound, OutputType );
00087 itkGetConstMacro( LowerBound, OutputType );
00088
00091 itkSetMacro( UpperThreshold, InputType );
00092 itkGetConstMacro( UpperThreshold, InputType );
00093
00096 itkSetMacro( LowerThreshold, InputType );
00097 itkGetConstMacro( LowerThreshold, InputType );
00098
00100 virtual void Initialize( void ) throw (ExceptionObject) {};
00101
00102 protected:
00103 LimiterFunctionBase()
00104 {
00105 this->m_UpperBound =
00106 itk::NumericTraits<OutputType>::One +
00107 itk::NumericTraits<OutputType>::One;
00108 this->m_LowerBound = itk::NumericTraits<OutputType>::Zero;
00109 this->m_UpperThreshold = itk::NumericTraits<InputType>::One;
00110 this->m_LowerThreshold = itk::NumericTraits<InputType>::One;
00111 };
00112 ~LimiterFunctionBase(){};
00113
00114 OutputType m_UpperBound;
00115 OutputType m_LowerBound;
00116 InputType m_UpperThreshold;
00117 InputType m_LowerThreshold;
00118
00119 private:
00120 LimiterFunctionBase(const Self& );
00121 void operator=(const Self& );
00122
00123 };
00124
00125 }
00126
00127 #endif