Error in displaying DICOM images in Matlab
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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] = ...
0 comentarios
Respuestas (2)
Walter Roberson
el 2 de En. de 2016
After the dicomread(), have it show size(I) and tell us what it says.
Image Analyst
el 2 de En. de 2016
Try extracting just the first 3 planes and showing it:
rgbImage = I(:,:,1:3);
imshow(rgbImage);
3 comentarios
Image Analyst
el 3 de En. de 2016
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
el 3 de En. de 2016
You do not need that step, you can just
imshow(I(:,:,1,sliceNumber))
Ver también
Categorías
Más información sobre DICOM Format en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!