]> Creatis software - cpPlugins.git/blobdiff - plugins/VTKIO/MeshWriter.cxx
Moved to version 1.0
[cpPlugins.git] / plugins / VTKIO / MeshWriter.cxx
diff --git a/plugins/VTKIO/MeshWriter.cxx b/plugins/VTKIO/MeshWriter.cxx
deleted file mode 100644 (file)
index fa44b2d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <VTKIO/MeshWriter.h>
-#include <cpInstances/DataObjects/Mesh.h>
-#include <cpPlugins/QT/SaveFileDialog.h>
-
-#include <vtkPolyData.h>
-#include <vtkPolyDataWriter.h>
-
-#ifdef cpPlugins_QT4
-#  include <QApplication>
-#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$