InsightSoftwareConsortium / napari-itk-io

File IO with itk for napari.
Apache License 2.0
7 stars 2 forks source link

Add the option of openning a Label layer when providing a binary image #10

Open rcremese opened 5 months ago

rcremese commented 5 months ago

Hello, I'm writing this issue because I'm currently using your plugin on napari and would like to be able to use it to open labels file for image segmentation for medical image segmentation challenges.

The problem I'm facing being that if the binary image is encoded in int, the autoconversion of napari easily handle the conversion to a napary.Label, but if it's type is a float this auto-conversion can't work and raise a type error.

I just wondered if it would be possible to add an option in your reader to choose between "image" or "layer" and do the appropriate conversion for napari. I can propose myself to contribute if needed.