IdentifyPrimaryObjects bug: cannot save Adaptive threshold strategy

My pipeline includes an IdentifyPrimaryObjects function that works well when the Threshold strategy is Adaptive. However, when I try to save this pipeline and reopen it, the Threshold strategy automatically resets to Global. (I am able to successfully edit and save other aspects of the pipeline)

In addition, when I Analyze Images, the pipeline executes a Global thresholding even when the Adaptive threshold is selected and saved.

Running Cellprofiler-3.1.8

Thanks for your help!
Sam

Hi Sam,

Can you send the pipeline? Thanks!

~Beth

Hi Beth,

I have attached the project. I would like to use Adaptive thresholding strategy in my 2nd IdentifyPrimaryObjects (right after DisplayDataOnImage). However, I strangely cannot save Adaptive as my selection!

Thanks,
Sam

dead50_v0_20151028.cpproj (11.6 MB)

Hi Sam,

I think I see what happened- when you just change from Global (with Robust Background) to Adaptive (which only supports Otsu), the GUI is switching to Otsu and displaying Otsu to you, but it still “remembers” that the last threshold strategy you chose was RobustBackground, which only is available from Global, so it switches you from Adaptive to Global so that you can use your preferred thresholding algorithm. If in Global mode I switch from RobustBackground to Otsu and then switch from Global to Adaptive, it remembers my choice just fine (see attached). It seems to be something specific about RobustBackground- if I switch from “Global/Manual” to “Adaptive/Otsu”, it save just fine for me.

I’ve filed this as a bug- thanks for reporting this! In the meantime, that workaround should succeed for you.

dead50_v0_20151028.cpproj (11.6 MB)

Hi Beth,

You are exactly right. Thank you!

-Sam

1 Like