how can convert HU(hounsfield units) to grayscale??
Mostrar comentarios más antiguos
how can convert HU(hounsfield units) to grayscale. is there any command in matlab for this?
I download a file from LIDC(Lung Image Database Consortium) to start my work,it has 55 images and these images are .dcm . I am beginner so I dont know how can I use this for a segmentation project. so I read it with dicomread and I saw that the value of this is between 0-4095 then I searched in google and found that ct images have a scale that call HU. when I want to see these images in matlab I just see a black screen..I think maybey there is a way in matlab for this. in fact I think I can do segmentation method on a .jpg image but I cant start my work with this images
thanks
1 comentario
Matt J
el 5 de Sept. de 2014
when I want to see these images in matlab I just see a black screen
We don't know what you did to display the images. There's no reason why you wouldn't be able to view image slices over a range of values like 0-4095, using something like imagesc.
Respuestas (3)
I suspect the image is already grayscale if it consists of an array of HU values and not a 3D/4D array with different color channels. It would be strange to have a color CT image, to my mind, though I guess for rendering and tissue segmentation purposes you might.
Image Analyst
el 5 de Sept. de 2014
0 votos
Use dicomread() to read in the images. They will have values. Don't worry what they're called - HU or gray levels - just use them. I don't see why you say "I cant start my work with this images" . You can use them as-is for your segmentation. There is no problem so why do you think there is? There is even a function that reads dicom images. Did you even try to use it?
4 comentarios
Image Analyst
el 5 de Sept. de 2014
sara's "Answer" moved here since it's not an answer to her original question but apparently a response to me:
I am beginner
I mean that when we have 55 image of one Patient so how can I use this? should I convert this 55 image to a Special image?
and the other problem is that when we have a .dcm image and use dicomread() , why I can not see the image when I use imshow();
Image Analyst
el 5 de Sept. de 2014
sara, what is a "Special image"? You forgot to show us your code so please read this http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer. So now I have to guess. Did you do this?
grayImage = dicomread(fullFileName);
? Or did you do something else? How did you display it? Did you do this:
imshow(grayImage, []);
? Or did you do something else? If you do this:
whos grayImage; % or whatever variable name you used.
what does it say about the size and type/class of the variable?
Image Analyst
el 6 de Sept. de 2014
Editada: Image Analyst
el 6 de Sept. de 2014
Not unless that one command is the name of a GUI that you can call up that shows the Radiologist a montage or else a single image with a listbox or scrollbar to change images. It should not be darker than your original image unless your original image had what the radiologist call window and level applied to it such that the displayed portion was a amplified intensity window. The [] option scales from min to max so in most cases it's brighter but it depends on the shape of the histogram. If you have one oddball pixel in there that is way brighter than everything else, say, some text, then it will make all the other pixels seem darker. Like if anatomy pixels have gray levels of 0-1000 but annotation is in there with gray level 65535, then all the anatomy pixels will be inthe range 0 to 1000*255/65535 and seem dark. But if the radiologist had the "original" image windowed so that 0-1000 displayed as 0-255, and the annotation would be clipped at 255 since it can't get any brighter so the image might seem brighter then. Understand? You can use imadjust to scale display between the small tails of the histogram, like the 1% points.
The reason you see a black image is that your data ranges from 0-4095, but imshow by default expects data ranging from 0 to 1 and sets the display range accordingly. You have several options for dealing with this,
- Normalize your imaging manually to fall within the range 0-1, e.g. Image=double( Image)/max(Image(:))
- Use a different display function like imagesc that will automatically scale your image as above.
- Don't use the default settings for imshow. Use additional input args to tell it that your data ranges from 0 to 4095.
7 comentarios
Matt J
el 6 de Sept. de 2014
You could attach the slice you're trying to display in a .mat file so that we can play with the same data.
sara
el 6 de Sept. de 2014
Matt J
el 6 de Sept. de 2014
I get perfectly okay results with
imshow(m,[0 4095])
If you want to see a bit more soft tissue detail, you can narrow the window a bit
imshow(m,[600,1500]); colorbar

You need to check the range of Hounsfield values that the your DCM viewer is windowed to. The image you've posted looks similar to what you get by doing the following in MATLAB,
imshow(m,[0,1100]);
In other words, it looks like your DCM viewer is set to a window of 0 to 1100 HU or so.
Image Analyst
el 6 de Sept. de 2014
I agree. That's what I said in my last comment about there being some window and level applied that is different between the two programs.
Categorías
Más información sobre Convert Image Type en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
