+// =========================================================================
+// @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 <fpa/Image/Functors/Base.h>
-#include <fpa/Base/Functors/RegionGrow/Base.h>
+#include <itkFunctionBase.h>
namespace fpa
{
{
/**
*/
- template< class _TImage, class _TOutput >
+ template< class _TPixel >
class BinaryThreshold
- : public fpa::Image::Functors::Base< _TImage, fpa::Base::Functors::RegionGrow::Base< typename _TImage::IndexType, _TOutput > >
+ : public itk::FunctionBase< _TPixel, bool >
{
public:
- typedef _TImage TImage;
- typedef _TOutput TOutput;
- typedef typename TImage::IndexType TIndex;
- typedef typename TImage::PixelType TPixel;
+ typedef _TPixel TPixel;
- typedef fpa::Base::Functors::RegionGrow::Base< TIndex, TOutput > TBase;
- typedef fpa::Image::Functors::Base< TImage, TBase > Superclass;
- typedef BinaryThreshold Self;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
+ typedef BinaryThreshold Self;
+ typedef itk::FunctionBase< TPixel, bool > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
public:
itkNewMacro( Self );
- itkTypeMacro( BinaryThreshold, Base );
+ itkTypeMacro(
+ fpa::Image::Functors::RegionGrow::BinaryThreshold,
+ itk::FunctionBase
+ );
itkGetConstMacro( Lower, TPixel );
itkGetConstMacro( Upper, TPixel );
+
itkSetMacro( Lower, TPixel );
itkSetMacro( Upper, TPixel );
public:
- virtual TOutput Evaluate(
- const TIndex& a, const TIndex& b
- ) const override;
+ virtual bool Evaluate( const TPixel& value ) const override;
protected:
BinaryThreshold( );