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.


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 : 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


img : GiftiImage

dataset contents represented in GiftiImage