]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/MinimumSpanningTree.h
...
[FrontAlgorithms.git] / lib / fpa / Image / MinimumSpanningTree.h
index a93157cac6acb00c3b4d524f66d12e66981af8db..22f7904f5b28549cbf5c619076ee06ffdfe69c50 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <fpa/Base/MinimumSpanningTree.h>
 #include <itkImage.h>
+#include <fpa/Image/PolyLineParametricPath.h>
 
 namespace fpa
 {
@@ -33,6 +34,8 @@ namespace fpa
       typedef typename Superclass::TCollisions    TCollisions;
       typedef typename Superclass::TVertices      TVertices;
 
+      typedef fpa::Image::PolyLineParametricPath< _VDim > TPolyLineParametricPath;
+
     public:
       itkNewMacro( Self );
       itkTypeMacro(
@@ -41,21 +44,21 @@ namespace fpa
         );
 
     public:
-      virtual TVertex GetParent( const TVertex& v ) const override
-        {
-          return( v + this->GetPixel( v ) );
-        }
-      virtual void SetParent( const TVertex& v, const TVertex& p ) override
-        {
-          this->SetPixel( v, p - v );
-        }
+      virtual TVertex GetParent( const TVertex& v ) const override;
+      virtual void SetParent( const TVertex& v, const TVertex& p ) override;
+
+      void GetPolyLineParametricPath(
+        typename TPolyLineParametricPath::Pointer& path,
+        const TVertex& a
+        ) const;
+      void GetPolyLineParametricPath(
+        typename TPolyLineParametricPath::Pointer& path,
+        const TVertex& a, const TVertex& b
+        ) const;
 
     protected:
-      MinimumSpanningTree( )
-        : Superclass( )
-        { }
-      virtual ~MinimumSpanningTree( )
-        { }
+      MinimumSpanningTree( );
+      virtual ~MinimumSpanningTree( );
 
     private:
       MinimumSpanningTree( const Self& other );
@@ -66,6 +69,10 @@ namespace fpa
 
 } // ecapseman
 
+#ifndef ITK_MANUAL_INSTANTIATION
+#  include <fpa/Image/MinimumSpanningTree.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+
 #endif // __fpa__Image__MinimumSpanningTree__h__
 
 // eof - $RCSfile$