When I call mimics.segment.local_threshold() from code I do not get the same result as using the GUI Local Threshold tool.
In fact, the output mask is barely different from the input mask.
If I call mimics.segment.activate_local_threshold() with the same parameters (input mask, thresholds, search_distance etc) and just click Apply manually I get the expected result. This seems to indicate that my parameters are correct.
Why does mimics.segment.local_threshold() not give the same result as the GUI tool?
How can I get the same result as the GUI tool without user intervention?
After few trials by using both API, I unfortunately can’t seem to replicate the error.
Example of the parameters I used are as below, and the result for both auto and manual mask are as expected.
I have tried your code on a mimics demo file, to compare results.
The issue appears to be that I had not properly converted the thresholds from HU to GV.
If I fix that I can get comparable results using local_threshold() and activate_local_threshold().