X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FDijkstra.h;h=f4da12311e397fb839c18209c31ff19475a108e0;hb=e832f438861464a8d521464b61be7e31c896adb8;hp=48d7a79b8bf026385a88a35c176033c48439e284;hpb=6fcc9fc78c44fa789bf092e2897cb6b391259b42;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/Dijkstra.h b/lib/fpa/Image/Dijkstra.h index 48d7a79..f4da123 100644 --- a/lib/fpa/Image/Dijkstra.h +++ b/lib/fpa/Image/Dijkstra.h @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace fpa @@ -15,13 +16,12 @@ namespace fpa * @param I Input image type * @param O Output image type */ - template< class I, class O > + template< class I, class O = I > class Dijkstra - : public Algorithm< I, O, fpa::Base::Dijkstra< typename I::IndexType, typename I::PixelType, typename O::PixelType, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, O > > > + : public Algorithm< I, O, fpa::Base::Dijkstra< typename I::IndexType, typename I::PixelType, typename O::PixelType, I, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, fpa::Image::MinimumSpanningTree< I::ImageDimension >, itk::ImageToImageFilter< I, O > > > { public: - typedef fpa::Base::Dijkstra< typename I::IndexType, typename I::PixelType, typename O::PixelType, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, O > > TBaseAlgorithm; - + typedef fpa::Base::Dijkstra< typename I::IndexType, typename I::PixelType, typename O::PixelType, I, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, fpa::Image::MinimumSpanningTree< I::ImageDimension >, itk::ImageToImageFilter< I, O > > TBaseAlgorithm; typedef Dijkstra Self; typedef Algorithm< I, O, TBaseAlgorithm > Superclass; typedef itk::SmartPointer< Self > Pointer; @@ -32,6 +32,7 @@ namespace fpa typedef typename Superclass::TVertex TVertex; typedef typename Superclass::TValue TValue; typedef typename Superclass::TResult TResult; + typedef typename Superclass::TSpace TSpace; typedef typename Superclass::TStartEvent TStartEvent; typedef typename Superclass::TStartLoopEvent TStartLoopEvent; @@ -45,6 +46,8 @@ namespace fpa typedef typename Superclass::TEndBacktrackingEvent TEndBacktrackingEvent; typedef typename Superclass::TBacktrackingEvent TBacktrackingEvent; + typedef typename TBaseAlgorithm::TMinimumSpanningTree TMinimumSpanningTree; + typedef fpa::Image::Functors::ImageCostFunction< TInputImage, TResult > TCostFunction; typedef itk::FunctionBase< TResult, TResult > TConversionFunction; @@ -73,10 +76,11 @@ namespace fpa Dijkstra( ); virtual ~Dijkstra( ); - virtual TResult _Cost( const TVertex& v, const TVertex& p ) const; + virtual TResult _Cost( const TVertex& v, const TVertex& p ) const ITK_OVERRIDE; - virtual void _BeforeGenerateData( ); - virtual void _InitResults( ); + virtual void _BeforeGenerateData( ) ITK_OVERRIDE; + virtual void _AfterGenerateData( ) ITK_OVERRIDE; + virtual void _InitResults( ) ITK_OVERRIDE; private: // Purposely not implemented @@ -92,7 +96,9 @@ namespace fpa } // ecapseman +#ifndef ITK_MANUAL_INSTANTIATION #include +#endif // ITK_MANUAL_INSTANTIATION #endif // __FPA__IMAGE__DIJKSTRA__H__