From: Leonardo Flórez-Valencia Date: Wed, 19 Jul 2017 02:19:54 +0000 (-0500) Subject: ... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=4718fa5cbf776b532e8a422a48c1d0d788755ce1;p=FrontAlgorithms.git ... --- diff --git a/lib/fpa/Image/RandomWalker.h b/lib/fpa/Image/RandomWalker.h index aba7d84..98b9492 100644 --- a/lib/fpa/Image/RandomWalker.h +++ b/lib/fpa/Image/RandomWalker.h @@ -12,6 +12,7 @@ #include #include #include +#include namespace fpa { @@ -67,34 +68,25 @@ namespace fpa template< class _TInputImage, class _TLabelImage, class _TScalar > class RandomWalker : public fpa::Base::DijkstraBase< fpa::Image::Algorithm< fpa::Image::RandomWalkerTraits< _TInputImage, _TLabelImage, _TScalar > > > - /* TODO - : public fpa::Base::DijkstraBase< fpa::Image::Algorithm< _TInputImage, itk::Image< _TScalar, _TInputImage::ImageDimension >, fpa::Base::MarksInterface< typename _TInputImage::IndexType >, fpa::Image::LabelledSeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::PointType, typename _TInputImage::PixelType, _TScalar, typename _TLabelImage::PixelType, typename _TInputImage::IndexType::LexicographicCompare > > > - */ { public: - /* TODO - typedef _TInputImage TInputImage; - typedef _TLabelImage TLabelImage; - typedef _TScalar TScalar; - typedef typename TInputImage::IndexType TVertex; - typedef typename TInputImage::PointType TPoint; - typedef typename TVertex::LexicographicCompare TVertexCompare; - typedef typename TInputImage::PixelType TInputValue; - typedef typename TLabelImage::PixelType TFrontId; - - typedef itk::Image< TScalar, _TInputImage::ImageDimension > TOutputImage; - typedef fpa::Base::MarksInterface< TVertex > TMarksInterface; - typedef fpa::Image::LabelledSeedsInterface< TVertex, TPoint, TInputValue, _TScalar, TFrontId, TVertexCompare > TSeedsInterface; - typedef fpa::Image::Algorithm< _TInputImage, TOutputImage, TMarksInterface, TSeedsInterface > TAlgorithm; - typedef RandomWalker Self; - typedef fpa::Base::DijkstraBase< TAlgorithm > Superclass; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; - - typedef fpa::Image::Functors::Dijkstra::Function< TInputImage, TScalar > TWeightFunction; - typedef typename TSeedsInterface::TNode TNode; - typedef typename TSeedsInterface::TNodes TNodes; - */ + typedef _TInputImage TInputImage; + typedef _TLabelImage TLabelImage; + typedef _TScalar TScalar; + + typedef fpa::Image::RandomWalkerTraits< TInputImage, TLabelImage, TScalar > TTraits; + typedef fpa::Image::Algorithm< TTraits > TAlgorithm; + typedef fpa::Base::DijkstraBase< TAlgorithm > Superclass; + typedef RandomWalker Self; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; + + typedef typename TTraits::TNode TNode; + typedef typename TTraits::TNodes TNodes; + typedef typename TTraits::TSeed TSeed; + typedef typename TTraits::TVertex TVertex; + + typedef fpa::Image::Functors::Dijkstra::Function< TInputImage, TScalar > TWeightFunction; public: itkNewMacro( Self ); diff --git a/lib/fpa/Image/RandomWalker.hxx b/lib/fpa/Image/RandomWalker.hxx index 21abc08..6935abf 100644 --- a/lib/fpa/Image/RandomWalker.hxx +++ b/lib/fpa/Image/RandomWalker.hxx @@ -102,7 +102,7 @@ _UnifySeeds( ) if( !is_seed ) { - typename TSeedsInterface::TNode node; + TNode node; node.Vertex = lIt.GetIndex( ); node.Parent = lIt.GetIndex( ); node.FrontId = lIt.Get( ); @@ -112,7 +112,7 @@ _UnifySeeds( ) } else { - typename TSeedsInterface::TSeed seed; + TSeed seed; seed.Vertex = lIt.GetIndex( ); seed.IsPoint = false; seed.FrontId = lIt.Get( );