Hi Johannes, as a quick fix can you try inverting the matrix? doug On 05/08/2013 01:31 PM, Johannes Klein wrote: > 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 <gr...@nmr.mgh.harvard.edu > <mailto:gr...@nmr.mgh.harvard.edu>> > Subject: Re: [Freesurfer] Using FSL matrix for Talairach transform > To: freesurfer@nmr.mgh.harvard.edu <mailto:freesurfer@nmr.mgh.harvard.edu> > Message-ID: <518943cf.7050...@nmr.mgh.harvard.edu > <mailto:518943cf.7050...@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 <mailto:Freesurfer@nmr.mgh.harvard.edu> >> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > -- > Douglas N. Greve, Ph.D. > MGH-NMR Center > gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu> > Phone Number: 617-724-2358 > Fax: 617-726-7422 > > Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting > FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 > www.nmr.mgh.harvard.edu/facility/filedrop/index.html > <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html> > Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/ > > > > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Douglas N. Greve, Ph.D. MGH-NMR Center gr...@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 www.nmr.mgh.harvard.edu/facility/filedrop/index.html Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/ _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.