Commit 3a6b6d92 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'maint/1.x' into v1.13

parents af858116 d1938fc7
Pipeline #3366 passed with stages
in 1 minute and 42 seconds
......@@ -2,6 +2,20 @@ This document contains the ``fslpy`` release history in reverse chronological
order.
1.13.3 (Friday February 8th 2019)
---------------------------------
Fixed
^^^^^
* Fixed an issue with the `.dicom.loadSeries` using memory-mapping for
image files that would subsequently be deleted.
* Fixed an issue in the :class:`.GiftiMesh` class, where
``numpy``/``nibabel`` was returning read-only index arrays.
1.13.2 (Friday November 30th 2018)
----------------------------------
......
......@@ -236,9 +236,13 @@ def loadSeries(series):
sp.call(cmd.split(), stdout=devnull, stderr=devnull)
files = glob.glob(op.join(td, '{}*.nii'.format(snum)))
images = [nib.load(f) for f in files]
# Force-load images into memory
[i.get_data() for i in images]
images = [nib.load(f, mmap=False) for f in files]
# copy images so nibabel no longer
# refs to the files (as they will
# be deleted), and use get_data()
# to force-load the image data.
images = [nib.Nifti1Image(i.get_data(), None, i.header)
for i in images]
return [DicomImage(i, series, dcmdir, name=desc) for i in images]
......@@ -195,8 +195,8 @@ def loadGiftiMesh(filename):
raise ValueError('{}: GIFTI surface files must contain '
'exactly one triangle array'.format(filename))
vertices = pointsets[0].data
indices = triangles[0].data
vertices = np.array(pointsets[0].data)
indices = np.array(triangles[0].data)
return gimg, vertices, indices
......
......@@ -47,7 +47,7 @@ import re
import string
__version__ = '1.13.2'
__version__ = '1.13.3'
"""Current version number, as a string. """
......
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