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"

6 visualizaciones (últimos 30 días)
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

Respuestas (1)

Saket Chirania
Saket Chirania el 15 de Dic. de 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

Categorías

Más información sobre DICOM Format en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by