필터 지우기
필터 지우기

Image saved as DICOM doesn't match original

조회 수: 1 (최근 30일)
Brian
Brian 2015년 8월 12일
댓글: Brian 2015년 8월 13일
Dear all,
I am a medical student postprocessing DICOM images, and wish to save the resulting image (I_blended) back into DICOM format. However, when I use the following:
>>dicomwrite(I_blended, 'I_blended_DICOM')
The resulting DICOM file 'I_blended_DICOM' is different than 'I_blended' in multiple ways:
  1. The image of 'I_blended_DICOM' is very, very bright (the values are either 0 or 65535, while 'I_blended' as a range of numbers)
  2. 'I_blended' is a 512*512 double, while 'I_blended_DICOM' is 512*512 uint16
  3. I am unable to adjust the window/contrast level of 'I_blended_DICOM' in my DICOM viewer, unlike other DICOM images.
I also tried to copy the metadata from an existing DICOM into my save:
>> metadata = dicominfo('IM20');
>> dicomwrite=(I_blended, 'I_blended_DICOM', metadata);
But the resulting 'I_blended_DICOM' is the same as I just described.
Please help! Thank you so much.

채택된 답변

Walter Roberson
Walter Roberson 2015년 8월 13일
As an experiment, how about
dicomwrite=(I_blended, 'I_blended_DICOM', metadata, 'CreateMode', 'Copy');
However, I doubt this will more than one of your difficulties.
The documentation for dicomread() says that the input images are always uint8, uint16 or int16. Never double. The data you read in with dicomread could not have been double but you are trying to write out double and expect it to be the same. The postings I find, some with the same difficulty about value conversions, say that you should convert your data to uint16() before trying to dicomwrite it. If that requires rescaling it, then rescale it before doing the uint16()
  댓글 수: 1
Brian
Brian 2015년 8월 13일
Converting it to int16 does the magic! Thank you so much!

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

추가 답변 (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