BodenmillerGroup / steinbock

A toolkit for processing multiplexed tissue images
https://bodenmillergroup.github.io/steinbock
MIT License
49 stars 14 forks source link

Completely black masks from deepcell #157

Closed paulrbuckley-kcl closed 1 year ago

paulrbuckley-kcl commented 1 year ago

Hi,

I have been working through your pipeline and have passed my .tiff images extracted from raw .mcd files to deepcell for object segmentation via steinbock. In my panel file, I have labelled under the deepcell column '1' for DNA channels for nuclear, and for 8/9 other channels '2' for membrane, for example CD45.

As output from deepcell, I receive completely black .tiff images. I was expecting to be able to make out the segmented cells. I'm wondering if this is an issue you've seen before, and/or whether you have any suggestions on how to rectify this issue

Best

Paul

jwindhager commented 1 year ago

Hi @paulrbuckley-kcl! Are you sure that the masks are completely black (as in: all pixel values are 0)? Cells in the generated masks are assigned unique pixel values between 1 and 2^16-1 by default, starting with value 1. If you have relatively few cells, depending on your image viewer, the corresponding low pixel values may appear black visually. Opening the images in ImageJ (adjust contrast if necessary) or napari (convert to "Labels" layer) should reveal the cells. Let me know if that helps!

paulrbuckley-kcl commented 1 year ago

Hi again! Thanks for getting back to me. I have now had a look in napari. The attached is a screenshot of my labels layer in one example - they are all identical from what I can tell. I've triple checked for bugs and it looks OK! My tiffs extracted from raw .mcd files have the same number of channels as my panel.csv file.. the labelling (DNA channels == 1, surface markers == 2) passed to Mesmer looks correct! Any ideas on what would cause this?

Screenshot 2022-12-12 at 11 04 20
paulrbuckley-kcl commented 1 year ago

To add, my .tiffs extracted from the raw .mcd file looks fine as well and what we'd expect biologically.

jwindhager commented 1 year ago

Uhm, this doesn't look good indeed. Would you be able to provide me with the following, so I can take a closer look?

My email address is jonas.windhager (at) uzh.ch. Thanks!

paulrbuckley-kcl commented 1 year ago

I doubt I could share them tbh but I don't think it'll be necessary.. weirdly if I open in ImageJ, I can see the cell masks! I've also tried with other .mcd and I can view in ImageJ and extract intensities.. thus I think it'll be ok.

Appreciate your help!