Processing Greyscale Images

I’ve been trying to process three images using the yeast pipeline. It seems to me that the pipeline requires RGB images, as well as all other pipelines. I looked into the pipeline and tried changing the conversion method from RGB to channels as well as HSV and all the following steps accordingly, and even deleting the ColortoGray step, but everything has failed. Is there any way to process images like the one I attached?

Thanks

Hi,

Certainly! CellProfiler is designed to work with grayscale images primarily. See my attached pipeline for an example.

The main setting to look out for is in NamesAndTypes -> Set the image type = Grayscale/Color image.
If your image is truly three colors, then set the “image type” to be “Color image” and subsequesntly you can use a ColorToGray module to convert to grayscale, since most CellProfiler modules expect grayscale inputs.

Does this help?
Cheers,
David
DL_test.cppipe (5.29 KB)

I just tried it this morning, and it works great. One issue I’m having is for multiple images it doesn’t seem to show/save the outline image output. Are there files for outlines for images other than the first image in the stack?

Hi,
I’m not clear on what you’re asking. To write outlines, you need to use a SaveImages modules to explicitly save any intermediate images in your pipeline to disk. But you also mention “stacks” - do you have image stacks (more than one image in a file) or do you simply mean for “all your images”?

David

[quote=“davidlogan”]Hi,
I’m not clear on what you’re asking. To write outlines, you need to use a SaveImages modules to explicitly save any intermediate images in your pipeline to disk. But you also mention “stacks” - do you have image stacks (more than one image in a file) or do you simply mean for “all your images”?

David[/quote]

Here’s the error i’m getting when I tried to save the four panel chart after each image when running the test mode. It has Input image, nuclei, nuclei outlines and a table. And yes I tried doing both images and an image stack using the same images that I made in ImageJ.

[quote]Traceback (most recent call last):
File “cellprofiler\gui\cpfigure.pyc”, line 655, in on_file_save
File “matplotlib\figure.pyc”, line 1084, in savefig
File “matplotlib\backends\backend_wxagg.pyc”, line 100, in print_figure
File “matplotlib\backend_bases.pyc”, line 1923, in print_figure
File “matplotlib\backend_bases.pyc”, line 1733, in print_pdf
File “matplotlib\backends\backend_pdf.pyc”, line 2161, in print_pdf
File “matplotlib\backends\backend_pdf.pyc”, line 469, in close
File “matplotlib\backends\backend_pdf.pyc”, line 563, in writeFonts
File “matplotlib\backends\backend_pdf.pyc”, line 1010, in embedTTF
File “matplotlib\backends\backend_pdf.pyc”, line 785, in embedTTFType3
RuntimeError: Face has no glyph names[/quote]

Would you please post your pipeline and a sample image stack? Zip the file if the forum complains.

Analyzing image stacks is complicated. Are you following the directions here for Loading Image Stacks and Movies? cellprofiler.org/tutorials.shtml

David

It’s not necessarily an image stack, for example I did the same thing today for one image. I was using your test pipeline, that you attached in your first post. It seems like I can’t save even one image…


I figured out how to save the outline images(added a SaveImages module), but not the whole panel from your pipeline.

Regarding the PDF crash, have you changed any of the fonts in the preferences? It might be that the font you have chosen isn’t compatible with the PDF backend in Matplotlib. (see matplotlib.1069221.n5.nabble.com … 36221.html). My default is Tahoma and that works for me. You can change the preferences by going to the menu, File/Preferences and looking for the title and table fonts.

I’m trying to improve image identification with the settings given, but I can’t seem to accomplish a lot. Is 80-90% accuracy the most I can expect with this type of image? First image attached is original parameters, than I have two more that result in some improvement but also loss. I also have brightfield images where only the cell walls are illuminated, do you think I’d have better luck with those and a different pipeline?