From 127e2dfd673766a5c23c304b4160ac94e2e3a0fd Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Fri, 29 Nov 2019 17:57:24 +0000
Subject: [PATCH] RF: change default handling

---
 fsl/transform/affine.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fsl/transform/affine.py b/fsl/transform/affine.py
index aaee3e182..92a16ddd4 100644
--- a/fsl/transform/affine.py
+++ b/fsl/transform/affine.py
@@ -585,7 +585,7 @@ def rmsdev(T1, T2, R=None, xc=None):
     return erms
 
 
-def rescale(oldShape, newShape, origin='centre'):
+def rescale(oldShape, newShape, origin=None):
     """Calculates an affine matrix to use for resampling.
 
     This function generates an affine transformation matreix that can be used
@@ -602,10 +602,14 @@ def rescale(oldShape, newShape, origin='centre'):
 
     :arg oldShape: Shape of input data
     :arg newShape: Shape to resample data to
-    :arg origin:   Voxel grid alignment - either ``'centre'`` or ``'corner'``
+    :arg origin:   Voxel grid alignment - either ``'centre'`` (the default) or
+                   ``'corner'``
     :returns:      An affine resampling matrix
     """
 
+    if origin is None:
+        origin = 'centre'
+
     oldShape = np.array(oldShape, dtype=np.float)
     newShape = np.array(newShape, dtype=np.float)
     ndim     = len(oldShape)
-- 
GitLab