lassoan / SlicerMONAIAuto3DSeg

Extension for 3D Slicer for running MONAI Auto3DSeg models
MIT License
67 stars 10 forks source link

Obtain standard DICOM codes for anatomical regions #16

Closed diazandr3s closed 7 months ago

diazandr3s commented 9 months ago

Is there an easy and systematic way of obtaining the DICOM category, modifier, designator, etc

SegmentedPropertyCategoryCodeSequence.CodingSchemeDesignator SegmentedPropertyCategoryCodeSequence.CodeValue SegmentedPropertyCategoryCodeSequence.CodeMeaning SegmentedPropertyTypeCodeSequence.CodingSchemeDesignator SegmentedPropertyTypeCodeSequence.CodeValue SegmentedPropertyTypeCodeSequence.CodeMeaning
SegmentedPropertyTypeModifierCodeSequence.CodingSchemeDesignator SegmentedPropertyTypeModifierCodeSequence.CodeValue SegmentedPropertyTypeModifierCodeSequence.CodeMeaning

of the following anatomical brain regions/segments?

'Left-Cerebral-White-Matter' 'Left-Lateral-Ventricle' 'Left-Inf-Lat-Vent' 'Left-Cerebellum-White-Matter' 'Left-Cerebellum-Cortex' 'Left-Thalamus' 'Left-Caudate' 'Left-Putamen' 'Left-Pallidum' '3rd-Ventricle' '4th-Ventricle' 'Brain-Stem' 'Left-Hippocampus' 'Left-Amygdala' 'CSF' 'Left-Accumbens-area' 'Left-VentralDC' 'Right-Cerebral-White-Matter' 'Right-Lateral-Ventricle' 'Right-Inf-Lat-Vent' 'Right-Cerebellum-White-Matter' 'Right-Cerebellum-Cortex' 'Right-Thalamus' 'Right-Caudate' 'Right-Putamen' 'Right-Pallidum' 'Right-Hippocampus' 'Right-Amygdala' 'Right-Accumbens-area' 'Right-VentralDC' 'ctx-lh-bankssts' 'ctx-lh-caudalanteriorcingulate' 'ctx-lh-caudalmiddlefrontal' 'ctx-lh-cuneus' 'ctx-lh-entorhinal' 'ctx-lh-fusiform' 'ctx-lh-inferiorparietal' 'ctx-lh-inferiortemporal' 'ctx-lh-isthmuscingulate' 'ctx-lh-lateraloccipital' 'ctx-lh-lateralorbitofrontal' 'ctx-lh-lingual' 'ctx-lh-medialorbitofrontal' 'ctx-lh-middletemporal' 'ctx-lh-parahippocampal' 'ctx-lh-paracentral' 'ctx-lh-parsopercularis' 'ctx-lh-parsorbitalis' 'ctx-lh-parstriangularis' 'ctx-lh-pericalcarine' 'ctx-lh-postcentral' 'ctx-lh-posteriorcingulate' 'ctx-lh-precentral' 'ctx-lh-precuneus' 'ctx-lh-rostralanteriorcingulate' 'ctx-lh-rostralmiddlefrontal' 'ctx-lh-superiorfrontal' 'ctx-lh-superiorparietal' 'ctx-lh-superiortemporal' 'ctx-lh-supramarginal' 'ctx-lh-frontalpole' 'ctx-lh-temporalpole' 'ctx-lh-transversetemporal' 'ctx-lh-insula' 'ctx-rh-bankssts' 'ctx-rh-caudalanteriorcingulate' 'ctx-rh-caudalmiddlefrontal' 'ctx-rh-cuneus' 'ctx-rh-entorhinal' 'ctx-rh-fusiform' 'ctx-rh-inferiorparietal' 'ctx-rh-inferiortemporal' 'ctx-rh-isthmuscingulate' 'ctx-rh-lateraloccipital' 'ctx-rh-lateralorbitofrontal' 'ctx-rh-lingual' 'ctx-rh-medialorbitofrontal' 'ctx-rh-middletemporal' 'ctx-rh-parahippocampal' 'ctx-rh-paracentral' 'ctx-rh-parsopercularis' 'ctx-rh-parsorbitalis' 'ctx-rh-parstriangularis' 'ctx-rh-pericalcarine' 'ctx-rh-postcentral' 'ctx-rh-posteriorcingulate' 'ctx-rh-precentral' 'ctx-rh-precuneus' 'ctx-rh-rostralanteriorcingulate' 'ctx-rh-rostralmiddlefrontal' 'ctx-rh-superiorfrontal' 'ctx-rh-superiorparietal' 'ctx-rh-superiortemporal' 'ctx-rh-supramarginal' 'ctx-rh-frontalpole' 'ctx-rh-temporalpole' 'ctx-rh-transversetemporal' 'ctx-rh-insula'

