03 - Defacing
1 General Information
When we acquired data “ourselves” (and start with the dicom files), we have to deface the T1w-scan! (When we get our data from the MRI-Lab, it will already be defaced)
To deface your T1w-scan, you first need a T1w nifti file! If you currently have DICOM files, you have to convert them to nifti’s first!
Defacing you T1w scans is an important preprocessing step that has to be done before running fmriprep. If you run fmriprep without prior defacing, you´ll probably run into errors!
Important (if you promised participants that they´ll get their T1w scan): Since we get already defaced images when not testing ourselves, every participant only gets the defaced T1w-scans. Thus, you have to do the defacing before sending the file to your participant!
2 Defacing your T1w-Scan
2.1 Start Pydeface (v.2.0.2)
To deface your t1w, you first have to open pydeface
:
Click on the Birds-Symbol at the bottom left
Hover
Neurodesk
Hover
All Applications
Scroll down until you find
pydeface
Click on
pydeface 2.0.2
After it opens, it may need some time to load everything - be patient!
Finally, it should look like this:
2.2 Get the path to your original T1w scan
Navigate to the anatomical scan of the participant within your BIDS directory
Right-click on the anatomical nifti file
Select `Copy Path(s)
2.3 The pydeface command
Go back to the terminal window, where pydeface is loaded (or start it again)
Type
pydeface
Enter the path to your T1w scan (right-click +
paste
or type in the path)Type
--outfile
Repeat Step 3 (with this approach, you “overwrite” the initial T1w with the then defaced T1w file)
Type
--force
It should look like this:
pydeface /home/jovyan/Website/bids/sub-999/ses-1/anat/sub-999_ses-1_T1w.nii.gz --outfile /home/jovyan/Website/bids/sub-999/ses-1/anat/sub-999_ses-1_T1w.nii.gz --force
Then, press enter. Again, it might take a few moments, until pydeface finishes, be patient! At the end, it should look like this:
2.4 The next steps
Congratulations, you successfully defaced a T1w-scan and you are one step closer to analyzing your data!
To continue in your journey to your Analysis, please return to the Overview-Page to check what to do next.
Alternatively, here is a list of potential next steps to continue with