]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.hxx
...
[FrontAlgorithms.git] / lib / fpa / Image / Functors / RegionGrow / BinaryThreshold.hxx
diff --git a/lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.hxx b/lib/fpa/Image/Functors/RegionGrow/BinaryThreshold.hxx
new file mode 100644 (file)
index 0000000..4184e03
--- /dev/null
@@ -0,0 +1,39 @@
+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
+
+#ifndef __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__
+#define __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__
+
+// -------------------------------------------------------------------------
+template< class _TPixel >
+bool fpa::Image::Functors::RegionGrow::BinaryThreshold< _TPixel >::
+Evaluate( const TPixel& value ) const
+{
+  return( this->m_Lower < value && value < this->m_Upper );
+}
+
+// -------------------------------------------------------------------------
+template< class _TPixel >
+fpa::Image::Functors::RegionGrow::BinaryThreshold< _TPixel >::
+BinaryThreshold( )
+  : Superclass( )
+{
+  this->m_Upper = std::numeric_limits< TPixel >::max( );
+  if( std::numeric_limits< TPixel >::is_integer )
+    this->m_Lower = std::numeric_limits< TPixel >::min( );
+  else
+    this->m_Lower = -this->m_Upper;
+}
+
+// -------------------------------------------------------------------------
+template< class _TPixel >
+fpa::Image::Functors::RegionGrow::BinaryThreshold< _TPixel >::
+~BinaryThreshold( )
+{
+}
+
+#endif // __fpa__Image__Functors__RegionGrow__BinaryThreshold__hxx__
+
+// eof - $RCSfile$