I would like to filter objects based on a threshold determined by Otsu’s method. Or at a minimum I would like the Filter Objects module to use a number that I provide in a file or something. I’m trying to modify the Filter Objects module because I would like it to save the object outlines the way it normally does so I can see how well the threshold works.
The reason I would like to do this is that for my application the optimal threshold moves around a bit due to the biology and imaging conditions. Using a fixed number isn’t very helpful.
I’ve managed to get a development version of CP open within wingIDE. Ouch. I can put a breakpoint right within the Filter Objects module at line 345 ( def run(self, workspace) ) code, but even though I see all the variables in memory and can load a value from a text file I have no idea where I should pass my new number.
I see that I could load some data with the LoadData module, but it doesn’t look like the Filter Objects would have access to that.
Any suggestions, including a better way to approach this problem, are welcome.
Thanks in advance! John