problem with reading MRI image (dicom)

4 ビュー (過去 30 日間)
D C
D C 2012 年 12 月 19 日
回答済み: abdalla gad 2015 年 6 月 24 日
I use dicomread function and then the matrix seems to be ok(includes numbers >0), but when i want to display image using imshow function matlab always displays black background. I didn't have this problem with CT images. Did you have any problems like that?

採用された回答

Matt Kindig
Matt Kindig 2012 年 12 月 19 日
Hi D C,
It's probably just a display issue. When using imshow, try setting the DisplayRange to autoscale, i.e.
imshow( DICOM_Matrix, 'DisplayRange', []);
  2 件のコメント
D C
D C 2012 年 12 月 19 日
It works! Thank you! But could you explain why this parameter 'DisplayRange' was needed?
Image Analyst
Image Analyst 2012 年 12 月 19 日
It's not - you can use just [] alone. See my answer below.

サインインしてコメントする。

その他の回答 (4 件)

Image Analyst
Image Analyst 2012 年 12 月 19 日
You probably have a uint16 image and are only using a small fraction of the 65535 allowable gray levels. If you don't specify a display range, it will put 0 to 0 on the display, and 65535 to 255 on the display (255 is the most an 8/24/32 bit color display can display). So if your max value is, say, 3000, it will show up as 3000/65535*255 = 12 gray levels and will be very dark - practically invisible. To have it autoscale so that the 3000 will get mapped to 255, use [], like this:
imshow(yourImageArray, []);
This will also work for floating point (single, double) images, which normally will show up as all white because it expects floating point images to be in the range 0-1. Do this and tell me what it says:
whos yourImageArray
max(yourImageArray(:)) % Don't use a semicolon
min(yourImageArray(:))
  4 件のコメント
D C
D C 2012 年 12 月 19 日
編集済み: D C 2012 年 12 月 19 日
MRI has a range 0-50 and CT has a range -2260 to 2467, so I guess I'm unable in this case to compare/fuse images?
Image Analyst
Image Analyst 2012 年 12 月 19 日
Why not? Why can't you just scale them with mat2gray()?

サインインしてコメントする。


D C
D C 2012 年 12 月 20 日
I meant I have to convert one of them. Thank you for all your help! That was pretty useful!

Wes
Wes 2013 年 4 月 9 日
Hi there,
It seems like I have a similar problem with reading DICOMs. I have stored T2* maps in DICOM files (it is a long scan, so I have about 240 time points of each map). Matlab reads it in such a strange way, windowing however it's pleased ;-) For me, the important bit is to retain the actual voxel value when I read in images, so absolutely no scaling can be done by Matlab. Any idea how to achieve that?
Thanks!

abdalla gad
abdalla gad 2015 年 6 月 24 日
hi.. plz i want to have code for read 3d mri dicom files

カテゴリ

Help Center および File ExchangeDICOM Format についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by