Copy DICOM header and use it to different DICOM images
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Rik
am 13 Nov. 2018
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.
Antworten (0)
Siehe auch
Kategorien
Mehr zu DICOM Format finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!