A way to set ImageNumber in Load data .csv

I am looking for a way where I can specify ‘ImageNumber’.
In the output of CellProfiler measurements, the ‘ImageNumber’ column, sequentially outputs a number for each image in a pipeline (for example, in an analysis of 1000 images, ImageNumber is 1 - 1000).

Is there a way where I can specify the image number in my loaddata.csv?
In other words, I want to provide the image number rather than have CP number my images.

The reason is that, for a variety of logistical and complex reason, I need to break up a data set into many-many batches for analysis and I need each image to have a unique ImageNumber.

Ideally, I would like to have CP export an ‘ImageNumber’ that is sequential across many separate pipeline runs (ie. run#1 uses ‘ImageNumber’ 1 -1000, run #2 uses ‘ImageNumber’ 1001-2000, run #3 ‘ImageNumber’ 2001-3000)

I’ve tried adding an ‘ImageNumber’ column in the loaddata.csv, but CP doesn’t use the data in that column imagenumber in the output. Other variations of columns for image number, such as ‘Image_ImageNumber’ cause unrecoverable errors in the loaddata module.

Hi @JTRodgers,

In case you have image number in your metadata you can add it in the exportspreadsheet module. I am not sure how you are trying to use the ImageNumber from the Loaddata.csv. Could you please share your pipeline & your CSV file here, so that we could help you better?

Regards,
Lakshmi
Fujifilm Wako Automation (Consultant)
www.wakoautomation.com
For CellProfiler training or optimised pipeline write to,
lakshmi.balasubramanian.contractor@fujifilm.com

Read more on our site.
Yokogawa CV8000 - The Ultimate in Confocal HCS
https://www.wakoautomation.com/products/yokogawa-high-content-imaging

Join us at, https://www.slas2020.org

If you output the Image table and look in there the original file name is listed and matched to the ‘ImageNumber’ you refer to above. You can use that to figure out which batch is which set of images processed. -John

Let me try to clarify.
In the data that CellProfiler exports, both in export to database and export to spreadsheet, CellProfiler assigns each image a number, sequentially (ImageNumber). For example, In an analysis of 100 images, along with the measurements, metadata, etc, that cell profiler exports, there will be the ‘ImageNumber’ column were each image is given a number 1, 2, 3, 4…100.

What I would like to do is, rather then have CellProfiler assign the image number, which always starts at 1 for every analysis run, I would like to assign the image number. For example, and extending on the previous example, if I were to run a separate analysis of images, I would like the CellProfiler to begin the ‘ImageNumber’ column at 101.

Does that make sense? I want to have non-repeating image numbers across many sets of separate analyses. The ImageNumber itself can be arbitrary (and it is not in my metadata), it just needs to be non repeating.

Is there a way to do this? Maybe from the Loaddata.csv file??

Hi @JTRodgers,

I see what you mean. I don’t think it’s possible to manually change the starting ImageNumber within CellProfiler, although you might be able to manually add the correct numbers to the load_data.csv files as a different metadata item (naming it something like ‘Metadata_Global_ImageNumber’).

If you’re not using load_data, you could also achieve this by making a csv associating each image name with a predefined number, then importing that file as part of metadata extraction to ‘label’ the images.

Alternatively, you could use a simple python script to run through your exported sheets and change the ImageNumbers after it’s all been run.

Hope that helps

1 Like