Dear Doug
Thank you for your answer. I however encounter an error:
>> F.vol = fast_mat2vol(lfdr,F.volsize)
ERROR: szvol inconsistent with mat2d
I have attached the final output (.mgh) and the .asc file. (As the files are too large, I added them here: https://we.tl/MKhhmeT5Zn)
Thank you
Robby
From: <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Douglas Greve <greve@nmr.mgh.harvard.edu>
Reply-To: "freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edu>
Date: Wednesday 15 June 2016 at 17:43
To: "freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Convert ascii to .mgh
I would do it in matlab, eg,
F = MRIread('F.mgh'); % This is to get the proper header information
lfdr = load('lfdr.asc');
F.vol = fast_mat2vol(lfdr,F.volsize);
MRIwrite(F,'lfdr.mgh');
On 6/15/16 4:45 AM, Robby De Pauw wrote:
Dear FreeSurfer users,
To address the problem of multiple comparison, I wanted to apply the localfdr-method. For this purpose, I need the F-statistic (which I can extract from the F.mgh scalar overlay I presume?).
I converted this to an ascii-file, which I was able to load into R, using the following chink of code:
mris_convert -c /Users/robbydepauw/Desktop/FreeSurfer/GLM/lh.Group.volume.glmdir/Groupeffect/F.mgh $SUBJECTS_DIR/fsaverage/surf/lh.white F.asc
After performing an local fdr analysis in R, I want to create a scalar overlay “lfdr.mgh”, but I fail at converting the asci file into an “.mgh”-overlay file.
Any idea how I could approach this conversion (from asci back to .mgh)?
Many thanks,
Greetings
Robby
Robby De Pauw, PT, MT, drs.
T +32 09 332 12 19 | Email Robby.DePauw@Ugent.be
Ghent University | Rehabilitation Sciences and Physiotherapy
Campus Heymans 3B3 (022)
De Pintelaan 185 BE-9000 Ghent
_______________________________________________Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer