X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FDijkstra.h;h=f4da12311e397fb839c18209c31ff19475a108e0;hb=e832f438861464a8d521464b61be7e31c896adb8;hp=4e5105ca90b65b99dfb2747813af60dae0bfdedd;hpb=b70a564ee2d7bc180b77a05c37ab431ab9c393e7;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/Dijkstra.h b/lib/fpa/Image/Dijkstra.h index 4e5105c..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::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::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,21 @@ 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; + typedef typename Superclass::TEndEvent TEndEvent; + typedef typename Superclass::TEndLoopEvent TEndLoopEvent; + typedef typename Superclass::TAliveEvent TAliveEvent; + typedef typename Superclass::TFrontEvent TFrontEvent; + typedef typename Superclass::TFreezeEvent TFreezeEvent; + + typedef typename Superclass::TStartBacktrackingEvent TStartBacktrackingEvent; + 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; @@ -61,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 @@ -80,7 +96,9 @@ namespace fpa } // ecapseman +#ifndef ITK_MANUAL_INSTANTIATION #include +#endif // ITK_MANUAL_INSTANTIATION #endif // __FPA__IMAGE__DIJKSTRA__H__