fsl.data.mghimage
¶
This module provides the MGHImage
class, which can be used to load
Freesurfer mgh
/mgz
image files.
-
fsl.data.mghimage.
ALLOWED_EXTENSIONS
= ['.mgz', '.mgh']¶ List of file extensions interpreted as MGH image files.
-
fsl.data.mghimage.
EXTENSION_DESCRIPTIONS
= ['Compressed MGH image', 'MGH image']¶ A description for each of the
ALLOWED_EXTENSIONS
.
-
class
fsl.data.mghimage.
MGHImage
(image, *args, **kwargs)¶ Bases:
fsl.data.image.Image
The
MGHImage
class is a NIFTIImage
which has been converted from a Freesurfer.mgh
file.- See:
-
save
(filename=None)¶ Overrides
Image.save()
. If afilename
is not provided, converts the original (MGH) file name into a NIFTI filename, before passing it to theImage.save()
method.
-
property
mghImageFile
¶ If this
MGHImage
was loaded from a file, returns the file name. Otherwise returnsNone
.
-
property
voxToSurfMat
¶ Returns an affine which can be used to transform voxel coordinates into the surface coordinate system for this image.
See: http://www.grahamwideman.com/gw/brain/fs/coords/fscoords.htm See: https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems
-
property
surfToVoxMat
¶ Returns an affine which can be used to transform surface coordinates into the voxel coordinate system for this image.
-
property
surfToWorldMat
¶ Returns an affine which can be used to transform surface coordinates into the world coordinate system for this image.
-
property
worldToSurfMat
¶ Returns an affine which can be used to transform world coordinates into the surface coordinate system for this image.