Reference API

neuromaps.datasets - Dataset fetchers

Functions for fetching datasets.

Functions to show all available annotations

available_annotations([source, desc, space, ...])

List datasets available via fetch_annotation().

available_tags([return_restricted])

Return available tags for querying annotations.

Functions to fetch and describe the annotations

fetch_annotation(*[, source, desc, space, ...])

Download files for brain annotations matching requested variables.

describe_annotations(annots[, format])

Return detailed descriptions for annotations as a pandas dataframe.

Functions to fetch the atlases

fetch_atlas(atlas, density[, url, data_dir, ...])

Fetch specified atlas and density.

fetch_civet([density, url, data_dir, verbose])

Fetch CIVET surface atlas.

fetch_fsaverage([density, url, data_dir, ...])

Fetch fsaverage surface atlas.

fetch_fslr([density, url, data_dir, verbose])

Fetch fsLR surface atlas.

fetch_mni152([density, url, data_dir, verbose])

Fetch MNI152 atlas.

fetch_regfusion(atlas[, url, data_dir, verbose])

Fetch regfusion inputs for mapping MNI152 to specified surface atlas.

fetch_all_atlases([data_dir, verbose])

Fetch (and cache) all available atlases.

get_atlas_dir(atlas[, data_dir])

Return filepath to specified atlas.

neuromaps.images - Image and surface handling

Functions for operating on images + surfaces.

Functions to load the images and surfaces

load_gifti(img)

Load gifti file img.

load_nifti(img)

Load nifti file img.

Functions to convert surfaces to GIFTI format

relabel_gifti(parcellation[, background, offset])

Update GIFTI images so label IDs are consecutive across hemispheres.

annot_to_gifti(parcellation[, background])

Convert FreeSurfer-style annotation parcellation files to GIFTI images.

dlabel_to_gifti(parcellation)

Convert CIFTI dlabel file to GIFTI images.

obj_to_gifti(obj[, fn])

Convert CIVET obj surface file to GIFTI format.

fssurf_to_gifti(surf[, fn])

Convert FreeSurfer surf surface file to GIFTI format.

fsmorph_to_gifti(morph[, fn, modifier])

Convert FreeSurfer morph data file to GIFTI format.

Functions to work with surfaces

average_surfaces(*surfs)

Generate average surface from input surfs.

interp_surface(data, src, trg[, method])

Interpolate data on src surface to trg surface.

vertex_areas(surface)

Calculate vertex areas from surface file.

neuromaps.nulls - Null models

Functions for computing null models.

Spatial permutation null models (for surface images only)

alexander_bloch(data[, atlas, density, ...])

Generate null maps from data using method from [SN1].

vazquez_rodriguez(data[, atlas, density, ...])

Generate null maps from data using method from [SN1].

vasa(data[, atlas, density, parcellation, ...])

Generate null maps for parcellated data using method from [SN2].

hungarian(data[, atlas, density, ...])

Generate null maps for parcellated data using the Hungarian method ([SN3]).

baum(data[, atlas, density, parcellation, ...])

Generate null maps for parcellated data using method from [SN4].

cornblath(data[, atlas, density, ...])

Generate null maps for parcellated data using method from [SN5].

Parametric spatial null models (for volumetric and surface images)

burt2018(data[, atlas, density, ...])

Generate null maps for data using method from [SN6].

burt2020(data[, atlas, density, ...])

Generate null maps for data using method from [SN7] and [SN8].

moran(data[, atlas, density, parcellation, ...])

Generate null maps for data using method from [SN9].

neuromaps.parcellate - Parcellation utilities

Functionality for parcellating data.

Parcellater(parcellation, space[, ...])

Class for parcellating arbitrary volumetric / surface data.

neuromaps.plotting - Plotting functions

Functionality for plotting.

plot_surf_template(data, template, density)

Plot data on template surface.

neuromaps.points - Triangle mesh utilities

Functions for working with triangle meshes + surfaces.

make_surf_graph(vertices, faces[, mask])

Construct adjacency graph from surf.

get_surface_distance(surface[, ...])

Calculate surface distance for vertices in surface.

neuromaps.resampling - Resampling workflows

Functions for comparing data.

resample_images(src, trg, src_space, trg_space)

Resample images src and trg to same space/density with resampling method.

neuromaps.stats - Statistical functions

Functions for statistical analyses.

compare_images(src, trg[, metric, ...])

Compare images src and trg.

permtest_metric(a, b[, metric, n_perm, ...])

Generate non-parameteric p-value of a and b for metric.

neuromaps.transforms - Transformations between spaces

Functionality for transforming files between spaces.

Volume-to-surface transformations

mni152_to_civet(img[, civet_density, method])

Project img in MNI152 space to CIVET surface.

mni152_to_fsaverage(img[, fsavg_density, method])

Project img in MNI152 space to fsaverage surface.

mni152_to_fslr(img[, fslr_density, method])

Project img in MNI152 space to fsLR surface.

Volume-to-volume transformations

mni152_to_mni152(img[, target, method])

Resample img to target image (if supplied) or target resolution.

Surface-to-surface transformations

civet_to_fslr(data[, target_density, hemi, ...])

Resample data on CIVET surface to the fsLR surface.

fslr_to_civet(data[, target_density, hemi, ...])

Resample data on fsLR surface to the CIVET surface.

civet_to_fsaverage(data[, target_density, ...])

Resample data on CIVET surface to the fsaverage surface.

fsaverage_to_civet(data[, target_density, ...])

Resample data on fsaverage surface to the CIVET surface.

civet_to_civet(data[, target_density, hemi, ...])

Resample data on CIVET surface to new density.

fslr_to_fsaverage(data[, target_density, ...])

Resample data on fsLR surface to the fsaverage surface.

fsaverage_to_fslr(data[, target_density, ...])

Resample data on fsaverage surface to the fsLR surface.

fslr_to_fslr(data[, target_density, hemi, ...])

Resample data on fsLR surface to new density.

fsaverage_to_fsaverage(data[, ...])

Resample data on fsaverage surface to new density.