Dicomread - Out of Memory
조회 수: 2 (최근 30일)
이전 댓글 표시
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
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
2020년 1월 14일
change DICOM Image data type after read dicom, then load and view your volume
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 DICOM Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!