Closed jkarten95 closed 3 years ago
Could you show me the exact command you are running so I can take a look? There are several ways to interact with deid and I want to make sure we are discussing the same one.
Sure!
base = '/folder/with/original/study/directories'
dicom_files = list(get_files(base))
#other code
cleaned_files = replace_identifiers(dicom_files=dicom_files, deid=recipe, ids=items, save=True, overwrite=True,
output_folder='/folder/for/new/files').
I am wondering if instead of stripping the .dcm files from the original location, can they be saved in their original folders? Essentially I have multiple imaging studies in one directory.
@jkarten95 did you try setting the same output folder as where you already have the files, and then overwrite to True?
Actually scratch that - just leave the output folder as None and set overwrite to true. See here: https://github.com/pydicom/deid/blob/7e7196dcc21bb489b1fecf32fb5b0c0420146b3f/deid/dicom/utils.py#L97
Based on reading the code, that should accomplish what you want (let me know if it does not!)
That worked perfectly! Thanks for the help.
Definitely! Happy to do so :)
Hi All,
In reading the documentation, I see that I can output a newly de-identified .dcm file to a specified folder. I was wondering if there is a way to de-identify "in place" instead of sending to a new folder and thereby preserving the original folder structure? I ask because the imaging studies are kept in complex folder structures that we'd like to maintain. Thanks for any advice!
Jordan