Error in displaying DICOM images in Matlab

조회 수: 2 (최근 30일)
Gee Cheng Mun
Gee Cheng Mun 2016년 1월 2일
댓글: Walter Roberson 2016년 1월 3일
I converted this image (.file) to a dicom image in AMIDE. However when I tried to display it in MATLAB, this error was shown. I am totally confused.
I=dicomread('data.dcm');
imshow(I,[]);
Error using imageDisplayValidateParams>validateCData (line 113)
Multi-plane image inputs must be RGB images of size MxNx3.
Error in imageDisplayValidateParams (line 27)
common_args.CData = validateCData(common_args.CData,image_type);
Error in imageDisplayParseInputs (line 78)
common_args = imageDisplayValidateParams(common_args);
Error in imshow (line 219)
[common_args,specific_args] = ...

답변 (2개)

Walter Roberson
Walter Roberson 2016년 1월 2일
After the dicomread(), have it show size(I) and tell us what it says.
  댓글 수: 1
Gee Cheng Mun
Gee Cheng Mun 2016년 1월 3일
I have an answer of 1x4 double [106, 106, 1, 5875], Min = 1 and Max = 5875.

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2016년 1월 2일
Try extracting just the first 3 planes and showing it:
rgbImage = I(:,:,1:3);
imshow(rgbImage);
  댓글 수: 3
Image Analyst
Image Analyst 2016년 1월 3일
It's not a 3D RGB image - it's a volumetric image. Get the image without the 1 dimension with squeeze():
array3D = squeeze(I);
Then pick a slice and display it
sliceNumber = 13; % Whatever;
imshow(array3D(:,:, sliceNumber));
Walter Roberson
Walter Roberson 2016년 1월 3일
You do not need that step, you can just
imshow(I(:,:,1,sliceNumber))

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 DICOM Format에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by