Re: [Freesurfer] Registration file types confusion

2020-03-27 Thread Douglas N. Greve

you can use lta_convert with the --outreg option

On 3/27/2020 3:20 PM, Xiaojiang Yang wrote:


External Email - Use Caution

Hi Douglas,

The link you gave to me 
(https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems) has some 
information about .dat file, but no information about .lta file at 
all. I cannot see a clear relationship between .lta and .dat files. I 
have a script that’s using the matrix from .dat file. I need to use 
the .lta to get that matrix. Could you please tell me how do I get the 
transformation matrix (as found in .dat file, line 5-7) given only the 
.lta file?


Thank you!

Xiaojiang


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Registration file types confusion

2020-03-27 Thread Xiaojiang Yang
External Email - Use Caution

Hi Douglas,

 

The link you gave to me (

https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems) has some
information about .dat file, but no information about .lta file at all. I
cannot see a clear relationship between .lta and .dat files. I have a script
that's using the matrix from .dat file. I need to use the .lta to get that
matrix. Could you please tell me how do I get the transformation matrix (as
found in .dat file, line 5-7) given only the .lta file?

 

Thank you!

Xiaojiang 

 

 

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Registration file types confusion

2020-03-27 Thread Douglas N. Greve

Part of you answer can be found here
https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems

tkregister2 and the .dat file format are obsolete, use tkregisterfv. 
This is just a front-end for FreeView; it always uses LTA.


I'm not sure if there is documentation for the LTA format. The first 4x4 
matrix is the transform that goes from the source (src) to the target 
(dst). The vox2ras matrix for each is in the file (see the Coord systems 
docs above). The intrepretation of the transform matrix depends on the 
type (eg, VOX_TO_VOX or RAS_TO_RAS)



On 3/25/2020 5:00 PM, Xiaojiang Yang wrote:


External Email - Use Caution

Hi everyone,

I am confused by the two types of registration files: .lta and .dat.

.dat file is simpler and easier to understand. But for the .lta files, 
there seems to be no detailed explanation regarding it. Can anyone 
point out to me where can I find the detail explanation of the file? 
And, what's the relationship between .lta and .dat file?


Also, .lta files seem to cause some compatibility issues. For example, 
if I use the tkregister2 utility to make some changes to the 
registration file of type .lta (generated by bbregister), like below


tkregister2 --mov $someSeries --reg 
$SUBJECTS_DIR/$subjectid/mri/transforms/FLAIR.auto.lta --surf pial


and save it from the GUI, then many errors occur in the console 
window, like below:

..
MatrixAsciiReadFrom: could not scanf parms
ERROR: TransformLTA2RegDat(): type = 2011264000, must be 1 or 0 or 14
Segmentation fault (core dumped)

Actually that is because the registration file has been saved in the 
format of .dat, although the file extension is still .lta, and the 
tkregister2 program finally cracks when reading the newly saved .lta file.


Anyone can solve my confusion? Thank you!


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Registration file types confusion

2020-03-25 Thread Xiaojiang Yang
External Email - Use Caution

Hi everyone,

I am confused by the two types of registration files: .lta and .dat.

.dat file is simpler and easier to understand. But for the .lta files,
there seems to be no detailed explanation regarding it. Can anyone point
out to me where can I find the detail explanation of the file? And, what's
the relationship between .lta and .dat file?

Also, .lta files seem to cause some compatibility issues. For example, if I
use the tkregister2 utility to make some changes to the registration file
of type .lta (generated by bbregister), like below

tkregister2 --mov $someSeries --reg
$SUBJECTS_DIR/$subjectid/mri/transforms/FLAIR.auto.lta --surf pial

and save it from the GUI, then many errors occur in the console window,
like below:
..
MatrixAsciiReadFrom: could not scanf parms
ERROR: TransformLTA2RegDat(): type = 2011264000, must be 1 or 0 or 14
Segmentation fault (core dumped)

Actually that is because the registration file has been saved in the format
of .dat, although the file extension is still .lta, and the tkregister2
program finally cracks when reading the newly saved .lta file.

Anyone can solve my confusion? Thank you!
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer