image segment features of multiple channels simultaneously

Dear all,

Knime Newbie here.

I am probably missing something obvious but is there a best/most efficient way to calculate image segment features (intensities) of three channels simultaneously?

  1. three parallel executions of the image segment features node with a different input for each of the three channels, then join the outputs?
  2. loop over the columns? is this possible at all?

Thank you very much,

Marie

Hi Marie,

I’d say both is possible, and it depends on your actual use case.

If you know you’ll always have three channels in your datasets, then it might be fine to “hardcode” it by using three Image Segment Features nodes, each one configured for one of the split channels.

If you want to measure the same features for all the three channels, you can also loop over the columns using Column List Loop Start – KNIME Hub and, for example, Loop End (Column Append) – KNIME Hub.

In this case, it might however be more performant to re-shape the table so that all channels are in the same column. You can do this using the Unpivoting – KNIME Hub node.


If you have a lot of image datasets (i.e. a lot of table rows), it usually makes more sense to parallelize on a higher level (i.e. parallelize all the input rows with the Parallel Chunk nodes) and then keep the workflow part that deals with each image more or less sequential.

To compare how the different approaches perform on your own data, you can use Timer Info – KNIME Hub and look at the added times of all nodes concerned.

1 Like

Thank you very much @imagejan.

I am finally getting around to implementing the options mentioned above.

  1. Hard coding works but it looks a bit messy as many nodes are used. Second place for processing time.
  2. Unpivoting works but the column names are lost in the Feature Calculator (Beta) node. By the time that I have manipulated the rowIDs to re-generate that information, things are looking messy again. This is the quickest in terms of processing time.
  3. Looping the columns looks the cleanest but takes the longest. :woman_facepalming:

The test data set that I am using is small and the processing is pre-faced with a Cellpose segmentation node which takes much longer than the couple of seconds to measure segment features.

Thank you very much for the advice!

Marie

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