]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpaPlugins/ThresholdImageGrowFunctionSource.cxx
...
[FrontAlgorithms.git] / lib / fpaPlugins / ThresholdImageGrowFunctionSource.cxx
index 8ea176ee7f5577f92acbdd309c87cf1d802d3260..99bac98e9db274f313a8ccb71744f3928c7a39de 100644 (file)
@@ -11,7 +11,7 @@ ThresholdImageGrowFunctionSource( )
   : Superclass( )
 {
   this->_AddInput( "ReferenceImage" );
-  this->_MakeOutput< GrowFunction >( "Output" );
+  this->_AddOutput< GrowFunction >( "Output" );
 
   this->m_Parameters->ConfigureAsReal( "LowerThreshold" );
   this->m_Parameters->ConfigureAsReal( "UpperThreshold" );
@@ -50,13 +50,15 @@ std::string fpaPlugins::ThresholdImageGrowFunctionSource::
 _GD0( itk::DataObject* data )
 {
   typedef fpa::Image::Functors::RegionGrowThresholdFunction< I > _F;
-  typename _F::Pointer functor = _F::New( );
+  typename _F::Pointer f = _F::New( );
+  f->SetLowerThreshold( this->m_Parameters->GetReal( "LowerThreshold" ) );
+  f->SetUpperThreshold( this->m_Parameters->GetReal( "UpperThreshold" ) );
 
   // Connect output
   GrowFunction* out = this->GetOutput< GrowFunction >( "Output" );
   if( out != NULL )
   {
-    out->SetITK< _F >( functor );
+    out->SetITK< _F >( f );
     return( "" );
   }
   else