Applying same pipeline to all images in a Z-stack?


I have Z stacks, each with about 80 planes. Overall, the stacks capture spherical balls of cells. In order to try to assess the volume of these balls of cells, I’d like to try to measure the X-Y area of the ball in each slice of the Z stack. Do you know if there is any way to accomplish this in CellProfiler? Essentially for each frame of the Z-stack, I’d like to apply some thresholding and intensity modifying steps, and then I’d hope to use something like the IdentifyPrimaryObjects module to identify the boundary of the ball of cells. Then I’d hope to repeat that for each frame of the Z-stack. Do you know if this is possible?

Many thanks!!


This is definitely possible, and in fact is the default behavior in CP- unless you tell it otherwise, it’ll do the exact same operations on every image, including every stack of a z stack.

By default if you give it many Z stacks it will just export all the data to one giant spreadsheet; if you’d prefer one CSV file for each Z stack, it’s definitely possible to use Metadata extraction though + some of the options in ExportToSpreadsheet to get that too. See the middle section of this rather long post of mine for an example of how that would work.

1 Like

Excellent; thank you so much!!

Ps, you could also just measure the volume in 3D… The version of CellProfiler in progress has that capability although it’s a work in progress. Check out the “nightly build” on the downloads page at!

Slight edit- the nightly build of CellProfiler for Mac has the 3D functionality, the Windows version doesn’t have it yet (but hopefully soon!)