Thanks in advance!

lassoan commented 9 months ago

Data sources that I would recommend using (in this order):

lassoan commented 7 months ago

Brats labels.csv files needs to be fixed up.

Currently, the type is repeated 3 times, while the first code is the category (usually Anatomical structure or Morphologically altered structure), then type (trachea, hemorrhage, ...), then if it is a morphologically altered structure and we know where it is then we can specify the anatomical region (e.g., cerebellum).

For example, correct labels.csv for Brats-GLI:

LabelValue,Name,SegmentedPropertyCategoryCodeSequence.CodingSchemeDesignator,SegmentedPropertyCategoryCodeSequence.CodeValue,SegmentedPropertyCategoryCodeSequence.CodeMeaning,SegmentedPropertyTypeCodeSequence.CodingSchemeDesignator,SegmentedPropertyTypeCodeSequence.CodeValue,SegmentedPropertyTypeCodeSequence.CodeMeaning,SegmentedPropertyTypeModifierCodeSequence.CodingSchemeDesignator,SegmentedPropertyTypeModifierCodeSequence.CodeValue,SegmentedPropertyTypeModifierCodeSequence.CodeMeaning,AnatomicRegionSequence.CodingSchemeDesignator,AnatomicRegionSequence.CodeValue,AnatomicRegionSequence.CodeMeaning,AnatomicRegionModifierSequence.CodingSchemeDesignator,AnatomicRegionModifierSequence.CodeValue,AnatomicRegionModifierSequence.CodeMeaning
3,Neoplasm,SCT,49755003,Morphologically Altered Structure,SCT,86049000,"Neoplasm, Primary",,,,SCT,12738006,Brain,,,
2,Edema,SCT,49755003,Morphologically Altered Structure,SCT,79654002,Edema,,,,SCT,12738006,Brain,,,
1,Necrosis,SCT,49755003,Morphologically Altered Structure,SCT,6574001,Necrosis,,,,SCT,12738006,Brain,,,
diazandr3s commented 7 months ago

Data sources that I would recommend using (in this order):

* [SegmentationCategoryTypeModifier-DICOM](https://github.com/Slicer/Slicer/blob/main/Modules/Loadable/Terminologies/Resources/SegmentationCategoryTypeModifier-DICOM-Master.json): this was developed by the QIICR project and contributed to Slicer. You can look up terms in the file, but it may be easier to use the terminology selector in Slicer, i.e., create a segmentation, select the segment, double-click the colored rectangle, and type the term (and if needed select modifier). When you save the segmentation the terminology codes will be saved in the nrrd header that you need to reformat to csv manually, but we should implement a converter to .csv to make this easier.

* [DICOM controlled terminology definitions](https://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_d.html)

* For any structures that cannot be find here or if there are any questions or ambiguities: contact David Clunie for advice

More information about this issue is here: https://discourse.slicer.org/t/new-extension-monai-auto3dseg-raise-the-bar-in-ai-medical-image-segmentation/35680/25?u=diazandr3s