Print

Print


Hi Sandra,

What bet -f and -g options have you tried? -f 0.2 worked for me but it depends on the dataset.

When bet struggled with magnitude images in my last project, I masked out the non-brain tissue.

###I used fsl_anat because it gave a good brain-extracted structural image - it was a bit "tight" that is better for the fieldmap than to have lots of non-brain tissue:

fsl_anat -i struc.nii.gz -o strucfiles

###Then a transform was created between the structural and functional image space:
flirt -in mag_EPI.nii.gz -ref strucfiles.anat/T1_biascorr.nii.gz -out mag_EPI2STRUC.nii.gz -omat mag_EPI2STRUC.mat -bins 256 -cost corratio -searchrx -30 30 -searchry -30 30 -searchrz -30 30 -dof 6  -interp trilinear -paddingsize 0

###The transform was inverted:
convert_xfm -omat mag_STRUC2EPI.mat -inverse mag_EPI2STRUC.mat

###And the brain-extracted structural image was registered to the functional image space:
flirt -in strucfiles.anat/T1_biascorr_brain.nii.gz -applyxfm -init mag_STRUC2EPI.mat -out mag_EPI_MASK.nii.gz -paddingsize 0 -interp trilinear -ref mag_EPI.nii.gz

fslmaths mag_EPI_MASK.nii.gz -bin mag_EPI_MASK.nii.gz


###If it is too large, you may add the -ero option:
fslmaths mag_EPI_MASK.nii.gz -ero mag_EPI_MASKero.nii.gz


###This will give you a mask in the same space as the magnitude file that can be used to mask-out non-brain tissue.
fslmaths mag_EPI.nii.gz -mas mag_EPI_MASK.nii.gz mag_EPI_brain.nii.gz
 
### And you can used to prepare fieldmap
fsl_prepare_fieldmap <scanner option> pha_EPI.nii.gz mag_EPI_brain.nii.gz fmap_EPI.nii.gz <time diff.>

You will have to put it in bash and run for each subject. 
I hope this helps.
Karolina