Hi Doug, Thanks for your reply! I'm getting closer to a solution now, with tkregister2's display showing a correctly transformed mni305 file, but I still cannot get a valid talairach.xfm file out of this.
Here's what I tried: tkregister2 --mov /usr/local/freesurfer/average/mni305.cor.mgz --targ orig.mgz --fsl mni2sub.mat --reg test_mni.mgz.reg works fine.
Next, to obtain a suitable .xfm file, I ran tkregister2 --mov /usr/local/freesurfer/average/mni305.cor.mgz --targ orig.mgz --fsl mni2sub.mat --reg test_mni.mgz.reg --xfmout testtal.xfm --noedit and copied the output (testtal.xfm) into mri/transforms/talairach.xfm
Now, when I view the result with tkregister2 --s test --fstal --mgz the transform is way off again. Apparently, tkregister2 reads and interprets the FSL matrix correctly, but the output transform that I get is not in the right format for transforms/talairach.xfm. I wonder if I'm using the wrong output switch now - but looking at tkregister2's documentation, it seems to be the one to use? Thanks, Johannes
Date: Tue, 07 May 2013 14:11:27 -0400 From: Douglas N Greve greve@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Using FSL matrix for Talairach transform To: freesurfer@nmr.mgh.harvard.edu Message-ID: 518943CF.7050801@nmr.mgh.harvard.edu Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi Johannes, try using the --xfmout option of tkregister2. I'm not sure what regdat2xfm is doing. doug
On 05/07/2013 12:42 PM, Johannes Klein wrote:
Dear all, I have some tricky subjects that I cannot get to register properly with the standard Talairach process, or even the use-mritotal option. However, with some fiddling, I've produced a reasonable registration matrix with FSL's FLIRT.
I'm now looking to convert my FSL registration matrix, and use it as Freesurfer's Talairach transform. From the documentation, I gathered that I need to get it into Freesurfer's xfm format, and I suppose this is a two step process.
I converted the FLIRT-provided matrix cor2raw.xfm like so: tkregister2 --mov /usr/local/freesurfer/average/mni305.cor.mgz --fslreg cor2raw.xfm --s mysubject --noedit --reg register.dat
I then converted register.dat to the xfm data format: regdat2xfm /usr/local/freesurfer/average/mni305.cor.mgz rawavg.mgz register.dat tal.xfm
and finally replaced talairach.xfm in the transforms directory with the output of the last command. Unfortunately, this doesn't work, and the transform is very much off target when I view it in tkregister2. Obviously, I've made a mistake when converting between the different transforms - could anybody point me in the right direction? Thanks all, Johannes
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer