ExtractMultipart problem with dcm4chee

Describe Your Question

I’m using OHIF to see dicom images from dcm4chee dicom server, i can see the study list, and the preview of series in viewer page, but i cannot do anything because i got an error about the missing content type from response header, that it’s used on extractMultipart of @cornerstone/dicom-image-loader.

What steps can we follow to reproduce the bug?

  1. Clone ohif version 3.10.0-beta.121
  2. Get a dcm4chee server with respond with no content type
  3. try to view a study

Error

app.bundle.a76722b268a9129984a7.js:38595 TypeError: Cannot read properties of null (reading 'indexOf')
    at extractMultipart (app.bundle.a76722b268a9129984a7.js:38442:21)
    at app.bundle.a76722b268a9129984a7.js:38578:35

Piece of code with the error

export default function extractMultipart(contentType, imageFrameAsArrayBuffer, options) {
    options ||= {};
    const response = new Uint8Array(imageFrameAsArrayBuffer);
    const isPartial = !!options?.isPartial;
    if (contentType.indexOf('multipart') === -1) {
        return {
            contentType,
            imageQualityStatus: isPartial
                ? ImageQualityStatus.SUBRESOLUTION
                : ImageQualityStatus.FULL_RESOLUTION,
            pixelData: response,
        };
    }
...

What should i do to set a config or something to avoid the need of content type ?

Also, i was using an old version of ohif of two/three years ago, and it was working

i’ve created a extractMultipart fix, but now i can’see thumbnails, it is showing like one correct and the rest like this, can’t see what is wrong, in v2 it used to work fine.

I have the same issue before by using OHIF v3. The problem may arise from the inclusion of incorrect data in the metadata response. You can check the error stack see why the contentType is null. It maybe the same problem with mine but I am not sure.

yeah, I’ve checked the response headers, and there’s no content type. I wonder if there’s a way to use OHIF v3 without content type, and about the thumbnails, when I refresh the page, the correct thumb changes to another index of the series grid.