Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: adding Philips XML/REC support #683

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add XMLRECImage support to imageclasses.py
grlee77 committed Oct 18, 2018

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 1ff1826ae45254b5b867675fa2bbe8e78e5a0312
11 changes: 9 additions & 2 deletions nibabel/imageclasses.py
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
from .nifti1 import Nifti1Pair, Nifti1Image
from .nifti2 import Nifti2Pair, Nifti2Image
from .parrec import PARRECImage
from .xmlrec import XMLRECImage
from .spm99analyze import Spm99AnalyzeImage
from .spm2analyze import Spm2AnalyzeImage
from .volumeutils import Recoder
@@ -32,7 +33,7 @@
Cifti2Image, Nifti2Image, # Cifti2 before Nifti2
Spm2AnalyzeImage, Spm99AnalyzeImage, AnalyzeImage,
Minc1Image, Minc2Image, MGHImage,
PARRECImage, GiftiImage, AFNIImage]
PARRECImage, XMLRECImage, GiftiImage, AFNIImage]


# DEPRECATED: mapping of names to classes and class functionality
@@ -90,6 +91,11 @@ def __getitem__(self, *args, **kwargs):
'has_affine': True,
'makeable': False,
'rw': False},
xml={'class': XMLRECImage,
'ext': '.xml',
'has_affine': True,
'makeable': False,
'rw': False},
afni={'class': AFNIImage,
'ext': '.brik',
'has_affine': True,
@@ -113,6 +119,7 @@ def __getitem__(self, *args, **kwargs):
('mgh', '.mgh'),
('mgz', '.mgz'),
('par', '.par'),
('xml', '.xml'),
('brik', '.brik')
))

@@ -121,7 +128,7 @@ def __getitem__(self, *args, **kwargs):
# here.
KNOWN_SPATIAL_FIRST = (Nifti1Pair, Nifti1Image, Nifti2Pair, Nifti2Image,
Spm2AnalyzeImage, Spm99AnalyzeImage, AnalyzeImage,
MGHImage, PARRECImage, AFNIImage)
MGHImage, PARRECImage, XMLRECImage, AFNIImage)


def spatial_axes_first(img):