DisplayDataOnImage bug: background is gone, data on black

Hi
I made a pipeline to crop, ColorToGrey and count cells (IdentifyPrimaryObjects), and then save input images with markers of object’s number (DisplayDataOnImage, pic.1). Despite i checked to display data on background, result pictures are just numbers on black, without background image (pic.2).
I tried to check all options, tried to click on both “display background image: Yes / No”, but still get the same result.
Any ideas how to fix this?
Thank in advance




Hi,

I’m not certain, but these are my initial thoughts:
(1) This issue is close but not exactly the same: cellprofiler.org/cgi-bin/trunk_build.cgi
(2) Try using a Text Color in DisplayDataOnImages of White, rather than Yellow. Are your input images color, or grayscale? (Grayscale almost certainly works better)
(3) Try removing the Crop module, and see if it fixes the black background issue.

Let us know how it goes. If you post your pipeline and some images, we could test it our selves here.
David

[quote=“David Logan”]
(2) Try using a Text Color in DisplayDataOnImages of White, rather than Yellow. Are your input images color, or grayscale? (Grayscale almost certainly works better)
David[/quote]

The second option works. Input images are colour, and output images (with displayed text) should be colour too. Wight text colour works, and, strangely, after switching to wight and then back to yellow (one of default colours), without changing any other option in pipeline, yellow colour works fine too. Still not working with custom colours, but default ones are enough, problem solved.
Thank you!

Ok, spent 3 more hours to figure it out. Problem is caused by corrupted input files: i used one file as is, and the same file, “saved as” in Photoshop or FastStone. In first case output files have no background, but have displayed data (in fact they have background, but very very darkened). In second case all is ok, there is background and displayed data. The colour of displayed text don’t matter: white, yellow or any custom colour.

If anybody get same problem, try to open your file in Photoshop (or other redactor), and save it as new file. Visually corrupted file and “saved as” file are identical, but DPI and some metadata things changed.

Don’t know, does this count as CellProfiler bug, or my incompetence, but anyway problem solved. Again :smile:

Thanks for writing back!