Dear freesurfer developers,
I call recon-all -all from a matlab script using a system(cmd) which is (apparently) correctly executed, as shown in the recon-all.log (matlab_* attached), i.e.:
/usr/local/freesurfer/bin/recon-all -all -cw256 -3T -multistrip -clean-bm -i /home/MRIdata/PUD/31148_MRI_sMRI_400614.nii -s /home/gc/study/recon-all/400614dclass
and apparently it run without errors as you can see in the matlab_recon-all.log file, but I get (systematically) a wrong
TalAviQA: 0.00000
while, if I run the above bash command directly I get a correct:
TalAviQA: 0.97713
as shown in the bash_recon-all.log (attached). I guessed that something wrong happened in
talairach_avi --i orig_nu.mgz --xfm transforms/talairach.auto.xfm --atlas 3T18yoSchwartzReactN32_as_orig
and the error traced in talairach_avi.log (matlab_* and bash_* attached). In fact matlab_talairach_avi.log is shorter and all imgreg_4dfp end sections are missing which imply that TalAviQA can not be extracted by awk and mritotal transform is performed instead. But really I don't understand why this happens and whether similar issues affects other recon-all subtask using matlab. I double checked this on two linux sistems and with fs version 6.0 and 5.3 ... same results.
Thanks in advance for any help,
cheers,
The tal_QC_AZS scripts expects the log file to have a specific format, and it looks like something changes when you run it inside matlab. sorry, the only idea I have is that the linux environments might be different in bash vs matlab.
On 09/11/2017 08:25 AM, Giuseppe Cabras wrote:
Dear freesurfer developers,
I call recon-all -all from a matlab script using a system(cmd) which is (apparently) correctly executed, as shown in the recon-all.log (matlab_* attached), i.e.:
/usr/local/freesurfer/bin/recon-all -all -cw256 -3T -multistrip -clean-bm -i /home/MRIdata/PUD/31148_MRI_sMRI_400614.nii -s /home/gc/study/recon-all/400614dclass
and apparently it run without errors as you can see in the matlab_recon-all.log file, but I get (systematically) a wrong
TalAviQA: 0.00000
while, if I run the above bash command directly I get a correct:
TalAviQA: 0.97713
as shown in the bash_recon-all.log (attached). I guessed that something wrong happened in
talairach_avi --i orig_nu.mgz --xfm transforms/talairach.auto.xfm --atlas 3T18yoSchwartzReactN32_as_orig
and the error traced in talairach_avi.log (matlab_* and bash_* attached). In fact matlab_talairach_avi.log is shorter and all imgreg_4dfp end sections are missing which imply that TalAviQA can not be extracted by awk and mritotal transform is performed instead. But really I don't understand why this happens and whether similar issues affects other recon-all subtask using matlab. I double checked this on two linux sistems and with fs version 6.0 and 5.3 ... same results.
Thanks in advance for any help,
cheers,
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Thanks Douglas for your reply.
I checked in detail the talairach_avi.log files and they show that imgreg_4dfp c executable:
$Id: imgreg_4dfp.c,v 1.4 2010/02/27 01:41:53 nicks Exp $
are executed in both environment (bash and matlab), but in bash imgreg_4dfp call in turn
$Id: fimgreg.f,v 1.1 2007/05/04 22:33:59 nicks Exp $
that show eta,q values in the talairach_avi.log file. Seems to me that, if I call recon-all from matlab, fimgreg code ( which I don't know where it is) is not executed or it don't write results to talairach_avi.log output, but probably talairach avi transform is fine.
... very strange behaviour.
Cheers,
Giuseppe
On 11/09/2017 18:25, Douglas N Greve wrote:
The tal_QC_AZS scripts expects the log file to have a specific format, and it looks like something changes when you run it inside matlab. sorry, the only idea I have is that the linux environments might be different in bash vs matlab.
On 09/11/2017 08:25 AM, Giuseppe Cabras wrote:
Dear freesurfer developers,
I call recon-all -all from a matlab script using a system(cmd) which is (apparently) correctly executed, as shown in the recon-all.log (matlab_* attached), i.e.:
/usr/local/freesurfer/bin/recon-all -all -cw256 -3T -multistrip -clean-bm -i /home/MRIdata/PUD/31148_MRI_sMRI_400614.nii -s /home/gc/study/recon-all/400614dclass
and apparently it run without errors as you can see in the matlab_recon-all.log file, but I get (systematically) a wrong
TalAviQA: 0.00000
while, if I run the above bash command directly I get a correct:
TalAviQA: 0.97713
as shown in the bash_recon-all.log (attached). I guessed that something wrong happened in
talairach_avi --i orig_nu.mgz --xfm transforms/talairach.auto.xfm --atlas 3T18yoSchwartzReactN32_as_orig
and the error traced in talairach_avi.log (matlab_* and bash_* attached). In fact matlab_talairach_avi.log is shorter and all imgreg_4dfp end sections are missing which imply that TalAviQA can not be extracted by awk and mritotal transform is performed instead. But really I don't understand why this happens and whether similar issues affects other recon-all subtask using matlab. I double checked this on two linux sistems and with fs version 6.0 and 5.3 ... same results.
Thanks in advance for any help,
cheers,
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
when you run an external command from matalb, it starts a new shell, and that shell will have an environment. It looks like the env is different than when you run something from a standard shell. Eg, when you open a bash shell, do you source the freesurfer environment before running FS commands? If so, you'd need to do the same thing in the shell created by matlab to get the same result
On 09/12/2017 04:24 AM, Giuseppe Cabras wrote:
Thanks Douglas for your reply.
I checked in detail the talairach_avi.log files and they show that imgreg_4dfp c executable:
$Id: imgreg_4dfp.c,v 1.4 2010/02/27 01:41:53 nicks Exp $
are executed in both environment (bash and matlab), but in bash imgreg_4dfp call in turn
$Id: fimgreg.f,v 1.1 2007/05/04 22:33:59 nicks Exp $
that show eta,q values in the talairach_avi.log file. Seems to me that, if I call recon-all from matlab, fimgreg code ( which I don't know where it is) is not executed or it don't write results to talairach_avi.log output, but probably talairach avi transform is fine.
... very strange behaviour.
Cheers,
Giuseppe
On 11/09/2017 18:25, Douglas N Greve wrote:
The tal_QC_AZS scripts expects the log file to have a specific format, and it looks like something changes when you run it inside matlab. sorry, the only idea I have is that the linux environments might be different in bash vs matlab.
On 09/11/2017 08:25 AM, Giuseppe Cabras wrote:
Dear freesurfer developers,
I call recon-all -all from a matlab script using a system(cmd) which is (apparently) correctly executed, as shown in the recon-all.log (matlab_* attached), i.e.:
/usr/local/freesurfer/bin/recon-all -all -cw256 -3T -multistrip -clean-bm -i /home/MRIdata/PUD/31148_MRI_sMRI_400614.nii -s /home/gc/study/recon-all/400614dclass
and apparently it run without errors as you can see in the matlab_recon-all.log file, but I get (systematically) a wrong
TalAviQA: 0.00000
while, if I run the above bash command directly I get a correct:
TalAviQA: 0.97713
as shown in the bash_recon-all.log (attached). I guessed that something wrong happened in
talairach_avi --i orig_nu.mgz --xfm transforms/talairach.auto.xfm --atlas 3T18yoSchwartzReactN32_as_orig
and the error traced in talairach_avi.log (matlab_* and bash_* attached). In fact matlab_talairach_avi.log is shorter and all imgreg_4dfp end sections are missing which imply that TalAviQA can not be extracted by awk and mritotal transform is performed instead. But really I don't understand why this happens and whether similar issues affects other recon-all subtask using matlab. I double checked this on two linux sistems and with fs version 6.0 and 5.3 ... same results.
Thanks in advance for any help,
cheers,
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
ps, you can run it with -no-talairach to turn off checking (soit will run all the way through)
On 09/11/2017 08:25 AM, Giuseppe Cabras wrote:
Dear freesurfer developers,
I call recon-all -all from a matlab script using a system(cmd) which is (apparently) correctly executed, as shown in the recon-all.log (matlab_* attached), i.e.:
/usr/local/freesurfer/bin/recon-all -all -cw256 -3T -multistrip -clean-bm -i /home/MRIdata/PUD/31148_MRI_sMRI_400614.nii -s /home/gc/study/recon-all/400614dclass
and apparently it run without errors as you can see in the matlab_recon-all.log file, but I get (systematically) a wrong
TalAviQA: 0.00000
while, if I run the above bash command directly I get a correct:
TalAviQA: 0.97713
as shown in the bash_recon-all.log (attached). I guessed that something wrong happened in
talairach_avi --i orig_nu.mgz --xfm transforms/talairach.auto.xfm --atlas 3T18yoSchwartzReactN32_as_orig
and the error traced in talairach_avi.log (matlab_* and bash_* attached). In fact matlab_talairach_avi.log is shorter and all imgreg_4dfp end sections are missing which imply that TalAviQA can not be extracted by awk and mritotal transform is performed instead. But really I don't understand why this happens and whether similar issues affects other recon-all subtask using matlab. I double checked this on two linux sistems and with fs version 6.0 and 5.3 ... same results.
Thanks in advance for any help,
cheers,
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu