The coordinates of the surface should be within a right-handed coordinate system (like T&T), and have units of mm. You may want to transform these coordinates to voxels in some image, in which case you would multiply them by the inverse of the voxel-to-world mapping of the image in question. Best regards, -John On 29 May 2012 15:18, John Fredy <[log in to unmask]> wrote: > Hi John, I extract the data coordinates from the surface that comes with the > SPM (cortex_8196.surf.gii). Is possible that the coordinates in this surface > are flipped? > > Thanks in advance > > On Thu, May 24, 2012 at 6:11 AM, John Ashburner <[log in to unmask]> > wrote: >> >> > I am trying to save one matrix as a new volume >> > >> > I build the matrix and use another volume as template >> > >> > fnm = spm_select(1, 'image'); >> > >> > >> > [pth bnm ext] = spm_fileparts(fnm); >> > >> > VI = spm_vol(fnm(1,:)); >> > >> > VO = VI; >> > >> > VO.fname = fullfile(pth, [bnm '_connectivity_' ext]); >> > >> > spm_write_vol(VO,img); >> > >> > >> > >> > Where img is the matrix, >> > >> > Is possible that the script flips my image? >> >> Yes. If the image you base the output on is flipped relative to your >> data. >> >> > In the resulting image seems like the right hemisphere correspond to the >> > left hemisphere >> >> I'd suggest checking the orientations in the headers of the images >> involved to see if you have used them properly. The .mat fields are >> the ones to examine. >> >> Best regards, >> -John > > > > > -- > John Ochoa > Docente de Bioingeniería > Universidad de Antioquia >