Display ImgLabeling

imglib2
scijava
Tags: #<Tag:0x00007fd540975758> #<Tag:0x00007fd5409755f0>

#1

what would be a convenient way to display a ImgLabeling? the DisplayService.createDisplay() does not seem to like it…

ava.lang.ClassCastException: java.lang.ClassCastException:
 net.imglib2.roi.labeling.LabelingType cannot be cast to net.imglib2.type.numeric.RealType

#2

I’m not sure what call you’re using exactly, but I would expect that <ImgLabeling>.getIndexImg() will give you a displayable RandomAccessibleInterval.


#3

Thanks @bogovicj

since ImgLabeling is implementing RandomAccessibleInterval I was expecting, that the display service would be able to handle it as is. But I should have looked just a bit further…


#4

No problem, glad it worked!