OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.09k stars 3.25k forks source link

DICOM JSON file multiframe not working #4114

Open kinsolutions opened 4 months ago

kinsolutions commented 4 months ago

Could you please share with me an example DICOM JSON file for multiframe? I have tried viewing it, and it shows the number of instances based on the number of frames, but when I scroll, it's not loading the next frame. Could you please suggest if there's anything I missed?

image

Originally posted by @kinsolutions in https://github.com/OHIF/Viewers/issues/2262#issuecomment-2098177053

sedghi commented 4 months ago

We haven't really tried the dicomJSON with multiframe.

@Ouwen Did you guys ever worked on this?

mochi-latte commented 3 months ago

I have the same issue. @kinsolutions did you find a solution?

mochi-latte commented 3 months ago

@sedghi I found the issue. There is two places:

Firstly, this loop should be start from 1 instead.

https://github.com/OHIF/Viewers/blob/4761bbf0c8c546b46fc5463dc608bc5dcea91044/extensions/default/src/DicomJSONDataSource/index.js#L264-L271

getImageId should update the frame query in the URL.

https://github.com/OHIF/Viewers/blob/29c02121df6eaab7443cf161d8feddf58c2075fc/extensions/default/src/DicomWebDataSource/utils/getImageId.js#L32-L34

fightroad commented 4 weeks ago

the same。 There are many issues when comparing the DICOMJSON and DICOMweb methods, and I hope these can be prioritized for resolution.

Ouwen commented 3 weeks ago

The URL for multiframe needs to include the frame such as &frame=0 then it should work as supported. However, for extremely large multiframe, this can cause issues in the caching and decaching of files.

Ideally, there is logic in multiframe to load the bytes of just the frame of interest so caching is granular at the slice level. Otherwise you'll have a slice of the multiframe decache and to get the slice back the entire multiframe may need to be re-downloaded.

In dicomweb, usually this logic is handled for you and everything is always at a slice level. However, multiframe P10 file format will not and the logic either needs to be handled in the frontend (no longer part of the dicomweb spec). Or a intermediate server needs to slice out instances within the multiframe (part of the dicomweb spec).