Uploading segmentations in the viewer

I am using an ORTHANC server connected to my prototype for viewing and storing CT scans and segmentations in DICOM-SEG format. The segmentations are initially created in .nrrd by clinical scientists and then converted to DICOM-SEG, for testing I am using Slicer3D. To verify that both the CT scans and segmentations are properly loaded, I am using the OHIF viewer. While the CT scans load correctly, I am encountering an issue where the segmentations do not load. The viewer shows the image attached

and the following error message appears in the console:

Error: Unsupported displaySet
    at HangingProtocolService.getViewportsRequireUpdate (index.js:32:2)
    at onDoubleClickThumbnailHandler (19.bundle.0aeb63febb9656960795.js:1167:49)
    at onDoubleClick (index.js:32:2)
    at Object.Rb (index.js:32:2)
    at Xb (index.js:32:2)
    at Yb (index.js:32:2)
    at Ze (index.js:32:2)
    at se (index.js:32:2)
    at index.js:32:2
    at Jb (index.js:32:2)

Can anyone guide me on resolving this issue? Specifically, I’m looking for advice on how to properly link the segmentation with the CT scan for viewing in OHIF.

Are there any best practices (formats, pre-processing, or post-processing) to ensure segmentations load correctly? Any pointers to the relevant resources would be greatly appreciated!

I ran into the same issue, and the solution was to import the @ohif/extension-cornerstone-dicom-seg extension (either using the cli, in the config.js or your custom mode) since the viewer does not know how to handle SEG files without the corresponding SOPClassHandler and viewport.

Thank you, I will make sure to implement this in my own prototype.

But just to clarify, now I am testing directly using the OHIF viewer plugin for the ORTHANC server. I navigate to it through this button:

In summary the steps I took:

  1. Uploaded a CT scan in Slicer3D
  2. Created a segmentation on 1 slice
  3. Exported in DICOM (.dcm) - when I test in the DICOMbrowser I see two series (CT, SEG)
  4. Uploaded the .dcm file in the ORTHANC server
  5. Tested the correct export of the file using the button “Open OHIF viewer”
    Result: Failed test, I can see only the CT scans and not the segmentation.

According to the ORTHANC server documentation about the OHIF plugin, “[…], the OHIF plugin for Orthanc only packages official releases of OHIF”. Therefore, my assumption is that the DICOM-SEG should work correctly through the indicated button, since I see other examples of SEG series in the OHIF viewer website correctly displayed. They should be using the same extensions.

I thought the issue could lie in incorrectly exporting the DICOM-SEG file, so I wanted to make sure I understand the right protocol for linking the segmentations to CT scans, for example by ensuring matching DICOM Series UID between the CT scans and segmentation, or other similar conditions.

I would greatly appreciate it If anyone could comment on the process I described, my assumption about the OHIF plugin for the ORTHANC server, and my doubt on the correct linkage between medical images and segmentations, thanks.