Problem saving 'TrackObjects' image

Hi,

As I find more great things to do better with CellProfiler, I’ve been on a posting spree. Thanks in advance for your patience and help.

I have built a pipeline for analysing timelapse experiments looking at fluorescent reporters in worm embryos. The segmentation of the embryos is from brightfield images (so that reporter expression does not affect the size of the identified embryo). I then use Track Objects to follow the embryos through the frames. I am happy with the performance of this part of the pipeline.

My main problem is that I would like to save the ‘TrackObjects’ colour-coded image so I can manually check no funny business went on. The help for the module says that the image produced can be saved by a SaveImages module downstream. However when I try this I simply get a blank image. I have tried different formats and colourmaps but to no avail.

I have attached a shortened pipeline to illustrate the problem along with a short sequence of images that can be processed with it.

Many thanks,

M.Perez
20130807_MPerez_SaveTrack_example_images.zip (1.58 MB)
20130807_SaveTrack_example.cp (6.48 KB)

The pipeline you attached seems to output a labeled image just fine; see screenshot for the 1st image. What sort of viewer are you using to check it out on?
-Mark


Hi Mark,

I simply see a blank white image whether using Mac Preview, ImageJ or even CellProfiler (using File --> Open Image).

I have downloaded the attached example pipeline and images and rerun them as-is to try and reproduce what you see but still get the same result. I have attached a couple of files (changed the pipeline to .png output and reran it again so that I could attach the images) to demonstrate the problem and to see if you might suggest some way they could be made visible.

Thanks a lot,

M. Perez






Ahh, you’re on a Mac. I’ve seen this happen, but not consistently. If you save the image as a different format, say, 16-bit TIF what do you get?
-Mark

Hi Mark,

I have tried every option on the list of possible output formats (including 8-bit and 16-bit for .tif/.tiff). All of the ones that don’t bring up an error message produce the same blank, white output.

I will try running the pipeline on a PC - it’s always an option to just do that if needs be.

Thanks,

M.Perez

As an aside: What Mac OS are you using?
-Mark

Hi Mark,

I am using Mac OS X version 10.6.8. Do you think upgrading the OS to the latest release might help?

Aha, logic! This seemed odd to me, and the answer turns out to be a logic issue and nothing inherent wrong with CellProfiler, per se. IF, that is, you have your Default Input Folder set to be the same as your Default Output Folder? (I hope?)

I just tried the pipeline on my Mac (10.8.4, but I don’t think it matters) and it seemed to work fine at first, i.e. I could see the colored label matrix. But on the second cycle I got an error which indicated that the input image was color, even though the images you supplied were truly grayscale. Notice, though,that SaveImages is saving as .bmp, but otherwise as the same base filename as the input. But LoadImages is using “BF” as the text, and so on the second cycle it is finding the newly created “Exp…BF…001.bmp” file, but it is color so CP is failing on EnhanceEdges (do you not see that error?).

I’m not sure why you were getting the white output images, but I think the simplest solution is to:
(1) Turn on Overwrite Images in Save Images (perhaps you had saved some “error” outputs long ago, and they were never being overwritten). Not critical, but might forestall similar issues.
(2) Change the Default Output Folder to somewhere other than the Default Input Folder (that is what it was set at, no?). Alternatively, you could specify a new output folder in SaveImages.

Cheers,
David

Hi David,

Unfortunately this doesn’t seem to be the problem. I usually set my Output folder as an Input sub-folder and so I do see that if I had incorrect settings in the LoadImages module it could produce this error in the way that you describe. However I have just tested it with an Output distinct and apart from the Input folder and unfortunately still see the same thing - blank white output.

Kind regards,

M.Perez

Darn. Using the release version (11710) with OS 10.6 should be totally fine. I am running 10.8 now, but there should be no need to upgrade from 10.6. Have you tried it on a Windows machine?

The other workaround would be to use our newer 2.0 (I suggest the 2.0 and not the 2.1 version yet) version found here:
cellprofiler.org/cgi-bin/trunk_build.cgi
Please read the caveats there, as well as more here: github.com/CellProfiler/CellPro … TrunkBuild
but I would be curious to see if this solved your problem somehow.

David

Hi David,

I have just tried running the pipeline on a PC and the image saves fine, with no problems. I have also tried using the Trunk Builds - the 2.0 Trunk Build didn’t want to run on my Mac for whatever reason (perhaps problems uninstalling the previous 2.0 version) but I tried the 2.1 build and also the problem appears to be resolved. I don’t know if this sheds any light on what the source of the problem was but in any case I can now run the pipeline without issues.

Thanks a lot for all your help and kind regards,

M.Perez

OK, good to hear that 2.1 is working for you! I’m not sure what the root cause of the issue with the older versions were but it seems like a somewhat rare case. So we will not belabor it further unless others have issues too.

Thanks,
David