class_map = {

    # classes of old TotalSegmentator v1
    "total_v1": {
        1: "spleen",
        2: "kidney_right",
        3: "kidney_left",
        4: "gallbladder",
        5: "liver",
        6: "stomach",
        7: "aorta",
        8: "inferior_vena_cava",
        9: "portal_vein_and_splenic_vein",
        10: "pancreas",
        11: "adrenal_gland_right",
        12: "adrenal_gland_left",
        13: "lung_upper_lobe_left",
        14: "lung_lower_lobe_left",
        15: "lung_upper_lobe_right",
        16: "lung_middle_lobe_right",
        17: "lung_lower_lobe_right",
        18: "vertebrae_L5",
        19: "vertebrae_L4",
        20: "vertebrae_L3",
        21: "vertebrae_L2",
        22: "vertebrae_L1",
        23: "vertebrae_T12",
        24: "vertebrae_T11",
        25: "vertebrae_T10",
        26: "vertebrae_T9",
        27: "vertebrae_T8",
        28: "vertebrae_T7",
        29: "vertebrae_T6",
        30: "vertebrae_T5",
        31: "vertebrae_T4",
        32: "vertebrae_T3",
        33: "vertebrae_T2",
        34: "vertebrae_T1",
        35: "vertebrae_C7",
        36: "vertebrae_C6",
        37: "vertebrae_C5",
        38: "vertebrae_C4",
        39: "vertebrae_C3",
        40: "vertebrae_C2",
        41: "vertebrae_C1",
        42: "esophagus",
        43: "trachea",
        44: "heart_myocardium",
        45: "heart_atrium_left",
        46: "heart_ventricle_left",
        47: "heart_atrium_right",
        48: "heart_ventricle_right",
        49: "pulmonary_artery",
        50: "brain",
        51: "iliac_artery_left",
        52: "iliac_artery_right",
        53: "iliac_vena_left",
        54: "iliac_vena_right",
        55: "small_bowel",
        56: "duodenum",
        57: "colon",
        58: "rib_left_1",
        59: "rib_left_2",
        60: "rib_left_3",
        61: "rib_left_4",
        62: "rib_left_5",
        63: "rib_left_6",
        64: "rib_left_7",
        65: "rib_left_8",
        66: "rib_left_9",
        67: "rib_left_10",
        68: "rib_left_11",
        69: "rib_left_12",
        70: "rib_right_1",
        71: "rib_right_2",
        72: "rib_right_3",
        73: "rib_right_4",
        74: "rib_right_5",
        75: "rib_right_6",
        76: "rib_right_7",
        77: "rib_right_8",
        78: "rib_right_9",
        79: "rib_right_10",
        80: "rib_right_11",
        81: "rib_right_12",
        82: "humerus_left",
        83: "humerus_right",
        84: "scapula_left",
        85: "scapula_right",
        86: "clavicula_left",
        87: "clavicula_right",
        88: "femur_left",
        89: "femur_right",
        90: "hip_left",
        91: "hip_right",
        92: "sacrum",
        93: "face",
        94: "gluteus_maximus_left",
        95: "gluteus_maximus_right",
        96: "gluteus_medius_left",
        97: "gluteus_medius_right",
        98: "gluteus_minimus_left",
        99: "gluteus_minimus_right",
        100: "autochthon_left",
        101: "autochthon_right",
        102: "iliopsoas_left",
        103: "iliopsoas_right",
        104: "urinary_bladder"
    },

    # classes of new TotalSegmentator v2
    "total": {
        1: "spleen",
        2: "kidney_right",
        3: "kidney_left",
        4: "gallbladder",
        5: "liver",
        6: "stomach",
        7: "pancreas",
        8: "adrenal_gland_right",
        9: "adrenal_gland_left",
        10: "lung_upper_lobe_left",
        11: "lung_lower_lobe_left",
        12: "lung_upper_lobe_right",
        13: "lung_middle_lobe_right",
        14: "lung_lower_lobe_right",
        15: "esophagus",
        16: "trachea",
        17: "thyroid_gland",
        18: "small_bowel",
        19: "duodenum",
        20: "colon",
        21: "urinary_bladder",
        22: "prostate",
        23: "kidney_cyst_left",
        24: "kidney_cyst_right",
        25: "sacrum",
        26: "vertebrae_S1",
        27: "vertebrae_L5",
        28: "vertebrae_L4",
        29: "vertebrae_L3",
        30: "vertebrae_L2",
        31: "vertebrae_L1",
        32: "vertebrae_T12",
        33: "vertebrae_T11",
        34: "vertebrae_T10",
        35: "vertebrae_T9",
        36: "vertebrae_T8",
        37: "vertebrae_T7",
        38: "vertebrae_T6",
        39: "vertebrae_T5",
        40: "vertebrae_T4",
        41: "vertebrae_T3",
        42: "vertebrae_T2",
        43: "vertebrae_T1",
        44: "vertebrae_C7",
        45: "vertebrae_C6",
        46: "vertebrae_C5",
        47: "vertebrae_C4",
        48: "vertebrae_C3",
        49: "vertebrae_C2",
        50: "vertebrae_C1",
        51: "heart",
        52: "aorta",
        53: "pulmonary_vein",
        54: "brachiocephalic_trunk",
        55: "subclavian_artery_right",
        56: "subclavian_artery_left",
        57: "common_carotid_artery_right",
        58: "common_carotid_artery_left",
        59: "brachiocephalic_vein_left",
        60: "brachiocephalic_vein_right",
        61: "atrial_appendage_left",
        62: "superior_vena_cava",
        63: "inferior_vena_cava",
        64: "portal_vein_and_splenic_vein",
        65: "iliac_artery_left",
        66: "iliac_artery_right",
        67: "iliac_vena_left",
        68: "iliac_vena_right",
        69: "humerus_left",
        70: "humerus_right",
        71: "scapula_left",
        72: "scapula_right",
        73: "clavicula_left",
        74: "clavicula_right",
        75: "femur_left",
        76: "femur_right",
        77: "hip_left",
        78: "hip_right",
        79: "spinal_cord",
        80: "gluteus_maximus_left",
        81: "gluteus_maximus_right",
        82: "gluteus_medius_left",
        83: "gluteus_medius_right",
        84: "gluteus_minimus_left",
        85: "gluteus_minimus_right",
        86: "autochthon_left",
        87: "autochthon_right",
        88: "iliopsoas_left",
        89: "iliopsoas_right",
        90: "brain",
        91: "skull",
        92: "rib_left_1",
        93: "rib_left_2",
        94: "rib_left_3",
        95: "rib_left_4",
        96: "rib_left_5",
        97: "rib_left_6",
        98: "rib_left_7",
        99: "rib_left_8",
        100: "rib_left_9",
        101: "rib_left_10",
        102: "rib_left_11",
        103: "rib_left_12",
        104: "rib_right_1",
        105: "rib_right_2",
        106: "rib_right_3",
        107: "rib_right_4",
        108: "rib_right_5",
        109: "rib_right_6",
        110: "rib_right_7",
        111: "rib_right_8",
        112: "rib_right_9",
        113: "rib_right_10",
        114: "rib_right_11",
        115: "rib_right_12",
        116: "sternum",
        117: "costal_cartilages"
    },

    "total_mr": {
        1: "spleen",
        2: "kidney_right",
        3: "kidney_left",
        4: "gallbladder",
        5: "liver",
        6: "stomach",
        7: "pancreas",
        8: "adrenal_gland_right",
        9: "adrenal_gland_left",
        10: "lung_left",
        11: "lung_right",
        12: "esophagus",
        13: "small_bowel",
        14: "duodenum",
        15: "colon",
        16: "urinary_bladder",
        17: "prostate",
        18: "sacrum",
        19: "vertebrae",
        20: "intervertebral_discs",
        21: "spinal_cord",
        22: "heart",
        23: "aorta",
        24: "inferior_vena_cava",
        25: "portal_vein_and_splenic_vein",
        26: "iliac_artery_left",
        27: "iliac_artery_right",
        28: "iliac_vena_left",
        29: "iliac_vena_right",
        30: "humerus_left",
        31: "humerus_right",
        32: "scapula_left",
        33: "scapula_right",
        34: "clavicula_left",
        35: "clavicula_right",
        36: "femur_left",
        37: "femur_right",
        38: "hip_left",
        39: "hip_right",
        40: "gluteus_maximus_left",
        41: "gluteus_maximus_right",
        42: "gluteus_medius_left",
        43: "gluteus_medius_right",
        44: "gluteus_minimus_left",
        45: "gluteus_minimus_right",
        46: "autochthon_left",
        47: "autochthon_right",
        48: "iliopsoas_left",
        49: "iliopsoas_right",
        50: "brain",
    },

    "total_highres_test": {
        1: "spleen",
        2: "kidney_right",
        3: "kidney_left",
        4: "gallbladder",
        5: "liver",
        6: "stomach",
        7: "pancreas",
        8: "adrenal_gland_right",
        9: "adrenal_gland_left",
        10: "lung_upper_lobe_left",
        11: "lung_lower_lobe_left",
        12: "lung_upper_lobe_right",
        13: "lung_middle_lobe_right",
        14: "lung_lower_lobe_right",
        15: "esophagus",
        16: "trachea",
        17: "thyroid_gland",
        18: "small_bowel",
        19: "duodenum",
        20: "colon",
        21: "urinary_bladder",
        22: "prostate",
        23: "kidney_cyst_left",
        24: "kidney_cyst_right"
    },
    
    # total_fast not extra class map, because easier to use just "total" for fast model
    "lung_vessels": {
        1: "lung_airways",
        2: "lung_airways_wall",
        3: "lung_arteries",
        4: "lung_veins"
    },
    "lung_vessels_LEGACY": {
        1: "lung_vessels",
        2: "lung_trachea_bronchia"
    },
    "oculomotor_muscles": {
        1: "skull",  # auxiliary class
        2: "eyeball_right",
        3: "lateral_rectus_muscle_right",
        4: "superior_oblique_muscle_right",
        5: "levator_palpebrae_superioris_right",
        6: "superior_rectus_muscle_right",
        7: "medial_rectus_muscle_left",
        8: "inferior_oblique_muscle_right",
        9: "inferior_rectus_muscle_right",
        10: "optic_nerve_left",
        11: "eyeball_left",
        12: "lateral_rectus_muscle_left",
        13: "superior_oblique_muscle_left",
        14: "levator_palpebrae_superioris_left",
        15: "superior_rectus_muscle_left",
        16: "medial_rectus_muscle_right",
        17: "inferior_oblique_muscle_left",
        18: "inferior_rectus_muscle_left",
        19: "optic_nerve_right"
    },
    "covid": {
        1: "lung_covid_infiltrate",
    },
    "cerebral_bleed": {
        1: "intracerebral_hemorrhage",
    },
    "hip_implant": {
        1: "hip_implant",
    },
    "coronary_arteries": {
        1: "coronary_arteries",
    },
    "coronary_arteries_LEGACY": {
        1: "coronary_arteries",
    },
    "body": {
        1: "body_trunc",
        2: "body_extremities",
    },
    "body_mr": {
        1: "body_trunc",
        2: "body_extremities",
    },
    "vertebrae_mr": {
        1: "sacrum",
        2: "vertebrae_L5",
        3: "vertebrae_L4", 
        4: "vertebrae_L3",
        5: "vertebrae_L2",
        6: "vertebrae_L1",
        7: "vertebrae_T12",
        8: "vertebrae_T11",
        9: "vertebrae_T10",
        10: "vertebrae_T9",
        11: "vertebrae_T8",
        12: "vertebrae_T7",
        13: "vertebrae_T6",
        14: "vertebrae_T5",
        15: "vertebrae_T4",
        16: "vertebrae_T3",
        17: "vertebrae_T2",
        18: "vertebrae_T1",
        19: "vertebrae_C7",
        20: "vertebrae_C6",
        21: "vertebrae_C5",
        22: "vertebrae_C4",
        23: "vertebrae_C3",
        24: "vertebrae_C2",
        25: "vertebrae_C1",
    },
    "pleural_pericard_effusion": {
        1: "lung_pleural",
        2: "pleural_effusion",
        3: "pericardial_effusion",
    },
    "liver_vessels": {
        1: "liver_vessels",
        2: "liver_tumor"
    },
    "vertebrae_body": {
        1: "vertebrae_body",
        2: "intervertebral_discs"
    },
    "heartchambers_highres": {
        1: "heart_myocardium",
        2: "heart_atrium_left",
        3: "heart_ventricle_left",
        4: "heart_atrium_right",
        5: "heart_ventricle_right",
        6: "aorta",
        7: "pulmonary_artery"
    },
    "appendicular_bones": {
        1: "patella",
        2: "tibia",
        3: "fibula",
        4: "tarsal",
        5: "metatarsal",
        6: "phalanges_feet",
        7: "ulna",
        8: "radius",
        9: "carpal",
        10: "metacarpal",
        11: "phalanges_hand"
    },
    "appendicular_bones_mr": {
        1: "patella",
        2: "tibia",
        3: "fibula",
        4: "tarsal",
        5: "metatarsal",
        6: "phalanges_feet",
        7: "ulna",
        8: "radius",
        # 9: "carpal",  # missing for mr
        # 10: "metacarpal",  # missing for mr
        # 11: "phalanges_hand"  # missing for mr
    },
    # those classes need to be removed
    "appendicular_bones_auxiliary": {
        12: "humerus",
        13: "femur",
        14: "liver",
        15: "spleen"
    },
    "tissue_types": {
        1: "subcutaneous_fat",
        2: "torso_fat",
        3: "skeletal_muscle"
    },
    "tissue_types_mr": {
        1: "subcutaneous_fat",
        2: "torso_fat",
        3: "skeletal_muscle"
    },
    "tissue_4_types": {
        1: "subcutaneous_fat",
        2: "torso_fat",
        3: "skeletal_muscle",
        4: "intermuscular_fat"
    },
    "face": {
        1: "face"
    },
    "face_mr": {
        1: "face"
    },
    # those classes need to be removed
    "face_mr_auxiliary": {
        2: "brain",
        3: "liver"
    },
    "brain_structures": {
        1: "brainstem",  # + brain_parenchyma
        2: "subarachnoid_space",
        3: "venous_sinuses", # + dural folds
        4: "septum_pellucidum",
        5: "cerebellum",
        6: "caudate_nucleus",
        7: "lentiform_nucleus",
        8: "insular_cortex",
        9: "internal_capsule",
        10: "ventricle",
        11: "central_sulcus",
        12: "frontal_lobe",
        13: "parietal_lobe",
        14: "occipital_lobe",
        15: "temporal_lobe",
        16: "thalamus"
    },
    "head_glands_cavities": {
        1: "eye_left",
        2: "eye_right",
        3: "eye_lens_left",
        4: "eye_lens_right",
        5: "optic_nerve_left",
        6: "optic_nerve_right",
        7: "parotid_gland_left",
        8: "parotid_gland_right",
        9: "submandibular_gland_right",
        10: "submandibular_gland_left",
        11: "nasopharynx",
        12: "oropharynx",
        13: "hypopharynx",
        14: "nasal_cavity_right",
        15: "nasal_cavity_left",
        16: "auditory_canal_right",
        17: "auditory_canal_left",
        18: "soft_palate",
        19: "hard_palate"
    },
    "headneck_bones_vessels": {
        1: "larynx_air",
        2: "thyroid_cartilage",
        3: "hyoid",
        4: "cricoid_cartilage",
        5: "zygomatic_arch_right",
        6: "zygomatic_arch_left",
        7: "styloid_process_right",
        8: "styloid_process_left",
        9: "internal_carotid_artery_right",
        10: "internal_carotid_artery_left",
        11: "internal_jugular_vein_right",
        12: "internal_jugular_vein_left",
    },
    "head_muscles": {   
        1: "masseter_right",
        2: "masseter_left",
        3: "temporalis_right",
        4: "temporalis_left",
        5: "lateral_pterygoid_right",
        6: "lateral_pterygoid_left",
        7: "medial_pterygoid_right",
        8: "medial_pterygoid_left",
        9: "tongue",
        10: "digastric_right",
        11: "digastric_left"
    },
    "headneck_muscles": {
        1: "sternocleidomastoid_right",
        2: "sternocleidomastoid_left",
        3: "superior_pharyngeal_constrictor",
        4: "middle_pharyngeal_constrictor",
        5: "inferior_pharyngeal_constrictor",
        6: "trapezius_right",
        7: "trapezius_left",
        8: "platysma_right",
        9: "platysma_left",
        10: "levator_scapulae_right",
        11: "levator_scapulae_left",
        12: "anterior_scalene_right",
        13: "anterior_scalene_left",
        14: "middle_scalene_right",
        15: "middle_scalene_left",
        16: "posterior_scalene_right",
        17: "posterior_scalene_left",
        18: "sterno_thyroid_right",
        19: "sterno_thyroid_left",
        20: "thyrohyoid_right",
        21: "thyrohyoid_left",
        22: "prevertebral_right",
        23: "prevertebral_left"
    },
    # CT model WIP
    "thigh_shoulder_muscles": {
        1: "quadriceps_femoris_left",
        2: "quadriceps_femoris_right",
        3: "thigh_medial_compartment_left",
        4: "thigh_medial_compartment_right",
        5: "thigh_posterior_compartment_left",
        6: "thigh_posterior_compartment_right",
        7: "sartorius_left",
        8: "sartorius_right",
        9: "deltoid",
        10: "supraspinatus",
        11: "infraspinatus",  # this also contains teres_minor
        12: "subscapularis",
        13: "coracobrachial",
        14: "trapezius",
        15: "pectoralis_minor",
        16: "serratus_anterior",
        17: "teres_major",
        18: "triceps_brachii"
    },
    "thigh_shoulder_muscles_mr": {
        1: "quadriceps_femoris_left",
        2: "quadriceps_femoris_right",
        3: "thigh_medial_compartment_left",
        4: "thigh_medial_compartment_right",
        5: "thigh_posterior_compartment_left",
        6: "thigh_posterior_compartment_right",
        7: "sartorius_left",
        8: "sartorius_right",
        9: "deltoid",
        10: "supraspinatus",
        11: "infraspinatus",  # this also contains teres_minor
        12: "subscapularis",
        13: "coracobrachial",
        14: "trapezius",
        15: "pectoralis_minor",
        16: "serratus_anterior",
        17: "teres_major",
        18: "triceps_brachii"
    },
    "lung_nodules": {
        1: "lung",
        2: "lung_nodules"
    },
    "kidney_cysts": {
        1: "kidney_cyst_left",
        2: "kidney_cyst_right"
    },
    # those classes need to be removed
    "kidney_cysts_auxiliary": {
        3: "kidney_left",
        4: "kidney_right"
    },
    "breasts": {
        1: "breast"
    },
    "ventricle_parts": {
        1: "ventricle_frontal_horn_left",
        2: "ventricle_occipital_horn_left", 
        3: "ventricle_body_left",
        4: "ventricle_temporal_horn_left",
        5: "ventricle_trigone_left",
        6: "ventricle_frontal_horn_right",
        7: "ventricle_occipital_horn_right",
        8: "ventricle_body_right", 
        9: "ventricle_temporal_horn_right",
        10: "ventricle_trigone_right",
        11: "third_ventricle",
        12: "fourth_ventricle"
    },
    "aortic_sinuses": {
        1: "left_ventricular_outflow_tract",
        2: "right_coronary_cusp", 
        3: "left_coronary_cusp",
        4: "non_coronary_cusp"
    },
    "liver_segments": {
        1: "liver_segment_1",
        2: "liver_segment_2", 
        3: "liver_segment_3",
        4: "liver_segment_4",
        5: "liver_segment_5",
        6: "liver_segment_6",
        7: "liver_segment_7",
        8: "liver_segment_8"
    },
    "liver_segments_mr": {
        1: "liver_segment_1",
        2: "liver_segment_2",
        3: "liver_segment_3", 
        4: "liver_segment_4",
        5: "liver_segment_5",
        6: "liver_segment_6",
        7: "liver_segment_7",
        8: "liver_segment_8"
    },
    "liver_lesions": {
        1: "liver_lesions"
    },
    "liver_lesions_mr": {
        1: "liver_lesions"
    },
    "craniofacial_structures": {
        1: "mandible",
        2: "teeth_lower",
        3: "skull",
        4: "head",
        5: "sinus_maxillary",
        6: "sinus_frontal",
        7: "teeth_upper"
    },
    "abdominal_muscles": {
        1: "pectoralis_major_right",
        2: "pectoralis_major_left",
        3: "rectus_abdominis_right",
        4: "rectus_abdominis_left",
        5: "serratus_anterior_right",
        6: "serratus_anterior_left",
        7: "latissimus_dorsi_right",
        8: "latissimus_dorsi_left",
        9: "trapezius_right",
        10: "trapezius_left",
        11: "external_oblique_right",
        12: "external_oblique_left",
        13: "internal_oblique_right",
        14: "internal_oblique_left",
        15: "erector_spinae_right",
        16: "erector_spinae_left",
        17: "transversospinalis_right",
        18: "transversospinalis_left",
        19: "psoas_major_right",
        20: "psoas_major_left",
        21: "quadratus_lumborum_right",
        22: "quadratus_lumborum_left"
    },
    "teeth": {
        1: "lower_jawbone",
        2: "upper_jawbone",
        3: "left_inferior_alveolar_canal",
        4: "right_inferior_alveolar_canal",
        5: "left_maxillary_sinus",
        6: "right_maxillary_sinus",
        7: "pharynx",
        8: "bridge",
        9: "crown",
        10: "implant",
        11: "upper_right_central_incisor_fdi11",
        12: "upper_right_lateral_incisor_fdi12",
        13: "upper_right_canine_fdi13",
        14: "upper_right_first_premolar_fdi14",
        15: "upper_right_second_premolar_fdi15",
        16: "upper_right_first_molar_fdi16",
        17: "upper_right_second_molar_fdi17",
        18: "upper_right_third_molar_fdi18",
        19: "upper_left_central_incisor_fdi21",
        20: "upper_left_lateral_incisor_fdi22",
        21: "upper_left_canine_fdi23",
        22: "upper_left_first_premolar_fdi24",
        23: "upper_left_second_premolar_fdi25",
        24: "upper_left_first_molar_fdi26",
        25: "upper_left_second_molar_fdi27",
        26: "upper_left_third_molar_fdi28",
        27: "lower_left_central_incisor_fdi31",
        28: "lower_left_lateral_incisor_fdi32",
        29: "lower_left_canine_fdi33",
        30: "lower_left_first_premolar_fdi34",
        31: "lower_left_second_premolar_fdi35",
        32: "lower_left_first_molar_fdi36",
        33: "lower_left_second_molar_fdi37",
        34: "lower_left_third_molar_fdi38",
        35: "lower_right_central_incisor_fdi41",
        36: "lower_right_lateral_incisor_fdi42",
        37: "lower_right_canine_fdi43",
        38: "lower_right_first_premolar_fdi44",
        39: "lower_right_second_premolar_fdi45",
        40: "lower_right_first_molar_fdi46",
        41: "lower_right_second_molar_fdi47",
        42: "lower_right_third_molar_fdi48",
        43: "left_mandibular_incisive_canal_fdi103",
        44: "right_mandibular_incisive_canal_fdi104",
        45: "lingual_canal",
        46: "upper_right_central_incisor_pulp_fdi111",
        47: "upper_right_lateral_incisor_pulp_fdi112",
        48: "upper_right_canine_pulp_fdi113",
        49: "upper_right_first_premolar_pulp_fdi114",
        50: "upper_right_second_premolar_pulp_fdi115",
        51: "upper_right_first_molar_pulp_fdi116",
        52: "upper_right_second_molar_pulp_fdi117",
        53: "upper_right_third_molar_pulp_fdi118",
        54: "upper_left_central_incisor_pulp_fdi121",
        55: "upper_left_lateral_incisor_pulp_fdi122",
        56: "upper_left_canine_pulp_fdi123",
        57: "upper_left_first_premolar_pulp_fdi124",
        58: "upper_left_second_premolar_pulp_fdi125",
        59: "upper_left_first_molar_pulp_fdi126",
        60: "upper_left_second_molar_pulp_fdi127",
        61: "upper_left_third_molar_pulp_fdi128",
        62: "lower_left_central_incisor_pulp_fdi131",
        63: "lower_left_lateral_incisor_pulp_fdi132",
        64: "lower_left_canine_pulp_fdi133",
        65: "lower_left_first_premolar_pulp_fdi134",
        66: "lower_left_second_premolar_pulp_fdi135",
        67: "lower_left_first_molar_pulp_fdi136",
        68: "lower_left_second_molar_pulp_fdi137",
        69: "lower_left_third_molar_pulp_fdi138",
        70: "lower_right_central_incisor_pulp_fdi141",
        71: "lower_right_lateral_incisor_pulp_fdi142",
        72: "lower_right_canine_pulp_fdi143",
        73: "lower_right_first_premolar_pulp_fdi144",
        74: "lower_right_second_premolar_pulp_fdi145",
        75: "lower_right_first_molar_pulp_fdi146",
        76: "lower_right_second_molar_pulp_fdi147",
        77: "lower_right_third_molar_pulp_fdi148"
    },
    "trunk_cavities": {
        1: "abdominal_cavity",
        2: "thoracic_cavity",
        3: "pericardium",
        4: "mediastinum"
    },
    "brain_aneurysm": {
        1: "brain_aneurysm"
    },
    "test": {
        1: "carpal"
    }
}


