X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FFilters%2FImage%2FRandomWalker.h;h=bf5af1142ff466c993baae794fa7fc3c43f183b0;hb=b6c80dbd5be1caf6cbdbfc21d2075021c57d7af2;hp=41fba2c148fecfa6a8a60630cc75f549b8a4f095;hpb=03200c96631e0c6e35b5be9c78d651185efcbdf2;p=FrontAlgorithms.git diff --git a/lib/fpa/Filters/Image/RandomWalker.h b/lib/fpa/Filters/Image/RandomWalker.h index 41fba2c..bf5af11 100644 --- a/lib/fpa/Filters/Image/RandomWalker.h +++ b/lib/fpa/Filters/Image/RandomWalker.h @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace fpa @@ -40,7 +41,7 @@ namespace fpa */ template< class _TInputImage, class _TInputLabels, class _TCostsImage = itk::Image< float, _TInputImage::ImageDimension >, class _TTraits = fpa::Filters::Image::RandomWalkerTraits< _TInputImage, _TInputLabels, _TCostsImage > > class RandomWalker - : public fpa::Filters::Image::Algorithm< fpa::Filters::DijkstraBase< _TTraits > > + : public fpa::Filters::Image::LabelsSeedFilter< fpa::Filters::Image::Algorithm< fpa::Filters::DijkstraBase< _TTraits > >, _TInputLabels > { public: typedef _TInputImage TInputImage; @@ -50,11 +51,11 @@ namespace fpa fpaTraitsMacro( typename, TTraits ); typedef fpa::Filters::DijkstraBase< TTraits > TAlgorithm; - typedef fpa::Filters::Image::Algorithm< TAlgorithm > Superclass; - typedef RandomWalker Self; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; - + typedef fpa::Filters::Image::Algorithm< TAlgorithm > TBase; + typedef fpa::Filters::Image::LabelsSeedFilter< TBase, TInputLabels > Superclass; + typedef RandomWalker Self; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; typedef typename Superclass::TMarksImage TOutputLabels; public: @@ -63,8 +64,6 @@ namespace fpa fpa::Filters::Image::RandomWalker, fpa::Filters::Image::Algorithm ); - fpaFilterInputMacro( InputLabels, TInputLabels ); - public: TCostsImage* GetOutputCosts( ); const TCostsImage* GetOutputCosts( ) const; @@ -80,16 +79,10 @@ namespace fpa RandomWalker( ); virtual ~RandomWalker( ); - virtual const itk::DataObject* _GetReferenceInput( ) const override; - virtual void _PrepareSeeds( const itk::DataObject* input ) override; - private: // Purposely not implemented. RandomWalker( const Self& other ); Self& operator=( const Self& other ); - - protected: - unsigned int m_InputLabelsIdx; }; } // ecapseman