Agent-driven registration of histological brain sections to BrainGlobe atlases.
Sections: Allen Mouse Brain Connectivity Atlas, Allen Institute for Brain Science (connectivity.brain-map.org).
LangSlice registers a stack of histology sections to a
BrainGlobe atlas, inside the AI app you already use:
Coronal sections of the Allen mouse atlas are the most tested case.
Install
Option 1: Tell your agent to install it (recommended)
Open your app (the Code tab in the Claude desktop app, Codex in the
ChatGPT desktop app, or a new conversation in Antigravity) and send:
I want to install LangSlice. Read this and follow the steps: https://raw.githubusercontent.com/greenpolo/LangSlice/main/docs/agents/install.md
On Windows, the Claude desktop app's Code tab needs
Git for Windows first.
Option 2: Install it yourself
1. Create the conda environment. Install
Miniforge if you do not have conda.
Download LangSlice (git clone https://github.com/greenpolo/LangSlice.git, or
download and unzip
the source archive)
into a folder you keep. Open a terminal in that folder (on Windows, Miniforge
Prompt) and run:
conda env create -f environment.yml
On Windows with an NVIDIA GPU, install PyTorch's CUDA build as the
installation guide
shows.
2. Add the LangSlice plugin to your app. The
installation guide
shows where to click in each desktop app, with screenshots. If you also
installed your app's command-line tool (claude, agy or codex), run:
# Claude Code
claude plugin marketplace add greenpolo/LangSlice
claude plugin install langslice@langslice
# Antigravity CLI
agy plugin install https://github.com/greenpolo/LangSlice/tree/main/connectors/antigravity
# Codex CLI
codex plugin marketplace add greenpolo/LangSlice
codex plugin add langslice@langslice
3. Finish in the app. In a new conversation, send Set up LangSlice.,
allow the changes it asks for, then quit the app and open it again.
Register a brain
Put one brain's section images in a folder, start a new conversation in your
app, and say what to register and what you know:
Register the brain in /data/brains/M04. Coronal sections, Allen mouse atlas. The images are 0.65 µm per pixel. The sections are 40 µm thick and every sixth one was kept.
Then check every section's overlay: the agent can be wrong.
Register a brain
covers what to prepare, how to check and correct a result, and the files you
get.
More