commercial_models = {
    "heartchambers_highres": 301,
    "appendicular_bones": 304,
    "appendicular_bones_mr": 855,
    "tissue_types": 481,
    "tissue_types_mr": 925,
    "tissue_4_types": 485,
    "vertebrae_body": 305,
    "face": 303,
    "face_mr": 856,
    "brain_structures": 409,
    "thigh_shoulder_muscles": 857,
    "thigh_shoulder_muscles_mr": 857,
    "coronary_arteries": 509,
    "coronary_arteries_LEGACY": 507,
    "aortic_sinuses": 920
}


class_map_5_parts = {

    # 24 classes
    "class_map_part_organs": {
        1: "spleen",
        2: "kidney_right",
        3: "kidney_left",
        4: "gallbladder",
        5: "liver",
        6: "stomach",
        7: "pancreas",
        8: "adrenal_gland_right",
        9: "adrenal_gland_left",
        10: "lung_upper_lobe_left",
        11: "lung_lower_lobe_left",
        12: "lung_upper_lobe_right",
        13: "lung_middle_lobe_right",
        14: "lung_lower_lobe_right",
        15: "esophagus",
        16: "trachea",
        17: "thyroid_gland",
        18: "small_bowel",
        19: "duodenum",
        20: "colon",
        21: "urinary_bladder",
        22: "prostate",
        23: "kidney_cyst_left",
        24: "kidney_cyst_right"
    },

    # 26 classes
    "class_map_part_vertebrae": {
        1: "sacrum",
        2: "vertebrae_S1",
        3: "vertebrae_L5",
        4: "vertebrae_L4",
        5: "vertebrae_L3",
        6: "vertebrae_L2",
        7: "vertebrae_L1",
        8: "vertebrae_T12",
        9: "vertebrae_T11",
        10: "vertebrae_T10",
        11: "vertebrae_T9",
        12: "vertebrae_T8",
        13: "vertebrae_T7",
        14: "vertebrae_T6",
        15: "vertebrae_T5",
        16: "vertebrae_T4",
        17: "vertebrae_T3",
        18: "vertebrae_T2",
        19: "vertebrae_T1",
        20: "vertebrae_C7",
        21: "vertebrae_C6",
        22: "vertebrae_C5",
        23: "vertebrae_C4",
        24: "vertebrae_C3",
        25: "vertebrae_C2",
        26: "vertebrae_C1"
    },

    # 18
    "class_map_part_cardiac": {
        1: "heart",
        2: "aorta",
        3: "pulmonary_vein",
        4: "brachiocephalic_trunk",
        5: "subclavian_artery_right",
        6: "subclavian_artery_left",
        7: "common_carotid_artery_right",
        8: "common_carotid_artery_left",
        9: "brachiocephalic_vein_left",
        10: "brachiocephalic_vein_right",
        11: "atrial_appendage_left",
        12: "superior_vena_cava",
        13: "inferior_vena_cava",
        14: "portal_vein_and_splenic_vein",
        15: "iliac_artery_left",
        16: "iliac_artery_right",
        17: "iliac_vena_left",
        18: "iliac_vena_right"
    },

    # 23
    "class_map_part_muscles": {
        1: "humerus_left",
        2: "humerus_right",
        3: "scapula_left",
        4: "scapula_right",
        5: "clavicula_left",
        6: "clavicula_right",
        7: "femur_left",
        8: "femur_right",
        9: "hip_left",
        10: "hip_right",
        11: "spinal_cord",
        12: "gluteus_maximus_left",
        13: "gluteus_maximus_right",
        14: "gluteus_medius_left",
        15: "gluteus_medius_right",
        16: "gluteus_minimus_left",
        17: "gluteus_minimus_right",
        18: "autochthon_left",
        19: "autochthon_right",
        20: "iliopsoas_left",
        21: "iliopsoas_right",
        22: "brain",
        23: "skull"
    },

    # 26 classes
    # 12. ribs start from vertebrae T12
    # Small subset of population (roughly 8%) have 13. rib below 12. rib
    #  (would start from L1 then)
    #  -> this has label rib_12
    # Even smaller subset (roughly 1%) has extra rib above 1. rib   ("Halsrippe")
    #  (the extra rib would start from C7)
    #  -> this has label rib_1
    #
    # Quite often only 11 ribs (12. ribs probably so small that not found). Those
    # cases often wrongly segmented.
    "class_map_part_ribs": {
        1: "rib_left_1",
        2: "rib_left_2",
        3: "rib_left_3",
        4: "rib_left_4",
        5: "rib_left_5",
        6: "rib_left_6",
        7: "rib_left_7",
        8: "rib_left_8",
        9: "rib_left_9",
        10: "rib_left_10",
        11: "rib_left_11",
        12: "rib_left_12",
        13: "rib_right_1",
        14: "rib_right_2",
        15: "rib_right_3",
        16: "rib_right_4",
        17: "rib_right_5",
        18: "rib_right_6",
        19: "rib_right_7",
        20: "rib_right_8",
        21: "rib_right_9",
        22: "rib_right_10",
        23: "rib_right_11",
        24: "rib_right_12",
        25: "sternum",
        26: "costal_cartilages"
    },

    "test": class_map["test"]
}


