Usage of blur_opts_BIM

Hi, upon reviewing the output script generated by afni_proc.py, I noticed that the options for 3dBlurInMask were not what I expected. I’m trying to blur only in the gray matter eroded mask with a fwhm of 5.0 mm. The following is the afni_proc.py script:

afni_proc.py -subj_id $subj
-script proc.SS.$subj -scr_overwrite
-blocks despike align tlrc volreg mask blur scale regress
-copy_anat $top_dir/SSWarper_Output/anatSS.test_sub.nii
-anat_has_skull no
-dsets $epi
-tcat_remove_first_trs $trs
-align_opts_aea -giant_move -cost lpc+zz
-volreg_align_to MIN_OUTLIER
-volreg_align_e2a
-volreg_tlrc_warp
-tlrc_base MNI152_T1_2009c+tlrc
-volreg_warp_dxyz 2.0
-tlrc_NL_warp
-tlrc_NL_warped_dsets
…/…/…/SSWarper_Output/anatQQ.test_sub.nii
…/…/…/SSWarper_Output/anatQQ.test_sub.aff12.1D
…/…/…/SSWarper_Output/anatQQ.test_sub_WARP.nii
-blur_in_mask yes
-blur_opts_BIM
-mask GMe
-FWHM 5.0
-mask_segment_anat yes
-mask_segment_erode yes
-regress_motion_per_run
-regress_bandpass 0.01 0.25
-regress_RSFC
-regress_ROI WMe brain CSFe
-regress_apply_mot_types demean deriv
-regress_est_blur_epits
-regress_run_clustsim no

The output script, however, contains these blurring options:

================================== blur ==================================

blur each volume of each run

foreach run ( $runs )
3dBlurInMask -preserve -FWHM 4.0 -Mmask full_mask.$subj+tlrc
-prefix pb03.$subj.r$run.blur
pb02.$subj.r$run.volreg+tlrc
end

Am I using blur_opts_BIM incorrectly?

Hi Daniel,

On one hand, that -blur_opts_BIM option is missing an internal step for applying it. I will fix that.

On the other hand, neither of those options is appropriate for being passed via -blur_opts_BIM. Basically, options passed that way in general should be ones that afni_proc.py does not (need to) know about.

The blur size should be specified via -blur_size.

But there is no mechanism to blur in only the gray matter, or to specify the blur mask via a generic lablel. Relevant options might include:
-blur_in_mask yes
-blur_in_automask
-blur_size SIZE
-mask_epi_anat yes

  • rick

Hi Rick,

Thanks for the corrections. How would you recommend that I proceed to blur only in the gray matter mask? One way I have tried is going into the output script and changing the Mmask parameter in 3dBlurInMask to the gray matter mask produced by afni, but I’m not sure if this the best way.

On another note, I noticed that the GM mask created by afni does not have as many voxels as I need. Is there a way to decrease the threshold to increase the amount of voxels?

Daniel