Please add a run time option to specify label indices for multilabel operations
Currently label indices are hard coded to the python script. This is ok, if application is going to be used with a fixed set of labels constantly (perhaps true for human clinical data). However, users might be interested in different organisms and types of multilabel segmentation. It would give everyone more flexibility if this is read from a csv or a json file during the run time.
To avoid inventing yet another json metadata format for specifying labels, you could use the new OME-Zarr format's metadata specification: http://api.csswg.org/bikeshed/?url=https://raw.githubusercontent.com/ome/ngff/master/0.2/index.bs#label-md
We'll add support for it in Slicer, too (and we'll extend it for properly handle overlapping labels).
To avoid inventing yet another json metadata format for specifying labels, you could use the new OME-Zarr format's metadata specification: http://api.csswg.org/bikeshed/?url=https://raw.githubusercontent.com/ome/ngff/master/0.2/index.bs#label-md
We'll add support for it in Slicer, too (and we'll extend it for properly handle overlapping labels).
Thanks for raising this issue @SlicerMorph. @lassoan, that is a good idea! We'll work on this after the break :)
Please see our ideas here (Progress and Next Steps / 2). Let us know if you find it worthwhile to consider for generic use.
With new UI improvements, all the predefined labels for your sample app (say radiology) with x,y,z models get pre-populated into the segmentation list. User can simply select and work based on the names.
When the label is saved, the information (label name => index) is saved as part of label info. This shall be an useful information or any image/label loaders in case of multi-label.
Please try the new version and feel free to reopen/add new issue/comments if required.