I would recommend taking a look at David Clunie’s “DICOM stuff”. While we are knowlegable on the subject, he is an expert. The tools of interest :
- dciodvfy, dcentvfy DICOM verification tools, though the sign says they are “NOT officially recognized or supported tools for certifying DICOM compliance” - they are more robust than anything I’ve written.
- DicomCleaner - modify the header so you can anonymize.
- Another option is to use Osirix’s anonymization functionality, though that assumes you are on a Mac, see this youtube video.