]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/Mori.h
...
[FrontAlgorithms.git] / lib / fpa / Image / Mori.h
index 21c1748b87be65d4cd4eb2db62b83a34dc43f919..550864d7957de297a6f65bed47e84716af5903fb 100644 (file)
@@ -17,20 +17,20 @@ namespace fpa
   {
     /**
      */
-    template< class _TInputImage, class _TOutputImage, class _TFrontId = unsigned char >
+    template< class _TInputImage, class _TOutputImage >
     class Mori
-      : public fpa::Base::Mori< fpa::Image::Algorithm< _TInputImage, _TOutputImage, fpa::Base::MarksInterface< typename _TInputImage::IndexType >, fpa::Base::SingleSeedInterface< typename _TInputImage::IndexType, typename _TInputImage::PointType, typename _TInputImage::PixelType, typename _TOutputImage::PixelType, _TFrontId, typename _TInputImage::IndexType::LexicographicCompare > > >
+      : public fpa::Base::Mori< fpa::Image::Algorithm< _TInputImage, _TOutputImage, fpa::Base::MarksInterface< typename _TInputImage::IndexType >, fpa::Base::SingleSeedInterface< typename _TInputImage::IndexType, typename _TInputImage::PointType, typename _TInputImage::PixelType, typename _TOutputImage::PixelType, typename _TOutputImage::PixelType, typename _TInputImage::IndexType::LexicographicCompare > > >
     {
     public:
       typedef _TInputImage  TInputImage;
       typedef _TOutputImage TOutputImage;
-      typedef _TFrontId     TFrontId;
 
       typedef typename TInputImage::IndexType        TVertex;
       typedef typename TInputImage::PointType        TPoint;
       typedef typename TVertex::LexicographicCompare TVertexCompare;
       typedef typename TInputImage::PixelType        TInputValue;
       typedef typename TOutputImage::PixelType       TOutputValue;
+      typedef typename TOutputImage::PixelType       TFrontId;
 
       typedef fpa::Base::MarksInterface< TVertex > TMarksInterface;
       typedef fpa::Base::SingleSeedInterface< TVertex, TPoint, TInputValue, TOutputValue, TFrontId, TVertexCompare > TSeedsInterface;
@@ -50,34 +50,32 @@ namespace fpa
       itkTypeMacro( fpa::Image::Mori, fpa::Base::Mori );
 
     public:
-      TMarks* GetOutputLevels( )
-        {
-          return( this->GetMarks( ) );
-        }
-      const TMarks* GetOutputLevels( ) const
-        {
-          return( this->GetMarks( ) );
-        }
+      TOutputImage* GetThresholdedOutput( );
+      const TOutputImage* GetThresholdedOutput( ) const;
 
     protected:
-      Mori( )
-        : Superclass( )
-        {
-        }
-      virtual ~Mori( )
-        {
-        }
+      Mori( );
+      virtual ~Mori( );
+
+      virtual void _AfterGenerateData( ) override;
 
     private:
       // Purposely not implemented.
       Mori( const Self& other );
       Self& operator=( const Self& other );
+
+    protected:
+      unsigned long m_ThresholdedOutputIdx;
     };
 
   } // ecapseman
 
 } // ecapseman
 
+#ifndef ITK_MANUAL_INSTANTIATION
+#  include <fpa/Image/Mori.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+
 #endif // __fpa__Image__Mori__h__
 
 // eof - $RCSfile$