Email discussion lists for the UK Education and Research communities

## SPM@JISCMAIL.AC.UK

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font
 LISTSERV Archives SPM Home SPM March 2009

#### Options

Subject:

Re: Can anyone send me the matlab routine or anything to convert Taliarach to MNI coordinate?

From:

Date:

Fri, 20 Mar 2009 16:43:58 -0400

Content-Type:

multipart/mixed

Parts/Attachments:

 text/plain (15 lines) , tal2mni.m (39 lines)
 ```I think this should do it. Yune Lee wrote: > Dear spm users, > > I'm trying to compare coordinates in early 2000 paper and those in > ours, but as theirs coordinate was taliarach, I need to convert it to > MNI (or vice versa). > So, it would be appreciated if anyone generously send me matlab > routine that does conversion between Taliarach and MNI. > > Thanks in advance, > YSL function outpoints = tal2mni(inpoints) % Converts coordinates to MNI brain best guess % from Talairach coordinates % FORMAT outpoints = tal2mni(inpoints) % Where inpoints is N by 3 or 3 by N matrix of coordinates % (N being the number of points) % outpoints is the coordinate matrix with MNI points % Matthew Brett 2/2/01 dimdim = find(size(inpoints) == 3); if isempty(dimdim)   error('input must be a N by 3 or 3 by N matrix') end if dimdim == 2   inpoints = inpoints'; end % Transformation matrices, different zooms above/below AC rotn = spm_matrix([0 0 0 0.05]); upz = spm_matrix([0 0 0 0 0 0 0.99 0.97 0.92]); downz = spm_matrix([0 0 0 0 0 0 0.99 0.97 0.84]); inpoints = [inpoints; ones(1, size(inpoints, 2))]; % Apply inverse translation inpoints = inv(rotn)*inpoints; tmp = inpoints(3,:)<0; % 1 if below AC inpoints(:, tmp) = inv(downz) * inpoints(:, tmp); inpoints(:, ~tmp) = inv(upz) * inpoints(:, ~tmp); outpoints = inpoints(1:3, :); if dimdim == 2   outpoints = outpoints'; end ```