Skip to main content
Ctrl+K

Coord2Region

  • Install
  • Documentation
  • API Reference
  • Get Help
  • Development Guide
  • GitHub
  • Install
  • Documentation
  • API Reference
  • Get Help
  • Development Guide
  • GitHub

Section Navigation

User Guide

  • Concepts & Workflow
  • Tutorials
    • fMRI coordinate-to-region workflow
    • MEG source localization
    • iEEG electrode localization
  • Examples Gallery
    • High level pipeline
    • Generate a nilearn-based brain image for a coordinate
    • Atlas mapping
    • Activate providers based on available API keys
    • fMRI coordinate-to-region workflow
    • Demonstrate exporting pipeline results to various formats
    • Conditionally enable local HuggingFace text and image models
    • Coordinate to study lookup
    • Mixed output pipeline example
    • Generate images using OpenAI or Anthropic depending on available keys
    • Custom provider: minimal implementation and usage
    • Query multiple FreeSurfer surface atlases with MultiAtlasMapper
    • Batch processing with BatchAtlasMapper using the aparc atlas
    • iEEG electrode localization
    • Query neuroimaging meta-analysis datasets using coord2study
    • Fetch the FreeSurfer aparc atlas and explore it with AtlasMapper
    • Use MultiAtlasMapper to query multiple atlases simultaneously
    • Fetching atlases
    • Demonstrate provider selection, retries, and caching
    • Basic usage of AtlasMapper
    • Demonstrate dataset caching with prepare_datasets()
    • Fetch the Harvard-Oxford atlas and explore it with AtlasMapper
    • End-to-end pipeline for multi-atlas coordinate querying
    • Batch processing with BatchAtlasMapper
    • MEG source localization
    • Generate an AI image and a deterministic Nilearn reference for a coordinate.
    • Build a structured reasoned report with narrative and machine-readable JSON.
    • Generate an atlas-aware summary for a coordinate using Coord2Region.
  • Supported Atlases
  • AI Provider Configuration

Operational Interfaces

  • CLI Tools
  • Web Interface
  • Pipeline Architecture
  • Glossary

Project Metadata

  • Design & Implementation
  • How to Cite
  • Changelog
  • Contributors
  • Code of Conduct
  • Documentation
  • Examples Gallery

Examples Gallery#

When you have a focused question—“How do I call this provider?” or “How can I dump outputs as CSV?”—browse the gallery below. Each card is a runnable recipe showing the exact CLI flags or Python calls needed for a specific task.

Anatomical Mapping#

Basic recipes for querying atlases. These examples demonstrate how to retrieve labels from standard atlases (Harvard-Oxford, AAL) and FreeSurfer parcellations.

Standard Atlases

Examples using one of multiple objects#

Basic usage of AtlasMapper

Basic usage of AtlasMapper

Fetch the Harvard-Oxford atlas and explore it with AtlasMapper

Fetch the Harvard-Oxford atlas and explore it with AtlasMapper

Batch processing with BatchAtlasMapper

Batch processing with BatchAtlasMapper

Use MultiAtlasMapper to query multiple atlases simultaneously

Use MultiAtlasMapper to query multiple atlases simultaneously

Atlas mapping

Atlas mapping

FreeSurfer & Surface

Examples using one of multiple objects#

Fetch the FreeSurfer aparc atlas and explore it with AtlasMapper

Fetch the FreeSurfer aparc atlas and explore it with AtlasMapper

Batch processing with BatchAtlasMapper using the aparc atlas

Batch processing with BatchAtlasMapper using the aparc atlas

Query multiple FreeSurfer surface atlases with MultiAtlasMapper

Query multiple FreeSurfer surface atlases with MultiAtlasMapper

Literature & AI Integration#

Examples that query external providers. These scripts mix local atlas data with Neurosynth/NeuroQuery lookups and Generative AI summaries.

Examples using one of multiple objects#

Custom provider: minimal implementation and usage

Custom provider: minimal implementation and usage

Generate images using OpenAI or Anthropic depending on available keys

Generate images using OpenAI or Anthropic depending on available keys

Query neuroimaging meta-analysis datasets using coord2study

Query neuroimaging meta-analysis datasets using coord2study

End-to-end pipeline for multi-atlas coordinate querying

End-to-end pipeline for multi-atlas coordinate querying

Demonstrate provider selection, retries, and caching

Demonstrate provider selection, retries, and caching

Coordinate to study lookup

Coordinate to study lookup

Advanced Configuration#

Deep dives into caching, conditional execution, backend switching, and formatting outputs.

Examples using one of multiple objects#

