Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Michiel Cottaar
fslpy
Commits
a5d02f56
Commit
a5d02f56
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
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
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/data/dicom.py
+6
-3
6 additions, 3 deletions
fsl/data/dicom.py
with
6 additions
and
3 deletions
fsl/data/dicom.py
+
6
−
3
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
:
...
...
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