KitwareMedical / dicom-anonymizer

Tool to anonymize DICOM files according to the DICOM standard
BSD 3-Clause "New" or "Revised" License
104 stars 47 forks source link

Customize rules #48

Closed Ede1994 closed 1 year ago

Ede1994 commented 1 year ago

I've tried your example: https://github.com/KitwareMedical/dicom-anonymizer#customoverrides-actions, but I always get the error message:

NameError: name 'allTags' is not defined

Can someone explain this to me?

pchoisel commented 1 year ago

Hello @Ede1994,

This example has not been updated for a while, I will update it. In the mean time, to make it work, you can replace allTags by ALL_TAGS and replace
anonymize(input_dicom_path, output_dicom_path, extraAnonymizationRules) by
anonymize(input_dicom_path, output_dicom_path, extraAnonymizationRules, False)

This should make the script work.

Ede1994 commented 1 year ago

Thanks! Now it works :)