From fd05e80c9eb5689a436dd3bdfcc6fc662a0bff6d Mon Sep 17 00:00:00 2001 From: acrovato <a.crovato@uliege.be> Date: Tue, 12 Mar 2024 08:39:51 +0100 Subject: [PATCH] Update threshold deprecated function for VTK9 --- tboxVtk/lineExtractor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tboxVtk/lineExtractor.py b/tboxVtk/lineExtractor.py index df305b5..3eb9320 100644 --- a/tboxVtk/lineExtractor.py +++ b/tboxVtk/lineExtractor.py @@ -55,7 +55,8 @@ class LineExtractor: # create a threshold containing the physical group (tag) to cut thresh = vtk.vtkThreshold() - thresh.ThresholdBetween(tag,tag) + thresh.SetLowerThreshold(tag) + thresh.SetUpperThreshold(tag) thresh.SetInputConnection(self.grid) thresh.SetInputArrayToProcess(0, 0, 0, vtk.vtkDataObject.FIELD_ASSOCIATION_CELLS, tag_name) # "tag" is the default name set in tboxVtk::VtkExport::save thresh.Update() -- GitLab