how can convert HU(hounsfield units) to grayscale??

18 次查看(过去 30 天)
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 个评论
Matt J
Matt J 2014-9-5
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.

请先登录,再进行评论。

回答(3 个)

Matt J
Matt J 2014-9-5
编辑:Matt J 2014-9-5
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
Image Analyst 2014-9-5
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 个评论
sara
sara 2014-9-6
编辑:sara 2014-9-6
thanks Image Analyst I use this code
grayImage = dicomread('000008.dcm');
imshow(grayImage, []);
it is better and show image but it is darker than my original image..
......................... for "special image " I mean that if we have 55 images that are Different from each other but all of them are for one Patient maybe there is a way to Access all of the information from them with one command.Because when we take a CT scan image the folder that the Radiologist give us include more than one image.
Image Analyst
Image Analyst 2014-9-6
编辑:Image Analyst 2014-9-6
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.

请先登录,再进行评论。


Matt J
Matt J 2014-9-5
编辑:Matt J 2014-9-5
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,
  1. Normalize your imaging manually to fall within the range 0-1, e.g. Image=double( Image)/max(Image(:))
  2. Use a different display function like imagesc that will automatically scale your image as above.
  3. Don't use the default settings for imshow. Use additional input args to tell it that your data ranges from 0 to 4095.
  7 个评论
Matt J
Matt J 2014-9-6
编辑:Matt J 2014-9-6
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
Image Analyst 2014-9-6
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by