Combining multiple fields from a well into a single image

Hi,

I’ve been asked if you can combine the multiple fields from the same well into a single image; I can’t see how to do this in CP - am I missing something obvious? :smile:

It does not seem that CellProfiler supports this (at least in an easy way).

See this previous posting http://forum.image.sc/t/combined-well-statistics-from-multiple-image-fields/16199/1
Although this approach would work, it presupposes a complete Relational Database infrastructure for the analysis of each data set which is time and labor intensive and not the approach we most likely want to take.
Furthermore, it seems that the answer on the forum is not justified, as the mean/median data are never generated directly from CellProfiler.

What I have been able to do is using the ExportToSpreadsheet module, combine the two fields in a single file and then process the field data (using some in memory analytics) to get a median or mean value from the fields of interest

My take on this would be to do the following:

  • Extract the well ID using metadata extraction in LoadImages if the well info is contained in the filename/folder path, or use LoadData to get it directly.
  • Enable grouping in LoadImages or LoadData using the well ID as the metadata to group by.
  • Use Tile to create a mosaic image from the individual images. Setting the module to tile “Across cycles” rather than “Within cycles” will assemble the mosaic from the all the images loaded during the run, and enabling grouping will do this on a per-well basis. You can set the # of rows and columns, but note that this approach assumes that the constituent images will occur in consecutive order.
  • Use SaveImages to save the tiled image on the “Last cycle” under how often to save (which will save per-group is grouping is enabled). You can also name the tiled image using the well ID by selecting “Single name” for “Select method for constructing…” and right-click in the “Enter single file name” field. A context menu will allow you to select/insert the well metadata which will appear in green; this means that CP will insert the actual well metadata at that location in the name, for each group.

The final result will be a per-well tiled image that can be used for analysis with another pipeline. However, caveats include the following:

  • The analysis now becomes a two-step process, and you have additional tiled images taking up space.
  • Possible memory constraints from using the larger tiled image.
  • Illumination aberrations will also be carried into the tiled image. If this is a problem, then you can perform per-image illumination correction to each image and then tile the corrected image in the 1st pipeline.

Regards,
-Mark

Hi Mark,

Thank you for the suggestion, I’ll pass this onto the scientist who made the request.

Nick