mvpa2.datasets.gifti.map2gifti

mvpa2.datasets.gifti.map2gifti(ds, filename=None, encoding='GIFTI_ENCODING_B64GZ', surface=None)

Maps data(sets) into a GiftiImage, and optionally saves it to disc.

Parameters:

ds : AttrDataset or numpy.ndarray

The data to be mapepd

filename : basestring or None, optional

Filename to which the GiftiImage is stored

encoding : “ASCII” or “Base64Binary” or “GZipBase64Binary”, optional

Encoding format of data

surface : mvpa2.surf.nibabel.surf.Surface or str, optional

Optional anatomical Surface object, or filename of anatomical surface file, to be stored together with the data. This should allow FreeSurfer’s mris_convert to read files written by this function

Returns:

img : GiftiImage

dataset contents represented in GiftiImage