1 #include <plugins/IO/MeshWriter.h>
2 #include <cpPlugins/DataObjects/Mesh.h>
3 #include <vtkPolyDataWriter.h>
5 // -------------------------------------------------------------------------
6 cpPluginsIO::MeshWriter::
10 this->_ConfigureInput< cpPlugins::DataObjects::Mesh >( "Input", true, false );
11 this->m_Parameters.Clear( );
12 this->m_Parameters.ConfigureAsSaveFileName( "FileName" );
13 this->m_Parameters.SetAcceptedFileExtensions(
19 // -------------------------------------------------------------------------
20 cpPluginsIO::MeshWriter::
25 // -------------------------------------------------------------------------
26 void cpPluginsIO::MeshWriter::
29 auto mesh = this->GetInputData< vtkPolyData >( "Input" );
31 this->_Error( "Invalid input image." );
33 auto f = this->_CreateVTK< vtkPolyDataWriter >( );
34 f->SetFileName( this->m_Parameters.GetSaveFileName( "FileName" ).c_str( ) );
35 f->SetInputData( mesh );