From 0244b51fa41cd0826ee20655a8e1f5eba3581405 Mon Sep 17 00:00:00 2001 From: Tim Hutton Date: Sun, 9 Jun 2024 23:04:32 +0100 Subject: [PATCH] ThresholdByUpper -> SetUpperThreshold, SetThresholdFunction(Upper) --- src/readybase/ImageRD.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/readybase/ImageRD.cpp b/src/readybase/ImageRD.cpp index 9920b4bc..4edc672f 100644 --- a/src/readybase/ImageRD.cpp +++ b/src/readybase/ImageRD.cpp @@ -943,7 +943,8 @@ void ImageRD::InitializeVTKPipeline_3D(vtkRenderer* pRenderer,const Properties& threshold->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_CELLS, vtkDataSetAttributes::SCALARS); - threshold->ThresholdByUpper(contour_level); + threshold->SetUpperThreshold(contour_level); + threshold->SetThresholdFunction(vtkThreshold::Upper); vtkSmartPointer geometry = vtkSmartPointer::New(); geometry->SetInputConnection(threshold->GetOutputPort()); @@ -1100,7 +1101,8 @@ void ImageRD::AddPhasePlot(vtkRenderer* pRenderer,float scaling,float low,float thresholdXmin->ReplaceOutOff(); vtkSmartPointer thresholdXmax = vtkSmartPointer::New(); thresholdXmax->SetInputConnection(thresholdXmin->GetOutputPort()); - thresholdXmax->ThresholdByUpper(maxVal); + thresholdXmax->SetUpperThreshold(maxVal); + thresholdXmax->SetThresholdFunction(vtkThreshold::Upper); thresholdXmax->ReplaceInOn(); thresholdXmax->SetInValue(maxVal); thresholdXmax->ReplaceOutOff(); @@ -1123,7 +1125,8 @@ void ImageRD::AddPhasePlot(vtkRenderer* pRenderer,float scaling,float low,float thresholdYmin->ReplaceOutOff(); vtkSmartPointer thresholdYmax = vtkSmartPointer::New(); thresholdYmax->SetInputConnection(thresholdYmin->GetOutputPort()); - thresholdYmax->ThresholdByUpper(maxVal); + thresholdYmax->SetUpperThreshold(maxVal); + thresholdYmax->SetThresholdFunction(vtkThreshold::Upper); thresholdYmax->ReplaceInOn(); thresholdYmax->SetInValue(maxVal); thresholdYmax->ReplaceOutOff(); @@ -1151,7 +1154,8 @@ void ImageRD::AddPhasePlot(vtkRenderer* pRenderer,float scaling,float low,float thresholdZmin->ReplaceOutOff(); vtkSmartPointer thresholdZmax = vtkSmartPointer::New(); thresholdZmax->SetInputConnection(thresholdZmin->GetOutputPort()); - thresholdZmax->ThresholdByUpper(maxVal); + thresholdZmax->SetUpperThreshold(maxVal); + thresholdZmax->SetThresholdFunction(vtkThreshold::Upper); thresholdZmax->ReplaceInOn(); thresholdZmax->SetInValue(maxVal); thresholdZmax->ReplaceOutOff(); @@ -1380,7 +1384,8 @@ void ImageRD::GetAsMesh(vtkPolyData *out, const Properties &render_settings) con threshold->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_CELLS, vtkDataSetAttributes::SCALARS); - threshold->ThresholdByUpper(contour_level); + threshold->SetUpperThreshold(contour_level); + threshold->SetThresholdFunction(vtkThreshold::Upper); vtkSmartPointer transform = vtkSmartPointer::New(); transform->Translate (-.5, -.5, -.5);