]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/RegionGrow.h
...
[FrontAlgorithms.git] / lib / fpa / Image / RegionGrow.h
index ad41e80a2dbea689573b407e36c3ea2c23b03b22..4d190dc09e32229afc33dc88da42c55333dbf202 100644 (file)
@@ -1,8 +1,14 @@
+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
+
 #ifndef __fpa__Image__RegionGrow__h__
 #define __fpa__Image__RegionGrow__h__
 
 #include <fpa/Base/RegionGrow.h>
 #include <fpa/Image/Algorithm.h>
+#include <fpa/Image/DefaultTraits.h>
 
 namespace fpa
 {
@@ -10,34 +16,32 @@ namespace fpa
   {
     /**
      */
-    template< class _TInputImage, class _TOutputImage >
+    template< class _TInputImage, class _TOutputImage, class _TFrontId = unsigned char >
     class RegionGrow
-      : public fpa::Base::RegionGrow< fpa::Image::Algorithm< _TInputImage, _TOutputImage > >
+      : public fpa::Base::RegionGrow< fpa::Image::Algorithm< fpa::Image::DefaultTraits< _TInputImage, _TOutputImage, _TFrontId > > >
     {
     public:
-      typedef fpa::Image::Algorithm< _TInputImage, _TOutputImage > TAlgorithm;
-      typedef RegionGrow                          Self;
+      typedef _TInputImage  TInputImage;
+      typedef _TOutputImage TOutputImage;
+      typedef _TFrontId     TFrontId;
+
+      typedef fpa::Image::DefaultTraits< TInputImage, TOutputImage, TFrontId > TTraits;
+      typedef fpa::Image::Algorithm< TTraits >    TAlgorithm;
       typedef fpa::Base::RegionGrow< TAlgorithm > Superclass;
+      typedef RegionGrow                          Self;
       typedef itk::SmartPointer< Self >           Pointer;
       typedef itk::SmartPointer< const Self >     ConstPointer;
 
-      typedef typename Superclass::TOutput TOutput;
-      typedef typename Superclass::TVertex TVertex;
-
-      typedef fpa::Image::Functors::Base< _TInputImage, typename Superclass::TGrowFunction > TGrowFunction;
-
     public:
       itkNewMacro( Self );
       itkTypeMacro( fpa::Image::RegionGrow, fpa::Base::RegionGrow );
 
     protected:
-      RegionGrow( );
-      virtual ~RegionGrow( );
-
-      virtual void _BeforeGenerateData( ) fpa_OVERRIDE;
+      RegionGrow( ) : Superclass( ) { }
+      virtual ~RegionGrow( )        { }
 
     private:
-      // Purposely not defined
+      // Purposely not implemented.
       RegionGrow( const Self& other );
       Self& operator=( const Self& other );
     };
@@ -46,10 +50,6 @@ namespace fpa
 
 } // ecapseman
 
-#ifndef ITK_MANUAL_INSTANTIATION
-#  include <fpa/Image/RegionGrow.hxx>
-#endif // ITK_MANUAL_INSTANTIATION
-
 #endif // __fpa__Image__RegionGrow__h__
 
 // eof - $RCSfile$