The first issue is that vtkImageBinaryThreshold does not seem to be wrapped in Python. I would expect it to be in vtkmodules.vtkImagingCore like the deprecated vtkImageThreshold.
The second issue relates to HybridMedianComparision.cxx. See the current code with the image here HybridMedianComparison.
If we use vtkImageBinaryThreshold we get this image where there seems to be no noise:
The SetThresholdFunction method call is missing in the script. This new attribute is an enum value. In this case, you need to call imageThershold→SetThresholdFunction(vtkImageBinaryThreshold::THRESHOLD_UPPER);. please note that its default value is vtkImageBinaryThreshold::THRESHOLD_BETWEEN.
To follow the logic that was in place before, in the case of “threshold by lower“, the UpperThreshold has to be set, and the other way around for THRESHOLD_UPPERcase.
Finally, to comply with the VTK logic, the ReplaceIn and ReplaceOut now have to be set manually during the filter configuration, otherwise the InValue and OutValue will not have effect on the filter output. You can call ReplaceInOn() and ReplaceOutOn() on all filter configuration if you are using InValue and OutValue.
I tested locally by adding these lines and it works on my side.
Please let me know if you have any further questions.
It is wrapped for Python it is just that PyCharm is flagging it as Cannot find reference 'vtkImageBinaryThreshold' in 'vtkmodules.vtkImagingCore' , sorry my bad.
I am using the master (most recent). If you look at vtkImageBinaryThreshold, all the Python tests are using vtkImageThreshold not vtkImageBinaryThreshold. There are no C++ tests. Should there be specific tests for vtkImageBinaryThreshold? Testing was the first place I looked in order to get ideas.