chcomin / pyvane

Python Vascular Network Analysis
Other
22 stars 5 forks source link

Python Vascular Network Analysis

Example

Python Vascular Network Analysis (PyVaNe) is a framework for analysing blood vessel digital images. This includes the segmentation, representation and characterization of blood vessels. The framework identifies 2D and 3D vascular systems and represent them using graphs. The graphs describe the topology of the blood vessels, that is, bifurcations and terminations are represented as nodes and two nodes are connected if there is a blood vessel segment between them.

Functions are provided for measuring blood vessel density, number of bifurcation points and tortuosity, but other metrics can be implemented. The created graphs are objects from the Networkx libray.

PyVaNe has been used in the following publications:

3D Blood Vessel Image

The library works for 2D and 3D blood vessel images but the focus of the library lies on 3D confocal microscopy images, such as this one:

Segmentation

File segmentation.py contains the segmentation routines, aimed at classifying pixels into two categories: blood vessel or background. The image below is a sum projection of a 3D binary image.

Medial Lines

File skeleton.py contains a skeletonization function implemented in C and interfaced using ctypes for calculating the medial lines of the blood vessels. This function was compiled for Linux.

Blood Vessel Reconstruction

Having the binary image and the medial lines, a model of the blood vessels surface can be generated:

Graph Generation and Adjustment

Files inside the graph folder are responsible for creating the graph and removing some artifacts such as small branches generated from the skeleton calculation.

Measurements

Functions inside measure.py implement some basic blood vessel measurmeents.

Whole Pipeline

The notebook default_pipeline.ipynb contains an example pipeline for applying all the functionalities.

Dependencies (version)

Warning, the skeletonization functions only work on Linux.