This is a repository for a DICOM anonymiser, deftly named DicomAnon. Although there are many applications that will anonymise DICOM files, this one was written to do so in bulk. With DicomAnon, you can point to a parent folder containing many patient folders, which may contain many imaging sessions, which may contain images acquired with different modalities. After telling DicomAnon where you want the anonymised files to be placed, it will preserve the folder structure and place anonymised DICOM files there. DicomAnon does not change the original files; it merely reads them, changes the value of DICOM tags that contain personal information about the patient, and writes them to the designated destination folder.
![DicomAnon screen shot](https://private-user-images.githubusercontent.com/1016303/329957761-742f9e86-d083-413f-9635-909e5964eb2e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjI3NzcsIm5iZiI6MTczOTYyMjQ3NywicGF0aCI6Ii8xMDE2MzAzLzMyOTk1Nzc2MS03NDJmOWU4Ni1kMDgzLTQxM2YtOTYzNS05MDllNTk2NGViMmUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMTIyNzU3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjAxM2I2ZTAxNWZiMTljNzc1OGIwZTJmM2I5NjE0YjhlMjU3ZDQzZjIxNjhlYWQzZjhmZDA4ZmM1NDkwNWNjMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.75jFGIR_T4fsT9s5k3QPfMkC5EIzTOzVrGiixPxtp0g)
The DICOM files are anonymised by replacing the values of the following DICOM tags:
- PatientName
- PatientID
- PatientAddress
- PatientMotherBirthName
- EthnicGroup
- ReferringPhysicianName
- ReferringPhysicianAddress
On completion, DicomAnon will save as an Excel spreadsheet in your home folder a mapping of the true patient IDs to anonymised patient IDs.
Note that adding new patient folders (and updates to existing patient folders) will not erase previous DICOM files for the same patient; the new anonymised DICOM files will be saved in the same structure alongside those previously processed. The new patient IDs will also be added to the Excel mapping spreadsheet.
Unzip the downloaded file and move it to a convenient place, alongside your other utility applications.
- Start the application and select the parent folder of the patient folders containing the DICOM files to be anonymised (i.e. the 'source' folder)
- Select the destination folder that will contain the anonymised DICOM files (i.e. the 'destination' folder). Create a new destination folder if you wish.
- Press the Anonymise! button.
- Wait for the processing to complete. The progress bar provides a visual clue about how far along it is.
- On completion, an Excel spreadsheet with the mapping from the real patient ID to the anonymised patient ID will be saved in your home directory.