SaveImages gets sequential numbering wrong

Hi folks,

I’m putting together a pipeline that involves SaveImages as a second to final step. Each input image is a .flex file that contains four GFP,RFP image pairs, and the pipeline will produce 4 output tiff images for each flex input that will contain both the GFP and RFP channels. I’m using meta-data to capture the plate and well_ID for each input .flex file, and these are combined to name the output files. I would like these output images to be saved with sequential site numbers, as in the example below:

The input looks like this:
<path/to/default/input>/Plate01/{001001.flex,001002.flex,001003.flex,…}
<path/to/default/input>/Plate02/{001001.flex,001002.flex,001003.flex,…}
<path/to/default/input>/Plate03/{001001.flex,001002.flex,001003.flex,…}

**
Desired output:**
<path/to/default/output>/Plate01/{001001_01.tiff, 001001_02.tiff, 001001_03.tiff, 001001_04.tiff, 001002_01.tiff, 001002_02.tiff,…}
<path/to/default/output>/Plate02/{001001_01.tiff, 001001_02.tiff, 001001_03.tiff, 001001_04.tiff, 001002_01.tiff, 001002_02.tiff,…}

The trouble: when I select “Sequential numbers” for filename construction in SaveImages, CP adds a suffix equal the current cycle for the whole of the input. So I get output like this:

Actual output:
<path/to/default/output>/Plate01/{001001_01.tiff, 001001_02.tiff, 001001_03.tiff, 001001_04.tiff, 001002_05.tiff, 001002_06.tiff,…}
<path/to/default/output>/Plate02/{001001_55.tiff, 001001_56.tiff, 001001_57.tiff, 001001_58.tiff, 001002_59.tiff, 001002_60.tiff,…}

Am I constructing my pipeline incorrectly? Or is this a bug? I’ve attached my pipeline. FYI, I’m using CP version 11570.

Thanks for your help,

Lee.
Sample_MarkerProject_Pipe_NoTexture.cp (12.1 KB)

Hi,
Sorry we missed this post. The short answer is that “Sequential numbers” is doing its intended function. It adds a monotonically increasing number/index that corresponds to each and every image cycle.

We do realize that movies, or stacked images of various kinds, do not have a clear mapping onto “image cycle” (should a cycle imply the file container, i.e. one for each flex file? or the series, or z-planes within each file?). But a possible way to deal with this is to extract more metadata and use those metadata tags to label your SaveImages output. There are “Series, T, and Z” metadata automatically associated with the LoadImages option “tif,tiff, flex, zvi movies” option and you should be able to choose one or more of these to your liking. You simply need to choose the “From image filename” option in SaveImages, rather than the “Sequential numbers” option, and then right-click and add your chosen metadata tag in the “Text to append…” setting.

We are implementing a hopefully better method for dealing with image stacks in the next release of CellProfiler.
Hopefully that helps you, or likely someone else at this point!
David