How to anonymize DICOM images?

Hello everyone,

I am a beginner of 3D Slicer and i have a simple question:

How to erase the information of patient on the CT or MR scan?

1 Like

If you want to remove protected health information from DICOM files you could look into DicomCleaner or CTP.


Note that you should always be extra careful, since sometime information that is not obvious must be removed to make the DICOM data de-identified.

One may think that removing patient name and birth date is sufficient, but in reality the process is a lot a lot more complex. Because of this, it is usually a good idea to rely on established and verified tools, like the ones mentioned by @pieper.

If you only care about the image pixel content, you can save the image into a non-DICOM format, which will discard all of the patient-specific metadata. Unless your image has burned-in annotations (and unless you worry about patient’s face or other image features that can uniquely identify the subject), this might be sufficient.

1 Like

Dicomcleaner is a very good software.I want to know whether the procedure can be done with 3d slicer?

Nothing specifically for deidentification in Slicer. Best to use one of the dedicated tools if you want to be confident in the results (it’s unfortaunately easy for patient identifying information to be left in the files by mistake).

What you can easily do in Slicer is what @fedorov suggested above: save the image file as .nrrd file (menu: File / Save).

You could find ways in Slicer to edit DICOM metadata but you are probably better off using dedicated tools. Why is it important for you to do the anonymization in Slicer?

1 Like

Thanks to everyone!
The best method to solve this problem is using dedicated tools.
The most simple method is saving the image file an non-DICOM format.


Adage is a pretty good DICOM Anonymization tool. It is available for free and easily accessible here Adage - AI Medical

there is a good program where you can anonymize and change tags in one click.

Note that both these above-mentioned tools (Adage and IMV) are very basic, oversimplified tools. They don’t seem to offer essential anonymization techniques (such as randomizing patient birth date, study dates to keep the relative timestamp valid, etc.), and don’t even attempt to make the image content safe (detect and remove burnt-in annotations, remove patient face, etc.).

CTP and DicomCleaner that @pieper mentioned above are more sophisticated, professional tools (and they are free and open-source). They may be harder to learn, but it is worth the effort if you need proper anonymization.


Thanks, dear Andras, I always found your comments useful.

1 Like

Hi all,

I wanted to share a no-code solution for pseudonymizing your cases
The whole code and step by step use-guide is here: PanCanAID/Step1_SortingFiles/README.MD at main · Sdamirsa/PanCanAID · GitHub

I know that these days, more people (like me :slight_smile: are working with Dicom, and I also noticed how anonymization can disturb your peace. So, I created this no code Python script, you just need to run it and it will identify dicom studies (each with many .dcm files) and extract dicom meta (I tried to extract all useful studies), assign pseudonymized numbers (defined by you), and then anonymize all dicoms while providing an excel that links new pseudonymized numbers with your patient (I call pseudonymized key). If you don’t want to code, use it. And if you know how to code, you can revise it for your project. You can ask doctors involved in your project to pseudonymize cases even before sharing them with you).

The reason behind this is my problems during the PanCanAID project (I have been working on it for three years now), which contains data from many various centres and CT scans with various metadata.