Maximum number of labels in VolumeSegmenter
5 views (last 30 days)
I am trying to open a labelled matrix from the workspace in the Volume Segmenter tool. However, I get this error saying that 'Maximum number of labels allowed is 255'. I have 1000 objects and they are labelled in an order in the label matrix. How can I edit and segment the objects in Volume Segmenter tool? Is there a way to extend the maximum number of labels allowed?
Pratyush Roy on 27 Apr 2021
Unfortunately the maximum number of labels that is supported in the volume visualization with labeled data is 128 due to implementation specifics when labeled data is overlaid with volume data.
If in your case, these 1000+ labels are not unique and are instance labels of the same category and if it is possible to visualize this volume as a binary mask, you can consider the following workaround:
1) In "volumeSegmenter", solve and visualize the problem as a binary segmentation problem instead of a multi-class segmentation problem. This will involve two classes: true = active particles, false = background.
2) "regionprops3" accepts a logical 3-D array as input, so the result of the segmentation solved in 1) can be fed directly into "regionprops3" for downstream processing. "regionprops3" will compute the individual true regions within the input volumetric binary image as part of the region analysis computation.
Hope this helps!