]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/RegionGrow.hxx
...
[FrontAlgorithms.git] / lib / fpa / Image / RegionGrow.hxx
index e8e92c89c07f152abef9d45551e6c740cf348758..b1f5da02b5b775e10b157ed782b7a47cd1a1a71f 100644 (file)
@@ -1,41 +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 >
-bool fpa::Image::RegionGrow< I, O >::
-_CheckMembership( const TVertex& v ) const
+template< class _TInputImage, class _TOutputImage >
+void fpa::Image::RegionGrow< _TInputImage, _TOutputImage >::
+_BeforeGenerateData( )
 {
-  if( this->m_MembershipFunction.IsNotNull( ) )
-    return( this->m_MembershipFunction->Evaluate( this->_VertexValue( v ) ) );
-  else
-    return( false );
-}
+  this->Superclass::_BeforeGenerateData( );
 
-// -------------------------------------------------------------------------
-template< class I, class O >
-void fpa::Image::RegionGrow< I, O >::
-_InitResults( )
-{
-  this->Superclass::_InitResults( );
-  this->GetOutput( )->FillBuffer( this->m_OutsideValue );
+  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$