X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=plugins%2FVTKIO%2FMeshWriter.cxx;fp=plugins%2FVTKIO%2FMeshWriter.cxx;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=fa44b2d56a3161fb70c813604aa76436d1a54ca3;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/plugins/VTKIO/MeshWriter.cxx b/plugins/VTKIO/MeshWriter.cxx deleted file mode 100644 index fa44b2d..0000000 --- a/plugins/VTKIO/MeshWriter.cxx +++ /dev/null @@ -1,65 +0,0 @@ -#include -#include -#include - -#include -#include - -#ifdef cpPlugins_QT4 -# include -#endif // cpPlugins_QT4 - -// ------------------------------------------------------------------------- -QDialog* cpPluginsVTKIO::MeshWriter:: -CreateQDialog( ) -{ -#ifdef cpPlugins_QT4 - cpPlugins::QT::SaveFileDialog* dlg = NULL; - if( QApplication::instance( ) != NULL ) - { - dlg = new cpPlugins::QT::SaveFileDialog( ); - dlg->SetParameters( &( this->m_Parameters ), "FileName" ); - - } // fi - return( dlg ); -#else // cpPlugins_QT4 - return( NULL ); -#endif // cpPlugins_QT4 -} - -// ------------------------------------------------------------------------- -cpPluginsVTKIO::MeshWriter:: -MeshWriter( ) - : Superclass( ) -{ - this->_ConfigureInput< cpInstances::DataObjects::Mesh >( "Input", true, false ); - this->m_Parameters.Clear( ); - this->m_Parameters.ConfigureAsSaveFileName( "FileName", "" ); - this->m_Parameters.SetAcceptedFileExtensions( - "FileName", - "Mesh files (*.vtk)" - ); -} - -// ------------------------------------------------------------------------- -cpPluginsVTKIO::MeshWriter:: -~MeshWriter( ) -{ -} - -// ------------------------------------------------------------------------- -void cpPluginsVTKIO::MeshWriter:: -_GenerateData( ) -{ - auto mesh = this->GetInputData< vtkPolyData >( "Input" ); - if( mesh == NULL ) - this->_Error( "Invalid input mesh." ); - - auto f = this->_CreateVTK< vtkPolyDataWriter >( ); - f->SetFileName( this->m_Parameters.GetSaveFileName( "FileName" ).c_str( ) ); - f->SetInputData( mesh ); - f->SetFileTypeToBinary( ); - f->Update( ); -} - -// eof - $RCSfile$