]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/MoriRegionGrow.h
...
[FrontAlgorithms.git] / lib / fpa / Image / MoriRegionGrow.h
index 57085825705893cf0cfd7c710d157d888a9b518a..182e004ba04e7cdc35ea34417a8dfc087ea338f2 100644 (file)
@@ -1,8 +1,15 @@
+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
+
 #ifndef __fpa__Image__MoriRegionGrow__h__
 #define __fpa__Image__MoriRegionGrow__h__
 
 #include <fpa/Base/MoriRegionGrow.h>
-#include <fpa/Image/Algorithm.h>
+#include <fpa/Base/SeedsInterface.h>
+#include <fpa/Image/MarksInterface.h>
+#include <fpa/Image/Filter.h>
 
 namespace fpa
 {
@@ -12,32 +19,29 @@ namespace fpa
      */
     template< class _TInputImage, class _TOutputImage >
     class MoriRegionGrow
-      : public fpa::Base::MoriRegionGrow< fpa::Image::Algorithm< _TInputImage, _TOutputImage > >
+      : public fpa::Base::MoriRegionGrow< fpa::Image::Filter< _TInputImage, _TOutputImage >, fpa::Image::MarksInterface< _TInputImage::ImageDimension >, fpa::Base::SeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::IndexType::LexicographicCompare > >
     {
     public:
-      typedef fpa::Image::Algorithm< _TInputImage, _TOutputImage > TAlgorithm;
-      typedef MoriRegionGrow                          Self;
-      typedef fpa::Base::MoriRegionGrow< TAlgorithm > Superclass;
-      typedef itk::SmartPointer< Self >           Pointer;
-      typedef itk::SmartPointer< const Self >     ConstPointer;
-
-      typedef typename Superclass::TOutput TOutput;
-      typedef typename Superclass::TVertex TVertex;
+      // Interfaces
+      typedef fpa::Image::Filter< _TInputImage, _TOutputImage > TFilter;
+      typedef fpa::Image::MarksInterface< _TInputImage::ImageDimension > TMarksInterface;
+      typedef fpa::Base::SeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::IndexType::LexicographicCompare > TSeedsInterface;
 
-      typedef fpa::Image::Functors::Base< _TInputImage, typename Superclass::TGrowFunction > TGrowFunction;
+      // Smart pointers
+      typedef MoriRegionGrow Self;
+      typedef fpa::Base::MoriRegionGrow< TFilter, TMarksInterface, TSeedsInterface > Superclass;
+      typedef itk::SmartPointer< Self > Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
 
     public:
       itkNewMacro( Self );
       itkTypeMacro( fpa::Image::MoriRegionGrow, fpa::Base::MoriRegionGrow );
 
     protected:
-      MoriRegionGrow( );
-      virtual ~MoriRegionGrow( );
-
-      virtual void _BeforeGenerateData( ) fpa_OVERRIDE;
+      MoriRegionGrow( ) : Superclass( ) { }
+      virtual ~MoriRegionGrow( )        { }
 
     private:
-      // Purposely not defined
       MoriRegionGrow( const Self& other );
       Self& operator=( const Self& other );
     };
@@ -46,10 +50,6 @@ namespace fpa
 
 } // ecapseman
 
-#ifndef ITK_MANUAL_INSTANTIATION
-#  include <fpa/Image/MoriRegionGrow.hxx>
-#endif // ITK_MANUAL_INSTANTIATION
-
 #endif // __fpa__Image__MoriRegionGrow__h__
 
 // eof - $RCSfile$