During the reg-feat2anat script fslregister produces errors. I tracked it to the argument parsing code
419 case "--fsvol": 420 if ( $#argv < 1) goto arg1err; 421 set fsvol = $argv[1]; shift; 422 set tmp = `fname2stem $fsvol`; 423 if(! $status) set fsvol = $tmp; 424 breaksw
The reg-feat2anat script uses the following call: ./fslregister --s *** --reg ***+.feat/reg/freesurfer/anat2exf.register.dat --mov ***+.feat/example_func.nii --dof 6 --bins 256 --cost corratio --fslmat ***+.feat/reg/freesurfer/exf2anat.fsl.mat --fsvol brainmask --maxangle 90 --initfslmat ***+.feat/reg/freesurfer/exf2anat.init.fsl.mat --tmp ***+.feat/reg/freesurfer/tmp --out ***+.feat/reg/freesurfer/tmp/exf-in-anat.nii
and the fsvol variable is eventually set ERROR: because line 422 fails. fsvol originally is just "brainmask" but it requires the full filename for fname2stem to work. Also, if I change the line 422 to $SUBJECTS_DIR/$subjid/mri/$fsvol.mgz the rest of the script fails because it expects to just have "brainmask" not the full path.
FS VOL FIRST brainmask Before stem brainmask /data/***********/mri/brainmask TMP ERROR: cannot determine stem FS VOL FIRST AFTER RETURN ERROR:
Thank you Chris for pointing this potential bug and the possible culprit in the source code. We will take a closer look it and determine the best way to proceed.
-Zeke
On 06/02/2013 10:16 PM, Chris Adamson wrote:
During the reg-feat2anat script fslregister produces errors. I tracked it to the argument parsing code
419 case "--fsvol": 420 if ( $#argv < 1) goto arg1err; 421 set fsvol = $argv[1]; shift; 422 set tmp = `fname2stem $fsvol`; 423 if(! $status) set fsvol = $tmp; 424 breaksw
The reg-feat2anat script uses the following call: ./fslregister --s *** --reg ***+.feat/reg/freesurfer/anat2exf.register.dat --mov ***+.feat/example_func.nii --dof 6 --bins 256 --cost corratio --fslmat ***+.feat/reg/freesurfer/exf2anat.fsl.mat --fsvol brainmask --maxangle 90 --initfslmat ***+.feat/reg/freesurfer/exf2anat.init.fsl.mat --tmp ***+.feat/reg/freesurfer/tmp --out ***+.feat/reg/freesurfer/tmp/exf-in-anat.nii
and the fsvol variable is eventually set ERROR: because line 422 fails. fsvol originally is just "brainmask" but it requires the full filename for fname2stem to work. Also, if I change the line 422 to $SUBJECTS_DIR/$subjid/mri/$fsvol.mgz the rest of the script fails because it expects to just have "brainmask" not the full path.
FS VOL FIRST brainmask Before stem brainmask /data/***********/mri/brainmask TMP ERROR: cannot determine stem FS VOL FIRST AFTER RETURN ERROR:
Hi Chris, this problem was created because of a change in the way tcshell works. When fname2stem fails, it should not go on to set fsvol = tmp because status should be set to 1. This is the way tcshell used to work. With newer version of CentOS, it sets status=0 because the set tmp was successful even though fname2stem failed. This was a super annoying thing for them to do. I've put a new version of reg-feat2anat here:
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/reg-feat2anat
let me know if this works doug
On 06/02/2013 10:16 PM, Chris Adamson wrote:
During the reg-feat2anat script fslregister produces errors. I tracked it to the argument parsing code
419 case "--fsvol": 420 if ( $#argv < 1) goto arg1err; 421 set fsvol = $argv[1]; shift; 422 set tmp = `fname2stem $fsvol`; 423 if(! $status) set fsvol = $tmp; 424 breaksw
The reg-feat2anat script uses the following call: ./fslregister --s *** --reg ***+.feat/reg/freesurfer/anat2exf.register.dat --mov ***+.feat/example_func.nii --dof 6 --bins 256 --cost corratio --fslmat ***+.feat/reg/freesurfer/exf2anat.fsl.mat --fsvol brainmask --maxangle 90 --initfslmat ***+.feat/reg/freesurfer/exf2anat.init.fsl.mat --tmp ***+.feat/reg/freesurfer/tmp --out ***+.feat/reg/freesurfer/tmp/exf-in-anat.nii
and the fsvol variable is eventually set ERROR: because line 422 fails. fsvol originally is just "brainmask" but it requires the full filename for fname2stem to work. Also, if I change the line 422 to $SUBJECTS_DIR/$subjid/mri/$fsvol.mgz the rest of the script fails because it expects to just have "brainmask" not the full path.
FS VOL FIRST brainmask Before stem brainmask /data/***********/mri/brainmask TMP ERROR: cannot determine stem FS VOL FIRST AFTER RETURN ERROR:
freesurfer@nmr.mgh.harvard.edu