1 #include "AppendMeshesFilter.h"
2 #include <cpPlugins/Interface/Mesh.h>
4 #include <vtkAppendPolyData.h>
6 // -------------------------------------------------------------------------
7 cpPlugins::BasicFilters::AppendMeshesFilter::
11 this->_AddInput( "Input0" );
12 this->_AddInput( "Input1" );
13 this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" );
16 // -------------------------------------------------------------------------
17 cpPlugins::BasicFilters::AppendMeshesFilter::
18 ~AppendMeshesFilter( )
22 // -------------------------------------------------------------------------
23 std::string cpPlugins::BasicFilters::AppendMeshesFilter::
26 auto m0 = this->GetInputData< cpPlugins::Interface::Mesh >( "Input0" );
27 auto m1 = this->GetInputData< cpPlugins::Interface::Mesh >( "Input1" );
28 if( m0 == NULL || m1 == NULL )
29 return( "AppendMeshesFilter: No input meshes." );
31 auto filter = this->_CreateVTK< vtkAppendPolyData >( );
32 filter->AddInputData( m0->GetVTK< vtkPolyData >( ) );
33 filter->AddInputData( m1->GetVTK< vtkPolyData >( ) );
36 auto out = this->GetOutputData< cpPlugins::Interface::Mesh >( "Output" );
37 out->SetVTK( filter->GetOutput( ) );