Hi,
For anyone else facing this problem all is not lost, particularly if you have a structural scan acquired during the same session. Our task is to create the brain extracted “magnitude” image that’s missing.
Here’s what you can do:
(1) Providing the structural was acquired during the same session and it looks like there was not significant movement between the structural and the gradient echo fieldmap acquisitions: take the structural and put it through bet (FSL’s brain extraction tool). Remember to create a mask (-m option).
bet structural structural_brain -m
HINT: using the -c option helps a lot.
(2) Confirm that the mask lies at, or within, the pial surface of the brain (use fsleyes to visualise)
(3) Transform the structural into the space of the phase image (here called phasemap) to create the missing magnitude image:
flirt -in structural -ref phasemap -applyxfm -usesqform -out magnitude
At this point you should load both the phasemap and magnitude image into fsleyes, to confirm that they are in good alignment.
(4) Transform the mask created in step one into the space of the phase image
flirt -in structural_brain_mask -ref phasemap -applyxfm -usesqform \
-out magnitude_brain_mask -interp nearestneighbour
(5) create a brain extracted magnitude image for use with fsl_prepare_fieldmap (here called magnitude_brain)
fslmaths magnitude -mas magnitude_brain_mask magnitude_brain
(6) run fsl_prepare_fieldmap e.g.
fsl_prepare_fieldmap SIEMENS phasemap magnitude_brain fieldmap 2.46
NOTE: the brain extracted magnitude image should be a conservatively masked image i.e. it’s better to lose edge voxels than have the image include CSF voxels outside the brain. Hence, I used the nearestneighbour interpolation option when transforming the mask.
YMMV.
Cheers, Jon