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

DOC: clarify

parent 2da19991
No related branches found
No related tags found
No related merge requests found
......@@ -847,6 +847,10 @@ class Nifti(notifier.Notifier, meta.Meta):
See :func:`.affine.rescale` for the meaning of the ``origin`` argument.
Only the spatial dimensions may be adjusted - use the functions in
the :mod:`.image.resample` module if you need to adjust non-spatial
dimensions.
:arg pixdim: New voxel dimensions
:arg shape: New image shape
:arg origin: Voxel grid alignment - either ``'centre'`` (the default)
......@@ -872,7 +876,8 @@ class Nifti(notifier.Notifier, meta.Meta):
oldPixdim = np.array(self.pixdim[:npixdim])
newShape = oldShape * (oldPixdim / newPixdim)
# pad shape to full dimensions
# We only allow adjustment of
# the spatial dimensions
if len(newShape) != 3:
raise ValueError('Three dimensions must be specified')
......
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