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

BF: Fix transform/affine imports

parent fa458217
No related branches found
No related tags found
No related merge requests found
...@@ -15,12 +15,12 @@ sub-functions of :func:`resample`. ...@@ -15,12 +15,12 @@ sub-functions of :func:`resample`.
""" """
import collections.abc as abc import collections.abc as abc
import numpy as np import numpy as np
import scipy.ndimage as ndimage import scipy.ndimage as ndimage
import fsl.utils.transform as transform import fsl.transform.affine as affine
def resampleToPixdims(image, newPixdims, **kwargs): def resampleToPixdims(image, newPixdims, **kwargs):
...@@ -64,7 +64,7 @@ def resampleToReference(image, reference, **kwargs): ...@@ -64,7 +64,7 @@ def resampleToReference(image, reference, **kwargs):
# Align the two images together # Align the two images together
# via their vox-to-world affines. # via their vox-to-world affines.
matrix = transform.concat(image.worldToVoxMat, reference.voxToWorldMat) matrix = affine.concat(image.worldToVoxMat, reference.voxToWorldMat)
# If the input image is >3D, we # If the input image is >3D, we
# have to adjust the resampling # have to adjust the resampling
...@@ -218,7 +218,7 @@ def resample(image, ...@@ -218,7 +218,7 @@ def resample(image,
matrix[:3, :3] = rotmat matrix[:3, :3] = rotmat
matrix[:3, -1] = offsets matrix[:3, -1] = offsets
matrix = transform.concat(image.voxToWorldMat, matrix) matrix = affine.concat(image.voxToWorldMat, matrix)
return data, matrix return data, matrix
...@@ -241,7 +241,7 @@ def applySmoothing(data, matrix, newShape): ...@@ -241,7 +241,7 @@ def applySmoothing(data, matrix, newShape):
:returns: A smoothed copy of ``data``. :returns: A smoothed copy of ``data``.
""" """
ratio = transform.decompose(matrix[:3, :3])[0] ratio = affine.decompose(matrix[:3, :3])[0]
if len(newShape) > 3: if len(newShape) > 3:
ratio = np.concatenate(( ratio = np.concatenate((
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
""" """
import fsl.utils.deprecated as deprecated import fsl.utils.deprecated as deprecated
from fsl.transform import * # noqa from fsl.affine import * # noqa
deprecated.warn('fsl.utils.transform', deprecated.warn('fsl.utils.transform',
......
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