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

MNT: Deprecate unfortunately named voxToScaledVoxMat and scaledVoxToVoxMat methods

parent 418c1d2f
No related branches found
No related tags found
No related merge requests found
...@@ -815,9 +815,10 @@ class Nifti(notifier.Notifier, meta.Meta): ...@@ -815,9 +815,10 @@ class Nifti(notifier.Notifier, meta.Meta):
@property @property
@deprecated.deprecated('3.22.0', '4.0.0', 'Use getAffine instead')
def voxToScaledVoxMat(self): def voxToScaledVoxMat(self):
"""Returns a transformation matrix which transforms from voxel """Returns a transformation matrix which transforms from ``voxel``
coordinates into scaled voxel coordinates, with a left-right flip coordinates into ``fsl`` coordinates, with a left-right flip
if the image appears to be stored in neurological order. if the image appears to be stored in neurological order.
See http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT/FAQ#What_is_the\ See http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT/FAQ#What_is_the\
...@@ -828,9 +829,11 @@ class Nifti(notifier.Notifier, meta.Meta): ...@@ -828,9 +829,11 @@ class Nifti(notifier.Notifier, meta.Meta):
@property @property
@deprecated.deprecated('3.22.0', '4.0.0', 'Use getAffine instead')
def scaledVoxToVoxMat(self): def scaledVoxToVoxMat(self):
"""Returns a transformation matrix which transforms from scaled voxels """Returns a transformation matrix which transforms from ``fsl``
into voxels, the inverse of the :meth:`voxToScaledVoxMat` transform. coordinates into ``voxel`` coordinates, the inverse of the
:meth:`voxToScaledVoxMat` transform.
""" """
return self.getAffine('fsl', 'voxel') return self.getAffine('fsl', 'voxel')
......
...@@ -138,15 +138,15 @@ def sformToFlirtMatrix(srcImage, refImage, srcXform=None): ...@@ -138,15 +138,15 @@ def sformToFlirtMatrix(srcImage, refImage, srcXform=None):
:attr:`.Nifti.voxToWorldMat` :attr:`.Nifti.voxToWorldMat`
""" """
srcScaledVoxToVoxMat = srcImage.scaledVoxToVoxMat srcFSLToVoxMat = srcImage.getAffine('fsl', 'voxel')
srcVoxToWorldMat = srcImage.voxToWorldMat srcVoxToWorldMat = srcImage.getAffine('voxel', 'world')
refWorldToVoxMat = refImage.worldToVoxMat refWorldToVoxMat = refImage.getAffine('world', 'voxel')
refVoxToScaledVoxMat = refImage.voxToScaledVoxMat refVoxToFSLMat = refImage.getAffine('voxel', 'fsl')
if srcXform is not None: if srcXform is not None:
srcVoxToWorldMat = srcXform srcVoxToWorldMat = srcXform
return concat(refVoxToScaledVoxMat, return concat(refVoxToFSLMat,
refWorldToVoxMat, refWorldToVoxMat,
srcVoxToWorldMat, srcVoxToWorldMat,
srcScaledVoxToVoxMat) srcFSLToVoxMat)
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