Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Michiel Cottaar
fslpy
Commits
b41c630c
Commit
b41c630c
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
RF: Adjust roi module to use new import
parent
3aef4975
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fsl/utils/image/__init__.py
+1
-0
1 addition, 0 deletions
fsl/utils/image/__init__.py
fsl/utils/image/roi.py
+4
-4
4 additions, 4 deletions
fsl/utils/image/roi.py
fsl/utils/transform.py
+1
-1
1 addition, 1 deletion
fsl/utils/transform.py
with
6 additions
and
5 deletions
fsl/utils/image/__init__.py
+
1
−
0
View file @
b41c630c
...
@@ -13,4 +13,5 @@ The following modules are available:
...
@@ -13,4 +13,5 @@ The following modules are available:
:nosignature
:nosignature
.image.resample
.image.resample
.image.roi
"""
"""
This diff is collapsed.
Click to expand it.
fsl/utils/image/roi.py
+
4
−
4
View file @
b41c630c
...
@@ -11,8 +11,8 @@ a region-of-interest from, or expand the field-of-view of, an :class:`.Image`.
...
@@ -11,8 +11,8 @@ a region-of-interest from, or expand the field-of-view of, an :class:`.Image`.
import
numpy
as
np
import
numpy
as
np
import
fsl.data.image
as
fslimage
import
fsl.data.image
as
fslimage
import
fsl.
utils.
transform
as
transform
import
fsl.transform
.affine
as
affine
def
_normaliseBounds
(
shape
,
bounds
):
def
_normaliseBounds
(
shape
,
bounds
):
...
@@ -97,8 +97,8 @@ def roi(image, bounds):
...
@@ -97,8 +97,8 @@ def roi(image, bounds):
# each spatial dimension
# each spatial dimension
oldaff
=
image
.
voxToWorldMat
oldaff
=
image
.
voxToWorldMat
offset
=
[
lo
for
lo
,
hi
in
bounds
[:
3
]]
offset
=
[
lo
for
lo
,
hi
in
bounds
[:
3
]]
offset
=
transform
.
scaleOffsetXform
([
1
,
1
,
1
],
offset
)
offset
=
affine
.
scaleOffsetXform
([
1
,
1
,
1
],
offset
)
newaff
=
transform
.
concat
(
oldaff
,
offset
)
newaff
=
affine
.
concat
(
oldaff
,
offset
)
return
fslimage
.
Image
(
newdata
,
return
fslimage
.
Image
(
newdata
,
xform
=
newaff
,
xform
=
newaff
,
...
...
This diff is collapsed.
Click to expand it.
fsl/utils/transform.py
+
1
−
1
View file @
b41c630c
...
@@ -16,6 +16,6 @@ from fsl.transform.flirt import (flirtMatrixToSform, # noqa
...
@@ -16,6 +16,6 @@ from fsl.transform.flirt import (flirtMatrixToSform, # noqa
deprecated
.
warn
(
'
fsl.utils.transform
'
,
deprecated
.
warn
(
'
fsl.utils.transform
'
,
vin
=
'
2.
2
.0
'
,
vin
=
'
2.
4
.0
'
,
rin
=
'
3.0.0
'
,
rin
=
'
3.0.0
'
,
msg
=
'
Use the fsl.transform module instead
'
)
msg
=
'
Use the fsl.transform module instead
'
)
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