finnlennartsson / kpum_noddi

repo for processing of DKI/NODDI data for preterm project at KPUM
0 stars 0 forks source link

Include a routine which anonymizes DCMs in /sourcedata #4

Closed finnlennartsson closed 1 year ago

finnlennartsson commented 1 year ago

Can be done within or after https://github.com/finnlennartsson/kpum_noddi/blob/fcb31888c15ebe662da77da914419c8e4464b464/scripts/bids_dicomdir2sourcedata.sh#L63

finnlennartsson commented 1 year ago

One potential is to use https://pydicom.github.io/pydicom/dev/auto_examples/metadata_processing/plot_anonymize.html#sphx-glr-auto-examples-metadata-processing-plot-anonymize-py

Some other exempels are https://pycad.co/dicom-anonymization-using-python/

finnlennartsson commented 1 year ago

Should anonymize these TAGs

PatientName
PatientBirthDate
PatientID
finnlennartsson commented 1 year ago

Have implemented this in the workflow in shell/bids_dicomdir2sourcedata.sh

This calls the Python-script python/anonymize_dicoms.py which performs the anynomization.

This scripts is run from the folder which contains all the DCMs to be anonymized. Anonymized files are written locally and added the prefix ANONYMIZED_