]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/MinimumSpanningTree.h
...
[FrontAlgorithms.git] / lib / fpa / Image / MinimumSpanningTree.h
index 371664c3b10b9e7e0eca1f9b89b5f917086e70ef..7d3941d23bbe57d904389af0161cffb74002f20a 100644 (file)
@@ -2,6 +2,7 @@
 #define __fpa__Image__MinimumSpanningTree__h__
 
 #include <fpa/Base/MinimumSpanningTree.h>
+#include <cpExtensions/DataStructures/PolyLineParametricPath.h>
 #include <itkImage.h>
 
 namespace fpa
@@ -12,20 +13,17 @@ namespace fpa
      */
     template< unsigned int _VDim >
     class MinimumSpanningTree
-      : public fpa::Base::MinimumSpanningTree< itk::Index< _VDim >, itk::Image< itk::Offset< _VDim >, _VDim > >
+      : public fpa::Base::MinimumSpanningTree< itk::Index< _VDim >, cpExtensions::DataStructures::PolyLineParametricPath< _VDim >, itk::Image< itk::Offset< _VDim >, _VDim > >
     {
     public:
       typedef itk::Index< _VDim >                               TVertex;
-      typedef itk::Offset< _VDim >                              TOffset;
-      typedef itk::Image< TOffset, _VDim >                      TImage;
-      typedef fpa::Base::MinimumSpanningTree< TVertex, TImage > Superclass;
-      typedef MinimumSpanningTree                               Self;
-      typedef itk::SmartPointer< Self >                         Pointer;
-      typedef itk::SmartPointer< const Self >                   ConstPointer;
-
-      typedef typename Superclass::TVertices TVertices;
-      typedef typename TImage::PointType TPoint;
-      typedef std::deque< TPoint > TPoints;
+      typedef cpExtensions::DataStructures::PolyLineParametricPath< _VDim > TPath;
+      typedef itk::Offset< _VDim >                                     TOffset;
+      typedef itk::Image< TOffset, _VDim >                             TImage;
+      typedef fpa::Base::MinimumSpanningTree< TVertex, TPath, TImage > Superclass;
+      typedef MinimumSpanningTree                                      Self;
+      typedef itk::SmartPointer< Self >                                Pointer;
+      typedef itk::SmartPointer< const Self >                          ConstPointer;
 
     public:
       itkNewMacro( Self );
@@ -34,11 +32,15 @@ namespace fpa
         );
 
     public:
-      virtual TVertex GetParent( const TVertex& v ) const fpa_OVERRIDE;
-      virtual void SetParent( const TVertex& v, const TVertex& p ) fpa_OVERRIDE;
+      virtual TVertex GetParent( const TVertex& v ) const override;
+      virtual void SetParent( const TVertex& v, const TVertex& p ) override;
 
-      TPoints GetEuclideanPath( const TVertex& a ) const;
-      TPoints GetEuclideanPath( const TVertex& a, const TVertex& b ) const;
+      virtual void GetPath(
+        typename TPath::Pointer& path, const TVertex& a
+        ) const override;
+      virtual void GetPath(
+        typename TPath::Pointer& path, const TVertex& a, const TVertex& b
+        ) const override;
 
     protected:
       MinimumSpanningTree( );