sprintf + calling value in nested structure
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su DICOM Format in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!