External Email - Use Caution
Hi Bruce, Thank you, I didn't realize it would be so simple in matlab!
To help others who might be looking for a solution: I was able to use MRIread for both my data.mgh file (created using mri_surf2surf, resampled to template space for the thickness values) and mask file (which i inverted using mri_binarize --binval 0 --binvalnot 1). Then I was able to use a simple multiplication across the two vectors (as they have the same number of vertices) to conserve the thickness values from vertices of interest and remove values from vertices I wanted to exclude.
matlab code: datafile_lh=MRIread('data_lh.mgh') maskfile_lh=MRIread('mask_lh.mgh') newmatrix=datafile.vol.*mask.vol).
Thanks again! Lindsay
On Fri, Jan 4, 2019 at 10:05 AM lindsay hanford lindsay.hanford@gmail.com wrote:
Hi Bruce, Sorry for the late reply. I have been searching the forum and the freesurfer wiki. Are there instructions somewhere on how to do this in matlab? Thanks, Lindsay
On Thu, Dec 20, 2018 at 2:41 PM lindsay hanford lindsay.hanford@gmail.com wrote:
Hello Freesurfer Community,
I am wondering if it is possible to recalculate cortical thickness metrics (perhaps using mri_segstats or aparcstats2table) while including either a SD threshold or an exclusion mask.
Using mri_surf2surf to register scans to the same space and then mri_surface_stats to create the std maps I have been comparing the variability of cortical thickness across the cortex for multiple scans across the same subject. From this I can determine a SD threshold point (0.5 say) or create a mask that includes all regions above that threshold.
I would like to use this to threshold the regions showing the highest variability out of my calculations for mean hemispheric thickness and also regional thickness. Is there a way to use an SD threshold within mri_segstats or aparcstats2table? Otherwise apply a mask image to exclude specific vertices?
Thank you in advance,
Lindsay
-- *Lindsay Hanford, PhD* *The Buckner Laboratory* *|* *Harvard University* 280 Northwest Laboratory, 52 Oxford St *|* Cambridge, MA 02138 412-218-4368 *|* lindsay.hanford@gmail.com