-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project: Efficient Handling and Progressive Loading of Compressed Multiframe DICOM Images #681
Comments
@OzgeYurtsever Could you add a title for the project? |
@OzgeYurtsever can you provide the characteristics of the dataset that would allow reproducing the issue? We may be able to locate a publicly available sample in Imaging Data Commons. |
@fedorov Two key variables contribute to this problem:
|
The query below will identify all MR US series from IDC along with the URL and total file size. SELECT
SeriesInstanceUID,
StudyInstanceUID,
NumberOfFrames,
SUM(instance_size)/POW(1024,3) AS series_size,
CONCAT("https://viewer.imaging.datacommons.cancer.gov/viewer/",StudyInstanceUID,"?seriesInstanceUID=",SeriesInstanceUID) as viewer_url
FROM
`bigquery-public-data.idc_current.dicom_all`
WHERE
Modality = "US"
AND SOPClassUID = "1.2.840.10008.5.1.4.1.1.3.1" # Ultrasound Multi-frame Image IOD
GROUP BY
StudyInstanceUID,
SeriesInstanceUID,
NumberOfFrames
ORDER BY
series_size desc Here's a sample series returned: https://viewer.imaging.datacommons.cancer.gov/viewer/1.3.6.1.4.1.14519.5.2.1.1600.1201.280261060505804787745195562783?seriesInstanceUID=1.3.6.1.4.1.14519.5.2.1.1600.1201.169862383836550038574427412141 None of the series I tried crashed the viewer. If you are not sure what to do with the query above or how to work with IDC, you can get up to speed by following this tutorial: https://github.com/ImagingDataCommons/IDC-Tutorials/tree/master/notebooks/getting_started. |
Project Page Pull Request Creation✅ COMPLETED: See #683 |
@fedorov Thank you for your reply. I tried the OHIF viewer demo locally with a breast ultrasound, but it crashed almost immediately. Unfortunately, I am unable to share the images I uploaded due to the visible PID. I have attached a screenshot of the crash. Do you think using the OHIF demo may not provide the exact same experience as what you shared earlier? Does OHIF demo page utilize the same image retrieving and loading methods with the one you shared above? |
All I am trying to say is that if you can reproduce the problem with a public dataset, I think this can help debug the problem. I gave you some pointers to public datasets you can try to use to reproduce the problem. I do not know what is the causing the problem. |
Thank you, I will try to find a dataset from the public sources that causes the same issue. |
Hi @fedorov, I tried looking at Data Commons. Is there any compressed data there? Or is there a way to specify transfer syntax? I couldn't find it. This issue seems to be related to the images being compressed. (We are still trying to get some data we can share) |
@emelalkim you can use any DICOM attribute - including |
Thanks @fedorov, |
Emel, the URL is just a convenience shortcut to give you the URL to the viewer to open in the browser the series in each row. You should add the attributes to the WHERE statement. Here's the query that takes into account your new condition: SELECT
SeriesInstanceUID,
StudyInstanceUID,
NumberOfFrames,
SUM(instance_size)/POW(1024,3) AS series_size,
CONCAT("https://viewer.imaging.datacommons.cancer.gov/viewer/",StudyInstanceUID,"?seriesInstanceUID=",SeriesInstanceUID) as viewer_url
FROM
`bigquery-public-data.idc_current.dicom_all`
WHERE
Modality = "US"
AND SOPClassUID = "1.2.840.10008.5.1.4.1.1.3.1" # Ultrasound Multi-frame Image IOD
AND TransferSyntaxUID = "1.2.840.10008.1.2.4.91" # select JPEG2000 compression
GROUP BY
StudyInstanceUID,
SeriesInstanceUID,
NumberOfFrames
ORDER BY
series_size desc Unfortunately, there are no US (or any other modality, except Slide Microscopy) with JPEG2000 compression in IDC :-( |
Yeah, I had already tried that, and a couple other compression types. I was hoping I could give the Transfer Syntax to OHIF. :( |
Hi @fedorov, |
Category
Cloud / Web
Key Investigators
Project Description
Loading compressed multiframe DICOM images as a whole causes frequent browser crashes, particularly on Microsoft machines. This issue arises due to the large file size of the DICOM images, exceeding the browser's memory capacity.
The browser's rendering engine attempts to load the entire file into memory, due to the significant size of these images, the browser can quickly exhaust its allocated memory, leading to crashes or unresponsive behavior.
This issue affects both ePAD and OHIF with the latest WADO-loader version.
Objective
Initiate a discourse about the methodologies for saving, storing, and reading DICOM data, and explore strategies for optimizing the handling of compressed multiframe images to achieve enhanced efficiency and avoid browser crashing.
Approach and Plan
Instead of loading the entire DICOM file at once, the image loading process can be modified to load the image in smaller chunks or frames progressively. This approach may allow the browser to handle smaller portions of the image, reducing the memory burden and enhancing overall stability.
Progress and Next Steps
We attempted to adapt a solution approach inspired by the PR link below. The link's solution specifically addresses uncompressed images. In our case, we tried a similar method to handle compressed images within the dicom-parser library, unfortunately, the attempted solution did not yield the desired outcome.
PR link: cornerstonejs/cornerstoneWADOImageLoader#454 (comment)
Ticket link: cornerstonejs/dicomParser#248
Illustrations
Background and References
Unfortunately the ultrasound images are not deindentified, we can not provide sample data yet. We are working on getting a data set.
Related libraries:
https://github.com/cornerstonejs/cornerstoneWADOImageLoader
https://github.com/cornerstonejs/dicomParser
The text was updated successfully, but these errors were encountered: