A Python package for analyzing 3D vascular structures from segmentations
In general, the analysis pipeline aims to convert segmented 3d vascular structures into statistics, with the following 3 steps:
-
Binary (segmentation) to preliminary skeleton
-
Preliminary skeleton to network representation (including network pruning)
-
Extract statistics
You can run analysis like run_vessel_analysis --config ./example_configs/example.yaml.
Or, you can do this analysis in other functions by calling the processing pipeline
from vessel_analysis_3d.processing_pipeline import Pipeline3D
from skimage.morphology import skeletonize
import numpy as np
# Suppose SEG is the segmentation
# get preliminary skeleton
SKL = skeletonize(SEG > 0, method="lee")
SKL = SKL.astype(np.uint8)
SKL[SKL > 0] = 1
# Support PARAMS contains all parameters
skl_final, brPts, endPts, reports = Pipeline3D.process_one_file(SEG, SKL, PARAMS)
# skl_final is your final skeleton
# brPts and endPts are two lists for the positions of branch points and end points
# reports contain three pandas DataFrames ready for plottingBefore starting, we recommend to create a new conda environment or a virtual environment with Python 3.10+.
conda create -y -n 3danalysis -c conda-forge python=3.11
conda activate 3danalysisStable Release: pip install vessel_analysis_3d
(not released yet)
Development Head: pip install git+https://github.com/MMV-Lab/vessel_analysis_3d.git
For full package documentation please visit MMV-Lab.github.io/vessel_analysis_3d.
See CONTRIBUTING.md for information related to developing the code.
MIT license