Commit a6b40f98 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Make sure that input images don't get associated with temp files

parent 343ec864
......@@ -1050,6 +1050,12 @@ def fileOrImage(*args, **kwargs):
hd, infile = tempfile.mkstemp(fslimage.defaultExt(),
# Create a copy of the input image and
# save that, so the original doesn't
# get associated with the temp file
val = nib.nifti1.Nifti1Image(
np.asanyarray(val.dataobj), None, val.header)
return infile
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment