Commit 62c51e9e authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'bf/dicom_mmap' into 'master'

Bf/dicom mmap

See merge request fsl/fslpy!102
parents 5bab6952 39f41562
Pipeline #3359 passed with stages
in 11 minutes and 46 seconds
......@@ -27,19 +27,26 @@ Changed
vertex data.
Removed
^^^^^^^
* Many deprecated items removed.
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.
Removed
^^^^^^^
* Many deprecated items removed.
1.13.2 (Friday November 30th 2018)
----------------------------------
......
......@@ -203,9 +203,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]
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