Hello all -
I"ve come across a slight issue when using mris_preproc to register multiple volumes from one subject onto a common surface. The temporary files created by mri_surf2surf have the name $tmpdir/$subj.mgh, which works just fine when each volume being transformed comes from a different subject. However when transforming multiple volumes from the same subject, each file converted overwrites the previous. The result is that the final call to mri_concat concatenates together multiple copies of the same volume, rather than the separate volumes specified as input.
A simple fix is to change the name of the temp files from $tmpdir/$subj.mgh to $tmpdir/$subj.$tinc.mgh, where $tinc is incremented after each volume. I've attached a diff against version 1.37.2.2 of mris_preproc (from Freesurfer 4.0.2) that implements this.
cheers... -- jds
82,83d81 < @ tinc = 0; # JDS < 209,210c207 < set tval = $tmpdir/$subj.$tinc.mgh #JDS: added tinc to avoid same-subject collisions < @ tinc = $tinc + 1 # JDS: increment tinc ---
set tval = $tmpdir/$subj.mgh
Jascha,
It looks like this problem was fixed in the v4.0.3 of mris_preproc. The fix appears to be the same as what you suggest. That file is attached in case you want to run it to double-check that it works.
Thanks for notifying us though.
Nick
On Fri, 2008-05-02 at 14:35 -0500, Jascha Swisher wrote:
Hello all -
I"ve come across a slight issue when using mris_preproc to register multiple volumes from one subject onto a common surface. The temporary files created by mri_surf2surf have the name $tmpdir/$subj.mgh, which works just fine when each volume being transformed comes from a different subject. However when transforming multiple volumes from the same subject, each file converted overwrites the previous. The result is that the final call to mri_concat concatenates together multiple copies of the same volume, rather than the separate volumes specified as input.
A simple fix is to change the name of the temp files from $tmpdir/$subj.mgh to $tmpdir/$subj.$tinc.mgh, where $tinc is incremented after each volume. I've attached a diff against version 1.37.2.2 of mris_preproc (from Freesurfer 4.0.2) that implements this.
cheers... -- jds
82,83d81 < @ tinc = 0; # JDS < 209,210c207 < set tval = $tmpdir/$subj.$tinc.mgh #JDS: added tinc to avoid same-subject collisions
< @ tinc = $tinc + 1 # JDS: increment tinc
set tval = $tmpdir/$subj.mgh
freesurfer@nmr.mgh.harvard.edu