skull stripping epi in align_epi_anat

Hello,

I am trying to align an anatomical image (anat.nii) to an epi (bold_e2.nii) and would like the procedure to also:

  • motion correct all epi’s to volume 5
  • skull strip all epis

I have been using:
align_epi_anat.py -anat anat.nii -child_anat roiMask.nii -epi bold_e2.nii -epi_base 5 -save_Al_in -save_vr -save_epi_ns

This appears to correctly align my anatomical to the base epi image, but the skull stripping is only applied to the base epi (as output to bold_e2_epi_in_3dAl_al+orig.BRIK). However, I would like all of the epis to be skull stripped, not just the base.

Thanks in advance.

I think it would be easiest just to apply the mask using 3dcalc or mask the output with 3dAutomask afterwards

3dcalc -a myepi_mask_and_aligned_dset+orig -b myepi_dset_aligned+orig -expr ‘a*step(b)’ -prefix whole_epi_dset_masked