Dear Freesurfers,
I just tried to use mri_motion_correct.fsl with the -tmpdir and -nocleanup options. Since I currently average around 10 to 16 mprage volumes per subject (NHPs) I want to look at the variance in addition to the average. And it seemed simplest to just keep the co-registered volumes in the tmpdir around and calculate the variance from those. But, it turns out that the -nocleanup does not work (nor does the implied -nocleanup that is set from -tmpdir (set CleanUp = 0)). The problem seems to be fixable by changing:
cleanup:
if($#CleanUp > 0) then foreach f ($CleanUpList) rm -f $f end endif
rm -r $tmpdir
goto cleanup_return;
to:
cleanup:
if($#CleanUp > 0) then if (${CleanUp} == 1) then echo "cleaning up..." foreach f ($CleanUpList) rm -f $f end endif endif if (${CleanUp} == 1) then rm -r $tmpdir endif
goto cleanup_return;
or even simpler:
goto cleanup; cleanup_return:
to:
if (${CleanUp} == 1) then goto cleanup; cleanup_return: endif
it would be great if this could be included into the next version. (It would certainly make my life easier :))
Best Regards Sebastian
Hi All,
since the new version seems to be just around the corner, I would like to ask nicely, if you could make sure the following functionality of mri_motion_correct.fsl is restored? I am not sure whether this ever reached anybody the first time I tried to send it, so I just resend it, please ignore if you already fixed this.
Many Thanks for your exceptionally nice software...
best Sebastian
Begin forwarded message:
From: Sebastian Moeller sebastian.moeller@lur.rwth-aachen.de Date: April 7, 2010 5:28:53 PM PDT To: Freesurfer Mailing List freesurfer@nmr.mgh.harvard.edu Bcc: Sebastian Moeller sebastian.moeller@lur.rwth-aachen.de Subject: mri_motion_correct.fsl buglet
Dear Freesurfers,
I just tried to use mri_motion_correct.fsl with the -tmpdir and -nocleanup options. Since I currently average around 10 to 16 mprage volumes per subject (NHPs) I want to look at the variance in addition to the average. And it seemed simplest to just keep the co-registered volumes in the tmpdir around and calculate the variance from those. But, it turns out that the -nocleanup does not work (nor does the implied -nocleanup that is set from -tmpdir (set CleanUp = 0)). The problem seems to be fixable by changing:
cleanup:
if($#CleanUp > 0) then foreach f ($CleanUpList) rm -f $f end endif
rm -r $tmpdir
goto cleanup_return;
to:
cleanup:
if($#CleanUp > 0) then if (${CleanUp} == 1) then echo "cleaning up..." foreach f ($CleanUpList) rm -f $f end endif endif if (${CleanUp} == 1) then rm -r $tmpdir endif
goto cleanup_return;
or even simpler:
goto cleanup; cleanup_return:
to:
if (${CleanUp} == 1) then goto cleanup; cleanup_return: endif
it would be great if this could be included into the next version. (It would certainly make my life easier :))
Best Regards Sebastian
freesurfer@nmr.mgh.harvard.edu