Skip to content

Commit

Permalink
ThresholdByUpper -> SetUpperThreshold, SetThresholdFunction(Upper)
Browse files Browse the repository at this point in the history
  • Loading branch information
timhutton committed Jun 9, 2024
1 parent 5611923 commit 0244b51
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/readybase/ImageRD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<vtkGeometryFilter> geometry = vtkSmartPointer<vtkGeometryFilter>::New();
geometry->SetInputConnection(threshold->GetOutputPort());
Expand Down Expand Up @@ -1100,7 +1101,8 @@ void ImageRD::AddPhasePlot(vtkRenderer* pRenderer,float scaling,float low,float
thresholdXmin->ReplaceOutOff();
vtkSmartPointer<vtkImageThreshold> thresholdXmax = vtkSmartPointer<vtkImageThreshold>::New();
thresholdXmax->SetInputConnection(thresholdXmin->GetOutputPort());
thresholdXmax->ThresholdByUpper(maxVal);
thresholdXmax->SetUpperThreshold(maxVal);
thresholdXmax->SetThresholdFunction(vtkThreshold::Upper);
thresholdXmax->ReplaceInOn();
thresholdXmax->SetInValue(maxVal);
thresholdXmax->ReplaceOutOff();
Expand All @@ -1123,7 +1125,8 @@ void ImageRD::AddPhasePlot(vtkRenderer* pRenderer,float scaling,float low,float
thresholdYmin->ReplaceOutOff();
vtkSmartPointer<vtkImageThreshold> thresholdYmax = vtkSmartPointer<vtkImageThreshold>::New();
thresholdYmax->SetInputConnection(thresholdYmin->GetOutputPort());
thresholdYmax->ThresholdByUpper(maxVal);
thresholdYmax->SetUpperThreshold(maxVal);
thresholdYmax->SetThresholdFunction(vtkThreshold::Upper);
thresholdYmax->ReplaceInOn();
thresholdYmax->SetInValue(maxVal);
thresholdYmax->ReplaceOutOff();
Expand Down Expand Up @@ -1151,7 +1154,8 @@ void ImageRD::AddPhasePlot(vtkRenderer* pRenderer,float scaling,float low,float
thresholdZmin->ReplaceOutOff();
vtkSmartPointer<vtkImageThreshold> thresholdZmax = vtkSmartPointer<vtkImageThreshold>::New();
thresholdZmax->SetInputConnection(thresholdZmin->GetOutputPort());
thresholdZmax->ThresholdByUpper(maxVal);
thresholdZmax->SetUpperThreshold(maxVal);
thresholdZmax->SetThresholdFunction(vtkThreshold::Upper);
thresholdZmax->ReplaceInOn();
thresholdZmax->SetInValue(maxVal);
thresholdZmax->ReplaceOutOff();
Expand Down Expand Up @@ -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<vtkTransform> transform = vtkSmartPointer<vtkTransform>::New();
transform->Translate (-.5, -.5, -.5);
Expand Down

0 comments on commit 0244b51

Please sign in to comment.