-
I just found documentation which states that only NRRD/NIFTI files can be directly loaded as segmentations. Is there a particular reason for this choice? Are there plans to add more file formats?
-
I was also able to find a python binding for “Convert labelmap to segmentation node” from the slicer forum
tmp = slicer.util.loadLabelVolume(pathMaskFile)
mask = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLSegmentationNode')
slicer.modules.segmentations.logic().ImportLabelmapToSegmentationNode(tmp, mask)
slicer.mrmlScene.RemoveNode(tmp)