: info = dicomupdate(fileinfo, attribute, value)
: info = dicomupdate(info, attrinfo)

Update a dicom struct with new values

Inputs

info - dicominfo struct.

attribute - attribute name to find and change value of.

value - attribute value to set.

attrinfo - a table with fields Location and Value for each matched attribute to change.

Outputs

info - dicominfo struct.

Examples

filename = file_in_loadpath("imdata/rtstruct.dcm");
info = dicominfo(filename);

% update specific values
finfo = dicomfind(info, "ROINumber");
finfo.Value{1} = 10;
info = dicomupdate(info, finfo);

% update all matching
info = dicomupdate(info, "ROINumber", 100);

Package: dicom