How can I load a default segment color config from customized file,like export from itk-snap

image

like this, itk-snap has a eport label description file funciton, so I want load this file to slicer to perform segmentation with color described in file, how can I do this?

One option is just to use the segment editor to make a segmentation with the names/colors you want to have but no segmentations and save it as a .seg.nrrd that you can use as a template. Then reload it for each case you want to segment and add the actual segmentations (setting the master volume and adjusting the segmentation geometry if needed).

one code piece i copy from module brain parcellation
image
and the GIFNiftyNet2.ctbl file format
image

I’ve added a reader for this ITK-Snap Label Description file format (*.txt or *.label), in the Sandbox extension. If you install this extension then you can-drag-and drop these label description files to make Slicer load them as a color table. This color table can then be used when you load a segmentation to set segment names and colors. See some more description here.

image

image