How to display Well images in Plate Heatmap Viewer?

[Cross-posting from GitHub since I realized later this was likely a better place to post]

Plate Heatmap Viewer says it supports viewing images (“Tables containing images allow visualization of the well images in the well detail view.”), but it is not working for me. I am not understanding what format the images need to be in.

I have saved PNGs in a local directory, output from a CellProfiler SaveImages module, and I’d like to display them in Plate Heatmap Viewer. The Docs say “Any cell of an image data column will be visualized”, and I have a column in my input that is a full folder and file path to my images, but I suspect that this is not the right format. Can you help give me any tip? Thanks!

1 Like

Welcome to the forum @dlogan

I think that the key is in the description.

Tables containing images allow visualization of the well images in the well detail view. Any cell of an imagedata column will be visualized. So far the KNIME native PNG images are recognised, as well as the formatsprovided by the Image Processing plugin

So you need a KNIME table with png or some other supported images in it, in every row that you want to visualize. This will not work if you only have a filepath.

Once you’re in the trelis view of the Plate Heatmap Viewer node, you can right click on a plate to open the detail view. You can then hover over (or right click on) individual wells to see the image(s) associated with that well.

Here’s an example I have where the images are chemical structures:

1 Like

Thanks, elsamuel, for answering. Yes, that is correct. There must be a column (or more) with images. PNG or IMG should work. Just the path to the images is not working.
Best, Martin

Thanks to both for the quick response. So then my next question (sorry, Knime novice): What is your suggested node to get images into a table? Could you post an example workflow?

I have tried Image Reader (Table) connecting to Plate Heatmap Viewer

but that returns this dialog where I’m stuck:
image

I also see there is “Image to Table” available, but that just takes in one image at a time…
I’ll be happy with any solution that allows me to view a file list of PNGs (yes, somehow converted to a Knime table), thanks!

In principle that is correct. You need to use an Image Reader or PNG Reader.

Are you sure your configured the Reader correctly? You need to append the images and the table structure must be the same as without the image column, meaning columns for plate name, plate column, plate row. Well duplicates are not allowed, but you could generate several image columns via e.g. pivoting… It looks like you dont have any number columns (maybe you lost them because you selected new table in the image reader!?).

The table you need to feed in should look similar like in the screen shot.

I had an example workflow for a workshop from 2015, which I still need to update. I dont have time for that now, but I will post a link as soon as I have it ready.

Martin

2 Likes

It’s difficult to create an example workflow since I don’t know what you’re working with, but here’s a simplified attempt:

  1. The List Files/Folders node points to a folder containing 3 png files named A1.png, A2.png, A3.png. It returns a filepath for each of these files.

  2. I convert the filepath to a string format, then to a URI, because the Read Images node only works with URI format

  3. The Read Images node takes each of the URIs and puts each image in its own row:

  4. Then I assign each row a well position using the Append Plate Well IDs node. You can assign well positions however you want. If your images are named after the well positions, you could extract the well positions from the path.

  5. This then goes into the Plate Heatmap Viewer. When I examine well A1, I get the following:

2 Likes

Thanks both @stoeter and @elsamuel, I got it working! At least it shows the smaller PNG thumbnails as expected. I think the key for me was to get the image paths into URI format and then read. I’m basically recapitulating your 2013(!) CP/Knime paper @stoeter :wink: but for a larger group that needs an open source solution for a simple QC overview.

One more question: I see the image thumbnails from the saved CellProfiler images, but is there any way within Plate Heatmap Viewer to render the full PNG? I was hoping if I clicked on the thumbnail it would fully render. Thanks!

Hi,
sorry, I dont think it is possible to click on an image and render is like is is possible with the Image View.
We also load CP image into KNIME once in a while, however I usually create small images (you said you had thumbnails) of e.g. 300x300 cropped from a large image (sometime as big as ~2500x2000). That could also be done within KNIME after loading the image. On the cropped image you can see enough deatails. Of cause you need to also have addressed the right contrast streching for the visualization…
Best,
M.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.