diff --git a/Common/RenderWindow.cxx b/Common/RenderWindow.cxx index 5b01cc9..135901a 100644 --- a/Common/RenderWindow.cxx +++ b/Common/RenderWindow.cxx @@ -19,6 +19,17 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-B license and that you accept its terms. * ------------------------------------------------------------------------ */ +#include + +#if VTK_MAJOR_VERSION > 9 || ( VTK_MAJOR_VERSION == 9 && VTK_MINOR_VERSION > 3 ) +#define VTK_ABOVE_9_3 +#endif + +#ifdef VTK_ABOVE_9_3 +#include +#else +#include +#endif #include #include @@ -34,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -1071,7 +1081,11 @@ RenderWindow::SetDisplayIdsOn () vtkDataSet *DataSet = this->GetMeshActor()->GetMapper()->GetInput(); //Generate ids for labeling - vtkIdFilter *ids = vtkIdFilter::New (); + #ifdef VTK_ABOVE_9_3 + vtkGenerateIds *ids = vtkGenerateIds::New (); + #else + vtkIdFilter *ids = vtkIdFilter::New (); + #endif ids->SetInputData (DataSet); ids->PointIdsOn (); ids->CellIdsOn ();