I’m trying to work my way around the ThresholdImageFilter class. My goal is to “cap” the image at some lower and upper bound (lb, ub). Everything below lb shall be set to lb and everything above ub shall be set to ub.
Now, I see that the ThresholdImageFilter class only has one single SetOutsideValue option, so I think I’d need two executions of the filter. The documentation states there are methods that it can use, ThresholdAbove(), ThresholdBelow() and ThresholdOutside(), however I fail to see where and how I can set them.
Thank you for your help!
(Python 3.9 and sitk 2.0.2)