]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/RegionGrow.hxx
...
[FrontAlgorithms.git] / lib / fpa / Image / RegionGrow.hxx
index 9b5b0f792ba457240aa28ecf7530d697c44b5d06..b1f5da02b5b775e10b157ed782b7a47cd1a1a71f 100644 (file)
@@ -1,31 +1,34 @@
-#ifndef __FPA__IMAGE__REGIONGROW__HXX__
-#define __FPA__IMAGE__REGIONGROW__HXX__
+#ifndef __fpa__Image__RegionGrow__hxx__
+#define __fpa__Image__RegionGrow__hxx__
 
 // -------------------------------------------------------------------------
-template< class I, class O >
-fpa::Image::RegionGrow< I, O >::
+template< class _TInputImage, class _TOutputImage >
+fpa::Image::RegionGrow< _TInputImage, _TOutputImage >::
 RegionGrow( )
   : Superclass( )
 {
 }
 
 // -------------------------------------------------------------------------
-template< class I, class O >
-fpa::Image::RegionGrow< I, O >::
+template< class _TInputImage, class _TOutputImage >
+fpa::Image::RegionGrow< _TInputImage, _TOutputImage >::
 ~RegionGrow( )
 {
 }
 
 // -------------------------------------------------------------------------
-template< class I, class O >
-void fpa::Image::RegionGrow< I, O >::
-_InitResults( )
+template< class _TInputImage, class _TOutputImage >
+void fpa::Image::RegionGrow< _TInputImage, _TOutputImage >::
+_BeforeGenerateData( )
 {
-  this->Superclass::_InitResults( );
-  this->m_GrowingFunction->SetSpace( this->GetInput( ) );
-  this->GetOutput( )->FillBuffer( this->m_OutsideValue );
+  this->Superclass::_BeforeGenerateData( );
+
+  TGrowFunction* grow =
+    dynamic_cast< TGrowFunction* >( this->GetGrowFunction( ) );
+  if( grow != NULL )
+    grow->SetImage( this->GetInput( ) );
 }
 
-#endif // __FPA__IMAGE__REGIONGROW__HXX__
+#endif // __fpa__Image__RegionGrow__hxx__
 
 // eof - $RCSfile$