I cannot complain about how the breaking API change was made. With all the deprecation macros, etc. it was managed well.
The problem is that the change was made at all, as it requires efforts from VTK users to update their code, and the result is worse than before. The syntax was changed from:
threshold.ThresholdBetween(labelValue, labelValue)
to
threshold.SetLowerThreshold(labelValue)
threshold.SetUpperThreshold(labelValue)
threshold.SetThresholdFunction(vtk.vtkThreshold.THRESHOLD_BETWEEN)
vtkThreshold API, while functionnal, was definitely non standard, as the
Treshold*method actually triggered the computation instead of configuring the filter before computation is handled by RequestData
It was just a convenience function. There was no direct triggering of any computation.
The same ThresholdByUpper(), ThresholdByLower(), ThresholdBetween() methods are still used in vtkImageThreshold.
Another worrying thing that I saw was that no convenience methods were added along with the introduction of SetThresholdFunction(int function). According to VTK style, these methods should have been added:
SetThresholdFunctionToBetween()SetThresholdFunctionToUpper()SetThresholdFunctionToLower()
These convenience methods are important, because they are much more convenient to use (especially with auto-complete) and have a much simpler syntax. This:
threshold.SetThresholdFunctionToBetween()
is much easier to write and read than what is required now:
threshold.SetThresholdFunction(vtk.vtkThreshold.THRESHOLD_BETWEEN)
If it was just a mistake then it is OK, it can be easily fixed. But if it was a conscious decision to skip them (to reduce VTK developer’s workload at the expense of user convenience) then that would need to be discussed, too.