Display DICOM images with imshow

59 ビュー (過去 30 日間)
walzer91
walzer91 2014 年 7 月 11 日
編集済み: DGM 2023 年 12 月 1 日
Hi everyone! I'm having some problems trying to show DICOM images. I read and show images using
image = 'img\IM-0001-0089-0001.dcm';
figure, imshow(image,'DisplayRange',[])
but the quality of the image still very poor, really different from the original! I know that the problem deals with the bit depth used, DICOM are 16 bit, but I don't know how to fix this problem! Please, somebody could help me? You can find here attached a screenshot of how the image really is and how I can display using matlab! Thanks!
  4 件のコメント
Ágúst Leó
Ágúst Leó 2023 年 12 月 1 日
Hey Walter Roberson! I followed the coding in the link you provided and made sure to not limit my images to uint16(), but the resolution is still limited compared to the original. Any ideas? Thanks!
DGM
DGM 2023 年 12 月 1 日
編集済み: DGM 2023 年 12 月 1 日
Nobody can guess what code you're using or what images you're using or the manner in which they appear.
The resolution is determined by your display and the size of the figure window. If the image is rendered smaller or larger than its native geometry, then it will be subject to nearest-neighbor interpolation.
The contrast is determined by the numeric class of the image and the range of the image content with respect to black and white. Most medical images that I see only occupy a small portion of the dynamic range available, and so they will be rendered with very little contrast.
inpict = dicomread('CT-MONO2-16-ankle.dcm'); % int16
imshow(inpict) % it's all gray
getrangefromclass(inpict) % the values associated with [black white]
ans = 1×2
-32768 32767
[min(inpict(:)) max(inpict(:))] % the actual extrema are both near 50% gray
ans = 1×2
32 4080
You can use the displayrange parameter of imshow() (either implicitly or otherwise) in order to change how the image data is rendered
% imshow(inpict,[0 5000]) % use some particular fixed values
imshow(inpict,[]) % use the data extrema
Otherwise, you can adjust the image contrast directly using tools like mat2gray(), imadjust(), etc.

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

回答 (1 件)

Piyush Prajapati
Piyush Prajapati 2019 年 7 月 1 日
You didn't read DICOM image in in proper format. This could be once possinle reason but this code below is working.
Try using this,
info = dicominfo('img\IM-0001-0089-0001.dcm');
image = dicomread(info);
figure
imshow(image,[]);

カテゴリ

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