]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Base/SeedsInterface.h
...
[FrontAlgorithms.git] / lib / fpa / Base / SeedsInterface.h
index cfc1bd568e505af2aba29ef173dccf8bc70d9a0a..d556f3aed3017b78411d48d12aabeff3188f8192 100644 (file)
@@ -6,8 +6,9 @@
 #ifndef __fpa__Base__SeedsInterface__h__
 #define __fpa__Base__SeedsInterface__h__
 
+#include <fpa/Config.h>
+#include <itkConceptChecking.h>
 #include <itkProcessObject.h>
-#include <set>
 
 namespace fpa
 {
@@ -15,29 +16,35 @@ namespace fpa
   {
     /**
      */
-    template< class _TVertex, class _TCompare >
+    template< class _TTraits >
     class SeedsInterface
     {
     public:
-      typedef _TVertex  TVertex;
-      typedef _TCompare TCompare;
       typedef SeedsInterface Self;
-      typedef std::set< TVertex, TCompare > TSeeds;
+      typedef _TTraits       TTraits;
+      fpa_Base_TraitTypes( typename TTraits );
+
+    private:
+      itkConceptMacro(
+        Check_TFrontId,
+        ( itk::Concept::IsUnsignedInteger< TFrontId > )
+        );
 
     public:
-      unsigned int GetNumberOfSeeds( ) const;
+      TSeeds& GetSeeds( );
       const TSeeds& GetSeeds( ) const;
-      typename TSeeds::const_iterator BeginSeeds( ) const;
-      typename TSeeds::const_iterator EndSeeds( ) const;
 
-      void AddSeed( const TVertex& seed );
-      void RemoveSeed( const TVertex& seed );
-      void ClearSeeds( );
+      virtual void AddSeed( const TVertex& seed );
+      virtual void AddSeed( const TPoint& seed );
+      virtual void ClearSeeds( );
 
     protected:
       SeedsInterface( itk::ProcessObject* filter );
       virtual ~SeedsInterface( );
 
+      virtual TNodes _UnifySeeds( ) = 0;
+      virtual void _PrepareSeeds( TNodes& nodes ) = 0;
+
     protected:
       TSeeds m_Seeds;
       itk::ProcessObject* m_Filter;