MATLAB: How to write the metadata of a DICOM image with an unsupported Information Object Definition (IOD) using the DICOMWRITE function in Image Processing Toolbox 5.0.1 (R14SP1)

createmodecustomdefinitiondicomwriteImage Processing Toolboxinformationiodobjectrtstruct

As of Image Processing Toolbox 5.0.1 (R14SP1), there are three supported Information Object Definitions: MR, CT, and SC. By default, DICOMWRITE will not preserve the metadata of DICOM images with unsupported Information Object Definitions.

Best Answer

Users who wish to create DICOM images with unsupported Information Object Definitions can specify the "CreateMode" property with value "Copy" as an argument to the DICOMWRITE function:
dicomwrite(img, 'filename', info, 'CreateMode', 'copy')
Note that when using the "Copy" value for the "CreateMode" option, it is the responsibility of the user to specify valid Image/Metadata data that conforms to a particular Information Object Definition.