MATLAB Answers

How to display DICOM image

32 views (last 30 days)
Majid Al-Sirafi
Majid Al-Sirafi on 23 Jan 2019
Commented: Walter Roberson on 25 Jan 2019
Hi everyone
Currently, I’m working in processing of DICOM image. The following program is used for noising the medical image
close all;
clear all;
X = dicomread('CT-MONO2-16-ankle.dcm');
metadata = dicominfo('CT-MONO2-16-ankle.dcm');
figure; imshow(X, []);title('before');
X = imnoise(X,'salt & pepper',0.0006);
dicomwrite(X, 'noisyImage.dcm', metadata);
Y = dicomread('noisyImage.dcm');
figure; imshow(Y, []); title('after');
Unfortunately, the output is blur noisy image. I want just noisy image (as shown in attached image), not blur noisy image. How can I do that?


Show 3 older comments
Walter Roberson
Walter Roberson on 23 Jan 2019
What do you mean pls?
Each call to figure() creates a new window. However since you did not pass position information, the two windows would be in the same place on the screen, with the second one hiding the first one. You could try passing Position information to the figure() call to force them to be at different locations on your screen.
how can I specify the perfect range to be fitted for any image
That is not possible automatically. With that range of data, we can tell that the dataset also gives information about bone, and automatic algorithms cannot guess whether you want to look at the bone or the soft tissue at any given time. It is like the optical illusion of the old lady simultaneous with the young woman: there is information present at multiple levels and automatic algorithms cannot decide between the levels.
The kind of dataset you are using often has the "interesting" information in numeric ranges that are different than the ones you are using, with the two most common ranges both starting above 10000. I do not know enough about the technology to say why the interesting range is not pretty much constant; it might plausibly be the case that if you were to examine the DICOM attributes that you might find some that permitted normalization in a way that would transform all of the datasets from different manufacturers to a common range.
Majid Al-Sirafi
Majid Al-Sirafi on 25 Jan 2019
so, what about the following comand
imshow(X, 'DisplayRange', [low high]);
what is the benefit of DisplayRange in the above command. can we use low and high in the display the image?
Walter Roberson
Walter Roberson on 25 Jan 2019
When you use a display range in imshow(), it tells the graphics system to map all value below "low" to the first color in the color map, and to map all values above "high" to the last color in the color map, and to map all values inbetween proportionately -- so a value 1/3 of the way between low and high would get mapped to 1/3 of the way into the color map.
If you specify a display range of [] (the empty array) then the code uses min(X(:)) and max(X(:))
Now, it might be the case that for one particular sequence of images that the "interesting" information is within a known range of values, but a different run of the same patient on the same machine might have a different "interesting" range of values because of different machine settings. In any case, a different dataset from a different manufacturer's machine will likely have the "interesting" range of values be different.
Automatically finding the "interesting" range of values can be tricky.

Sign in to comment.

Answers (0)