dicomread truecolor comes out pink and green R2015a trial
Show older comments
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 Comments
Image Analyst
on 11 Jul 2015
Edited: Image Analyst
on 11 Jul 2015
Probably won't get very much help until you attach the file. What other app did you open it with? ImageJ? Photoshop?
Chris Fahim
on 11 Jul 2015
Image Analyst
on 11 Jul 2015
Did you see the first sentence in my comment?
Chris Fahim
on 11 Jul 2015
Accepted Answer
More Answers (2)
Steven Lord
on 11 Jul 2015
0 votes
You asked this on the newsgroup earlier this week. I responded.
3 Comments
Chris Fahim
on 11 Jul 2015
Julio Chirinos
on 16 Jan 2020
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
on 17 Jan 2020
Julio, to solve your problem it's best if you just attach your dicom image, zipped up.
Image Analyst
on 11 Jul 2015
0 votes
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 Comments
Chris Fahim
on 11 Jul 2015
Chris Fahim
on 13 Jul 2015
Image Analyst
on 13 Jul 2015
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
on 16 Jul 2015
Edited: Chris Fahim
on 16 Jul 2015
Categories
Find more on Read and Write Image Data from Files in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!