Conditionally enable local HuggingFace text and image models

Conditionally enable local HuggingFace text and image models

Generate a nilearn-based brain image for a coordinate

Generate a nilearn-based brain image for a coordinate

Demonstrate dataset caching with prepare_datasets()

Demonstrate dataset caching with prepare_datasets

Activate providers based on available API keys

Activate providers based on available API keys

Demonstrate exporting pipeline results to various formats

Demonstrate exporting pipeline results to various formats

Fetching atlases

Fetching atlases

End-to-End Workflows#

Complete pipelines integrating multiple components.

Examples using one of multiple objects#

Mixed output pipeline example

Mixed output pipeline example

fMRI coordinate-to-region workflow

fMRI coordinate-to-region workflow

iEEG electrode localization

iEEG electrode localization

MEG source localization

MEG source localization

High level pipeline

High level pipeline

Data Management#

Download Requirements

Some examples require datasets to be present locally. Coord2Region tries to fetch these automatically, but you can also manage them manually.

Electrophysiology Datasets (MNE)

Examples using MNE (MEG/iEEG) rely on the sample and epilepsy_ecog datasets.

import mne

# Downloads to ~/mne_data by default
mne.datasets.sample.data_path()
mne.datasets.epilepsy_ecog.data_path()

Literature Datasets (NiMARE/Neurosynth)

Coordinate-to-study lookups require cached database files. Use the helper function to pre-fetch them:

from coord2region.coord2study import fetch_datasets

# Downloads to ~/.coord2region_examples
fetch_datasets(data_dir="~/.coord2region_examples", sources=["neurosynth"])

High level pipeline

High level pipeline

Generate a nilearn-based brain image for a coordinate

Generate a nilearn-based brain image for a coordinate

Atlas mapping

Atlas mapping

Activate providers based on available API keys

Activate providers based on available API keys

fMRI coordinate-to-region workflow

fMRI coordinate-to-region workflow

Demonstrate exporting pipeline results to various formats

Demonstrate exporting pipeline results to various formats

Conditionally enable local HuggingFace text and image models

Conditionally enable local HuggingFace text and image models

Coordinate to study lookup

Coordinate to study lookup

Mixed output pipeline example

Mixed output pipeline example

Generate images using OpenAI or Anthropic depending on available keys

Generate images using OpenAI or Anthropic depending on available keys

Custom provider: minimal implementation and usage

Custom provider: minimal implementation and usage

Query multiple FreeSurfer surface atlases with MultiAtlasMapper

Query multiple FreeSurfer surface atlases with MultiAtlasMapper

Batch processing with BatchAtlasMapper using the aparc atlas

Batch processing with BatchAtlasMapper using the aparc atlas

iEEG electrode localization

iEEG electrode localization

Query neuroimaging meta-analysis datasets using coord2study

Query neuroimaging meta-analysis datasets using coord2study

Fetch the FreeSurfer aparc atlas and explore it with AtlasMapper

Fetch the FreeSurfer aparc atlas and explore it with AtlasMapper

Use MultiAtlasMapper to query multiple atlases simultaneously

Use MultiAtlasMapper to query multiple atlases simultaneously

Fetching atlases

Fetching atlases

Demonstrate provider selection, retries, and caching

Demonstrate provider selection, retries, and caching

Basic usage of AtlasMapper

Basic usage of AtlasMapper

Demonstrate dataset caching with prepare_datasets()

Demonstrate dataset caching with prepare_datasets

Fetch the Harvard-Oxford atlas and explore it with AtlasMapper

Fetch the Harvard-Oxford atlas and explore it with AtlasMapper

End-to-end pipeline for multi-atlas coordinate querying

End-to-end pipeline for multi-atlas coordinate querying

Batch processing with BatchAtlasMapper

Batch processing with BatchAtlasMapper

MEG source localization

MEG source localization

Generate an AI image and a deterministic Nilearn reference for a coordinate.

Generate an AI image and a deterministic Nilearn reference for a coordinate.

Build a structured reasoned report with narrative and machine-readable JSON.

Build a structured reasoned report with narrative and machine-readable JSON.

Generate an atlas-aware summary for a coordinate using Coord2Region.

Generate an atlas-aware summary for a coordinate using Coord2Region.

Download all examples in Python source code: auto_examples_python.zip

Download all examples in Jupyter notebooks: auto_examples_jupyter.zip

Gallery generated by Sphinx-Gallery

previous

iEEG electrode localization

next

High level pipeline

© Copyright 2025-2026, coord2region developers. Last updated 2026-05-09.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.17.1.