dicomread truecolor comes out pink and green R2015a trial

3 次查看(过去 30 天)
When I read in a dicom file I get a 720x960x3 uint8 output as I would expect. However, if I do an imshow() on this output the resulting image comes out with a green background (which should be black) and pink text (which should be white). All the other colors are off as well.
My code is pretty simple:
X = dicomread('KX000008');
imshow(X);
I've checked the headers and it is set to truecolor so I'm not sure what's going on. Opening the same dicom in other dicom viewer tools it comes out correct, black background and white text. Any help is appreciated.
  4 个评论

请先登录,再进行评论。

采纳的回答

Chris Fahim
Chris Fahim 2015-7-16
Unfortunately, I think the only answer for this is a bug in Matlab dicomread for jpeg lossless transfer syntax 1.2.840.10008.1.2.4.70.
I used http://support.dcmtk.org/docs-dcmrt/dcmdjpeg.html to decompress the same image and matlab reads the decompressed image as expected.
  2 个评论
Eric Larson
Eric Larson 2015-9-9
I have been experiencing the same problem. Pink and green images result from reading in DICOM with imagery encoded with 1.2.840.10008.1.2.4.70 transfer syntax. Same image file is unpacked/displayed correctly in other tools (e.g. ShowCase). (By the way, I am using 2014b and the MCR.) I'd drop an image sample here as an attachment, but unfortunately it is much larger than 5MB.
Julio Chirinos
Julio Chirinos 2020-1-16
Experiencing the exact same problem exactly on 2019b. it's dissapointing that the Mathworks has not fixed this bug after 4 years!

请先登录,再进行评论。

更多回答(2 个)

Steven Lord
Steven Lord 2015-7-11
You asked this on the newsgroup earlier this week. I responded.
  3 个评论
Julio Chirinos
Julio Chirinos 2020-1-16
Steven, your link above no longer works. So what is the workaround for this bug? Every other DICOM software I have tried reads the colors correctly. The problem is restricted to Matlab
Image Analyst
Image Analyst 2020-1-17
Julio, to solve your problem it's best if you just attach your dicom image, zipped up.

请先登录,再进行评论。


Image Analyst
Image Analyst 2015-7-11
Since we can't actually download and see your data and problem, all I can do is to assume what you're saying is right, and suggest the way to fix it is to just remap the colors into the colors you want. Are the colors two very specific colors with precise RGB values, or are they a range of alike colors?
  4 个评论
Image Analyst
Image Analyst 2015-7-13
I don't know what De-ID means. You mean like removing the patient name from the image or something like that? Anyway, doesn't sound like a loss to me - sounds like a solution or at least a workaround. At least you know how to get it working.
Chris Fahim
Chris Fahim 2015-7-16
编辑:Chris Fahim 2015-7-16
Deid, meaning removing both names/info burned on the image and from the dicom tags. I'm beginning to think Matlab has a bug in dicomread, I just decompressed using http://support.dcmtk.org/docs-dcmrt/dcmdjpeg.html and the decompressed image shows up correctly in matlab.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 DICOM Format 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by