dicomread()command is not reading the .dcm format image
조회 수: 5 (최근 30일)
이전 댓글 표시
matlab is not readind the dicom format image using the dicomread() command and returning......
Error using dicomread>newDicomread (line 233)
Unsupported data encoding.
Error in dicomread (line 89)
[X, map, alpha, overlays] = newDicomread(msgname, frames, useVRHeuristic);
and this is the dicom image i tried to read
댓글 수: 8
Rik
2023년 5월 18일
I just tried it myself with this alternative reader. It seems to read all tags just fine, except for the image tags. Apperently it uses an alternative standard to store the image. Unless you figure out what standard that is, I doubt it will be easy to read the image.
채택된 답변
Walter Roberson
2023년 5월 18일
TransferSyntaxUID: '1.2.840.10008.1.2.4.80'
According to https://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_8.7.3.html that Transfer Syntax indicates
JPEG-LS Lossless Image Compression
MATLAB does not support JPEG-LS (except in the sense that if you happen to be using Windows and if your Microsoft Media Platform happens to have been extended with a JPEG-LS codec, then imread() just might be able to handle an image file in the format; this would not apply for dicom though.)
You have two options that I can think of at the moment:
- use some kind of external dicom reader and writer to convert to a transfer syntax that MATLAB can handle; or
- use the dicom header information to find the location and size inside the dcm file of the raw binary data, read it as raw data, and use a function similar to https://www.mathworks.com/matlabcentral/fileexchange/53039-jpegls_codec to decode the raw data
댓글 수: 9
Walter Roberson
2023년 5월 28일
Yes, information loss could occur using that path.
You should use one viewer that can interpret JPEG-LS data and export it using any of the lossless transfer syntax listed at https://www.mathworks.com/help/images/ref/dicomread.html#mw_4c7434ed-c796-477c-aca8-5e3f7989ea7f
Actually, even just "explicit VR little endian" might work.
Walter Roberson
2023년 5월 28일
A viewer that can read JPEG-LS and can export it as any of the lossless transfer syntaxes, "should not" lose information when it does the transformation.
But I have no experience with weasis or onis so I have no idea whether they are high quality programs or junk programs, so I cannot be sure that they will not lose information in cases there is no good reason to lose information.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!