Closed poldrack closed 1 month ago
Thanks @poldrack . Much appreciated.
I made a few recent commits that should address this - note : I also normalized images in [0,1] range for the registration itself ... output is like:
...
QQQ_00049_0GenericAffine.mat
QQQ_00050_0GenericAffine.mat
...
Confirmed fixed as of 0.4.2
Describe the bug It is sometimes necessary to set an output directory for ants transforms other than
/tmp
due to space limitations. However, theoutprefix
option does not seem to work properly with themotion_correction
workflow. Instead of creating a different set of transforms for each timepoint, it outputs the same set of transforms for each of the timepoints.To Reproduce
When the workflow is run with outprefix set, the output files for each step are identical.
When the flag is unset, then the behavior is correct:
Expected behavior I expect that the outprefix should simply prepend to the temporay file name (including its random hash).
Proposed solution
I will work on a PR to address this. I think that the easiest solution is to add a
tempdir
argument to the workflow, and then pass this pass as the prefix to the temporary file generator. (probably also a good idea to update from mktemp to mkstemp since mktemp is deprecated)