Hi FS group,
My goal is to calculate the % of voxels in a given region that are higher than a region-specific threshold. This is what I've done so far for each subject:
For each subject, for each cortical region (Seg1001-1035 & Seg2001-2035), I now want to count the number of voxels that are above region-specific thresholds as found in thresh.lst, ie.
Do you have any advice on the best way to do this? I think I can use mri_segstats, but am not sure if I'm looking at the right arguments and/or if there is a more straightforward way to do this. This is what I have so
far:
foreach s (`cat s.lst`) / foreach seg (`cat thresh.lst | awk '{print $2}'`)
set thresh = `cat thresh.lst | grep $seg | awk '{print $3}'`
mri_segstats --i vol.nii --seg aparc+aseg.functionalspace.nii --id $seg --maskthresh $thresh --masksign pos --sum tmp.$seg.stats
...and then grep NVoxels from tmp.$seg.stats, grep total NVoxels from vol.aparc+aseg.stats, divide/echo into summary stats file?
Thank you in advance for any advice!
Best,
Sara