Dear All,
I ran recon-all and generated a brain.mgz and say, lh.pial. I converted brain.mgz to brain.nii, imported the latter to matlab/spm and realigned it to rbrain.nii, generating a transform matrix M=rbrain.reorient.mat. if MM is the header for rbrain.nii, the header O for the original brain.nii can be calculated with O=inv(M) *MM.
How do I reorient the lh.pial to the rbrain.nii? I suppose I need a reader for the pial header in matlab.
Many thanks,
Octavian
Hi Octavian
you can read the surface into matlab with read_surf.m, but I think you will need to transform the x,y,z coords of every vertex
cheers Bruce On Wed, 28 Oct 2015, Octavian Lie wrote:
Dear All,
I ran recon-all and generated a brain.mgz and say, lh.pial. I converted brain.mgz to brain.nii, imported the latter to matlab/spm and realigned it to rbrain.nii, generating a transform matrix M=rbrain.reorient.mat. if MM is the header for rbrain.nii, the header O for the original brain.nii can be calculated with O=inv(M) *MM.
How do I reorient the lh.pial to the rbrain.nii? I suppose I need a reader for the pial header in matlab.
Many thanks,
Octavian
freesurfer@nmr.mgh.harvard.edu