I have a lot of segmentation annotation exported from 3dslicer. But the label value is not consistent. So I would like to do some data clean. I got
.seg.nrrd (segmentation file export from 3dslicer),
.ctbl (color table), and
-label.nrrd (labelmap file export from 3dslicer) for each input image. I check
seg.nrrd's metadatakeys, and I notice that there are keys:
Segment0_Color Segment0_ColorAutoGenerated Segment0_ID Segment0_Name Segment0_NameAutoGenerated
So I could simply update these keys, and the data (converted to numpy array, remap to correct label value, and then convert back to nrrd) according to the
.ctbl file. Is that OK?
Then I found this post. I only need to update the labelmap file (
-label.nrrd) file. Am I right? Maybe 3dslicer could merge
-label.nrrd to save space.
For now, our workflow:
- load data
- switch to Segment Editor module, add Segment
- switch to Segmentations module, export segmentation to Labelmap
- save files, including Segmentation (
.seg.nrrd), label map (
-label.nrrd), and Color Table (
- close scene, and restart from step 1 for the next input image.
In step 2, we have 3 classes, but there might only be one class, so the user would only add one class, and set the proper class name. I think that’s why we got an inconsistent color table. Any suggestions to improve this workflow?