Hi Sara, it looks like you are doing a functional constraint. See
these slides
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:
- recon T1
- coregister vol.nii to T1
- move aparc+aseg.mgz into functional space
- mri_segstats --i vol.nii --seg aparc+aseg.functionalspace.nii --sum vol.aparc+aseg.stats to get NVoxels & mean stats
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.
ctx-lh-bankssts Seg1001 1.383697722
ctx-lh-caudalanteriorcingulate Seg1002 1.272858762
ctx-lh-caudalmiddlefrontal Seg1003 1.167540497
...
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
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer