X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FFunctors%2FRegionGrow%2FBinaryThreshold.h;fp=lib%2Ffpa%2FImage%2FFunctors%2FRegionGrow%2FBinaryThreshold.h;h=3acbc5c20cd226822859c64ad5d5b9dd90d6d11e;hb=617f49bff4a6db5ed51b4f767c3634d1915fdced;hp=0000000000000000000000000000000000000000;hpb=14bfa97aef83c54e1cf3813594bd9ae03f23f7f5;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.h b/lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.h new file mode 100644 index 0000000..3acbc5c --- /dev/null +++ b/lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.h @@ -0,0 +1,77 @@ +// ========================================================================= +// @author Leonardo Florez Valencia +// @email florez-l@javeriana.edu.co +// ========================================================================= + +#ifndef __fpa__Image__Functors__RegionGrow__BinaryThreshold__h__ +#define __fpa__Image__Functors__RegionGrow__BinaryThreshold__h__ + +#include + +namespace fpa +{ + namespace Image + { + namespace Functors + { + namespace RegionGrow + { + /** + */ + template< class _TPixel > + class BinaryThreshold + : public itk::FunctionBase< _TPixel, bool > + { + public: + typedef _TPixel TPixel; + + typedef BinaryThreshold Self; + typedef itk::FunctionBase< TPixel, bool > Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; + + public: + itkNewMacro( Self ); + itkTypeMacro( + fpa::Image::Functors::RegionGrow::BinaryThreshold, + itk::FunctionBase + ); + + itkGetConstMacro( Lower, TPixel ); + itkGetConstMacro( Upper, TPixel ); + + itkSetMacro( Lower, TPixel ); + itkSetMacro( Upper, TPixel ); + + public: + virtual bool Evaluate( const TPixel& value ) const override; + + protected: + BinaryThreshold( ); + virtual ~BinaryThreshold( ); + + private: + // Purposely not implemented + BinaryThreshold( const Self& other ); + Self& operator=( const Self& other ); + + protected: + TPixel m_Lower; + TPixel m_Upper; + }; + + } // ecapseman + + } // ecapseman + + } // ecapseman + +} // ecapseman + +#ifndef ITK_MANUAL_INSTANTIATION +# include +#endif // ITK_MANUAL_INSTANTIATION + +#endif // __fpa__Image__Functors__RegionGrow__BinaryThreshold__h__ + +// eof - $RCSfile$