Copy DICOM header and use it to different DICOM images
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I have a stack of 2D DICOM images. I want to replace the DICOM header of these DICOM images (without affecting pixel intensities) with another DICOM header (DICOM header from another dataset) that has all the info I need. Can I do this in Matlab?
Thanks.
댓글 수: 4
Rik
2018년 11월 13일
That should work. You can easily test it by re-loading and comparing:
info = dicominfo('DICOM_1');
data = dicomread('DICOM_2');
dicomwrite(data,'NEW_FILE',info);
info_new=dicominfo('NEW_FILE');
data_new=dicomread('NEW_FILE');
isequal(data_new,data)
isequal(info_new,info)
Note that the info sometimes contains the filename as well, so the last test might return false for a succesfull operation.
With doing it in binary I meant reading the binary stream that contains the metadata, and writing that together with the binary stream containing the pixel data. That is much harder to work with, and you need to do more yourself, but at least you can be sure that result is bit-perfect.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 DICOM Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!