compose Labeling fails after Bitmask manipulation

Hi,
I have a labeling with a number of segments. I use the segment features node to get a table that also contains the bitmask image for every single label. Now if I do some operations like “Fill Holes” or “Outline” on these bitmasks and try to use the new bitmasks to compose the labeling with the GroupBy node it always fails and I get the error message:
"WARN GroupBy 0:22 Group column ‘Source Labeling’ not in spec.
WARN GroupBy 0:22 Skipped group(s): Bitmask groups: “Labeling[
name=WT_1_CW209_15.nd2;
source=C:\Users\jlabimaging\Desktop\Michael\Cotyledones\WT\WT_1_CW209_15.nd2;
dimensions=512,512,117 (X,Y,Z)]” cause: “Bitmask in row WT_1_CW209_15.nd2#5 cannot be added to the result.”

Is there any way to make this work?

Best
Christian

Hi @COS_HD1,

This happens often when you select an image of a different dimensionality for the Interval option in the GroupBy’s (Manual) Aggregation tab. If the CCA + Segment Features node generate 2D bitmasks and you try to set the interval based on the 3D input image (which seems to be the case for you), you’ll get this kind of error. The usual way around this is to use the Source Labeling for Interval.

Best,
Stefan

Hi Stefan,
Thanks for your reply. I posted an example workflow and a respective input image stack so that you can see what the problem is. At the end I managed to assemble a new labeling with the manipulated bitmasks. However they are not correctly assembled but all inserted at the same position. Somehow the original position of each label in the source labeling got lost. I also tried to use the transfer metadata node but that also doesn’t do the trick.

Best Christian

Summary

workflow_image.zip (306.1 KB)

Hi @COS_HD1,
the problem is the ImageJ macro node, it does not restore the offset metadata from the input image.
I have attached a workflow with a workaround:
test_labels_fixed.knwf (26.2 KB)

best,
Gabriel

1 Like

Thanks Gabriel. Works perfectly now.

Christian

1 Like

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