knime-ip / knip

KNIME Image Processing Extension
https://www.knime.com/community/image-processing
49 stars 11 forks source link

Labeling to Image: do not assume that a label is mapped to the same value for different images #511

Open stelfrich opened 5 years ago

stelfrich commented 5 years ago

Currently, Labeling to Image uses the value from the backing image to convert the RAI<LabelingType> to an RAI<? extends RealType>. This can result in inconsistent behavior when two RAI<LabelingType> have the same labels but use a different LabelingMapping.

This happens for example when a pixel-based classifier is applied to tiles of an image: whatever label the first pixel belongs to will be mapped to 1. Hence, the "meaning" of a1 in the backing image changes with the contents of the image and produces inconsistencies when using Labeling to Image.