Closed fedorov closed 8 months ago
Unfortunately, SlicerTotalSegmentator contains colors for only 80 body parts. Search for 3dslicerlabel
on
https://github.com/lassoan/SlicerTotalSegmentator/blob/main/TotalSegmentator/Resources/SegmentationCategoryTypeModifier-TotalSegmentator.term.json
Looking at code in suggests he choose random colors when colors are not present in the json file.
https://github.com/lassoan/SlicerTotalSegmentator/blob/main/TotalSegmentator/TotalSegmentator.py
Please advise how we should proceed.
We have the colors for all structures. Let's just add the colors we have to the terminology csv?
Unfortunately we do not have colors for the new body parts introducted in TotalSegmentator V2
Let's add all the colors we have for v1, and leave the rest blank for now. If SlicerTotalSegmentator reuses this, the same logic already implemented can be maintained - when colors are missing, random colors can be assigned.
the PR #37 is now updated to address issues #39 and #10
The csv file now contains the colors for all body parts in totalseg v1.
Here's how the colors were curated:
The file that you requested is located at https://github.com/ImagingDataCommons/Cloud-Resources-Workflows/blob/config_fix2/configs/TotalSegmentator/totalsegmentator_snomed_mapping_with_partial_colors.csv
Right now colors are separated from label->code mapping, and this is confusing.
Related to https://github.com/ImagingDataCommons/Cloud-Resources-Workflows/pull/37.
Let's pick the mapping file from https://github.com/wasserth/TotalSegmentator/blob/master/resources/totalsegmentator_snomed_mapping.csv and augment it with the colors used in https://github.com/lassoan/SlicerTotalSegmentator/blob/main/TotalSegmentator/Resources/SegmentationCategoryTypeModifier-TotalSegmentator.term.json, then replace colors for vertebrae/ribs based on what is done in Related to https://github.com/ImagingDataCommons/Cloud-Resources-Workflows/pull/37.
When this is ready, I will discuss with Jacob and Andras re consolidating this to simplify maintenance. We can hopefully just put the resulting CSV file in the TS repo in place of https://github.com/wasserth/TotalSegmentator/blob/master/resources/totalsegmentator_snomed_mapping.csv.