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
Evan Edmond
fslpy
Commits
a5d02f56
Commit
a5d02f56
authored
Oct 05, 2018
by
Paul McCarthy
🚵
Browse files
RF: Bump minimum dcm2niix version, and use the load-one-series flag to
reduce the number of series that need to be loaded.
parent
5cd1112a
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/data/dicom.py
View file @
a5d02f56
...
...
@@ -44,6 +44,10 @@ import fsl.data.image as fslimage
log
=
logging
.
getLogger
(
__name__
)
MIN_DCM2NIIX_VERSION
=
(
1
,
0
,
2017
,
12
,
15
)
"""Minimum version of dcm2niix that is required for this module to work. """
class
DicomImage
(
fslimage
.
Image
):
"""The ``DicomImage`` is a volumetric :class:`.Image` with some associated
DICOM metadata.
...
...
@@ -115,7 +119,6 @@ def enabled():
"""
cmd
=
'dcm2niix -h'
minimumVersion
=
(
1
,
0
,
2016
,
9
,
30
)
versionPattern
=
re
.
compile
(
'v'
'(?P<major>[0-9]+)\.'
'(?P<minor>[0-9]+)\.'
...
...
@@ -145,7 +148,7 @@ def enabled():
# make sure installed version
# is equal to or newer than
# minimum required version
for
iv
,
mv
in
zip
(
installedVersion
,
minimumVersion
):
for
iv
,
mv
in
zip
(
installedVersion
,
MIN_DCM2NIIX_VERSION
):
if
iv
>
mv
:
return
True
elif
iv
<
mv
:
return
False
...
...
@@ -225,7 +228,7 @@ def loadSeries(series):
dcmdir
=
series
[
'DicomDir'
]
snum
=
series
[
'SeriesNumber'
]
desc
=
series
[
'SeriesDescription'
]
cmd
=
'dcm2niix -b n -f %s -z n -o . {}'
.
format
(
dcmdir
)
cmd
=
'dcm2niix -b n -f %s -z n -o .
-n {}
{}'
.
format
(
snum
,
dcmdir
)
with
tempdir
.
tempdir
()
as
td
:
...
...
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