]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Base/Dijkstra.h
CMake updated. Some other filters added.
[FrontAlgorithms.git] / lib / fpa / Base / Dijkstra.h
index 602608eb9973cfbf0849cbd8db594b5b3a2b5d6f..69fe86a798289509fb31557b6927c90dbbd64466 100644 (file)
@@ -14,24 +14,26 @@ namespace fpa
      * @param V  Vertex type.
      * @param C  Vertex value type.
      * @param R  Result value type.
+     * @param S  Space type where vertices are.
      * @param VC Vertex lexicographical compare.
      * @param B  Base class for this algorithm. It should be any itk-based
      *           filter (itk::ProcessObject).
      *
      */
-    template< class V, class C, class R, class VC, class B >
+    template< class V, class C, class R, class S, class VC, class B >
     class Dijkstra
-      : public Algorithm< V, C, R, VC, B >
+      : public Algorithm< V, C, R, S, VC, B >
     {
     public:
       typedef Dijkstra                         Self;
-      typedef Algorithm< V, C, R, VC, B >      Superclass;
+      typedef Algorithm< V, C, R, S, VC, B >   Superclass;
       typedef itk::SmartPointer< Self >        Pointer;
       typedef itk::SmartPointer< const Self >  ConstPointer;
 
       typedef typename Superclass::TVertex              TVertex;
       typedef typename Superclass::TValue               TValue;
       typedef typename Superclass::TResult              TResult;
+      typedef typename Superclass::TSpace               TSpace;
       typedef typename Superclass::TVertexCompare       TVertexCompare;
       typedef typename Superclass::TMinimumSpanningTree TMinimumSpanningTree;
 
@@ -69,6 +71,10 @@ namespace fpa
     public:
       itkTypeMacro( Dijkstra, Algorithm );
 
+      itkBooleanMacro( LocalCosts );
+      itkGetConstMacro( LocalCosts, bool );
+      itkSetMacro( LocalCosts, bool );
+
     protected:
       Dijkstra( );
       virtual ~Dijkstra( );
@@ -92,6 +98,7 @@ namespace fpa
       Self& operator=( const Self& other );
 
     protected:
+      bool m_LocalCosts;
       _TQueue m_Queue;
     };