Mridefcer/ same data, different results (defacing)

Hi Everyone,

I am having a weird problem.
My collegue wrote a script for creating BIDS files which consists of the two main steps:

  • converting DICOM images to Niftti with dcm2niix

  • anonymizing data (i.e., removing facial features ) with mri_deface

While it works fine using her computer, it clearly looks like the same script for defacing does not work well on my computer. We both use Ubuntu systems and same programs (dcm2niix, mridefcer). Below, I attach the examples of the results (defacing) for the same subject data.

Picture A - my collegue’s computer (correct defacing!)
Picture B - my computer (incorrect defacing!)

Does anyone have an idea why is this happening?

Ahoi hoi @Magdalena,

did you check mri_deface’s wiki site yet?
Besides the image you want to deface, you need to provide two templates as inputs: talairach_mixed_with_skull.gca and face.gca. I assume your colleague’s script somehow incorporates these as well? Do you have these files and your FreeSurfer environment set accordingly? Are you and your colleague using the same FreeSurfer version?

What could be useful in such a case and furthermore ease up everyone’s (lab) life is putting everything in a docker image, comparable to the BIDS apps (you can find an example template here. A friend and I recently made a BIDS app for defacing (including different defacing tools) and from that experience I can say that it’s certainly manageable and worth it.

HTH, best, Peer

1 Like