sprintf + calling value in nested structure
Afficher commentaires plus anciens
I need to loop through a set of structures/fields within a structure, 'dicom', to obtain specific reference numbers stored within the structure.
The reference number(s) that I am looking for can be called by: dicom.DVHSequence.Item_1.DVHReferencedROISequence.Item_1.ReferencedROINumber
However, the Item_# will change each time I call a reference number.
I have used sprintf to change the Item_# that I am calling:
ref_ROI_num_file_name = sprintf('dicom.DVHSequence.Item_%i.DVHReferencedROISequence.Item_%d.ReferencedROINumber',h,h)
with a for loop to increment 'i' (which works).
However, after I use sprintf, I cannot seem call the field name. I have tried getfield() to no avail.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur DICOM Format dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!