Resizing a string-based labeling image

Hi,

I'm having a few relatively large string-based labeling images that I would like to scale down for saving and further analysis. As far as I can tell there is no "Labeling Resizer" node, and the Image Resizer doesn't work on labelings.

I tried chaining the Labeling to Image, Image Resizer and Image to Labeling nodes, but unfortunately this will change the labels back to arbitrary numbers that I cannot relate to the original labels. I can think of two ways to achieve my goal:

  • Change the labeling back to a numbered labeling: the Label Transformer node doesn't allow to go this way, does it?
  • Save a mapping of (string labels=>numbers) while converting to an image. The Labeling to Image node doesn't have this option.
     

Any hints how I can achieve this?

Thx,

Jan

A workaround would be to use the Feature Calculator and GroupBy nodes to reassemble a number-based labeling and save the mapping between string labels and number labels for further analysis.

If anyone knows a better way to do this, I'd love to know.

Cheers,

Jan

 

Hi Jan,

actually the "Image to Labeling" should help here, in particular if using the "Labels from ..."-option in the "Labeling Settings"-Tab. However, I found that the "Labels from ..." option has no effect. It's a bug.

I try to fix it with the next bug fix release.

Best,
Martin

see: https://github.com/knime-ip/knip/pull/309

For the record, there’s now a Labeling Resizer node that was introduced with this commit:

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