Closed NirutaDhimal closed 1 year ago
That function returns a dictionary that has all fields -> values. https://pydicom.github.io/deid/examples/func-replace/
Hi, can you please specify which function? The above link took me to examples section
Look on that page at:
items = get_identifiers(dicom_files, expand_sequences=True)
and see the example output below it. Try running it on your own to see the same.
Thanks
Sure thing! Closing, ping again if you need.
I tried to implement
items = get_identifiers(dicom_files, expand_sequences=True)
but I am getting error
@vsoch Can you help here? What am I doing wrong?
I also checked deid documentation but I couldn't find any expand_sequences argument. https://deid.readthedocs.io/en/latest/source/deid.dicom.html?highlight=get_identifiers#deid.dicom.header.get_identifiers
Sorry about that must be a typo - the function has strip_sequences
and not expand_sequences
! https://github.com/pydicom/deid/blob/b1556a72c9fbfbfb7967da774e67057f7c437a02/deid/dicom/header.py#L25
And actually, it's a bug! It should be there - it was erroneously removed. I'll get a PR in to fix it asap!
ok it's fixed! If you are using the older version the default for expand_sequences (internal to the function) is True, so safe to just move it from the above. Thanks for catching the error!
How can I get the value of a tag of each dicom files in get_identifiers?