External Email - Use Caution
Hello everyone,
I am having trouble getting past the very first stages of trac-all -prep.
I am using FreeSurfer 7.3.2. I tried several workarounds based on previous
answers to similar problems in this mailing list, but I am unsuccessful
each time.
First, when I try to run trac-all -prep without any configuration file,
using only the defaults, it prints out an error:
trac-all -prep -s sub-01 -i $SUBJECTS_DIR/raw/sub-01/dwi/1_0000.dcm
ERROR: for B0 distortion correction with reverse-polarity DWIs
ERROR: or for model-based eddy-current distortion correction,
ERROR: must specify PE direction
As I understand it, the default version of trac-all should assume default
deb0=0, and not look for reverse-polarity images to do distortion
correction for TOPUP.
Then, I tried to perform the analysis using the configuration file and
specify that I do not want to perform correction based on reverse-polarity
images or phase maps (my data don't have these), by explicitly entering
"set dob0 = 0". The problem persisted. I did what a previous user was told
to do - set "pedir" and "epifactor" and "echospacing" manually.
Then, I ran into the final error which I cannot overcome.
No matter what I do, it ends in an error:
mv: cannot stat
'/home/sj/freesurfer/DEPRINFL_subjects_outputs/sub-01/dmri/dwi_orig_las.1.nii.gz':
No such file or directory
It seems it cannot create this file.
Earlier in the log there is also a previously mentioned error:
INFO: input image orientation is LPS
INFO: input image determinant is 6.49902
mri_convert -oni 128 -onj 128 -onk 60 -oid 0 0 0 -ojd 0 0 0 -okd 0 0 0 -oc
0 -21 7 -rt nearest
/home/sj/freesurfer/DEPRINFL_subjects_outputs/sub-01/dmri/dwi_orig.1.nii.gz
/home/sj/freesurfer/DEPRINFL_subjects_outputs/sub-01/dmri/dwi_orig_las.1.nii.gz
mri_convert -oni 128 -onj 128 -onk 60 -oid 0 0 0 -ojd 0 0 0 -okd 0 0 0 -oc
0 -21 7 -rt nearest
/home/sj/freesurfer/DEPRINFL_subjects_outputs/sub-01/dmri/dwi_orig.1.nii.gz
/home/sj/freesurfer/DEPRINFL_subjects_outputs/sub-01/dmri/dwi_orig_las.1.nii.gz
mri_convert: directions must have non-zero magnitude; out_i_direction = (0,
0, 0)
It appears to be a problem with converting into LAS.
(Previously there was mention of there being a wrong "trac-preproc" file
for runs with only 1 subject, but my problem remains when trying to run
single and multiple subjects. I also tried to change my trac-preproc file
to the versions from previous answers, with no luck).
When I check the dmri folder the dwi_orig.1.bvals and dwi_orig.1.bvecs, and
dwi_orig_las.1.bvals files contain correct values, but dwi_orig_las.1.bvecs
contains only zeros.
When I run mri_info on dwi_orig.1.nii.gz I get this:
Volume information for sub-01/dmri/dwi_orig.1.nii.gz
type: nii
dimensions: 128 x 128 x 60 x 76
voxel sizes: 1.718750, 1.718750, 2.200000
type: SHORT (4)
fov: 220.000
dof: 1
xstart: -110.0, xend: 110.0
ystart: -110.0, yend: 110.0
zstart: -66.0, zend: 66.0
TR: 7100.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle:
0.00 degrees
nframes: 76
PhEncDir: UNKNOWN
FieldStrength: 0.000000
ras xform present
xform info: x_r = -0.9959, y_r = -0.0243, z_r = -0.0868, c_r =
-0.4050
: x_a = 0.0326, y_a = -0.9949, z_a = -0.0955, c_a =
-21.6846
: x_s = -0.0841, y_s = -0.0979, z_s = 0.9916, c_s =
7.5075
Orientation : LPS
Primary Slice Direction: axial
voxel to ras transform:
-1.7117 -0.0418 -0.1910 117.5550
0.0561 -1.7100 -0.2100 90.4641
-0.1445 -0.1683 2.1816 -37.9249
0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant 6.49902
ras to voxel transform:
-0.5794 0.0190 -0.0489 64.5443
-0.0142 -0.5789 -0.0570 51.8698
-0.0395 -0.0434 0.4507 25.6592
0.0000 0.0000 0.0000 1.0000
"PhEncDir" shows UNKNOWN, but as I said, my config file contains "set pedir
= (AP)".
I also tried to do the analysis on FreeSurfer 7.2 and the develeopment
version, but no luck.
I would appreciate any input into how to solve this problem.
Regards,
SJ.