- auto o = this->GetInputData( "Input" );
- cpPlugins_Demangle_Mesh_Meshes_1( o, _GD0_2D, 2 )
- cpPlugins_Demangle_Mesh_Meshes_1( o, _GD0_3D, 3 )
- this->_Error( "Invalid input image dimension." );
+ auto mesh = this->GetInputData< vtkPolyData >( "Input" );
+ double bounds[ 6 ];
+ mesh->GetBounds( bounds );
+ double zdiff = std::fabs( bounds[ 5 ] - bounds[ 4 ] );
+ if( zdiff > 1e-5 )
+ {
+ cpPlugins_Demangle_Mesh_Meshes_1(
+ this->GetInputData( "Input" ), _GD0_3D, 3
+ )
+ this->_Error( "Invalid input image dimension." );
+ }
+ else
+ this->_GD0_2D( mesh );