PyTube: Python-Based Tube Tracing of 3D Neuronal Morphology

SUMMARY: Reconstruction of neuronal morphology from three-dimensional (3D) microscopy images is essential for quantitative neuroanatomical analysis. Tube fitting is a useful strategy to model neuron reconstruction, however existing implementations such as NeuTube can be difficult to deploy in various applications. Here, we present PyTube, an open-source Python-based tube-fitting software package for automated reconstruction of neuronal morphology from 3D fluorescence microscopy volumes. PyTube provides a modular framework spanning image preprocessing, seed initialization, iterative tracing, graph-based chain connection, and morphology postprocessing, with performance-critical components implemented in Cython. In addition to single-volume execution, the package supports batch tracing, intermediate diagnostic outputs, and SWC export for downstream analysis. Evaluation on 1,512 AIBS/SEU-ALLEN mouse-brain image volumes and 163-image Gold166 benchmark showed that PyTube and NeuTube achieved comparable aggregate reconstruction accuracy and topology-aware DIADEM scores against manual reconstructions on both datasets. Median runtime was 18.5% lower for PyTube on AIBS/SEU-ALLEN and 16.9% lower on Gold166. PyTube also supports scripted and batch-oriented execution. AVAILABILITY: PyTube is implemented in Python and Cython and released under the BSD 3-Clause License. Source code, documentation, and installation instructions are available at the project GitHub repository: https://github.com/YunZhixi98/PyTube. This study utilized the release version 0.1.0 with the commit hash 32d1c7bf67bf50a42171c4829a2332dabb6e072a. The exact AIBS/SEU-ALLEN image blocks, corresponding manual reconstructions, and benchmark scripts used in this study are archived at Zenodo (10.5281/zenodo.22664836). The underlying fMOST imaging data and single-neuron reconstructions reported by Peng et al. (2021) are also publicly available through the Brain Image Library. The Gold166 benchmark dataset used for the independent evaluation is publicly available through Zenodo (DOI: 10.5281/zenodo.168168). For the comparative results generated with neuTube, we used the NeuTube plugin distributed with the Vaa3D tools repository at commit 475e4ca92d4e51de10f1c05d80cef6615432c087, available at https://github.com/Vaa3D/vaa3d_tools/tree/475e4ca92d4e51de10f1c05d80cef6615432c087/released_plugins/v3d_plugins/bigneuron_ting_neutube. The corresponding plugin documentation provides the NeuTube source archive at https://www.dropbox.com/s/g2alfleyp6d9dfc/NeuTu.zip. SUPPLEMENTARY INFORMATION: Supplementary data are available at Bioinformatics online.

Authors

Institutions

Publication Details

Journal
Bioinformatics
Published
2026-11-30
DOI
https://doi.org/10.1093/bioinformatics/btag900
Primary Topic
Cell Image Analysis Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

PyTube: Python-Based Tube Tracing of 3D Neuronal Morphology

Zhixi Yun, Yufeng Liu, Kangxu Fan, Hanchuan Peng
Bioinformatics
Cell Image Analysis Techniques
article

PyTube: Python-Based Tube Tracing of 3D Neuronal Morphology

Zhixi Yun, Yufeng Liu, Kangxu Fan, Hanchuan Peng
article en

Abstract

SUMMARY: Reconstruction of neuronal morphology from three-dimensional (3D) microscopy images is essential for quantitative neuroanatomical analysis. Tube fitting is a useful strategy to model neuron reconstruction, however existing implementations such as NeuTube can be difficult to deploy in various applications. Here, we present PyTube, an open-source Python-based tube-fitting software package for automated reconstruction of neuronal morphology from 3D fluorescence microscopy volumes. PyTube provides a modular framework spanning image preprocessing, seed initialization, iterative tracing, graph-based chain connection, and morphology postprocessing, with performance-critical components implemented in Cython. In addition to single-volume execution, the package supports batch tracing, intermediate diagnostic outputs, and SWC export for downstream analysis. Evaluation on 1,512 AIBS/SEU-ALLEN mouse-brain image volumes and 163-image Gold166 benchmark showed that PyTube and NeuTube achieved comparable aggregate reconstruction accuracy and topology-aware DIADEM scores against manual reconstructions on both datasets. Median runtime was 18.5% lower for PyTube on AIBS/SEU-ALLEN and 16.9% lower on Gold166. PyTube also supports scripted and batch-oriented execution. AVAILABILITY: PyTube is implemented in Python and Cython and released under the BSD 3-Clause License. Source code, documentation, and installation instructions are available at the project GitHub repository: https://github.com/YunZhixi98/PyTube. This study utilized the release version 0.1.0 with the commit hash 32d1c7bf67bf50a42171c4829a2332dabb6e072a. The exact AIBS/SEU-ALLEN image blocks, corresponding manual reconstructions, and benchmark scripts used in this study are archived at Zenodo (10.5281/zenodo.22664836). The underlying fMOST imaging data and single-neuron reconstructions reported by Peng et al. (2021) are also publicly available through the Brain Image Library. The Gold166 benchmark dataset used for the independent evaluation is publicly available through Zenodo (DOI: 10.5281/zenodo.168168). For the comparative results generated with neuTube, we used the NeuTube plugin distributed with the Vaa3D tools repository at commit 475e4ca92d4e51de10f1c05d80cef6615432c087, available at https://github.com/Vaa3D/vaa3d_tools/tree/475e4ca92d4e51de10f1c05d80cef6615432c087/released_plugins/v3d_plugins/bigneuron_ting_neutube. The corresponding plugin documentation provides the NeuTube source archive at https://www.dropbox.com/s/g2alfleyp6d9dfc/NeuTu.zip. SUPPLEMENTARY INFORMATION: Supplementary data are available at Bioinformatics online.

Bioinformatics
Fudan University (CN), Shanghai Innovation Institute (CN), Southeast University (CN)
Cell Image Analysis Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon