DICOM SEG misalignment and “missing frames” error in OHIF-XNAT viewer

19 views
Skip to first unread message

Deniz Karakay

unread,
Nov 5, 2025, 4:46:10 PM (2 days ago) Nov 5
to xnat_discussion

Hi all,

I encountered a potential issue when loading DICOM SEG files in the OHIF-XNAT viewer that does not appear in the online OHIF viewer.

When I test the same dataset:

  • The online OHIF viewer (https://viewer.ohif.org) loads the DICOM SEG perfectly — slice alignment is correct.

  • The OHIF-XNAT viewer displays RTSTRUCT objects correctly for the same subject and segmentation. It aligns well as well.

  • However, when I load the DICOM SEG into the OHIF-XNAT viewer, it displays with a slice misalignment relative to the anatomical images (the spleen is about two slices off, and the liver is about one slice off.) I only tried those two, I'm not so sure where the problem comes from.

When loading the DICOM SEG in OHIF-XNAT, I get the following console error:

Failed to check for overlap of segments: missing frames in PerFrameFunctionalGroupsSequence or the segmentation has different geometry respect to the source image.

Despite this error, the segmentation still loads — but the overlay appears shifted along the slice axis.
I verified that:

It seems like the OHIF-XNAT integration is interpreting the SEG frame mapping slightly differently than the standalone OHIF build.


You can see the attached example. Purple one comes from RTStruct, and red one comes from DICOM seg, and there is one slice off here, but it is not one slice, when I checked the spleen. I'm guessing something is wrong with the segments and determining their correct ordering.

Has anyone else observed this issue or found a fix/workaround?
Any guidance would be appreciated.

Best regards,
Deniz Karakay


Slice5.png
Slice4.png

Simon Doran

unread,
Nov 6, 2025, 3:54:42 AM (21 hours ago) Nov 6
to xnat_discussion
Hi Deniz,

  Thanks for reporting this issue. Are you able to provide us with an anonymised copy of the data that are causing the problem? It is clear from the error message that the XNAT-OHIF viewer believes there is something amiss with the source data, so we would need to check why there seem to be missing frames.

  Best wishes,

Simon

Deniz Karakay

unread,
Nov 6, 2025, 6:15:59 PM (7 hours ago) Nov 6
to xnat_discussion

Hi Simon,

Thank you for your quick reply.

You can find an example dataset attached as DICOM.zip. Inside, the out_seg.zip archive contains the DICOM SEG files I used:

  • liver_dicomseg.dcm

  • spleen_dicomseg.dcm

These were generated from the same reference DICOM series included in DICOM.zip.
For comparison, I’ve also included RTStruct files that I generated:

  • liver_rtstruct.dcm

  • spleen_rtstruct.dcm

When loaded in the XNAT-OHIF viewer, both RTSTRUCT files align correctly with the reference DICOM series. However, the corresponding DICOM SEG files show slice misalignment. In this example, the spleen segmentation appears about 18 slices off, and the liver about 6 slices off.

From my observations, the offset seems proportional to the number of segmented slices relative to the total slice count. It looks like the viewer may be starting the segmentation volume from the first slice instead of correctly mapping to the reference image positions like RTStruct does (both samples were starting from first slice).

Thank you,

Best regards,
Deniz Karakay

out_seg.zip
DICOM.zip
Reply all
Reply to author
Forward
0 new messages