class_map_parts_mr = {
    
    "class_map_part_organs": {
        1: "spleen",
        2: "kidney_right",
        3: "kidney_left",
        4: "gallbladder",
        5: "liver",
        6: "stomach",
        7: "pancreas",
        8: "adrenal_gland_right",
        9: "adrenal_gland_left",
        10: "lung_left",
        11: "lung_right",
        12: "esophagus",
        13: "small_bowel",
        14: "duodenum",
        15: "colon",
        16: "urinary_bladder",
        17: "prostate",
        18: "sacrum",
        19: "vertebrae",
        20: "intervertebral_discs",
        21: "spinal_cord",
        22: "heart",
        23: "aorta",
        24: "inferior_vena_cava",
        25: "portal_vein_and_splenic_vein",
        26: "iliac_artery_left",
        27: "iliac_artery_right",
        28: "iliac_vena_left",
        29: "iliac_vena_right"
    },
    
    "class_map_part_muscles": {
        1: "humerus_left",
        2: "humerus_right",
        3: "scapula_left",
        4: "scapula_right",
        5: "clavicula_left",
        6: "clavicula_right",
        7: "femur_left",
        8: "femur_right",
        9: "hip_left",
        10: "hip_right",
        11: "gluteus_maximus_left",
        12: "gluteus_maximus_right",
        13: "gluteus_medius_left",
        14: "gluteus_medius_right",
        15: "gluteus_minimus_left",
        16: "gluteus_minimus_right",
        17: "autochthon_left",
        18: "autochthon_right",
        19: "iliopsoas_left",
        20: "iliopsoas_right",
        21: "brain"
    }
}


