This may be a basic question as I'm relatively new to matlab. I have a DICOM file which I've read the headers for into a structure using the dicominfo function. I would like to modify certain fields where there is more than one instance so for example:
info=dicominfo('Some dicim file.dcm');
Within info, there multiple sub-structures with multiple nested fields for example there is a sub-structure called SOPInstanceUID, and within this there are n fields storing value: field_1, field_2..field_n
To see the a certain value I can type within the structure:
However I would like to set a new value i.e to then write a new DICOM file.
I would like to do this automatically for all possible field numbers e.g:
My question is how do I get Matlab to read the field name for each 'i', in order to set a new value for each field in the structure? I have tried various things like str2cat and sprintf but nothing works.
I hope this make sense and I would be very grateful for any help on this.