If you have a tkregister registration file called subj1.mat, then name it something else as the volume reading tools think that is an spm-style .mat file and try to read it as a matlab4 matrix.
doug
Nguyen, Thang Q wrote:
Hello all,
I get a directional cosine error when I try to register data or extract values from them so I tried mri_info and get this message:
mri_info subj1.img
matfile: only read 256 bytes of name (810698068 specified)
MatlabRead: readHeader returned NULL
WARNING: analyzeRead(): matfile subj1.mat exists but could not read ...
may not be matlab4 mat file ... proceeding without it.
INFO: could not find subj1.mat file for direction cosine info.
INFO: use Analyze 7.5 hdr->hist.orient value: 0, transverse unflipped (default).
INFO: if not valid, please provide the information in subj1.mat file
Volume information for subj1.img
type: analyze4d dimensions: 79 x 95 x 68voxel sizes: 2.0000, 2.0000, 2.0000
type: FLOAT (3) fov: 79.000 xstart: -39.5, xend: 39.5 ystart: -47.5, yend: 47.5 zstart: -34.0, zend: 34.0 TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle:0.00 degrees
nframes: 1ras xform present
xform info: x_r = -1.0000, y_r = 0.0000, z_r = 0.0000, c_r= 0.0000
: x_a = 0.0000, y_a = 1.0000, z_a = 0.0000, c_a= 0.0000
: x_s = 0.0000, y_s = 0.0000, z_s = 1.0000, c_s= 0.0000
Orientation : LAS
Primary Slice Direction: axial
voxel to ras transform:
-2.0000 0.0000 0.0000 79.0000 0.0000 2.0000 0.0000 -95.0000 0.0000 0.0000 2.0000 -68.0000 0.0000 0.0000 0.0000 1.0000voxel-to-ras determinant -8
ras to voxel transform:
-0.5000 -0.0000 -0.0000 39.5000 0.0000 0.5000 0.0000 47.5000 0.0000 0.0000 0.5000 34.0000 0.0000 0.0000 0.0000 1.0000Here is the mat file:
Subj1
2.000000
2.000000
200.000000
1.054861e+00 -2.348376e-02 -1.086195e-01 7.747378e-01
9.350572e-02 -3.302234e-01 1.067427e+00 -3.124532e+01
-4.640190e-02 -9.299399e-01 -3.056859e-01 -7.546637e+00
0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00
round
What does the matlab error mean? Why can't it read the directional cosine?
-Thang
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer