OHIF Plugin and MultiFrame DICOMs

I have added the new OHIF plugin (thanks for that!) to an existing linux based Orthanc installation. Orthanc and all plugins (except OHIF) is compiled from scratch on Alma Linux based on the code from yesterday. The OHIF plugin is the LSB from the website (I could not recompile it from scratch because of the docker requirements and being behind a corporate firewall). Due to the size of the existing Orthanc database (10 TB of data and 5 Million instances) I’m using the dicom-web backend (because a 1KB increase in database size per instance would be too much in this case).

What I have noticed is that the OHIF plugin works perfectly for Single Frame DICOMs. However, when trying to open Siemens Multi Frame MRI DICOMs it fails and gives only empty images and an unspecific error message. The error in the browsers console is

331.bundle.bd0c13931a21d53086c9.js:29510 
        
       TypeError: Cannot read properties of null (reading '0')
    at app.bundle.599d31514539ffe1c788.js:14774:121
    at Array.map (<anonymous>)
    at combineFrameInstance (app.bundle.599d31514539ffe1c788.js:14774:109)
    at MetadataProvider._getInstance (app.bundle.599d31514539ffe1c788.js:14866:27)
    at MetadataProvider.get (app.bundle.599d31514539ffe1c788.js:14872:27)
    at Module.getMetaData (331.bundle.bd0c13931a21d53086c9.js:2813:37)
    at te (app.bundle.599d31514539ffe1c788.js:7:40923)
    at se (app.bundle.599d31514539ffe1c788.js:7:42930)
    at app.bundle.599d31514539ffe1c788.js:7:47832 'wadors:../dicom-web/studies/1.2.276.0.38.1.1.1.5631.20230503114015.46143371/series/1.3.12.2.1107.5.2.50.175785.2023050312011134582384252.0.0.0/instances/1.3.12.2.1107.5.2.50.175785.2023050312055486448984441/frames/41'

and it looks like OHIF has problems reading the dicom-web response of Orthanc. The Orthanc --trace --debug log is fine and gives no specific errors, so I do suspect that the error is on the OHIF end. But I still do find it strange that it works perfectly fine with Single Frame DICOMs on the same server but simply fails for Multi Frames. Or could this also be related to the Orthanc DICOM Web plugin?

Has anyone experienced similar problems or has any idea how to fix it? Any ideas what I could do to further investigate or debug the problem?

Hello,

I would suggest to first discuss this issue with the OHIF community, as your question is not specific to the OHIF plugin for Orthanc.

Kind Regards,
Sébastien-

As a follow-up for anyone interested, I have posted the question to the OHIF forum with some example DICOMs: https://community.ohif.org/t/multiframe-dicom-problem-together-with-orthanc/852

No useful replies yet but I will update this post here in case a solution is found.

1 Like

The bug seems to be on the side of OHIF and it has been reproduced by their developers: [Bug] MultiFrame DICOM Problem · Issue #3488 · OHIF/Viewers · GitHub

Hello,
Tell me, please - does anyone know when the plugin will be updated, including bug fixes?

I installed the latest LSB last week on our server and the problem seems to be fixed. It still says that it’s the old OHIF Version in the info popup but I can now view Siemens Multi Frame DICOMS without problems.

Thanks for answer. Another problem found. It can’t load studies with encapsulated PDF into the viewer window. I build plugin with OHIF 3.8.0-beta.14 inside. The following warning appears in the console:

Unable to retrieve EncapsulatedDocument from Proxy

Screenshot

In settings “UserConfiguration” is on. My ohif.js:

 * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium,
 * and 2018-2023 Open Health Imaging Foundation
 * SPDX-License-Identifier: MIT
 */

