]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/IO/MeshReader.cxx
...
[cpPlugins.git] / lib / cpPlugins / Plugins / IO / MeshReader.cxx
index 35b95d4cc81909ddb0e603e05e712380ba67c377..d1410e8666e06daf2db44da0ee9d896dd06a9e13 100644 (file)
@@ -4,6 +4,7 @@
 #include <vtkPolyData.h>
 #include <vtkPolyDataReader.h>
 
+/* TODO
 #ifdef cpPlugins_Interface_QT4
 #include <QFileDialog>
 #endif // cpPlugins_Interface_QT4
@@ -37,18 +38,19 @@ ExecConfigurationDialog( QWidget* parent )
 
   return( r );
 }
+*/
 
 // -------------------------------------------------------------------------
 cpPlugins::IO::MeshReader::
 MeshReader( )
   : Superclass( )
 {
-  this->_MakeOutput< cpPlugins::Interface::Mesh >( "Output" );
+  this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" );
 
   std::vector< TParameters::TString > valid_types;
   valid_types.push_back( "float" );
   valid_types.push_back( "double" );
-  this->m_Parameters->ConfigureAsString( "FileName" );
+  this->m_Parameters->ConfigureAsOpenFileName( "FileName" );
   this->m_Parameters->ConfigureAsChoices( "PixelType", valid_types );
   this->m_Parameters->ConfigureAsUint( "Dimension" );
 
@@ -95,14 +97,13 @@ std::string cpPlugins::IO::MeshReader::
 _GD1( )
 {
   // Get filename
-  std::string fname = this->m_Parameters->GetString( "FileName" );
+  std::string fname = this->m_Parameters->GetOpenFileName( "FileName" );
 
   vtkPolyDataReader* pdr = this->_CreateVTK< vtkPolyDataReader >( );
   pdr->SetFileName( fname.c_str( ) );
   pdr->Update( );
 
-  cpPlugins::Interface::Mesh* out =
-    this->GetOutput< cpPlugins::Interface::Mesh >( "Output" );
+  auto out = this->GetOutputData< cpPlugins::Interface::Mesh >( "Output" );
   if( out != NULL )
     out->SetVTK( pdr->GetOutput( ) );
   else