X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FMinimumSpanningTree.h;h=4a4e0e62bbbc53ebbc4cd5830ca6ec1d005c144e;hb=d80032f7c6cb6cdfe9f4d85162112e8c190647d5;hp=652547d62debf33c7ecb79d27d809f5f54efb4a6;hpb=db33ebb226fd58f493b7db245fc8b807f895ee6e;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/MinimumSpanningTree.h b/lib/fpa/Image/MinimumSpanningTree.h index 652547d..4a4e0e6 100644 --- a/lib/fpa/Image/MinimumSpanningTree.h +++ b/lib/fpa/Image/MinimumSpanningTree.h @@ -1,8 +1,9 @@ -#ifndef __FPA__IMAGE__MINIMUMSPANNINGTREE__H__ -#define __FPA__IMAGE__MINIMUMSPANNINGTREE__H__ +#ifndef __fpa__Image__MinimumSpanningTree__h__ +#define __fpa__Image__MinimumSpanningTree__h__ -#include #include +#include +#include namespace fpa { @@ -10,35 +11,43 @@ namespace fpa { /** */ - template< class V, class N, class C, unsigned int D, unsigned long L > + template< unsigned int _VDim > class MinimumSpanningTree - : public fpa::Base::MinimumSpanningTree< V, C, itk::Image< N, D > > + : public fpa::Base::MinimumSpanningTree< itk::Index< _VDim >, cpExtensions::DataStructures::PolyLineParametricPath< _VDim >, itk::Image< itk::Offset< _VDim >, _VDim > > { public: - typedef fpa::Base::MinimumSpanningTree< V, C, itk::Image< N, D > > Superclass; - typedef MinimumSpanningTree Self; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; - - typedef V TVertex; - typedef C TCollisions; - - protected: - typedef N _TNode; + typedef itk::Index< _VDim > TVertex; + 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 ); - itkTypeMacro( MinimumSpanningTree, fpa_Base_MinimumSpanningTree ); + itkTypeMacro( + fpa::Image::MinimumSpanningTree, fpa::Base::MinimumSpanningTree + ); + + public: + virtual TVertex GetParent( const TVertex& v ) const fpa_OVERRIDE; + virtual void SetParent( const TVertex& v, const TVertex& p ) fpa_OVERRIDE; + + 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( ); virtual ~MinimumSpanningTree( ); - virtual long _FrontId( const V& v ) const; - virtual V _Parent( const V& v ) const; - private: - // Purposely not implemented + // Purposely not defined MinimumSpanningTree( const Self& other ); Self& operator=( const Self& other ); }; @@ -47,8 +56,10 @@ namespace fpa } // ecapseman -#include +#ifndef ITK_MANUAL_INSTANTIATION +# include +#endif // ITK_MANUAL_INSTANTIATION -#endif // __FPA__IMAGE__MINIMUMSPANNINGTREE__H__ +#endif // __fpa__Image__MinimumSpanningTree__h__ // eof - $RCSfile$