Skip to content
Synapse-aware skeleton generation for neural circuits
C++ Python C
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
connectome Initial commit Aug 5, 2019
data_structures Initial commit Aug 5, 2019
evaluation Initial commit Aug 5, 2019
examples volumetric_somae: updated location Aug 5, 2019
isthmus Initial commit Aug 5, 2019
utilities Initial commit Aug 5, 2019
.gitignore Initial commit Aug 5, 2019
LICENSE README: updated with directions Aug 5, 2019 Initial commit Aug 5, 2019
requirements.txt requirements.txt: added requirements file for easy setup Aug 5, 2019

Synapse-Aware Skeleton Generation

The skeleton benchmark and code for the 2019 MICCAIR paper Synapse-Aware Skeleton Generation for Neural Circuits [1]. For more information:


git clone .
cd synapseaware
conda create -n synapseaware_env python=3.7
conda install --file requirements.txt
cd connectome
python build_ext --inplace
cd ../isthmus 
python build_ext --inplace
cd ../teaser
python build_ext --inplace

Add the parent directory to this repository to your PYTHONPATH variable.

Meta Files

Each new dataset needs a meta file named meta/{PREFIX}.meta where {PREFIX} is a unique identifier for the dataset. All functions in this repository require as input this {PREFIX} identifier to find information such as resolution and grid size. An example meta file is provided in examples/meta/Fib25.meta.

Directory Structure

For each new {PREFIX}, you need to create the following directories:

surfaces/{PREFIX} (optional)
volumetric_somae/segmentations/{PREFIX} (optional)

If the segment does not contain the somae, a central point should be chosen as the soma and be copied to the somae and volumetric_somae/surfaces directories. The algorithm also assumes the following directories:

width-errors (optional)

The script examples/scripts/ creates the intended directory structure.

Example Script

The script examples/scripts/ extracts the skeleton for an example from the FIB-25 dataset publicly available online [2]. A central point was chosen as the soma location since this particular segment does not contain the cell body.

Input Format

All of the point clouds have the format:

unsigned long: Z Grid Size
unsigned long: Y Grid Size
unsigned long: X Grid Size
unsigned long: number of points 
unsigned long *: points in linear index

The file utilities/ contains example input/output operations for this file format. Use the following methods to convert between Cartesian coordinates and the linear index:

# iv is the linear index
# yres is the Y Grid Size
# xres is the X Grid Size
def IndexToIndices(iv):
	iz = iv // (yres * xres)
	iy = (iv - iz * yres * xres) // xres
	ix = iv % xres
	return iz, iy, ix

def IndicesToIndex(ix, iy, iz):
	return iz * yres * xres + iy * xres + ix


[1] Matejek, B., Wei, D., Wang, X., Zhao, J., Palágyi, K., and Pfister, H., Synapse-Aware Skeleton Generation for Neural Circuits. In *International Conference on Medical Image Computing and Computer-Assisted Intervention, pp. YYY-YYY. Springer, Cham, 2019.

[2] Takemura, S.Y., Xu, C.S., Lu, Z., Rivlin, P.K., Parag, T., Olbris, D.J., Plaza, S., Zhao, T., Katz, W.T., Umayam, L. and Weaver, C., 2015. Synaptic circuits and their variations within different columns in the visual system of Drosophila. Proceedings of the National Academy of Sciences, 112(44), pp.13711-13716.

You can’t perform that action at this time.