I am trying to use the dicomanon function to update the "StudyDate" metadata element in an image file to set it to a new value "20010101"

2 Ansichten (letzte 30 Tage)
I tried to follow the syntax in the help file.
I tried the following command:
dicomanon('00000001anon.dcm', '00000001anon2.dcm', 'update', 'StudyDate', 20000101);
I get the following errors:
Error using dicomanon>parseInputs (line 272)
Parameter names must be a string.
Error in dicomanon (line 76)
args = parseInputs(varargin{:});
I also tried the following command:
dicomanon('00000001anon.dcm', '00000001anon2.dcm', 'StudyDate', '20000101');
Error using dicomanon>parseInputs (line 278)
Unrecognized parameter "StudyDate".
Error in dicomanon (line 76)
args = parseInputs(varargin{:});
I think the dicomanon function indicates that I should be able to update the values of metadata elements in the file. Is this limitted to a subset of metadata values? Do I need to read the metadata into a structure, update it, and then use dicomwrite?
Thank you!
Paul Hannon

Antworten (1)

Saket Chirania
Saket Chirania am 15 Dez. 2020
Hi Paul,
Try to read to read the meta data into structure and and use dicomwrite to write images as DICOM files. After you have the DICOM files you can use dicomanon to update the file according to your needs. Hope this helps.
For more details refers to following page: dicomwrite

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!

Translated by