Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
62c51e9e
Commit
62c51e9e
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Plain Diff
Merge branch 'bf/dicom_mmap' into 'master'
Bf/dicom mmap See merge request fsl/fslpy!102
parents
5bab6952
39f41562
No related branches found
No related tags found
No related merge requests found
Pipeline
#3359
passed
6 years ago
Stage: test
Stage: style
Stage: doc
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.rst
+13
-6
13 additions, 6 deletions
CHANGELOG.rst
fsl/data/dicom.py
+8
-4
8 additions, 4 deletions
fsl/data/dicom.py
with
21 additions
and
10 deletions
CHANGELOG.rst
+
13
−
6
View file @
62c51e9e
...
...
@@ -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)
----------------------------------
...
...
This diff is collapsed.
Click to expand it.
fsl/data/dicom.py
+
8
−
4
View file @
62c51e9e
...
...
@@ -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
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment