I'm working on volumes, i have a mask and a CTMEP . The mask allows to locate the tumour. At first, i wanted to find a way to overlay my two volumes so that i found that : http://www.mathworks.com/matlabcentral/fileexchange/39460-overlayvolume/content/overlayVolume.m .
I tried but i'm not satisfied of my 3 figures that appear. As a matter of fact, the display is too dark , and i can't distinguish the differents part of the organs. I don't know which parameter i have to modify to see my organs. I thought at the begining that it was because i was in HU but even in greyscale i can't see anything. I add a picture of what i see.
Thank you for your help.
here is the link.
It all depends on how the plotting function is called inside the overlayVolume
.
When you use imshow(I)
it behaves differently for different types of data.
If your data is uint8
imshow
will assume that it is in range 0-255. If your data is uint16
it will assume it is 0-65535. This means that it will plot white for 65535 and black for 0.
If your data is double, imshow(I)
will assume it is in range 0-1 (so converting an image to double and dividing by its max value will plot it correctly).
What happens in your case is that you are dealing with X-ray images. Generally , in this type of data, you need the values stored in uint16
type due to the resolution you need, but you generally do not use the whole range because the images are created by mathematical algorithms. Your max value was 4071
, wich is way closer to black (0) than it is to white (65535) so almost everything was plotted in black or dark grey. Converting it to double and putting it in the range 0-1 solved the problem.
If the function imshow()
wasn't inside a class someone else created but you where putting it in your code my suggestion would be different. imshow
accepts ranges as input, so you could do imshow(I,[0 4071])
to force 4071 to be "white". More generally you could doimshow(I,[min(I(:) max(I(:)])
, or the equivalent call (and less verbose) imshow(I,[])
.