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
Michiel Cottaar
fslpy
Commits
d7fb61b6
Commit
d7fb61b6
authored
Jan 29, 2021
by
Paul McCarthy
🚵
Browse files
Merge branch 'rf/docfix' into 'master'
Rf/docfix See merge request fsl/fslpy!279
parents
38a40735
6bf9cf50
Changes
6
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.rst
View file @
d7fb61b6
...
...
@@ -2,6 +2,20 @@ This document contains the ``fslpy`` release history in reverse chronological
order.
3.5.2 (Friday 29th January 2021)
---------------------------------
Fixed
^^^^^
* Adjusted the :func:`.dicom.scanDir` function so that it will set a
default value for ``SeriesDescription`` if it is not present in the
``dcm2niix`` ``json`` output.
* Fixed some issues with API documentation generation.
3.5.1 (Thursday 21st January 2021)
----------------------------------
...
...
doc/mock_modules.txt
View file @
d7fb61b6
...
...
@@ -9,3 +9,4 @@ numpy.linalg
scipy
scipy.ndimage
scipy.ndimage.interpolation
six
fsl/data/cifti.py
View file @
d7fb61b6
...
...
@@ -343,7 +343,7 @@ class BrainStructure(object):
:param primary: Name of the brain structure (e.g. cortex, thalamus)
:param secondary: Further specification of which part of the brain structure is described (e.g. 'white' or
'pial' for the cortex)
'pial' for the cortex)
:param hemisphere: which hemisphere is the brain structure in ('left', 'right', or 'both')
:param geometry: does the parent object describe the 'volume' or the 'surface'
"""
...
...
@@ -490,4 +490,3 @@ def load(filename, mask_values=(0, np.nan), writable=False) -> Union[DenseCifti,
if
writable
:
raise
ValueError
(
"Can not open NIFTI file in writable mode"
)
return
Cifti
.
from_image
(
vol_img
,
mask_values
)
fsl/data/dicom.py
View file @
d7fb61b6
...
...
@@ -194,6 +194,10 @@ def scanDir(dcmdir):
with
open
(
fn
,
'rt'
)
as
f
:
meta
=
json
.
load
(
f
)
meta
[
'DicomDir'
]
=
dcmdir
# SeriesDescription is not
# guaranteed to be present
if
'SeriesDescription'
not
in
meta
:
meta
[
'SeriesDescription'
]
=
meta
[
'SeriesNumber'
]
series
.
append
(
meta
)
# sort by series number
...
...
fsl/wrappers/wrapperutils.py
View file @
d7fb61b6
...
...
@@ -168,6 +168,7 @@ def genxwrapper(func, runner):
The following keyword arguments will be intercepted by the wrapper
function, and will *not* be passed to ``func``:
- ``stdout``: Passed to ``runner``. Defaults to ``True``.
- ``stderr``: Passed to ``runner``. Defaults to ``True``.
- ``exitcode``: Passed to ``runner``. Defaults to ``False``.
...
...
tests/test_dicom.py
View file @
d7fb61b6
...
...
@@ -189,7 +189,8 @@ def test_loadSeries():
assert
'PatientName'
in
img
.
metaKeys
()
assert
'MCCARTHY_PAUL'
in
img
.
metaValues
()
or
\
'MCCARTHY^PAUL'
in
img
.
metaValues
()
or
\
'MCCARTHY_PAUL_2'
in
img
.
metaValues
()
'MCCARTHY_PAUL_2'
in
img
.
metaValues
()
or
\
'MCCARTHY^PAUL^2'
in
img
.
metaValues
()
assert
(
'PatientName'
,
'MCCARTHY_PAUL'
)
in
img
.
metaItems
()
or
\
(
'PatientName'
,
'MCCARTHY^PAUL'
)
in
img
.
metaItems
()
or
\
(
'PatientName'
,
'MCCARTHY_PAUL_2'
)
in
img
.
metaItems
()
or
\
...
...
Write
Preview
Supports
Markdown
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