]> Creatis software - FrontAlgorithms.git/blobdiff - libs/fpa/Image/Functors/RegionGrow/BinaryThreshold.h
...
[FrontAlgorithms.git] / libs / fpa / Image / Functors / RegionGrow / BinaryThreshold.h
index 70ac8d0027e8bca7c218a5c1cc11aeb493255590..3acbc5c20cd226822859c64ad5d5b9dd90d6d11e 100644 (file)
@@ -1,8 +1,12 @@
+// =========================================================================
+// @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
 {
@@ -14,35 +18,33 @@ 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( );