Commit 548ec054 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'rel/3.5.2' into 'v3.5'


See merge request fsl/fslpy!280
parents 462bff2f aa826640
......@@ -2,6 +2,20 @@ This document contains the ``fslpy`` release history in reverse chronological
3.5.2 (Friday 29th January 2021)
* 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)
......@@ -9,3 +9,4 @@ numpy.linalg
......@@ -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)
......@@ -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']
# sort by series number
......@@ -47,7 +47,7 @@ import re
import string
__version__ = '3.5.1'
__version__ = '3.5.2'
"""Current version number, as a string. """
......@@ -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``.
......@@ -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 \
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment