Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save files in a fixed naming format #221

Closed
NirutaDhimal opened this issue Sep 24, 2022 · 4 comments
Closed

Save files in a fixed naming format #221

NirutaDhimal opened this issue Sep 24, 2022 · 4 comments

Comments

@NirutaDhimal
Copy link

After the replace_identifiers function is executed the files are stored in a format "PatientID_SOPInstanceID". But I want to store the file in this format "mask_modality_studyDate_instancenumber". here mask is the value that I replaced patientID with.
How can I do this?

@vsoch
Copy link
Member

vsoch commented Sep 24, 2022

Save accepts a filename https://deid.readthedocs.io/en/latest/source/deid.dicom.html?highlight=save#deid.dicom.parser.DicomParser.save.

@NirutaDhimal
Copy link
Author

NirutaDhimal commented Sep 28, 2022

I am using replace_identifiers function. Is there a way for me to save the files in above naming pattern? I am doing this for a bulk of files.

@vsoch
Copy link
Member

vsoch commented Sep 28, 2022

Through that interface, I would set output_folder from None to a temporary directory, and then rename them after to whatever you'd like.

@NirutaDhimal
Copy link
Author

Thanks

@vsoch vsoch closed this as completed Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants