Hi all,
I’m switching over to Susan-smoothing for my post-FMRIPREP pipeline, and running into an issue. Susan smoothing needs a parameter, for brightness threshold. Per this post, I’m trying to calculate the median brain intensity within and outside the brain mask supplied by FMRIPREP/BET.
My command to do so is as follows:
f="/path/to/my/preproc_bold.nii.gz"
funcdir=$(dirname $f)
mask="$(ls $funcdir | grep "mask.nii.gz")"
inv="$(ls $funcdir | grep "mask_inverse.nii.gz")"
a=$(fslstats $f -p 50 -k $funcdir/$mask)
b=$(fslstats $f -p 50 -k $funcdir/$inv)
c=$($a - $b)
fslstats does not seem able to run the command to obtain the median voxel intensity with a reasonable amount of memory. I’ve tried with 10G, 20G, and 30G, and have maxed usage in each case. It doesn’t seem to me like this should take this much memory to begin with. I’m doing this on just 1 scan for now, but that code is part of a shell script that submits the SUSAN smoothing itself with those parameters to a SLURM job, 1 for each subject. Is it unreasonable to try to obtain this median statistic from an interactive job? Even then, I wasn’t expecting to need so much time/memory for this calculation.
Am I missing something?
Thanks,
Clayton