Interferometric ultra-high resolution 3D imaging through brain sections
Project page · Download toolbox · Software instruction · Supplementary analysis
4Pi-BRAINSPOT is a MATLAB toolbox for interferometric ultra-high resolution 3D imaging through brain sections. It reconstructs nanoscale 3D molecular information from 4Pi single-molecule switching nanoscopy datasets by combining in situ coherent PSF retrieval, dynamic interferometric correction, GPU localization, drift correction, and volume visualization.
The project page hosts the article links and supplementary movies: http://4pi-brainspot.xulab.cc/
| Capability | Purpose |
|---|---|
| Four-channel import | Load p1, s2, p2, and s1 interferometric image stacks with camera metadata. |
| Channel alignment | Register detection paths using affine transforms or fresh calibration data. |
| In situ 4Pi PSF retrieval | Recover sample-aware coherent PSF models directly from molecular datasets. |
| Dynamic model update | Estimate cavity phase shifts and objective-misalignment changes over time. |
| CUDA localization | Run pupil-based 3D localization with GPU acceleration. |
| Post-processing | Perform rejection, 3D drift correction, volume alignment, and axial color display. |
- Achieves sub-15 nm 3D molecular resolution in thick brain sections.
- Enables 3D imaging in 50 um mouse brain slices with tissue clearing and light-sheet illumination.
- Achieves 6.4 nm lateral and 2.9 nm axial localization precision.
- Integrates in situ coherent PSF retrieval, dynamic model correction, GPU localization, and 3D visualization in the 4Pi-BRAINSPOT workflow.
4Pi-BRAINSPOT toolbox/ MATLAB GUI and reconstruction workflow
Support/ Helper functions, PSF toolbox, SR/sCMOS utilities
Data_4pi/ Demo data and calibration files
4Pi-BRAINSPOT Supplementary analysis/
Companion analysis scripts and instruction PDF
docs/ GitHub Pages site and supplementary videos
- Windows 7 or later, 64-bit.
- MATLAB R2019b, 64-bit.
- CUDA 7.5 compatible graphics driver for GPU-based localization.
- A CUDA-capable GPU is required for the localization module.
- Download or clone this repository.
- Open MATLAB and switch to the repository folder.
- Open
4Pi-BRAINSPOT toolbox/main.m. - Confirm that the support path points to the
Supportfolder. - Run
main.mto launch the GUI.
- Setup - Configure pixel size, NA, refractive indices, camera gain/offset, and optional sCMOS calibration.
- Data Import - Import four detection-channel stacks and optionally apply temporal median background subtraction.
- Channel Alignment - Align channels with calculated or imported affine transforms.
- 4Pi PSF Segmentation - Crop isolated molecular sub-regions for PSF model construction.
- In Situ PSF Retrieval - Estimate pupil magnitude, pupil phase, Zernike coefficients, and retrieved 4Pi PSFs.
- Dynamic Model Update - Correct time-varying cavity phase and objective mismatch.
- 4Pi Localization - Run GPU localization, quality rejection, drift correction, and volume alignment.
- Display - Render x-y views with molecules color-coded by axial position.
The Data_4pi folder includes a compact demonstration dataset:
rawData_4Pi.mat- sample 4Pi single-molecule dataset.config_4Pi.mat- general setting parameters.tform_all.mat- alignment calibration file.sCMOS_calibration_4Pi.mat- sCMOS calibration parameters.recon4Pi.mat- sample reconstruction result.
If this toolbox supports your work, please cite:
Hao-Cheng Gao, Fan Xu, Xi Cheng, Tailong Chen, Cheng Bi, Yue Zheng, Yilun Li, Yumian Li, Alexander A. Chubykin, and Fang Huang. Interferometric ultra-high resolution 3D imaging through brain sections. Nature Communications (2026). https://doi.org/10.1038/s41467-026-71614-6
This software is developed as companion code for the 4Pi-BRAINSPOT study.
- Purdue University
- Beijing Institute of Technology
- Correspondence: Fan Xu, Alexander A. Chubykin, Fang Huang
