Many images to one histogram


I am running a pipe line that processes images, identifies nuclei and produces histograms. It performs these functions per cycle. A histogram is produced per image, per cycle. However, I want the software to process many images and produce one histogram that reflects all of the images. How do I do this?


The DisplayHistogram module currently is designed to work on each image set (that is, it refreshes every cycle, as you’ve noticed). If you want to combine all the images from the whole set into a single histogram, just use the Data Tool > Histogram, after processing is completed. This also allows you to combine a subset of images (e.g., images 2 through 8, or whatever) into a single histogram. These extra options are too complex to have been built into the DisplayHistogram module, so they are only available after processing completes.



I am using Cellprofiler 2.2 for my Image analysing process. I didnt get how to find the Histogram in Data Tool to get a histogram for all image set.

Thanks for your time



On the main menu bar of CellProfiler, there should be Data Tools tab (close to Windows), within it you can find DisplayHistogram, isn’t it there?



Dear Minh,
Thanks for your answer… I am not that familiar with Cellprofiler. As you mensioned its in Data Tools (I thought it should be in data tools pipeline).
Do we have to export data to CellH5 to work with this tool or it work directly by exporting data to datasheet?
Thanks for your time



You don’t have to use the ExportDataToCellH5 module, but under output settings (the same place where you set where the output saves at the end) you DO have to either export to a .h5 or .mat file; my understanding is that you can’t use this on just a spreadsheet. Hope that helps!


Dear Bcimini
Thanks for your answer… it works now, it show results per Image )one cycle) not for the whole images or cycles. Because I need the Histogram for the whole images or at least a set of images.
I attached images of the resulted operation… I hope I did it in correct way this time.

Thanks for your time


Looks like you are using one of the lesser-used features of CellProfiler.

As far as I can tell, the post which started this thread 10 (!) years ago refers to a feature that no longer exists in CellProfiler. The histogram data tool does not seem to allow combining results from multiple image sets anymore. I’m afraid you will need to use a standard spreadsheet program (Excel or Google docs) to accomplish this task.

Alternately, I think you can accomplish what you want in CellProfiler Analyst but I won’t guarantee it, since it’s been quite a long time since I’ve tested it. Using CPA requires that you create a properties file in your CellProfiler pipeline, in the Export to Database module. It’s powerful software but takes a few steps to get going. It’s a good investment to learn how to get your data into it, but a spreadsheet program would be simpler to accomplish your immediate goals.

Good luck!


Dear Anne
I am very thankful for this detailed answer… I already uesed the CellProfiler Analyst with properties file and it works well… but I thought its possible to use it in Cellprofiler itself as a control for the whole process…

Thx again for your and other people time