Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Common/RenderWindow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <vtkVersion.h>

#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 <vtkGenerateIds.h>
#else
#include <vtkIdFilter.h>
#endif

#include <vtkObjectFactory.h>
#include <vtkPolyDataMapper.h>
Expand All @@ -34,7 +45,6 @@
#include <vtkLabeledDataMapper.h>
#include <vtkActor2D.h>
#include <vtkCellArray.h>
#include <vtkIdFilter.h>
#include <vtkCellCenters.h>
#include <vtkTextProperty.h>
#include <vtkCellData.h>
Expand Down Expand Up @@ -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 ();
Expand Down