CP3.3.0 error with 'overlayoutlines' and 'displaydataonimage'

Dear CellProfiler team,

Firstly - thank you so much for your incredible work!

I wondered if I could get some help with two error messages I’m running into whilst trying to migrate my CP2 pipelines into CP3?

In essence, the pipeline loads some channels and then selects a proportion of bit depth in each channel to work with downstream using ‘RescaleIntensity’. These are then combined into multichannel composite image via ‘GrayToColour’. So far so good.

Nuclei and cells are then identified, prior to trying to display the cell outlines and cell object numbers (via OverlayOutlines and DisplayDataOnImage) on the output of the earlier GrayToColour module…

This results in two errors:
“Error while processing OverlayOutlines: images of type float must be between -1 and 1”

and then,

“Error while processing DisplayDataOnImage: operands could not be broadcast together with shapes (1029,) (1023,)”

Meanwhile, the approach works fine in my old CP2.2.0 pipeline - I’d just used the original ‘ApplyThresholds’ module to discard intensities below the lower threshold and, then specified the upper limit of pixels to mask using a ‘RescaleIntensity’ module.

My source images and CP3 pipeline are here (~50MB):

Thanks in advance,

John

Hi John,

Sorry about your difficulties!

I’m pretty sure I’ve sourced the problem with your OverlayOutlines module- it’s actually a bug from GrayToColor, which I’ve filed here. A workaround for the meantime would be to set the weights in your different channels to something like 0.5.

I can confirm your DisplayDataOnImage module, but I’m working still on figuring out the cause (it’s almost certainly a bug, but the question is a bug in what)- would you mind sending along the CP2.2 version of the pipeline that worked as well?

Dear bcimini,

Thank you so much for the prompt response and for the workaround!

No problem at all - I’ve updated the dropbox folder to inlcude an identical routine in CP2.2 - which seems to work just fine: https://www.dropbox.com/sh/ejd6k8cx04y3bdx/AAAPaNJDD7Jvhv7ymNMMlZqja?dl=0

My best,
John

Bug reported here; I’m hopeful this may be an easy fix but we’ll see. Sorry for the inconvenience!

Not at all! Thank you so much for the help - and - for the fabulous image analysis tools.

Seeing awesome speed improvements with CP3 : ))!

Best wishes,
John

I believe I have a resolution for this error here: https://github.com/CellProfiler/CellProfiler/issues/3541
The fix should be available in our next release!

Aether - thanks so much - this is fantastic news! Thanks to you and Beth for the help and looking forward to the next release. John

Hi All,

I’m getting a very similar error in CP 3.1.8.

It seems to depend on the “Discard secondary objects touching the border of the image” option in the IdentifySecondaryObjects module - if I set this to No, everything’s fine, but if I set it to Yes, I get:

ValueError: operands could not be broadcast together with shapes

I’m getting the same error when trying to OverlayOutlines on a RBG image where I assigned different weights to each channel on GrayToColor module.
Is there a solution yet?
Thanks!

Hi @dsastre,

It looks like the issue has been already addressed. Please check this link. Check if you also have a mismatch with your object numbers.

Do you mind sharing the pipeline with your sample image? So we could help you better.

Regards,
Lakshmi
Fujifilm Wako Automation (Consultant)
www.wakoautomation.com
For CellProfiler training or optimised pipeline write to,
lakshmi.balasubramanian.contractor@fujifilm.com

Read more on our site.
Yokogawa CV8000 - The Ultimate in Confocal HCS
https://www.wakoautomation.com/products/yokogawa-high-content-imaging