Dear Guillaume,

Thank you very much for your code example. I just wonder where can I find 'mesh.surf.gii' in your example?

For a functional image like "sub-001_task-rest_space-fsaverage5_hemi-R.func.gii", I think I should find some thing like "fsaverage5_hemi-R_midthickness.surf.gii". Do you happen to know where would "fsaverage5_hemi-R_midthickness.surf.gii" exist?

Thank you very much!

Best,

Chao-Gan


On Fri, Oct 13, 2017 at 11:04 PM Guillaume Flandin <[log in to unmask]> wrote:
Hi Patrick,

Then, given you're not using them for proper inference, it probably
doesn't matter too much - it's just that the separation in two
hemispheres is an artefact of the preprocessing pipeline (eg you would
rarely do that with volumetric data).

To combine the surface meshes, you can do something like this:

M = gifti({'L.surf.gii','R.surf.gii'});
M = spm_mesh_join(M);
save(gifti(M),'mesh.surf.gii')

and for the functional data it would be something like:

gl = gifti('L.func.gii');
gr = gifti('R.func.gii');
for i=1:size(gr.cdata,2)
  gg = gifti([gl.cdata(:,i);gr.cdata(:,i)]);
  gg.private.metadata = struct('name','SurfaceID','value','mesh.surf.gii');
  save(gg,spm_file('mesh.func.gii','suffix',sprintf('_%05d',i)),'ExternalFileBinary');
end

As with the previous snippet, I haven't tried it so it might require
adjustments...

Best regards,
Guillaume.


On 13/10/17 15:39, Patrick Sadil wrote:
> Hello Guillaume,
>      I see. We had only been planning on using these data as a really rough localizer, grabbing voxels that were active as determined by an uncorrected p-value threshold. But, it sounds like even that would be improved by analyzing the entire hemisphere together. Sorry, to keep asking questions about this, but do you know of a reliable way to combine these hemispheres?
>
> Best,
> Patrick
>

--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG


--
Chao-Gan YAN, Ph.D.
Professor, Principal Investigator
Deputy Director, Magnetic Resonance Imaging Research Center
Institute of Psychology, Chinese Academy of Sciences
16 Lincui Road, Chaoyang District, Beijing 100101, China
-