]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Base/SingleSeedInterface.h
...
[FrontAlgorithms.git] / lib / fpa / Base / SingleSeedInterface.h
index 0b2147b24845172b402fa27457017d58f6acfada..807d8d0552cb557818446b85d7941be37fad782e 100644 (file)
@@ -6,10 +6,7 @@
 #ifndef __fpa__Base__SingleSeedInterface__h__
 #define __fpa__Base__SingleSeedInterface__h__
 
-#include <functional>
-#include <set>
-#include <vector>
-
+#include <fpa/Config.h>
 #include <itkConceptChecking.h>
 #include <itkProcessObject.h>
 
@@ -19,57 +16,63 @@ namespace fpa
   {
     /**
      */
-    template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare = std::greater< _TVertex > >
+    template< class _TTraits >
     class SingleSeedInterface
     {
     public:
+      typedef SingleSeedInterface Self;
+      typedef _TTraits            TTraits;
+      fpa_Base_TraitTypes( typename TTraits );
+
+      /* TODO
+         typedef _TVertex       TVertex;
+         typedef _TPoint        TPoint;
+         typedef _TInputValue   TInputValue;
+         typedef _TOutputValue  TOutputValue;
+         typedef _TFrontId      TFrontId;
+         typedef _TCompare      TCompare;
+         typedef SeedsInterface Self;
+
+         struct TSeed
+         {
+         TVertex Vertex;
+         TPoint  Point;
+         bool    IsPoint;
+         bool    IsUnified;
+         TFrontId FrontId;
+         TSeed( )
+         : IsUnified( false ),
+         FrontId( TFrontId( 0 ) )
+         { }
+         };
+         typedef std::vector< TSeed > TSeeds;
+
+         struct TNode
+         {
+         TVertex  Vertex;
+         TVertex  Parent;
+         TFrontId FrontId;
+
+         // Hack to hide the fact that seed values need to be initialized
+         mutable TOutputValue Value;
+         };
+         struct TNodeCompare
+         {
+         bool operator()( const TNode& a, const TNode& b ) const
+         {
+         TCompare cmp;
+         return( cmp( a.Vertex, b.Vertex ) );
+         }
+         };
+         typedef std::set< TNode, TNodeCompare > TNodes;
+      */
+
+    private:
       itkConceptMacro(
         Check_TFrontId,
         ( itk::Concept::IsUnsignedInteger< _TFrontId > )
         );
 
-    public:
-      typedef _TVertex       TVertex;
-      typedef _TPoint        TPoint;
-      typedef _TInputValue   TInputValue;
-      typedef _TOutputValue  TOutputValue;
-      typedef _TFrontId      TFrontId;
-      typedef _TCompare      TCompare;
-      typedef SingleSeedInterface Self;
-
-      struct TSeed
-      {
-        TVertex  Vertex;
-        TPoint   Point;
-        bool     IsPoint;
-        bool     IsUnified;
-        TFrontId FrontId;
-        TSeed( )
-          : IsUnified( false ),
-            FrontId( TFrontId( 0 ) )
-          { }
-      };
-      typedef std::vector< TSeed > TSeeds;
-
-      struct TNode
-      {
-        TVertex  Vertex;
-        TVertex  Parent;
-        TFrontId FrontId;
-
-        // Hack to hide the fact that seed values need to be initialized
-        mutable TOutputValue Value;
-      };
-      struct TNodeCompare
-      {
-        bool operator()( const TNode& a, const TNode& b ) const
-          {
-            TCompare cmp;
-            return( cmp( a.Vertex, b.Vertex ) );
-          }
-      };
-      typedef std::set< TNode, TNodeCompare > TNodes;
-
     public:
       TSeeds& GetSeeds( );
       const TSeeds& GetSeeds( ) const;