# Unable to open SEG Modality file

**URL:** <https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881>\
**Category:** Support\
**Tags:** segmentation, dicom\
**Created:** [September 27, 2021, 2:32pm UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881 "2021-09-27T14:32:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushikdasroy](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kaushikdasroy](https://discourse.slicer.org/u/kaushikdasroy)\
**Post date:** [September 27, 2021, 2:32pm UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881/1 "2021-09-27T14:32:01Z")

</div>

Operating system: Windows 10 Pro  
Slicer version: 4.11.20210226 r29738 / 7a593c8  
Expected behavior: Open the segmentation file  
Actual behavior: Error message

I am trying to open a DICOM SEG file in the slicer and getting an error. The log and the SEG file in the drive -  
[https://drive.google.com/drive/folders/1\_Us1UQf6RsQw6Do\_qU605uEVWNPosPDk?usp=sharing](https://drive.google.com/drive/folders/1_Us1UQf6RsQw6Do_qU605uEVWNPosPDk?usp=sharing)

Please suggest what might be the problem.  
Thanks!

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [September 27, 2021, 7:53pm UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881/2 "2021-09-27T19:53:18Z")

</div>

Did you try installing the Quantitative Reporting extension? This is where the SEG plugin is provided.

---

<div class="post-metadata">

**Author:** ![kaushikdasroy](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kaushikdasroy](https://discourse.slicer.org/u/kaushikdasroy)\
**Post date:** [September 27, 2021, 8:21pm UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881/3 "2021-09-27T20:21:05Z")

</div>

I have the following extensions - Quantitative reporting, slicerRT, slicerRadiomics, slicerDevelopmentToolbox and few more (DCMQI, longitudinalPETCT, petDicomExtension)

Thanks for checking this!

---

<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:** [September 27, 2021, 10:06pm UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881/4 "2021-09-27T22:06:19Z")

</div>

The problem is that the segment contains an invalid color. See `recommendedDisplayRGBValue` in the metadata extracted by DCMQI tool:

```auto
{
   "BodyPartExamined" : "",
   "ClinicalTrialSeriesID" : "",
   "ClinicalTrialTimePointID" : "",
   "ContentCreatorName" : "",
   "InstanceNumber" : "1",
   "SeriesDescription" : "CAUTION: Research Use Only. NVIDIA Clara generated DICOM SEG for Axial Chest CT COVID-19",
   "SeriesNumber" : "4516",
   "segmentAttributes" : [
      [
         {
            "SegmentAlgorithmName" : "AI Organ Segmentation",
            "SegmentAlgorithmType" : "AUTOMATIC",
            "SegmentDescription" : "",
            "SegmentLabel" : "Lung-seg",
            "SegmentedPropertyCategoryCodeSequence" : {
               "CodeMeaning" : "Anatomical Structure",
               "CodeValue" : "T-D0050",
               "CodingSchemeDesignator" : "SRT"
            },
            "SegmentedPropertyTypeCodeSequence" : {
               "CodeMeaning" : "Organ",
               "CodeValue" : "T-D0050",
               "CodingSchemeDesignator" : "SRT"
            },
            "labelID" : 1,
            "recommendedDisplayRGBValue" : [4294966216, 74, 193]
         }
      ]
   ]
}

```

Please report this error to NVidia Clara developers! Thank you.

Problems with this segmentation object:

- Probably they thought that the color is specified as RGB value, but actually it is encoded as CIELab.
- The segment type is just “Organ”, which is useless. The proper term would have been “Lung”.
- Old SRT codes are used instead of SCT.
- Clara version number is not included. This is important, because it allows fixing up problems in DICOM files retrospectively without relying on any heuristics. For example, we could determine that segment color “looks like” RGB and then interpret it as RGB, but it would be much better if we could tell it from the [software version](https://dicom.innolitics.com/ciods/segmentation/general-equipment/00181020).

---

<div class="post-metadata">

**Author:** ![kaushikdasroy](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kaushikdasroy](https://discourse.slicer.org/u/kaushikdasroy)\
**Post date:** [September 28, 2021, 5:12pm UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881/5 "2021-09-28T17:12:06Z")

</div>

This is response from clara :

As for the Clara DICOM Seg Writer, it actually does NOT set the **optional** attribute for recommended color for the label(s). It is likely DCMQI was generating default for the absent optional attribute, which then caused you to think Clara was providing it. Please use DCMDUMP or others to inspect and compare.

Also, the attributed that you mentioned has been retired and replaced with the recommended CIELab value attribute, per [DICOM Part 3](http://dicom.nema.org/medical/Dicom/2018d/output/chtml/part03/sect_C.10.7.html),

`Graphic Layer Recommended Display RGB Value (0070,0067) was previously used in this Module, but has been retired and its function replaced by Graphic Layer Recommended Display CIELab Value (0070,0401). See PS3.3-2004.`

Other viewer can handle the the absence of this attribute, as it is NOT a Type 1 attribute at all.

---

<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:** [September 28, 2021, 6:28pm UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881/6 "2021-09-28T18:28:52Z")

</div>

> [@kaushikdasroy](#):
>
> As for the Clara DICOM Seg Writer, it actually does NOT set the **optional** attribute for recommended color for the label(s).

In the file that you shared, the segment color was specified, so either the Clara DICOM Seg Writer actually does set the attribute, or the file was reprocessed with some other software before given to you. The value that is stored in the file looks like an RGB value, so most likely Clara developers did not know that they had to use CIELab color space:

```auto
[0062,0002]	SegmentSequence SQ	266
	[fffe,e000]	Item na	250
		[0062,000d]	RecommendedDisplayCIELabValue	[3] 128, 174, 128	US	6

```

In segmentation objects you cannot specify color in RGB color space, but only CIELab is allowed, in [Recommended Display CIELab Value Attribute (0062,000D)](https://dicom.innolitics.com/ciods/segmentation/segmentation-image/00620002/0062000d). I don’t think that the (0070,0067) and (0070,0401) attributes that you referenced are related to DICOM Segmentation Object IOD.

Slicer can handle the missing value without any problem, but we have not came across a corrupted color before and the out-of-range value caused a GUI update issue. I’ve fixed this issue yesterday, so today’s Slicer Preview Release can open DICOM Segmentation Objects even if RecommendedDisplayCIELabValue does not correspond to a valid RGB value:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/6/764b4323ef4c64c62bc5a518b9a16512ab3063bc.png)

If you contact Clara developers about the above described issues then please copy here the link to the bug report link so that we can follow up.

---

<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:** [September 29, 2021, 5:12am UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881/7 "2021-09-29T05:12:35Z")

</div>

I’ve found the discussion with Clara developers: [Invalid color in segmentation - not opening segmentation in slicer - Clara Deploy SDK - NVIDIA Developer Forums](https://forums.developer.nvidia.com/t/invalid-color-in-segmentation-not-opening-segmentation-in-slicer/190271)

---

<div class="post-metadata">

**Author:** ![kaushikdasroy](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kaushikdasroy](https://discourse.slicer.org/u/kaushikdasroy)\
**Post date:** [October 1, 2021, 2:34am UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881/8 "2021-10-01T02:34:19Z")

</div>

@lassoan , thanks for taking this up with Clara team and the slicer release. I saw your response. It is helpful.

---

<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:** [October 1, 2021, 2:51am UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881/9 "2021-10-01T02:51:22Z")

</div>

Also note that I’ve updated Slicer a few days ago, so the current Slicer Preview Release can load the the file (even though the segment color is invalid).

---

<div class="post-metadata">

**Author:** ![BrianOBrien](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/brianobrien/32/69577_2.png) [@BrianOBrien](https://discourse.slicer.org/u/BrianOBrien)\
**Post date:** [March 6, 2024, 12:11am UTC](https://discourse.slicer.org/t/unable-to-open-seg-modality-file/19881/10 "2024-03-06T00:11:49Z")

</div>

I noticed this thread today as I am a new user here.  
I noticed this thread is quite old but the data looked interesting.  
I uploaded it and dumped the dicom and found this:

Odd the pixel module seems,

Samples per pixel is 256  
Number of frames is 320  
Rows 2  
Cols 2  
Bits Allocated 256
