DICOM Segmentation (SEG) not rendering in Orthanc OHIF plugin v1.7: rawSurfaceData.data is undefined
The problem is that DICOM Segmentation (SEG) files are not rendering their structures in the OHIF viewer. The viewer shows the file and says it “can’t load,” and clicking on the details does nothing, consistent with a JavaScript exception. The underlying error indicates the viewer is receiving empty bulk data.
I am using Orthanc OHIF Plugin 1.7, which (based on the Mercurial log) packages OHIF Viewer v3.11.0. I suspect I am still hitting a persistent bug related to bulk data transfer for SEG/RTStruct objects, even though this version should contain the fix referenced in the community forum.
What steps can we follow to reproduce the bug?
- Start Orthanc with the configuration provided below (includes all advanced SEG/SR fixes).
- Upload a DICOM Segmentation (SEG) object linked to a supported series (e.g., CT or MR).
- Open the study in the OHIF Viewer (
http://localhost:8042/ohif/). - Attempt to load the SEG file.
- Observe that the file does not render the contour/mask, and the viewer displays a generic “can’t load” message.
- Check the browser console (F12) for the specific JavaScript error upon attempting to load the SEG.
Uncaught (in promise) TypeError: can't access property "points", rawSurfaceData.data is undefined
promises http://localhost:8042/ohif/7431.bundle.....
// Browser Console Error upon loading the SEG file:
Uncaught (in promise) TypeError: can't access property "points", rawSurfaceData.data is undefined
promises http://localhost:8042/ohif/...
createAndCacheSurfacesFromRaw http://localhost:8042/...
computeSurfaceData http://localhost:localhost:8042/....
Configuration Snippets
I have tried some configuration troubleshooting steps. Below are the relevant blocks from my current orthanc.json:
/* PLUGINS */
"Plugins" : [
"/usr/share/orthanc/plugins/libOrthancMySQLIndex.so",
"/usr/share/orthanc/plugins/libOrthancMySQLStorage.so",
"/usr/share/orthanc/plugins/libOrthancGdcm.so",
"/usr/share/orthanc/plugins/libOrthancDicomWeb.so",
"/usr/share/orthanc/plugins/libOrthancOHIF.so"
],
/* OHIF CONFIGURATION (includes bulk data fixes for SEG/SR) */
"OHIF" : {
"DataSource" : "dicom-web",
"Config" : {
// Fixes for bulk data transfer issues
"bulkDataAcceptHeader" : "multipart/related; type=application/octet-stream",
"bulkDataURI" : "enabled"
}
},
/* HTTP HEADERS (includes CORS/COEP fix for SharedArrayBuffer) */
"HttpHeaders" : {
"Cross-Origin-Opener-Policy" : "same-origin",
"Cross-Origin-Embedder-Policy" : "require-corp"
},
/* DICOMWEB CONFIGURATION (includes transcoding attempt to bypass compression issues) */
"DicomWeb" : {
"SeriesMetadata" : "Full",
"StudiesMetadata" : "Full",
"Root" : "/dicom-web/",
"EnableWado" : true,
"TranscodeToPreferredTransferSyntax" : true
}
Since the error points directly to the viewer failing to read the raw surface data (rawSurfaceData.data is undefined), and all server-side transfer settings have been applied, I suspect there is a deeper issue in how v3.11 interacts with the bulk data from the DICOMweb plugin. Any further diagnostic steps or known workarounds would be greatly appreciated.