window.config = {
  routerBasename: "/",
    extensions: [],
    modes: [],
    showStudyList: !0,
    omitQuotationForMultipartRequest: !0,
    showWarningMessageForCrossOrigin: !0,
    showCPUFallbackMessage: !0,
    showLoadingIndicator: !0,
    strictZSpacingForVolumeViewport: !0,
  httpErrorHandler: error => {
    // This is 429 when rejected from the public idc sandbox too often.
    console.warn(error.status);
  },
  hotkeys: [
    {
      commandName: 'incrementActiveViewport',
      label: 'Next Viewport',
      keys: ['right'],
    },
    {
      commandName: 'decrementActiveViewport',
      label: 'Previous Viewport',
      keys: ['left'],
    },
    { commandName: 'rotateViewportCW', label: 'Rotate Right', keys: ['r'] },
    { commandName: 'rotateViewportCCW', label: 'Rotate Left', keys: ['l'] },
    { commandName: 'invertViewport', label: 'Invert', keys: ['i'] },
    {
      commandName: 'flipViewportHorizontal',
      label: 'Flip Horizontally',
      keys: ['h'],
    },
    {
      commandName: 'flipViewportVertical',
      label: 'Flip Vertically',
      keys: ['v'],
    },
    { commandName: 'scaleUpViewport', label: 'Zoom In', keys: ['+'] },
    { commandName: 'scaleDownViewport', label: 'Zoom Out', keys: ['-'] },
    { commandName: 'fitViewportToWindow', label: 'Zoom to Fit', keys: ['='] },
    { commandName: 'resetViewport', label: 'Reset', keys: ['space'] },
    { commandName: 'nextImage', label: 'Next Image', keys: ['down'] },
    { commandName: 'previousImage', label: 'Previous Image', keys: ['up'] },
    // {
    //   commandName: 'previousViewportDisplaySet',
    //   label: 'Previous Series',
    //   keys: ['pagedown'],
    // },
    // {
    //   commandName: 'nextViewportDisplaySet',
    //   label: 'Next Series',
    //   keys: ['pageup'],
    // },
    {
      commandName: 'setToolActive',
      commandOptions: { toolName: 'Zoom' },
      label: 'Zoom',
      keys: ['z'],
    },
    // ~ Window level presets
    {
      commandName: 'windowLevelPreset1',
      label: 'W/L Preset 1',
      keys: ['1'],
    },
    {
      commandName: 'windowLevelPreset2',
      label: 'W/L Preset 2',
      keys: ['2'],
    },
    {
      commandName: 'windowLevelPreset3',
      label: 'W/L Preset 3',
      keys: ['3'],
    },
    {
      commandName: 'windowLevelPreset4',
      label: 'W/L Preset 4',
      keys: ['4'],
    },
    {
      commandName: 'windowLevelPreset5',
      label: 'W/L Preset 5',
      keys: ['5'],
    },
    {
      commandName: 'windowLevelPreset6',
      label: 'W/L Preset 6',
      keys: ['6'],
    },
    {
      commandName: 'windowLevelPreset7',
      label: 'W/L Preset 7',
      keys: ['7'],
    },
    {
      commandName: 'windowLevelPreset8',
      label: 'W/L Preset 8',
      keys: ['8'],
    },
    {
      commandName: 'windowLevelPreset9',
      label: 'W/L Preset 9',
      keys: ['9'],
    },
  ],
};

/**
 * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium,
 * and 2018-2023 Open Health Imaging Foundation
 * SPDX-License-Identifier: MIT
 */

window.config.routerBasename = '/ohif/';

if (true) {
  window.config.dataSources = [
    {
      friendlyName: 'Orthanc DICOMweb',
      namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
      sourceName: 'dicomweb',
      configuration: {
        name: 'orthanc',

        wadoUriRoot: '../dicom-web',
        qidoRoot: '../dicom-web',
        wadoRoot: '../dicom-web',
        
        qidoSupportsIncludeField: !1,
            supportsReject: !1,
            imageRendering: "wadors",
            thumbnailRendering: "wadors",
            enableStudyLazyLoad: !0,
            supportsFuzzyMatching: !1,
            supportsWildcard: !0,
            staticWado: !0,
            singlepart: "bulkdata,video",
            bulkDataURI: {
                enabled: !0,
                relativeResolution: "studies"
            },
		
      }
    }
  ];

  window.config.defaultDataSourceName = 'dicomweb';

} else {
  window.config.showStudyList = false;
  window.config.dataSources = [
    {
      friendlyName: 'Orthanc DICOM JSON',
      namespace: '@ohif/extension-default.dataSourcesModule.dicomjson',
      sourceName: 'dicomjson',
      configuration: {
        name: 'json',
      },
    }
  ];

  window.config.defaultDataSourceName = 'dicomjson';
}

Warning appears after executing function “getDirectURL” lines:

if (!singlepart || singlepart !== true && singlepart.indexOf(fetchPart) === -1) {
    if (value.retrieveBulkData) {
        return value.retrieveBulkData().then(arr => {
            value.DirectRetrieveURL = URL.createObjectURL(new Blob([arr], {
                        type: defaultType
                    }));
            return value.DirectRetrieveURL;
        });
    }
    console.warn('Unable to retrieve', tag, 'from', instance);
    return undefined;

The problem is that value does not have a retrieveBulkData property.
I am attaching a file for testing.
test.dcm (147.4 KB)

Hello,

I guess that you should ask to the OHIF community, similarly to your other related question: OHIF plugin 1.1 - #6 by jodogne

Regards,
Sébastien-