X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FMori.h;h=b45db506d2c99d21153398215e4857a1c6daac18;hb=75a965968c4234c08e1ad1700ee5bc8da6362eba;hp=7e6b0e032ce1f779d763893c3600f1010ff1916a;hpb=c9542e420b94b0bfc1f285599f7816eab1191519;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/Mori.h b/lib/fpa/Image/Mori.h index 7e6b0e0..b45db50 100644 --- a/lib/fpa/Image/Mori.h +++ b/lib/fpa/Image/Mori.h @@ -18,52 +18,17 @@ namespace fpa { /** */ - template< class _TInputImage, class _TOutputImage > - class MoriTraits - : public fpa::Image::DefaultTraits< _TInputImage, _TOutputImage, typename _TOutputImage::PixelType > - { - public: - typedef MoriTraits Self; - typedef _TInputImage TInputImage; - typedef _TOutputImage TOutputImage; - typedef typename TOutputImage::PixelType TFrontId; - typedef fpa::Image::DefaultTraits< TInputImage, TOutputImage, TFrontId > Superclass; - - typedef typename Superclass::TVertex TVertex; - typedef typename Superclass::TInputValue TInputValue; - typedef typename Superclass::TPoint TPoint; - typedef typename Superclass::TOutputValue TOutputValue; - typedef typename Superclass::TCompare TCompare; - typedef typename Superclass::TNeighborhood TNeighborhood; - typedef typename Superclass::TFilter TFilter; - - typedef fpa::Base::SingleSeedInterface< TVertex, TPoint, TInputValue, TOutputValue, TFrontId, TCompare > TSeedsInterface; - typedef fpa::Base::MarksInterface< TVertex > TMarksInterface; - - typedef typename TSeedsInterface::TNode TNode; - typedef typename TSeedsInterface::TNodes TNodes; - typedef typename TSeedsInterface::TSeed TSeed; - typedef typename TSeedsInterface::TSeeds TSeeds; - - private: - // Purposely not implemented. - MoriTraits( ); - MoriTraits( const Self& other ); - virtual ~MoriTraits( ); - Self& operator=( const Self& other ); - }; - - /** - */ - template< class _TInputImage, class _TOutputImage > + template< class _TInputImage, class _TOutputImage, class _TTraits = fpa::Image::DefaultTraits< _TInputImage, _TOutputImage, typename _TOutputImage::PixelType > > class Mori - : public fpa::Base::Mori< fpa::Image::Algorithm< fpa::Image::MoriTraits< _TInputImage, _TOutputImage > > > + : public fpa::Base::Mori< fpa::Image::Algorithm< _TTraits, fpa::Base::MarksInterface< _TTraits >, fpa::Base::SingleSeedInterface< _TTraits > > > { public: typedef _TInputImage TInputImage; typedef _TOutputImage TOutputImage; - typedef fpa::Image::MoriTraits< TInputImage, TOutputImage > TTraits; - typedef fpa::Image::Algorithm< TTraits > TAlgorithm; + typedef _TTraits TTraits; + typedef fpa::Base::MarksInterface< _TTraits > TMarksInterface; + typedef fpa::Base::SingleSeedInterface< _TTraits > TSeedsInterface; + typedef fpa::Image::Algorithm< TTraits, TMarksInterface, TSeedsInterface > TAlgorithm; typedef Mori Self; typedef fpa::Base::Mori< TAlgorithm > Superclass;