# Required modifiers in terminology

**URL:** <https://discourse.slicer.org/t/required-modifiers-in-terminology/8197>\
**Category:** Development\
**Created:** [August 27, 2019, 3:30pm UTC](https://discourse.slicer.org/t/required-modifiers-in-terminology/8197 "2019-08-27T15:30:59Z")\
**Posts on this page:** 8\
**Page:** 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:** [August 27, 2019, 3:30pm UTC](https://discourse.slicer.org/t/required-modifiers-in-terminology/8197/1 "2019-08-27T15:30:59Z")

</div>

We would like to use terminologies correctly in NVidia’s AI segmentation plugin. However, the terminology json or logic does not seem to make sense. For example, I cannot create a segment for “spleen”. When I choose “Segmentation category and type – DICOM master list” and search for spleen, a property is found, but I’m forced to select laterality! I can choose “Left”, “Right”, or “Right and left” - but there is no way I can simply choose “Spleen”.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/a/5a69758b8d01c07251e8639fe944599364ef7507.png)

Is this an error in the terminology json (there should be an option for not specifying laterality)? Or is this an error in the terminology implementation (it should not _require_ selection of a modifier)?

[https://github.com/Slicer/Slicer/blob/ef1891672d53b8dba745673f1ca6eafd1fbfc473/Modules/Loadable/Terminologies/Resources/SegmentationCategoryTypeModifier-DICOM-Master.json#L12281-L12307](https://github.com/Slicer/Slicer/blob/ef1891672d53b8dba745673f1ca6eafd1fbfc473/Modules/Loadable/Terminologies/Resources/SegmentationCategoryTypeModifier-DICOM-Master.json#L12281-L12307)

@fedorov @cpinter

---

<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:** [August 27, 2019, 5:14pm UTC](https://discourse.slicer.org/t/required-modifiers-in-terminology/8197/2 "2019-08-27T17:14:40Z")

</div>

The behaviour is expected, this is how I implemented it back then, based on the specification and later clarifications of @fedorov.

If it needs to be changed, then it is not an implementation question but one related to the standards.

---

<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:** [August 27, 2019, 5:17pm UTC](https://discourse.slicer.org/t/required-modifiers-in-terminology/8197/3 "2019-08-27T17:17:32Z")

</div>

@fedorov, can you explain the rationale for requiring selection of “Left”, “Right”, or “Right and left” for organs such as the spleen?

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [August 28, 2019, 1:33am UTC](https://discourse.slicer.org/t/required-modifiers-in-terminology/8197/4 "2019-08-28T01:33:03Z")

</div>

Spleen is defined in the dcmqi segmentation JSON file, which (at least, a version of it) I believe was used to populate segment editor, here:

> <https://github.com/QIICR/dcmqi/blob/master/doc/segContexts/SegmentationCategoryTypeModifier-DICOM-Master.json#L12984-L13000>

It is marked as unpaired, so I do not know why laterality is forced in Segment editor.

---

<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:** [August 28, 2019, 1:58am UTC](https://discourse.slicer.org/t/required-modifiers-in-terminology/8197/5 "2019-08-28T01:58:53Z")

</div>

I think the “paired” attribute was not included in the specifications when implementing Terminologies, thus it is not considered.

---

<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:** [August 28, 2019, 2:04am UTC](https://discourse.slicer.org/t/required-modifiers-in-terminology/8197/6 "2019-08-28T02:04:37Z")

</div>

Spleen has laterality in this file in the dmqi repository:

> <https://github.com/QIICR/dcmqi/blob/c3b40ac82ebcf760325884c6558e1aacbe622133/doc/segContexts/resources/SegmentationCategoryTypeModifier.json#L11160-L11197>

Which file Slicer should use?

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [August 28, 2019, 2:51am UTC](https://discourse.slicer.org/t/required-modifiers-in-terminology/8197/7 "2019-08-28T02:51:59Z")

</div>

I think this discussion from March 2017 should help: [https://github.com/QIICR/QuantitativeReporting/issues/150#issuecomment-288408153](https://github.com/QIICR/QuantitativeReporting/issues/150#issuecomment-288408153)

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [August 28, 2019, 2:54am UTC](https://discourse.slicer.org/t/required-modifiers-in-terminology/8197/8 "2019-08-28T02:54:54Z")

</div>

> [@cpinter](#):
>
> I think the “paired” attribute was not included in the specifications when implementing Terminologies, thus it is not considered.

It might well be that this was not considered at the time. The reality is I don’t know how frequently this feature in Slicer was used, so chances are things went un-noticed.
