File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 24
24
from .affines import AffineError , to_matvec , from_matvec , append_diag
25
25
from .spaces import vox2out_vox
26
26
from .nifti1 import Nifti1Header , Nifti1Image
27
- from .orientations import axcodes2ornt
27
+ from .orientations import axcodes2ornt , io_orientation , ornt_transform
28
28
from .imageclasses import spatial_axes_first
29
29
30
30
SIGMA2FWHM = np .sqrt (8 * np .log (2 ))
@@ -386,5 +386,7 @@ def conform(from_img,
386
386
cval = cval , out_class = out_class )
387
387
388
388
# Reorient to desired orientation.
389
- ornt = axcodes2ornt (orientation , labels = list (zip ('RPI' , 'LAS' )))
390
- return out_img .as_reoriented (ornt )
389
+ start_ornt = io_orientation (out_img .affine )
390
+ end_ornt = axcodes2ornt (orientation )
391
+ transform = ornt_transform (start_ornt , end_ornt )
392
+ return out_img .as_reoriented (transform )
You can’t perform that action at this time.
0 commit comments