Skip to content
Snippets Groups Projects
Commit 127e2dfd authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: change default handling

parent 76328be6
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment