]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/RegionGrow.h
...
[FrontAlgorithms.git] / lib / fpa / Image / RegionGrow.h
index cf05dd1ed2e869cb69eb79a54b8105d0eb1a2571..09631cc93becb731af623c166b7ca2a40fddc04d 100644 (file)
@@ -1,8 +1,17 @@
-#ifndef __FPA__IMAGE__REGIONGROW__H__
-#define __FPA__IMAGE__REGIONGROW__H__
+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
 
+#ifndef __fpa__Image__RegionGrow__h__
+#define __fpa__Image__RegionGrow__h__
+
+#include <fpa/Base/MarksInterfaceWithCollisions.h>
 #include <fpa/Base/RegionGrow.h>
+#include <fpa/Base/SeedsInterface.h>
 #include <fpa/Image/Algorithm.h>
+#include <fpa/Image/DefaultTraits.h>
+
 
 namespace fpa
 {
@@ -10,26 +19,35 @@ namespace fpa
   {
     /**
      */
-    template< class _TInputImage, class _TOutputImage = _TInputImage >
+    template< class _TInputImage, class _TOutputImage, class _TFrontId = unsigned char, class _TTraits = fpa::Image::DefaultTraits< _TInputImage, _TOutputImage, _TFrontId > >
     class RegionGrow
-      : public fpa::Base::RegionGrow< fpa::Image::Algorithm< _TInputImage, _TOutputImage > >
+      : public fpa::Base::RegionGrow< fpa::Image::Algorithm< _TTraits, fpa::Base::MarksInterfaceWithCollisions< _TTraits >, fpa::Base::SeedsInterface< _TTraits > > >
     {
     public:
-      typedef fpa::Base::RegionGrow< fpa::Image::Algorithm< _TInputImage, _TOutputImage > > Superclass;
-      typedef RegionGrow                      Self;
-      typedef itk::SmartPointer< Self >       Pointer;
-      typedef itk::SmartPointer< const Self > ConstPointer;
+      typedef _TInputImage  TInputImage;
+      typedef _TOutputImage TOutputImage;
+      typedef _TTraits      TTraits;
+      typedef fpa::Base::MarksInterfaceWithCollisions< TTraits > TMarksInterface;
+      typedef fpa::Base::SeedsInterface< TTraits > TSeedsInterface;
+
+      typedef fpa::Image::Algorithm< TTraits, TMarksInterface, TSeedsInterface > TAlgorithm;
+      typedef fpa::Base::RegionGrow< TAlgorithm > Superclass;
+      typedef RegionGrow                          Self;
+      typedef itk::SmartPointer< Self >           Pointer;
+      typedef itk::SmartPointer< const Self >     ConstPointer;
+
+      fpa_Base_TraitTypes( typename TTraits );
 
     public:
       itkNewMacro( Self );
-      itkTypeMacro( RegionGrow, fpa::Base::RegionGrow );
+      itkTypeMacro( fpa::Image::RegionGrow, fpa::Base::RegionGrow );
 
     protected:
-      RegionGrow( );
-      virtual ~RegionGrow( );
+      RegionGrow( ) : Superclass( ) { }
+      virtual ~RegionGrow( )        { }
 
     private:
-      // Purposely not implemented
+      // Purposely not implemented.
       RegionGrow( const Self& other );
       Self& operator=( const Self& other );
     };
@@ -38,10 +56,6 @@ namespace fpa
 
 } // ecapseman
 
-#ifndef ITK_MANUAL_INSTANTIATION
-#  include <fpa/Image/RegionGrow.hxx>
-#endif
-
-#endif // __FPA__IMAGE__REGIONGROW__H__
+#endif // __fpa__Image__RegionGrow__h__
 
 // eof - $RCSfile$