]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/IO/ImageReader.cxx
Widget integration (step 5/6): Interactive plugins now supported, widgets updates...
[cpPlugins.git] / lib / cpPlugins / Plugins / IO / ImageReader.cxx
index 64bec97ee509f757048622affe663c5896f4d9f4..60b33b67998b0961d7c04b934c87f9a725fca907 100644 (file)
@@ -25,14 +25,13 @@ ExecConfigurationDialog( QWidget* parent )
   dialog.setNameFilter( QFileDialog::tr( "All files (*)" ) );
   if( dialog.exec( ) )
   {
-    this->m_Parameters = this->m_DefaultParameters;
     QStringList names = dialog.selectedFiles( );
     QStringList::const_iterator qIt = names.begin( );
     for( ; qIt != names.end( ); ++qIt )
-      this->m_Parameters.AddValueToStringList(
+      this->m_Parameters->AddToStringList(
         "FileNames", qIt->toStdString( )
         );
-    this->m_Parameters.SetValueAsBool( "VectorType", false );
+    this->m_Parameters->SetBool( "VectorType", false );
     r = true;
 
   } // fi
@@ -50,11 +49,8 @@ ImageReader( )
   this->SetNumberOfOutputs( 1 );
   this->_MakeOutput< cpPlugins::Interface::Image >( 0 );
 
-  using namespace cpPlugins::Interface;
-  this->m_DefaultParameters.Configure( Parameters::StringList, "FileNames" );
-  this->m_DefaultParameters.Configure( Parameters::Bool, "VectorType" );
-  this->m_DefaultParameters.SetValueAsBool( "VectorType", false );
-  this->m_Parameters = this->m_DefaultParameters;
+  this->m_Parameters->ConfigureAsStringList( "FileNames" );
+  this->m_Parameters->ConfigureAsBool( "VectorType", false );
 }
 
 // -------------------------------------------------------------------------
@@ -69,7 +65,7 @@ _GenerateData( )
 {
   // Get filenames
   TStringList names;
-  this->m_Parameters.GetValueAsStringList( names, "FileNames" );
+  this->m_Parameters->GetStringList( names, "FileNames" );
 
   std::string r = "";
   if( names.size( ) >= 1 )
@@ -344,7 +340,7 @@ template< class P, unsigned int D >
 std::string cpPlugins::IO::ImageReader::
 _GD1( const TStringList& names )
 {
-  if( this->m_Parameters.GetValueAsBool( "VectorType" ) )
+  if( this->m_Parameters->GetBool( "VectorType" ) )
     return( this->_RealGD< itk::VectorImage< P, D > >( names ) );
   else
     return( this->_RealGD< itk::Image< P, D > >( names ) );