NiBabel

Access a cacophony of neuro-imaging file formats

Previous topic

nibabel.gifti.gifti.loadImage

Next topic

nibabel.gifti.gifti.GiftiCoordSystem

Reggie -- the one

nibabel.gifti.gifti.saveImage

nibabel.gifti.gifti.saveImage(image, filename)

Save the current image to a new file

If the image was created using array data (not loaded from a file) one has to specify a filename

Note that the Gifti spec suggests using the following suffixes to your filename when saving each specific type of data:

.gii
Generic GIFTI File
.coord.gii
Coordinates
.func.gii
Functional
.label.gii
Labels
.rgba.gii
RGB or RGBA
.shape.gii
Shape
.surf.gii
Surface
.tensor.gii
Tensors
.time.gii
Time Series
.topo.gii
Topology