Treshold terminology

When I use the Threshold filter on a dataset in Paraview 5.10 or 5.11, I have the option to change the threshold method from “Between” (which is default) to “Above upper threshold” or “Below lower threshold”. I find this formulation confusing and inconsistent with the “Between” method. I think the correct names should be “Above lower threshold” and “Below upper threshold”.

WDYT @Tiffany_Chhim ?

Hello Ondřej,

I agree that it can sound a bit counter intuitive compared to the “Between” mode.
One reason for this behavior is that existing code was used when the new modes "Above upper threshold” and “Below lower threshold” were added.

Changing these to “Above lower threshold” and “Below upper threshold” would require adding a couple of new methods to produce the desired effects.

Hello Tiffany,

Thank you for your reply. However, I think that “Above lower threshold” could be implemented using the existing code as “Between” method with the upper threshold automatically set to plus infinity (or maximum value). I don’t understand why that would be difficult?

That’s a good question. If we look into the API for vtkThreshold, we have the following methods:

  /**
   * Methods used for thresholding. vtkThreshold::Lower returns true if s is lower than the lower
   * threshold, vtkThreshold::Upper returns true if s is larger than the upper threshold, and
   * vtkThreshold::Between returns true if s is between the lower and upper thresholds.
   *
   * [...]
   */
  int Lower(double s) const;
  int Upper(double s) const;
  int Between(double s) const;

Notice the description for the Upper and Lower methods. Those are the reason for the choice that was made :slightly_smiling_face:

So this oddity was created by programmers behind vtk. I understand. :slightly_smiling_face: