I'm trying to modify the metadata of a DICOM file and copy ALL the fields over to a new file. The default dicomwrite does not copy all the fields. I tried to use 'createmode','copy' and I get the following error: Undefined function 'fieldnames' for input arguments of type 'uint8'.
The DICOM dictionary has all the fields I need to copy over, so thats not the issue! Any help would be greatly appreciated. My code is below:
%% Using dicomwrite(X,'file_copy.dcm',hdr) successfully copies, but leaves some fields out in the metadata.