I'm doing this on the mgh connectome scanner data. There didn't appear to
be any freesurfer data in that release.

Ok so sounds like you think making a custom subject average is overkill,
and I should just use fsaverage?


If so then would you mind just checking that I've got steps 2 and 5 right;
saving to .mgh from matlab/python and projecting to the common space?

At present the resulting files make freeview crash, so something's not
right.

2. Write patterns out to .mgh file

matlab:
save_mgh(pattern,outfile,eye(4));

...and/or python:
nibabel.MGHImage(pattern[:,numpy.newaxis,numpy.newaxis].astype(np.float32),numpy.eye(4)).to_filename(outfile)



5. Project the resultant files on to the group template

mri_surf2surf --srcsubject subj1 --srcsurfreg sphere.reg.avg_sub
--trgsubject avg_sub --trgsurfreg sphere.reg --hemi lh --sval <pattern mgh
file> --tval /tmp/test_avgsub.mgh





Much appreciated!


John






On 6 February 2016 at 15:58, Glasser, Matthew <[email protected]> wrote:

> Indeed why use the orig surfaces?  They are missing a lot of corrections
> and improvements.
>
> Peace,
>
> Matt.
>
> From: <[email protected]> on behalf of "Harms,
> Michael" <[email protected]>
> Date: Saturday, February 6, 2016 at 2:56 PM
> To: John Griffiths <[email protected]>, "
> [email protected]" <[email protected]>
> Subject: Re: [HCP-Users] vertex-wise correspondences across subjects
>
>
> Hi John,
> Why not just use the surfaces from HCP that already have vertex-wise
> correspondence?  Or, why can’t you use the usual FS machinery (i.e.,
> through ‘fsaverage’)?
>
> If you indeed need to start from the FS ?h.orig surfaces, then this is
> indeed more appropriate for the FS list.  Note that I think that FS’s
> ‘make_average_subject’ just creates average surfaces for your particular
> group of subjects.  I don’t think what you are attempting actually changes
> the registration, since you are not changing the sphere.reg files.  (To do
> that is much more complicated).
>
> cheers,
> -MH
>
> --
> Michael Harms, Ph.D.
> -----------------------------------------------------------
> Conte Center for the Neuroscience of Mental Disorders
> Washington University School of Medicine
> Department of Psychiatry, Box 8134
> 660 South Euclid Ave. Tel: 314-747-6173
> St. Louis, MO  63110 Email: [email protected]
>
> From: <[email protected]> on behalf of John Griffiths
> <[email protected]>
> Date: Saturday, February 6, 2016 at 11:33 AM
> To: "[email protected]" <[email protected]>
> Subject: [HCP-Users] vertex-wise correspondences across subjects
>
> Dear hcp peeps,
>
> Could you please help me with the following analysis workflow:
>
>
> I am doing an analysis with HCP data where I identify patterns on the ?h.orig 
> surfaces. What I want to do now is to resample these patterns over vertices, 
> such
> that I have vertex-wise correspondence across subjects. I believe this
> essentially requires the construction of and projection to a group template
> (although I'm aware this could be done with e.g. fsaverage).
>
> Here is where I'm at:
>
>
> cd(freesurfer dir)
>
>
> 1. Read ?h.orig surfaces; compute patterns
>
> (...some in-house stuff...)
>
> 2. Write patterns out to .mgh file
>
> matlab:
> save_mgh(pattern,outfile,eye(4));
>
> ...and/or python:
> nibabel.MGHImage(pattern[:,numpy.newaxis,numpy.newaxis].astype(np.float32),numpy.eye(4)).to_filename(outfile)
>
> 3. Generate group template
>
> make_average_subject --out avgsub --sd <fs dir> -subjects subj1 subj2 subj3...
>
> Then for each subject:
>
>
> 4. Register to the new group template
>
> mris_register -curv subj1/surf/lh.sphere avgsub/lh.reg.template.tif
> subj1/surf/lh.sphere.reg.avgsub
>
>
>
> 5. Project the surface patterns identified in 1. and 2. above on to the new 
> group
> template, so that the vertex values correspond across subjects, and can be
> averaged, statistically compared. etc.
>
> mri_surf2surf --srcsubject subj1 --srcsurfreg sphere.reg.avg_sub
> --trgsubject avg_sub --trgsurfreg sphere.reg --hemi lh --sval <pattern mgh
> file> --tval /tmp/test_avgsub.mgh
>
>
> However this breaks down at mri_surf2surf, and I'm not particularly
> confident that the earlier parts are exactly right either.
>
>
> Could you please show me what commands I should be using for the aims as
> described above?
>
> Many thanks,
>
> John
>
>
>
>
> (p.s. yes this is a cross-post from freesurfer list; but got no response from 
> there, and it is regarding analysis of HCP data, so didn't seem to heinous)
>
>
>
>
> --
>
> Dr. John Griffiths
>
> Post-Doctoral Research Fellow
>
> Rotman Research Institute, Baycrest
>
> Toronto, Canada
>
> and
>
> Honorary Associate
>
> School of Physics
>
> University of Sydney
>
> _______________________________________________
> HCP-Users mailing list
> [email protected]
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>
>
> ------------------------------
>
> The materials in this message are private and may contain Protected
> Healthcare Information or other information of a sensitive nature. If you
> are not the intended recipient, be advised that any unauthorized use,
> disclosure, copying or the taking of any action in reliance on the contents
> of this information is strictly prohibited. If you have received this email
> in error, please immediately notify the sender via telephone or return mail.
>
> _______________________________________________
> HCP-Users mailing list
> [email protected]
> http://lists.humanconnectome.org/mailman/listinfo/hcp-users
>
>
> ------------------------------
>
> The materials in this message are private and may contain Protected
> Healthcare Information or other information of a sensitive nature. If you
> are not the intended recipient, be advised that any unauthorized use,
> disclosure, copying or the taking of any action in reliance on the contents
> of this information is strictly prohibited. If you have received this email
> in error, please immediately notify the sender via telephone or return mail.
>



-- 

Dr. John Griffiths

Post-Doctoral Research Fellow

Rotman Research Institute, Baycrest

Toronto, Canada

and

Honorary Associate

School of Physics

University of Sydney

_______________________________________________
HCP-Users mailing list
[email protected]
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to