class_map_parts_headneck_muscles = {
 
    "class_map_part_muscles_1": {
        1: "sternocleidomastoid_right", 
        2: "sternocleidomastoid_left",
        3: "superior_pharyngeal_constrictor",
        4: "middle_pharyngeal_constrictor",
        5: "inferior_pharyngeal_constrictor",
        6: "trapezius_right",
        7: "trapezius_left",
        8: "platysma_right",
        9: "platysma_left",
        10: "levator_scapulae_right",
        11: "levator_scapulae_left"
    },

    "class_map_part_muscles_2": {
        1: "anterior_scalene_right",
        2: "anterior_scalene_left",
        3: "middle_scalene_right",
        4: "middle_scalene_left",
        5: "posterior_scalene_right",
        6: "posterior_scalene_left",
        7: "sterno_thyroid_right",
        8: "sterno_thyroid_left",
        9: "thyrohyoid_right",
        10: "thyrohyoid_left",
        11: "prevertebral_right",
        12: "prevertebral_left"
    }
}


map_taskid_to_partname_ct = {
    291: "class_map_part_organs",
    292: "class_map_part_vertebrae",
    293: "class_map_part_cardiac",
    294: "class_map_part_muscles",
    295: "class_map_part_ribs",

    517: "test",
}

map_taskid_to_partname_mr = {
    850: "class_map_part_organs",
    851: "class_map_part_muscles"
}

map_taskid_to_partname_headneck_muscles = {
    778: "class_map_part_muscles_1",
    779: "class_map_part_muscles_2"
}

# pprint({idx:v for idx, (k, v) in enumerate(a.items())}, sort_dicts=False)
