]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/Mori.h
...
[FrontAlgorithms.git] / lib / fpa / Image / Mori.h
index 7e6b0e032ce1f779d763893c3600f1010ff1916a..b45db506d2c99d21153398215e4857a1c6daac18 100644 (file)
@@ -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;