]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/ExtractSliceImageFilter.cxx
Parameters are now part of the pipeline update process
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / ExtractSliceImageFilter.cxx
index 88b3152d1ee997153445763ead1cebe47f964e61..df46d6f434d8e62a28759818ff816a2f8fc24241 100644 (file)
@@ -12,12 +12,8 @@ ExtractSliceImageFilter( )
   this->SetNumberOfOutputs( 1 );
   this->_MakeOutput< cpPlugins::Interface::Image >( 0 );
 
-  using namespace cpPlugins::Interface;
-  this->m_DefaultParameters.Configure( Parameters::Int, "Axis" );
-  this->m_DefaultParameters.Configure( Parameters::Int, "Slice" );
-  this->m_DefaultParameters.SetValueAsInt( "Axis", 0 );
-  this->m_DefaultParameters.SetValueAsInt( "Slice", 0 );
-  this->m_Parameters = this->m_DefaultParameters;
+  this->m_Parameters->ConfigureAsUint( "Axis", 0 );
+  this->m_Parameters->ConfigureAsInt( "Slice", 0 );
 }
 
 // -------------------------------------------------------------------------
@@ -61,11 +57,8 @@ _RealGD( itk::DataObject* image )
   typedef typename O::PixelType _OP;
 
   // Get parameters
-  int axis = this->m_Parameters.GetValueAsInt( "Axis" );
-  int slice = this->m_Parameters.GetValueAsInt( "Slice" );
-
-  std::cout << "HOLA: " << slice << std::endl;
-
+  int axis = this->m_Parameters->GetUint( "Axis" );
+  int slice = this->m_Parameters->GetInt( "Slice" );
 
   // Compute region
   I* img = dynamic_cast< I* >( image );
@@ -77,8 +70,6 @@ _RealGD( itk::DataObject* image )
   region.SetSize( size );
   region.SetIndex( index );
 
-  std::cout << "HOLA-: " << region << std::endl;
-
   // Configure filter
   _F* filter = this->_CreateITK< _F >( );
   filter->SetInput( img );