]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.h
...
[FrontAlgorithms.git] / lib / fpa / Image / Functors / RegionGrow / BinaryThreshold.h
diff --git a/lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.h b/lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.h
new file mode 100644 (file)
index 0000000..3acbc5c
--- /dev/null
@@ -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 <itkFunctionBase.h>
+
+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 <fpa/Image/Functors/RegionGrow/BinaryThreshold.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+
+#endif // __fpa__Image__Functors__RegionGrow__BinaryThreshold__h__
+
+// eof - $RCSfile$