From: Eduardo DAVILA Date: Mon, 7 Aug 2017 14:45:20 +0000 (+0200) Subject: #3114 bbGEditor Bug New Normal - branch vtk7itk4 compilation with vtk7 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=204fc70d152f2c46eea9d21bc2616ccfb2226e8e;p=bbtkGEditor.git #3114 bbGEditor Bug New Normal - branch vtk7itk4 compilation with vtk7 --- diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx index c5effa8..15c1f19 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx @@ -183,7 +183,16 @@ namespace bbtk strip->InsertCellPoint(3); pdFill->SetPoints( _pts ); pdFill->SetStrips( strip ); + + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 _fillPolyMapper->SetInput(pdFill); +#else + _fillPolyMapper->SetInputData(pdFill); +#endif + + _fillObjectActor->SetMapper(_fillPolyMapper); _fillPolyMapper->Modified(); ///************************* FILL ************************* diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx index a8789d7..4c6c7ee 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.cxx @@ -136,7 +136,14 @@ namespace bbtk pdTrianglesInputs->SetPoints( _TrianglesInputsPts ); pdTrianglesInputs->SetStrips( stripTrianglesInputs ); + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 _TrianglesInputsPolyMapper->SetInput( pdTrianglesInputs ); +#else + _TrianglesInputsPolyMapper->SetInputData( pdTrianglesInputs ); +#endif + _TrianglesInputsActor->SetMapper(_TrianglesInputsPolyMapper); _TrianglesInputsPolyMapper->Modified(); @@ -174,7 +181,14 @@ namespace bbtk pdTrianglesOutputs->GetCellData()->SetScalars( _cellDataOutputTriangles ); pdTrianglesOutputs->SetPoints( _TrianglesOutputsPts ); pdTrianglesOutputs->SetStrips( stripTrianglesOutputs ); + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 _TrianglesOutputsPolyMapper->SetInput( pdTrianglesOutputs ); +#else + _TrianglesOutputsPolyMapper->SetInputData( pdTrianglesOutputs ); +#endif + _TrianglesOutputsActor->SetMapper(_TrianglesOutputsPolyMapper); _TrianglesOutputsPolyMapper->Modified(); ///************************* Inputs Fill (triangles) ************************* @@ -243,7 +257,12 @@ namespace bbtk pdFill->SetPoints( _pts ); pdFill->SetStrips( strip ); +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 _fillPolyMapper->SetInput(pdFill); +#else + _fillPolyMapper->SetInputData(pdFill); +#endif _fillObjectActor->SetMapper(_fillPolyMapper); _fillPolyMapper->Modified(); diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.cxx index c104877..902a247 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.cxx @@ -159,7 +159,15 @@ namespace bbtk { strip->InsertCellPoint( 3 ) ; pdFill->SetPoints( _pts ) ; pdFill->SetStrips( strip ) ; + + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 _fillPolyMapper->SetInput( pdFill ) ; +#else + _fillPolyMapper->SetInputData( pdFill ) ; +#endif + _fillObjectActor->SetMapper( _fillPolyMapper ) ; _fillPolyMapper->Modified( ) ; ///************************* FILL ************************* diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx index cd2332f..9376a67 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx @@ -138,7 +138,13 @@ namespace bbtk { pdFill->SetPoints( _pts ) ; pdFill->SetStrips( strip ) ; +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 _fillPolyMapper->SetInput( pdFill ) ; +#else + _fillPolyMapper->SetInputData( pdFill ) ; +#endif + _fillObjectActor->SetMapper( _fillPolyMapper ) ; _fillPolyMapper->Modified( ) ; diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index 731585d..3832cf2 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -213,7 +213,15 @@ void wxVtkSceneManager::configureBaseView() aPolygon->GetPointIds()); aPolygonGrid->SetPoints(_pts); _aPolygonMapper = vtkDataSetMapper::New(); + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 _aPolygonMapper->SetInput(aPolygonGrid); +#else + _aPolygonMapper->SetInputData(aPolygonGrid); +#endif + + _fillObjectActor->SetMapper(_aPolygonMapper); _fillObjectActor->GetProperty()->SetColor(PORTFILL_NH_R, PORTFILL_NH_G, PORTFILL_NH_B);