Cxd Movie analysis - thousands of cells over hundreds of images




I’m looking at fluorescence intensity changes in a group of cells over time. The cells are tightly packed and extremely numerous, hence the value of CellProfiler in this case.
The loaded file is a .cxd - a stack of 400 images over time. Each image contains 5000 cells, which remain entirely static over the duration.

I need to identify each cell as an ROI and then measure the intensity of each individually over each individual stack. Of course, the simplest program would just be to identify cells on each stack and then measure the cells on each stack. However, my pc takes five minutes to analyse the 5000 objects in a single stack in this way, and I’m not even sure it would succeed in getting through all 400 stacks before dying. So, there’s gotta be a better way!

I’ve attached my pipelines. Here’s how I’ve tried to it:

Pipeline 1 loads just a single frame (the first, by default) of the .cxd file. It uses IdentifyPrimaryObjects to find the cells, and then it uses OverlayOutlines to create an overlay of each object. This pipeline works fine – no problems here.

In pipeline 2, I want to ‘load’ the overlayoutlines defined in the previous pipeline onto every sequential stack in my .cxd movie. I will then use MeasureObjectIntensity to extract mean intensity values from each cell object. I haven’t been able to create this pipeline because I can’t work out how to load the OverlayOutlines which hasn’t been created in the current pipeline.

So two key questions:

  1. Can cellprofiler be made to look at every frame in a .cxd movie, or do I need to manually convert that movie to a stack of .tif files before entering pipeline 2?

  2. Can Pipeline 2 be made to load an overlayoutlines file from Pipeline 1?
    If not, then perhaps I’ll need to combine these two pipelines, such that stack#1 is used for IdentifyPrimaryObjects and OverlayOutlines, and then these outlines are used for MeasureObjectIntensity upon the rest of the stacks.

I’ve attached a single TIF of my cell view - I can’t give the full .cxd because it’s a couple of gigs sadly…

Thanks very much for your help, in advance!! I’ve been working at this for the last 8 hours and it’s just defeated me :confounded:

Ewan Pipeline 1 Cell ID.cppipe (6.4 KB)
Ewan Pipeline 2 Int measure.cppipe (6.2 KB)


Can cellprofiler be made to look at every frame in a .cxd movie, or do I need to manually convert that movie to a stack of .tif files before entering pipeline 2?

Generally speaking, if you can open the individual frames in FIJI, you can open them up in CellProfiler (especially if you use CP 3.0) since they use the same libraries for file loading; if you upload it somewhere that can handle the size (like GoogleDrive or Dropbox) and link it here we can probably take a look, but generally I’d start by using the Metadata module’s “Import from file header” feature- I’d recommend looking at the help for the Metadata module and searching the forum (such as this thread).

Can Pipeline 2 be made to load an overlayoutlines file from Pipeline 1?

It can’t really load outlines as objects, but if you save the objects themselves (by using ConvertObjectsToImage in “uint16” mode then by saving a 16bit tif), you’ll notice that NamesAndTypes allows you to designate input images as “Objects”. See that module’s help for more info.

Once you have your objects loaded, you can match a single object set to all timepoints in a movie- this thread has an example of such a pipeline and how you’d set up the input modules to do that.


Thanks for all the advice - I finally found a system that works (almost).

Based heavily on pipelines by lee.leavitt, as in the thread that you referenced.

Now I’m getting an error that I don’t understand.

My two pipelines and all the inputs and outputs are in this drive folder:

Image264 goes into pipeline 1, where the cells are identified and saved as objects, creating Image264.5.roi. This object then goes into pipeline 2, along with Data266 (a cxd stack), and the intensity of each ROI object during each stack-frame is measured. This should create the file ‘video_analysisDATA’, of mean pixel intensities for each cell object in each frame. An additional file should also be created, called ‘video_analysisIMAGE’.

The problem is, firstly the video_analysisDATA file only contains one object - it has amalgamated all of the individual cells, rather than calculating mean intensity for each seperately.

Secondly, it does not create the file video_analysisIMAGE. The output claims that this file exists, but the file is not to be found. That’s not actually a problem in itself, but it’s probably indicative of something wrong…

I also get an error in the script just before the end of the run, which is surely related:
IOerror: [Errno 13] Permission denied: u’b:\8. data\in-vitro data\cell profiler data output\video_analysisDATA.csv’ Finished!
The textbox for the error says ’

Any help on this would be huge - I’m sure I’ve made a mistake in the ‘ExportToSpreadsheet’ module, but I’ve tried changing all parts of that module, and nothing has helped.

Thanks :blush:


Oh scratch that.

I ran it again, changing from ‘Image’ output to ‘Experiment’ output, and this time it worked without a hitch, and all cells analysed separately.

I don’t understand why…
but atleast its solved!