ZCT size

I’m testing CellProfiler (Mac version 2.0) to analyze stacks of images taken with a confocal scope on MetaMorph, and some seemingly identical stacks give me this error message using the LoadImages module:

Error while processing LoadImages:
ZCT size vs image count mismatch (sizeZ=20, sizeZ=1, sizeT=1, total=21)

The stacks were not altered from the MetaMorph output. Changing the file name didn’t change the error. I got the error with both “stk movies” and “tif, tiff, flex movies”. I couldn’t figure out the problem after a cursory review of the code. I couldn’t attach the movies because they are greater than 10 MB. I cropped the movies in ImageJ to get them under 10 MB, but I no longer got the error message with the cropped movie. I can upload the movies somewhere else if you need to look at them.

Yes, please upload the movies so we can take a look.

Where should I upload them? The movies are 58 MB each and your forum size limit is 10 MB.

We recommended using YouSendIt, or Picasa if you have an account there.

I just stuck them on our web site:


I forgot to add: Could you post your pipeline as well?

There’s not much to the pipeline since I couldn’t get the stacked images to load properly.
confocal_stacks.cp (3.08 KB)

Hi John,
I’ve looked at the file - it’s an interaction with the latest version of the Bioformats library (loci.wisc.edu/software/bio-formats) that we use to open the MetaMorph tif files. Your file is a z-stack with exposures taken at the following z-positions:
226.575, 227.125, 228.075, 229.125, 230.3, 231.45, 232.1, 233.1, 234.45,
235.35, 236.05, 236.85, 238.25, 239.925, 239.925, 241.2, 242.325,
243.425, 244.15, 245.075, 246.475

If you look closely, there are two exposures taken at 239.925. Bioformats analyzes stacks to try to figure out whether they represent time series (z is the same for all exposures), z stacks (z is different for all exposures) or combinations of z and t (z can be grouped into sets of similar height with different t). It’s a heuristic and it got thrown off by two at the same height which caused the error.

We’re part of the LOCI effort, so we’re discussing how to handle situations like yours. In the meantime, the software will run if you set up your microscope so that you don’t duplicate z-heights. Possibly, you can revert to an earlier version of Bioformats, replacing loci_tools.jar (it should be in the bioformats folder in your installation directory) with an earlier version such as this here:

svn.broadinstitute.org/CellProf … r?rev=9844

It’s a little chancy to make the substitution; I’d only do it if you’ve generated a lot of otherwise unusable data. Hopefully we’ll correct the problem soon, though.


Thanks, Lee. It looks like a MetaMorph problem - I’m working with them to fix the bug.

  • John