KNIME: Count number of vesicle per cell

@stelfrich @imagejan @Lisa1 @Alex_H @TobiasKletter

Hello,

We would like to count the number of vesicles in a cell in 3D, using KNIME.

We managed to both segment the the cells and the vesicles, so we have the corresponding label images, but we do not know how to continue.

We found the node “Measure Image Segment Features”, but that does not take two label images as input, but only one label image and one ordinary image.

I guess we would need a node that takes two label images and computes how many labels of the one image are within the labels of the other?! Or maybe there is a different logic?

1 Like

You can have a look at the Count Chromosomes workflow on the KNIME example server (99_Community > 01_Image_Processing > 03_Applications).

In essence, you’ll need to follow these steps:

  • Use a Label Transformer node to make your labels unique (i.e. cell 1 is not vesicle 1)
  • Use a Labeling Arithmetics node to merge the labels into a single label image with overlapping labels.
  • Use a Segment Features node to extract the label dependencies of overlapping labels
  • Use the GroupBy node to group per source labeling and count the vesicles per cell

Hope that helps,
Jan

4 Likes

In this step you might also want to do a filtering on the segment labels for something like vesicle_* (containing a wildcard). Otherwise, you’ll end up with rows for vesicles as well as cells which, I assume, is not necessarily what you want…