]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/BinaryErodeImageFilter.cxx
Parameters are now part of the pipeline update process
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / BinaryErodeImageFilter.cxx
index fd207a09eb4e188f20e0339f42b9680d4d8172bd..0713edfe9114a51dedf05cee2ff57f423cda6980 100644 (file)
@@ -16,12 +16,7 @@ BinaryErodeImageFilter( )
   this->SetNumberOfOutputs( 1 );
   this->_MakeOutput< cpPlugins::Interface::Image >( 0 );
 
-  using namespace cpPlugins::Interface;
-  this->m_DefaultParameters.Configure( Parameters::Uint, "Radius" );
-
-  this->m_DefaultParameters.SetValueAsUint( "Radius", 2 );
-
-  this->m_Parameters = this->m_DefaultParameters;
+  this->m_Parameters->ConfigureAsUint( "Radius", 2 );
 }
 
 // -------------------------------------------------------------------------
@@ -72,19 +67,17 @@ _RealGD( itk::DataObject* image )
 
   // Get parameters
   _RT rad_val;
-  rad_val.Fill( this->m_Parameters.GetValueAsUint( "Radius" ) );
+  rad_val.Fill( this->m_Parameters->GetUint( "Radius" ) );
 
   // Configure filter
 
   StructuringElementType structuringElement;
-  structuringElement.SetRadius(rad_val);
-  structuringElement.CreateStructuringElement();
-
-
+  structuringElement.SetRadius( rad_val );
+  structuringElement.CreateStructuringElement( );
 
   _F* filter = this->_CreateITK< _F >( );
   filter->SetInput( dynamic_cast< I* >( image ) );
-  filter->SetKernel(structuringElement);
+  filter->SetKernel( structuringElement );
   filter->Update( );
 
   // Connect output