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
cd8ba60e
Commit
cd8ba60e
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
looksLikeMGHImage is not a very useful function.
parent
78c7a59a
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/mghimage.py
+9
-17
9 additions, 17 deletions
fsl/data/mghimage.py
with
9 additions
and
17 deletions
fsl/data/mghimage.py
+
9
−
17
View file @
cd8ba60e
...
@@ -21,6 +21,15 @@ import nibabel as nib
...
@@ -21,6 +21,15 @@ import nibabel as nib
import
fsl.data.image
as
fslimage
import
fsl.data.image
as
fslimage
ALLOWED_EXTENSIONS
=
[
'
.mgz
'
,
'
.mgh
'
]
"""
List of file extensions interpreted as MGH image files.
"""
EXTENSION_DESCRIPTIONS
=
[
'
Compressed MGH image
'
,
'
MGH image
'
]
"""
A description for each of the :attr:`ALLOWED_EXTENSIONS`.
"""
class
MGHImage
(
fslimage
.
Image
):
class
MGHImage
(
fslimage
.
Image
):
"""
The ``MGHImage`` class is a NIFTI :class:`Image` which has been converted
"""
The ``MGHImage`` class is a NIFTI :class:`Image` which has been converted
from a Freesurfer ``.mgh`` file.
from a Freesurfer ``.mgh`` file.
...
@@ -60,20 +69,3 @@ class MGHImage(fslimage.Image):
...
@@ -60,20 +69,3 @@ class MGHImage(fslimage.Image):
name. Otherwise returns ``None``.
name. Otherwise returns ``None``.
"""
"""
return
self
.
getMeta
(
'
mghImageFile
'
,
None
)
return
self
.
getMeta
(
'
mghImageFile
'
,
None
)
ALLOWED_EXTENSIONS
=
[
'
.mgz
'
,
'
.mgh
'
]
"""
List of file extensions interpreted as MGH image files.
"""
EXTENSION_DESCRIPTIONS
=
[
'
Compressed MGH image
'
,
'
MGH image
'
]
"""
A description for each of the :attr:`ALLOWED_EXTENSIONS`.
"""
def
looksLikeMGHImage
(
filename
):
"""
Returns ``True`` if the given file looks like a MGH image, ``False``
otherwise.
"""
return
fslimage
.
looksLikeImage
(
filename
,
ALLOWED_EXTENSIONS
)
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