X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPlugins%2FIO%2FMeshReader.cxx;h=d1410e8666e06daf2db44da0ee9d896dd06a9e13;hb=1b600247da314fe62d007ca8a0ce24d0006931f4;hp=077b96955a52e3c6f977f0154fcea23faf84714e;hpb=2eaf38cfdcbd2cfb0cc323dad6ded6bbeb436edf;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/IO/MeshReader.cxx b/lib/cpPlugins/Plugins/IO/MeshReader.cxx index 077b969..d1410e8 100644 --- a/lib/cpPlugins/Plugins/IO/MeshReader.cxx +++ b/lib/cpPlugins/Plugins/IO/MeshReader.cxx @@ -4,15 +4,17 @@ #include #include +/* TODO #ifdef cpPlugins_Interface_QT4 #include #endif // cpPlugins_Interface_QT4 // ------------------------------------------------------------------------- -bool cpPlugins::IO::MeshReader:: +cpPlugins::IO::MeshReader:: +DialogResult cpPlugins::IO::MeshReader:: ExecConfigurationDialog( QWidget* parent ) { - bool r = false; + DialogResult r = Self::DialogResult_Cancel; #ifdef cpPlugins_Interface_QT4 @@ -28,7 +30,7 @@ ExecConfigurationDialog( QWidget* parent ) this->m_Parameters->SetSelectedChoice( "PixelType", "float" ); this->m_Parameters->SetUint( "Dimension", 3 ); - r = true; + r = Self::DialogResult_NoModal; } // fi @@ -36,20 +38,23 @@ 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", 3 ); + this->m_Parameters->ConfigureAsUint( "Dimension" ); + + this->m_Parameters->SetUint( "Dimension", 3 ); } // ------------------------------------------------------------------------- @@ -92,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