Hi Victor, If you have the original DICOMs you could try something like pydicom to overwrite the voxel values. The process would go something like:
1) Convert DICOM to nifti using your favorite tool 2) Deface niftii data using your favorite tool 3) Load the defaced data into python using nibabel, 4) Load the original dicom data into python using pydicom 5) Overwrite voxel values in the dicom with defaced nifti data 6) Use pydicom to save a new defaced DICOM series Good luck! -Paul ________________________________ From: freesurfer-boun...@nmr.mgh.harvard.edu <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Victor Montal Blancafort <victor.mon...@gmail.com> Sent: Tuesday, May 24, 2022 10:39 AM To: freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu> Subject: [Freesurfer] Deface DICOM External Email - Use Caution Dear FS experts, I am using mri_deface to annon our data. Nevertheless, for a recent project, we were requested to share our DICOM original files, instad of .nii or .mgz. Thus, I was wondering if you know a simple way to deface T1 data inputing a DICOM and obtaining a series of DICOM as output? I have tried to 1) deface using mri_deface, 2) convert the .nii to dicom using the nifti2dicom utility and 3) correct DICOM info thats incorrecly parsed at step 2). However, such approach does not work correctly for all our data (it fails for several reasons, such as correctly storing acq direction, or dimensions when sampling from nifti 2 dicom). I have seen that @Doug has been working on a new deface utility (mideface) but it seems to work also only for .nii Any insight? Victor Montal
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline <https://www.massgeneralbrigham.org/complianceline> . Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.