If you're still in DICOM space, you can use the anonymize function in mricron/dcm2nii (https://www.nitrc.org/projects/mricron) to anonymize the files. If you're still seeing text on the images themselves, there are some solutions, but would be good to know if you're converting from DICOM to NIFTI.