Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
William Clarke
fsl_mrs
Commits
7df86032
Commit
7df86032
authored
Sep 20, 2021
by
William Clarke
Browse files
Comments in reshape nifti-mrs function.
parent
9e3c1e0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl_mrs/utils/nifti_mrs_tools/reshape.py
View file @
7df86032
...
...
@@ -7,6 +7,11 @@ from fsl_mrs.core import NIFTI_MRS
import
numpy
as
np
# TO DO:
# def _reshape_hdr(dynamic_hdr, target):
# return reshaped_hdr
def
reshape
(
nmrs
,
reshape
,
d5
=
None
,
d6
=
None
,
d7
=
None
):
"""Reshape the higher dimensions (5-7) of an nifti-mrs file.
...
...
@@ -32,6 +37,8 @@ def reshape(nmrs, reshape, d5=None, d6=None, d7=None):
shape
+=
reshape
nmrs_reshaped
=
NIFTI_MRS
(
np
.
reshape
(
nmrs
.
data
,
shape
),
header
=
nmrs
.
header
)
# reshpaed_hrd = _reshape_hdr(nmrs_reshaped.dynamic_hdr_vals[2],)
# Note numerical index is N-1
if
d5
:
nmrs_reshaped
.
set_dim_tag
(
4
,
d5
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment