필터 지우기
필터 지우기

TO convert *.mat file into *.dcm files

조회 수: 2 (최근 30일)
Kavitha Srinivasan
Kavitha Srinivasan 2012년 12월 3일
Hi all I am working with multidimensional array of CT images in mat format. Now I need to save them as *.dicom files. By using dicomwrite, the intensity (pixel) values fall within smallest value=0 to max= 65535(default). Thus all my finer details of my image is lost (image is almost blank & most of the part is white). I want to retain the same details after conversion to dcm files. Could anyone please help me with this.
Thanks
  댓글 수: 4
Walter Roberson
Walter Roberson 2012년 12월 4일
How do you normally display the image? Are you using imagesc() With some particular colormap ?
Kavitha Srinivasan
Kavitha Srinivasan 2012년 12월 4일
when it is in mat file, I use imagesc() with colormap gray. when it is dcm file, I use imshow().

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

채택된 답변

Walter Roberson
Walter Roberson 2012년 12월 4일
mindata = min(YourData(:));
maxdata = max(Yourdata(:));
mappeddata = uint16( (YourData - mindata) ./ (maxdata - mindata) * 65535 );
Now write mappeddata
  댓글 수: 1
Kavitha Srinivasan
Kavitha Srinivasan 2012년 12월 4일
It works.Thank you very much.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by