Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
1f55df41
Commit
1f55df41
authored
1 month ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: Deprecate unfortunately named voxToScaledVoxMat and scaledVoxToVoxMat methods
parent
418c1d2f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/data/image.py
+7
-4
7 additions, 4 deletions
fsl/data/image.py
fsl/transform/flirt.py
+6
-6
6 additions, 6 deletions
fsl/transform/flirt.py
with
13 additions
and
10 deletions
fsl/data/image.py
+
7
−
4
View file @
1f55df41
...
@@ -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
'
)
...
...
This diff is collapsed.
Click to expand it.
fsl/transform/flirt.py
+
6
−
6
View file @
1f55df41
...
@@ -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`
"""
"""
src
ScaledVox
ToVoxMat
=
srcImage
.
scaledVoxToVoxMat
src
FSL
ToVoxMat
=
srcImage
.
getAffine
(
'
fsl
'
,
'
voxel
'
)
srcVoxToWorldMat
=
srcImage
.
voxToW
orld
Mat
srcVoxToWorldMat
=
srcImage
.
getAffine
(
'
voxel
'
,
'
w
orld
'
)
refWorldToVoxMat
=
refImage
.
worldToVoxMat
refWorldToVoxMat
=
refImage
.
getAffine
(
'
world
'
,
'
voxel
'
)
refVoxTo
ScaledVox
Mat
=
refImage
.
voxToScaledVoxMat
refVoxTo
FSL
Mat
=
refImage
.
getAffine
(
'
voxel
'
,
'
fsl
'
)
if
srcXform
is
not
None
:
if
srcXform
is
not
None
:
srcVoxToWorldMat
=
srcXform
srcVoxToWorldMat
=
srcXform
return
concat
(
refVoxTo
ScaledVox
Mat
,
return
concat
(
refVoxTo
FSL
Mat
,
refWorldToVoxMat
,
refWorldToVoxMat
,
srcVoxToWorldMat
,
srcVoxToWorldMat
,
src
ScaledVox
ToVoxMat
)
src
FSL
ToVoxMat
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment