X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FMinimumSpanningTree.h;h=4a4e0e62bbbc53ebbc4cd5830ca6ec1d005c144e;hb=a993dd7dc7f3154d00eed3d3a4796fb9e3ff582d;hp=371664c3b10b9e7e0eca1f9b89b5f917086e70ef;hpb=ea46079b5aef76c1782648ed23e70ea944649635;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/MinimumSpanningTree.h b/lib/fpa/Image/MinimumSpanningTree.h index 371664c..4a4e0e6 100644 --- a/lib/fpa/Image/MinimumSpanningTree.h +++ b/lib/fpa/Image/MinimumSpanningTree.h @@ -2,6 +2,7 @@ #define __fpa__Image__MinimumSpanningTree__h__ #include +#include #include 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 ); @@ -37,8 +35,12 @@ namespace fpa virtual TVertex GetParent( const TVertex& v ) const fpa_OVERRIDE; virtual void SetParent( const TVertex& v, const TVertex& p ) fpa_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 fpa_OVERRIDE; + virtual void GetPath( + typename TPath::Pointer& path, const TVertex& a, const TVertex& b + ) const fpa_OVERRIDE; protected: MinimumSpanningTree( );