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
81cb7c60
Commit
81cb7c60
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
DOC: clarify
parent
2da19991
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/data/image.py
+6
-1
6 additions, 1 deletion
fsl/data/image.py
with
6 additions
and
1 deletion
fsl/data/image.py
+
6
−
1
View file @
81cb7c60
...
...
@@ -847,6 +847,10 @@ class Nifti(notifier.Notifier, meta.Meta):
See :func:`.affine.rescale` for the meaning of the ``origin`` argument.
Only the spatial dimensions may be adjusted - use the functions in
the :mod:`.image.resample` module if you need to adjust non-spatial
dimensions.
:arg pixdim: New voxel dimensions
:arg shape: New image shape
:arg origin: Voxel grid alignment - either ``
'
centre
'
`` (the default)
...
...
@@ -872,7 +876,8 @@ class Nifti(notifier.Notifier, meta.Meta):
oldPixdim
=
np
.
array
(
self
.
pixdim
[:
npixdim
])
newShape
=
oldShape
*
(
oldPixdim
/
newPixdim
)
# pad shape to full dimensions
# We only allow adjustment of
# the spatial dimensions
if
len
(
newShape
)
!=
3
:
raise
ValueError
(
'
Three dimensions must be specified
'
)
...
...
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