Names and Types only finding one image

Hi, I’ve been running into the issue of the NamesAndTypes module detecting only one picture matching a rule, even if I upload many into the Images module. For example, in the attached project, only one picture that has “Prebio” in the name is detected. Not sure if this is a mistake on my end or a bug - I am experiencing this with other pipelines and image sets as well. Any suggestions?

3 images have Prebio in the name, but only one image set is detected:

Here is the pipeline:
question_names.cppipe (27.2 KB)

Hi @d.t.bolsh,

The problem isn’t that only one image is found that CellProfiler doesn’t know how to match the images to create image sets so just shows you it’s best guess. The default behaviour is for there to be the same number of files for each image, all matching each other. It doesn’t know that one of your images is a partner for all the other ones. This behaviour is something that took me a bit to understand. There’s a few threads on the forum about similar stuff - this one is an example: Variable image types for analysis?.

To try and illustrate, I put 4 images with the same names as yours in a folder called “test” and pulled that Folder name out using a regular expression in the Metadata module.

Then in the NamesAndTypes module I changed the Image set matching method to be Metadata and set the Matching as below. The top row needs to be what the images you want to match have in common and then the next row needs to be something the separate images have a unique Metadata entry for.

As I say, this can be a confusing so let me know any questions you have.

Good luck!

Hi, thanks for the help. For some reason the regular expression is not detecting the folder from the file location. I have the same folder name on my desktop, just like in your example. I am operating CellProfiler 3.1.9 on Mac.

EDIT: I had to change the second backslash to a forward slash (paths on Macs use / ) Thanks! The updated regex is .*Desktop/(?P[a-z]{4})


If you only have one plate template in a given experiment, another option would be to use the “Add single image” option- that automatically adds the same image down-the-line to all your image sets. I’ve put some screenshots below.

1 Like

Hi, that is the method I ended up using. Thanks!