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
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
Branches containing commit
No related tags found
Tags containing commit
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
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
):
"""
The ``MGHImage`` class is a NIFTI :class:`Image` which has been converted
from a Freesurfer ``.mgh`` file.
...
...
@@ -60,20 +69,3 @@ class MGHImage(fslimage.Image):
name. Otherwise returns ``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