@@ -324,17 +324,17 @@ void CellPopulationPyChasteActorGenerator<DIM>::AddPottsBasedCellPopulationActor
324
324
}
325
325
}
326
326
327
- vtkSmartPointer<vtkGeometryFilter> p_geometry_filter_pre =
328
- vtkSmartPointer<vtkGeometryFilter>::New ();
329
- #if VTK_MAJOR_VERSION <= 5
330
- p_geometry_filter_pre->SetInput (p_potts_grid);
331
- #else
332
- p_geometry_filter_pre->SetInputData (p_potts_grid);
333
- #endif
327
+ auto p_geometry_filter_pre = vtkSmartPointer<vtkGeometryFilter>::New ();
328
+ p_geometry_filter_pre->SetInputData (p_potts_grid);
334
329
335
330
vtkSmartPointer<vtkThreshold> p_threshold = vtkSmartPointer<vtkThreshold>::New ();
336
331
p_threshold->SetInputConnection (p_geometry_filter_pre->GetOutputPort ());
332
+
333
+ #if VTK_MAJOR_VERSION < 9
337
334
p_threshold->ThresholdByUpper (0.0 );
335
+ #else
336
+ p_threshold->SetUpperThreshold (0.0 );
337
+ #endif
338
338
p_threshold->SetInputArrayToProcess (0 , 0 , 0 , vtkDataObject::FIELD_ASSOCIATION_CELLS, " Cell Id" );
339
339
340
340
vtkSmartPointer<vtkGeometryFilter> p_geom_filter = vtkSmartPointer<vtkGeometryFilter>::New ();
@@ -366,12 +366,16 @@ void CellPopulationPyChasteActorGenerator<DIM>::AddPottsBasedCellPopulationActor
366
366
for (unsigned idx=0 ; idx<p_potts_grid->GetNumberOfCells (); idx++)
367
367
{
368
368
vtkSmartPointer<vtkThreshold> p_local_threshold = vtkSmartPointer<vtkThreshold>::New ();
369
- #if VTK_MAJOR_VERSION <= 5
370
- p_local_threshold->SetInput (p_geom_filter->GetOutput ());
371
- #else
372
- p_local_threshold->SetInputData (p_geom_filter->GetOutput ());
373
- #endif
374
- p_local_threshold->ThresholdBetween (p_element_base_ids->GetTuple1 (idx), p_element_base_ids->GetTuple1 (idx));
369
+ p_local_threshold->SetInputData (p_geom_filter->GetOutput ());
370
+
371
+ #if VTK_MAJOR_VERSION < 9
372
+ p_local_threshold->ThresholdBetween (p_element_base_ids->GetTuple1 (idx),
373
+ p_element_base_ids->GetTuple1 (idx));
374
+ #else
375
+ p_threshold->SetLowerThreshold (p_element_base_ids->GetTuple1 (idx));
376
+ p_threshold->SetUpperThreshold (p_element_base_ids->GetTuple1 (idx));
377
+ #endif
378
+
375
379
p_local_threshold->SetInputArrayToProcess (0 , 0 , 0 , vtkDataObject::FIELD_ASSOCIATION_CELLS, " Cell Base Id" );
376
380
377
381
vtkSmartPointer<vtkGeometryFilter> p_local_geom_filter = vtkSmartPointer<vtkGeometryFilter>::New ();
@@ -1110,12 +1114,12 @@ void CellPopulationPyChasteActorGenerator<DIM>::AddMeshBasedCellPopulationActor(
1110
1114
p_scaled_ctf->Build ();
1111
1115
1112
1116
vtkSmartPointer<vtkThreshold> p_threshold = vtkSmartPointer<vtkThreshold>::New ();
1113
- #if VTK_MAJOR_VERSION <= 5
1114
- p_threshold->SetInput (p_voronoi_grid);
1115
- #else
1116
- p_threshold->SetInputData (p_voronoi_grid);
1117
- #endif
1117
+ p_threshold->SetInputData (p_voronoi_grid);
1118
+ #if VTK_MAJOR_VERSION < 9
1118
1119
p_threshold->ThresholdByUpper (0.0 );
1120
+ #else
1121
+ p_threshold->SetUpperThreshold (0.0 );
1122
+ #endif
1119
1123
p_threshold->SetInputArrayToProcess (0 , 0 , 0 , vtkDataObject::FIELD_ASSOCIATION_CELLS, " CellColors" );
1120
1124
1121
1125
vtkSmartPointer<vtkGeometryFilter> p_geom_filter = vtkSmartPointer<vtkGeometryFilter>::New ();
0 commit comments