フィルターのクリア

Dicomread - Out of Memory

4 ビュー (過去 30 日間)
Francesco Maffessanti
Francesco Maffessanti 2012 年 3 月 28 日
回答済み: Selva Karna 2020 年 1 月 14 日
I am trying to import in MATLAB a multiframe DICOM file. The DICOM data is JEPG compressed. When importing the file using dicomread , MATLAB goes out of memory OOM (file size is 60 MB and thus it should not be a true memory issue). Using dbstop id error, I found out MATLAb runs OOM when trying to write the tempfile containing the actual frame compressed: >> fwrite(fid, metadata,InstanceData((1:len)... this happens because the variable len, describing the length of the current frame in metadata.InstanceData, has huge causeing the OOM. Therefore, I suppose something goes wrong when building the Offset table. Of note, basic DICOM viewer can read all the frames in the DICOM file. I am running MATLAB R2010b on Win64
  1 件のコメント
Eric Larson
Eric Larson 2019 年 9 月 16 日
I get this same error today (2018b) with a DICOM file every now and then. It has the same length issue where the length is a rediculous value. Perhaps Matlab could constrain the length to be the difference of the offset of the current frame to the offset for the next frame and not blindly accept a length like 2500000000. The symptom is that Matlab is trying to create the indices (1:length)+offset and the system goes to memory extremes (16GB+) trying to do that.
I realize that the DICOM file is not properly constructed in this case but oher DICOM viewers manage to read it just fine. A little defensive programming might go a long way here.

サインインしてコメントする。

回答 (1 件)

Selva Karna
Selva Karna 2020 年 1 月 14 日
change DICOM Image data type after read dicom, then load and view your volume

カテゴリ

Help Center および File ExchangeDICOM Format についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by