# Terminology labels and file location

**URL:** <https://discourse.slicer.org/t/terminology-labels-and-file-location/35240>\
**Category:** Support\
**Created:** [April 2, 2024, 6:26pm UTC](https://discourse.slicer.org/t/terminology-labels-and-file-location/35240 "2024-04-02T18:26:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 2, 2024, 6:26pm UTC](https://discourse.slicer.org/t/terminology-labels-and-file-location/35240/1 "2024-04-02T18:26:45Z")

</div>

We are creating a custom terminology for vertebrate musculoskeletal system by extracting the relevant terms from the Uberon ontology. I have encountered a few things that I can’t find the answers to.

1. When I custom terminology is successfully imported to Slicer, where is it saved? I removed the original JSON file that was imported, but the terminology is still there. I searched for files modified under Slicer install tree, but wasn’t able to find. As I am testing more and more files are being added, and I would like clear them.
2. Is there field that controls the value of the displayed value? AFAIT the label comes from “CodeMeaning” field. There is a field called “3dSlicerLabel” but that does’t seem to affect the displayed value.

The issue is some of the terms from Uberon is too long to use as the actual name.  
E.g., **[upper first primary molar tooth](https://www.ebi.ac.uk/ols4/ontologies/uberon/classes/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_0018588)**

Instead we would like this to be displayed something like **UM1**.

Here is the section of terminology we are using…

```auto
"SegmentationCategoryTypeContextName": "Murat",
    "@schema": "https://raw.githubusercontent.com/qiicr/dcmqi/master/doc/schemas/segment-context-schema.json#",
    "SegmentationCodes": {
        "Category": [
            {
                "CodeMeaning": "Dentition",
                "CodingSchemeDesignator": "UBERON",
                "showAnatomy": true,
                "cid": "7150",
                "CodeValue": "0018588",
                "contextGroupName": "SegmentationPropertyCategories",
                "Type": [
                    {
                        "recommendedDisplayRGBValue": [
                            0,
                            179,
                            92
                        ],
                        "CodeMeaning": "upper first primary molar tooth",
                        "CodingSchemeDesignator": "UBERON",
                        "3dSlicerLabel": "UM1",
                        "3dSlicerIntegerLabel": 1,
                        "CodeValue": "0018588",
                        "contextGroupName": "CommonTissueSegmentationTypes",
                        "paired": "Y",
                        "Modifier": [
                            {
                                "recommendedDisplayRGBValue": [
                                    0,
                                    179,
                                    92
                                ],
                                "CodeMeaning": "Right",
                                "CodingSchemeDesignator": "SCT",
                                "3dSlicerLabel": "right UM1",
                                "3dSlicerIntegerLabel": 2,
                                "cid": "244",
                                "UMLSConceptUID": "C0205090",
                                "CodeValue": "24028007",
                                "contextGroupName": "Laterality",
                                "SNOMEDCTConceptID": "24028007"
                            },
                            {
                                "recommendedDisplayRGBValue": [
                                    0,
                                    179,
                                    92
                                ],
                                "CodeMeaning": "Left",
                                "CodingSchemeDesignator": "SCT",
                                "3dSlicerLabel": "left UM1",
                                "3dSlicerIntegerLabel": 3,
                                "cid": "244",
                                "UMLSConceptUID": "C0205091",
                                "CodeValue": "7771000",
                                "contextGroupName": "Laterality",
                                "SNOMEDCTConceptID": "7771000"
                            }
                        ]
                    },
                    {
                        "recommendedDisplayRGBValue": [
                            144,
                            16,
                            49
                        ],
                        

```

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 4, 2024, 11:34am UTC](https://discourse.slicer.org/t/terminology-labels-and-file-location/35240/2 "2024-04-04T11:34:18Z")

</div>

1. When you import the terminology, currently it is not even saved in the scene, but the Terminology module logic stores and handles the new terminology data. So you need to load the json after every restart (from script or manually) if you want to use it. No need to delete it (I am not even sure the current API supports it), all you need to do is restart Slicer and you won’t have any custom terminology loaded.
2. 3dSlicerLabal as I understand is just a way to connect any entry to the current GeneralAnatomyColors color table, just establishing correspondence. It is not needed for a custom terminology. The `CodeMeaning` field is what the displayed terminology type will be.

Why do you say it is too long? I work with terminology type names of similar length and did not have problems.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 4, 2024, 2:14pm UTC](https://discourse.slicer.org/t/terminology-labels-and-file-location/35240/3 "2024-04-04T14:14:20Z")

</div>

> [@cpinter](#):
>
> u want to use it. No need to delete it (I am not even sure the current API supports it), all you need to do is restart Slicer and you won’t have any custom terminology loaded.

That’s not the behavior I am observing. The imported terminology is persistent after multiple restarts.

> [@cpinter](#):
>
> Why do you say it is too long? I work with terminology type names of similar length and did not have problems.

It makes it harder to distinguish between consecutive segments:  
e.g.

upper first primary molar tooth  
upper second primary molar tooth  
upper third primary molar tooth  
upper fourth primary molar tooth  
upper first secondary molar tooth  
upper second seconday molar tooth  
upper third secondary molar tooth  
upper fourth secondary molar tooth  
vs  
UdM1  
UdM2  
UdM3  
UdM4  
UM1  
UM2  
UM3  
UM4

(UdM1 stands for upper deciduous molar #1)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 4, 2024, 4:06pm UTC](https://discourse.slicer.org/t/terminology-labels-and-file-location/35240/4 "2024-04-04T16:06:35Z")

</div>

> [@muratmaga](#):
>
> There is a field called “3dSlicerLabel” but that does’t seem to affect the displayed value.

“3sSlicerLabel” field specifies the default segment name (see orange arrow):

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/f/0f2d4d63db67db4b90f18881ca5a625ad7f3db2e.png)

This label gives more flexibility in how a name appears, which can be particularly useful if there are modifiers, because then automatically generated names are not always the best.

```auto
          {
            "CodingSchemeDesignator": "SCT",
            "CodeValue": "46027005",
            "CodeMeaning": "Common iliac vein",
            "Modifier": [
              {
                "3dSlicerLabel": "right common iliac vein",
                "recommendedDisplayRGBValue": [0, 151, 206],
                "CodingSchemeDesignator": "SCT",
                "CodeValue": "24028007",
                "CodeMeaning": "Right"
              },
              {
                "3dSlicerLabel": "left common iliac vein",
                "recommendedDisplayRGBValue": [0, 151, 206],
                "CodingSchemeDesignator": "SCT",
                "CodeValue": "7771000",
                "CodeMeaning": "Left"
              },
              {
                "CodingSchemeDesignator": "SCT",
                "CodeValue": "51440002",
                "CodeMeaning": "Right and left"
              }
            ]
          }, 

```

However, you don’t have to use `3dSlicerLabel`. You can change `CodeMeaning` value instead. A term is specified only by coding scheme designator and code value; code meaning is for convenience only (for example to provide some user-friendly displayable string).

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 5, 2024, 9:32am UTC](https://discourse.slicer.org/t/terminology-labels-and-file-location/35240/5 "2024-04-05T09:32:07Z")

</div>

> [@muratmaga](#):
>
> That’s not the behavior I am observing. The imported terminology is persistent after multiple restarts.

I’m surprised, I need to import the terminology every time. @lassoan do you know what is the expected behavior?

About the long code meanings, we also have a terminology for teeth, this is how we created it:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/5/65143e5dcb7423a51e6cb2cd8384873a9db62b19.png)  
I guess the teeth do not have numbering for animals…  
Anyway you can edit the code meaning as you wish.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 5, 2024, 9:39am UTC](https://discourse.slicer.org/t/terminology-labels-and-file-location/35240/6 "2024-04-05T09:39:16Z")

</div>

> [@cpinter](#):
>
> I guess the teeth do not have numbering for animals…  
> Anyway you can edit the code meaning as you wish.

Yes, that’s human specific. Varying number of teeth and dental formula in different organisms makes it impossible to use such a numbering scheme.
