Dicomread a File and Dicomwrite it results in different outputs...

조회 수: 1 (최근 30일)
Ingo Hermann
Ingo Hermann 2020년 8월 28일
답변: Ingo Hermann 2020년 8월 30일
I have a very weird problem.
I open a DicomFile and save it without changing a thing, but when I look at the dcm in synedra view, they are different.
The original files goes from -4096 to 4096 but the save file only from 0 to 4096. I then tried to stretch the file by myself i.o.:
x = (2.*x-4096);
But this was also not working, dicomwrite cuts the values below 0...
dinfo = dicominfo('testDicom.dcm');
x = dicomread(dinfo);
dicomwrite(x, 'testDicom2.dcm', dinfo)
Any ideas?
Best Ingo
  댓글 수: 6
Ingo Hermann
Ingo Hermann 2020년 8월 29일
Okay, I solved the problem!
If I would have read the manual carefully I have to use the option ( 'CreateMode', 'copy' ):
dicomwrite(x, 'testDicom2.dcm', dinfo 'CreateMode', 'copy');
Thanks for your help again and best wishes
Ingo
Rik
Rik 2020년 8월 29일
Please post the solution as an answer and accept it. That way people with a similar problem can more easily find the solution.

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

채택된 답변

Ingo Hermann
Ingo Hermann 2020년 8월 30일
Okay, I solved the problem!
If I would have read the manual carefully I have to use the option ( 'CreateMode', 'copy' ):
dicomwrite(x, 'testDicom2.dcm', dinfo 'CreateMode', 'copy');
Thanks for your help again and best wishes
Ingo

추가 답변 (0개)

카테고리

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