Skip to content

Commit 6f6d927

Browse files
committed
Update docs, function name
1 parent 22f4286 commit 6f6d927

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

nibabel/funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def as_closest_canonical(img, enforce_diag=False):
206206
unmodified.
207207
'''
208208
# Get the image class to transform the data for us
209-
img = img.transpose(io_orientation(img.affine))
209+
img = img.as_reoriented(io_orientation(img.affine))
210210

211211
# however, the affine may not be diagonal
212212
if enforce_diag and not _aff_is_diag(img.affine):

nibabel/nifti1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,10 +1969,10 @@ def set_sform(self, affine, code=None, **kwargs):
19691969
else:
19701970
self._affine[:] = self._header.get_best_affine()
19711971

1972-
def transpose(self, ornt):
1972+
def as_reoriented(self, ornt):
19731973
"""Apply an orientation change and return a new image
19741974
1975-
If image already has orientation, return the original image, unchanged
1975+
If ornt is identity transform, return the original image, unchanged
19761976
19771977
Parameters
19781978
----------
@@ -1985,7 +1985,7 @@ def transpose(self, ornt):
19851985
the transpose that needs to be done to the implied array, as in
19861986
``arr.transpose(ornt[:,0])``
19871987
"""
1988-
img = super(Nifti1Pair, self).transpose(ornt)
1988+
img = super(Nifti1Pair, self).as_reoriented(ornt)
19891989

19901990
if img is self:
19911991
return img

nibabel/spatialimages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,10 @@ def orthoview(self):
486486
title=self.get_filename())
487487

488488

489-
def transpose(self, ornt):
489+
def as_reoriented(self, ornt):
490490
"""Apply an orientation change and return a new image
491491
492-
If image already has orientation, return the original image, unchanged
492+
If ornt is identity transform, return the original image, unchanged
493493
494494
Parameters
495495
----------

0 commit comments

Comments
 (0)