MATLAB Answers

how to convert dicom image to png

조회 수: 92(최근 30일)
Hi all,
i want to convert my dicom image to png image.
below my coding, but error. Anyone can help me?
[I, map]=dicomread('lung.dcm');
Error using imwrite>parse_inputs (line 628)
The colormap should have three columns.
Error in imwrite (line 440)
[data, map, filename, format, paramPairs] = parse_inputs(varargin{:});

채택된 답변

Image Analyst
Image Analyst 23 Jan 2021
I imagine you looked at what map was. Did that not give you any clue as to why it was not 3 columns? What was it? Maybe it's empty, in which case you'd not pass it in to imwrite.
  댓글 수: 8
mohd akmal masud
mohd akmal masud 24 Jan 2021
oh i see..mean there is no map, then cannot convert it to RGB.
yes, for im2unit8 done.
thank you sir for your explanation. thank you so much.

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

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by