--- /dev/null
+#include <plugins/IO/MeshWriter.h>
+#include <cpPlugins/DataObjects/Mesh.h>
+#include <vtkPolyDataWriter.h>
+
+// -------------------------------------------------------------------------
+cpPluginsIO::MeshWriter::
+MeshWriter( )
+ : Superclass( )
+{
+ this->_ConfigureInput< cpPlugins::DataObjects::Mesh >( "Input", true, false );
+ this->m_Parameters.Clear( );
+ this->m_Parameters.ConfigureAsSaveFileName( "FileName" );
+ this->m_Parameters.SetAcceptedFileExtensions(
+ "FileName",
+ "Mesh files (*.vtk)"
+ );
+}
+
+// -------------------------------------------------------------------------
+cpPluginsIO::MeshWriter::
+~MeshWriter( )
+{
+}
+
+// -------------------------------------------------------------------------
+void cpPluginsIO::MeshWriter::
+_GenerateData( )
+{
+ auto mesh = this->GetInputData< vtkPolyData >( "Input" );
+ if( mesh == NULL )
+ this->_Error( "Invalid input image." );
+
+ auto f = this->_CreateVTK< vtkPolyDataWriter >( );
+ f->SetFileName( this->m_Parameters.GetSaveFileName( "FileName" ).c_str( ) );
+ f->SetInputData( mesh );
+ f->Update( );
+}
+
+// eof - $RCSfile$
--- /dev/null
+#ifndef __CPPLUGINSIO__MESHWRITER__H__
+#define __CPPLUGINSIO__MESHWRITER__H__
+
+#include <plugins/cpPluginsIO_Export.h>
+#include <cpPlugins/BaseObjects/ProcessObject.h>
+
+namespace cpPluginsIO
+{
+ /**
+ */
+ class cpPluginsIO_EXPORT MeshWriter
+ : public cpPlugins::BaseObjects::ProcessObject
+ {
+ cpPluginsObject( MeshWriter, cpPlugins::BaseObjects::ProcessObject, IO );
+ };
+
+} // ecapseman
+
+#endif // __CPPLUGINS__IO__MESHWRITER__H__
+
+// eof - $RCSfile$