Dicomwrite error with metadata validation
显示 更早的评论
I am trying to alter an image and then write it back to .dcm format with its original header metadata. This is an RT image radiograph file (meaning it has structure contour data included in the header attributes (50xx,3000)). Using dicomwrite, I get the error: "Error using dicom_add_attr>validate_data (line 122) Attribute (5000,3000) has wrong data type."
I have done nothing to the header data besides read it directly from the original dicom file. I need to write this image back to dicom with its header intact. Are there any options to ignore discrepancies in Matlab's validation?
Here is a test that produces the error: >>img = dicomread('RI.Field 1.dcm'); >>hdr = dicominfo('RI.Field 1.dcm'); >>dicomwrite(img,'file.dcm',hdr,'CreateMode','copy');
[release 2018a]
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Read and Write Image Data from Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!