]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Functors/VertexFunction.h
...
[FrontAlgorithms.git] / lib / fpa / Functors / VertexFunction.h
diff --git a/lib/fpa/Functors/VertexFunction.h b/lib/fpa/Functors/VertexFunction.h
new file mode 100644 (file)
index 0000000..43fd538
--- /dev/null
@@ -0,0 +1,59 @@
+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
+#ifndef __fpa__Functors__VertexFunction__h__
+#define __fpa__Functors__VertexFunction__h__
+
+#include <fpa/Functors/BaseVertexFunction.h>
+
+namespace fpa
+{
+  namespace Functors
+  {
+    /**
+     */
+    template< class _TVertex, class _TValue >
+    class VertexFunction
+      : public fpa::Functors::BaseVertexFunction< _TVertex >
+    {
+    public:
+      typedef _TVertex TVertex;
+      typedef _TValue  TValue;
+      typedef fpa::Functors::BaseVertexFunction< TVertex > Superclass;
+      typedef VertexFunction                               Self;
+      typedef itk::SmartPointer< Self >                    Pointer;
+      typedef itk::SmartPointer< const Self >              ConstPointer;
+
+    public:
+      itkTypeMacro(
+        fpa::Functors::VertexFunction, fpa::Functors::BaseVertexFunction
+        );
+
+    public:
+      virtual TValue Evaluate(
+        const TVertex& vertex, const TVertex& parent
+        ) const = 0;
+
+    protected:
+      VertexFunction( )
+        : Superclass( )
+        {
+        }
+
+      virtual ~VertexFunction( )
+        {
+        }
+
+    private:
+      // Purposely not implemented.
+      VertexFunction( const Self& other );
+      Self& operator=( const Self& other );
+    };
+
+  } // ecapseman
+
+} // ecapseman
+
+#endif // __fpa__Functors__VertexFunction__h__
+// eof - $RCSfile$