]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Filters/Dijkstra.h
...
[FrontAlgorithms.git] / lib / fpa / Filters / Dijkstra.h
index 0a770224eb41a3859eef50c75a52aec690b407bb..9356ed8c1bb6aa2ac2bfe09d5c314a43be79030e 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef __fpa__Filters__Dijkstra__h__
 #define __fpa__Filters__Dijkstra__h__
 
-#include <fpa/Filters/DijkstraBase.h>
+#include <fpa/Filters/RandomWalker.h>
 
 namespace fpa
 {
@@ -13,43 +13,41 @@ namespace fpa
   {
     /**
      */
-    template< class _TTraits, class _TMST >
+    template< class _TDataInterface, class _TMST >
     class Dijkstra
-      : public fpa::Filters::DijkstraBase< _TTraits >
+      : public fpa::Filters::RandomWalker< _TDataInterface >
     {
     public:
-      typedef _TTraits TTraits;
-      typedef _TMST    TMST;
-      fpaTraitsMacro( typename, TTraits );
-
-      typedef fpa::Filters::DijkstraBase< _TTraits > Superclass;
-      typedef Dijkstra                               Self;
-      typedef itk::SmartPointer< Self >              Pointer;
-      typedef itk::SmartPointer< const Self >        ConstPointer;
+      typedef _TDataInterface TDataInterface;
+      typedef _TMST TMST;
+      typedef fpa::Filters::RandomWalker< TDataInterface > Superclass;
+      typedef Dijkstra                                     Self;
+      typedef itk::SmartPointer< Self >                    Pointer;
+      typedef itk::SmartPointer< const Self >              ConstPointer;
+
+      typedef typename Superclass::TTraits TTraits;
+      fpaTraitsMacro( typename TTraits );
+      typedef typename Superclass::TCost  TCost;
+      typedef typename Superclass::TLabel TLabel;
 
       typedef typename Superclass::TScalarWeight TScalarWeight;
       typedef typename Superclass::TVertexWeight TVertexWeight;
 
     public:
-      itkTypeMacro( fpa::Filters::Dijkstra, fpa::Filters::DijkstraBase );
+      itkTypeMacro( fpa::Filters::Dijkstra, fpa::Filters::RandomWalker );
 
       fpaFilterOutputMacro( MinimumSpanningTree, TMST );
 
-
     protected:
       Dijkstra( );
       virtual ~Dijkstra( );
 
       virtual void _AfterGenerateData( ) override;
-      virtual void _UpdateOutputValue( TNode& n ) override;
+      virtual void _PostComputeOutputValue( TNode& n ) override;
 
     private:
-      // Purposely not implemented.
       Dijkstra( const Self& other );
       Self& operator=( const Self& other );
-
-    protected:
-      unsigned int m_MinimumSpanningTreeIdx;
     };
 
   } // ecapseman
@@ -59,6 +57,5 @@ namespace fpa
 #ifndef ITK_MANUAL_INSTANTIATION
 #  include <fpa/Filters/Dijkstra.hxx>
 #endif // ITK_MANUAL_INSTANTIATION
-
 #endif // __fpa__Filters__Dijkstra__h__
 // eof - $RCSfile$