Mr. Scrub (or "MR scrub") is a command line tool to scrub away identifying information from DICOM files.
There's much more detailed documentation at mrscrub.readthedocs.io.
Just pip
python -m pip install mrscrub
De-identification profiles determine which DICOM fields should be scubbed and
how. You can find an example profile here.
mrscrub
ships with some profiles by default, which you can load with
scrub.py -c NAME [args]
or you can create one yourself and pass in the file name
scrub.py -c ./profile.yaml [args]
For a simple example, load up one of the saved de-identification profiles
along with an -i|--input
directory (of DICOM files) and an -o|--output
directory where you want to save the scrubbed files
scrub.py -c PBN_v1.0 -i <input dir> -o <output dir>