Published October 19, 2025 | Version 1.0

Code repository of the paper "Semi-automatic annotation of brain vessels in magnetic resonance angiography images"

  • 1. Institute of Artificial Intelligence, Lomonosov Moscow State University
  • 2. Laboratory of Analysis of Semantics, Center for Language and Semantics Technologies, Faculty of Computer Science, HSE University
  • 3. Neurosputnik LLC
  • 4. ROR icon Lomonosov Moscow State University
  • 5. Rebis LLC

Description

 

Brain MRA Vessel Annotation Analysis

Description

This repository contains the complete code package for the manuscript "Semi-automatic annotation of brain vessels in magnetic resonance angiography images". The package provides modular tools for brain vessel segmentation, clustering, and quality assessment in 3D TOF-MRA images.

Key Features

  • Multi-scale Frangi filtering for preliminary vessel segmentation with GPU acceleration
  • Intensity histogram clustering using Ward's hierarchical clustering for dataset homogenization
  • Signal-to-noise analysis with comprehensive quality metrics (SNR, CNR, CV, eCNR)
  • Skull stripping utilities for brain mask generation and extracranial vessel removal
  • Demographic correlation analysis linking image clusters with patient characteristics

Repository Structure

  • Frangi/: PyTorch-based Frangi filter implementation with parameter optimization
    • Implements multi-scale vessel enhancement using Hessian eigenvalues
    • Includes GPU-accelerated computation with CUDA support
    • Provides parameter optimization tools for different vessel sizes
    • Generates preliminary vessel masks for expert annotation refinement
    • Essential for automated vessel detection in 3D MRA volumes
  • Clusterization/: Hierarchical clustering of MRA volumes by intensity statistics
    • Performs unsupervised grouping of MRA images based on intensity histograms
    • Uses Ward's hierarchical clustering to identify homogeneous image subsets
    • Correlates image clusters with demographic characteristics (age, sex, ethnicity)
    • Critical for dataset quality control and bias reduction in vessel annotation
  • SNRAnalysis/: Technical validation metrics and quality assessment tools
    • Computes comprehensive image quality metrics (SNR, CNR, CV, eCNR)
    • Provides statistical analysis of vessel segmentation quality
    • Generates validation reports and quality control visualizations
    • Enables comparison between different scanners and acquisition protocols
    • Essential for technical validation of the annotation pipeline
  • SkullStripping/: FreeSurfer-based brain mask generation and skull removal
    • Implements automated skull stripping using FreeSurfer's mri_synthstrip
    • Generates brain masks to exclude extracranial vessels from analysis
    • Ensures focus on intracranial vasculature for accurate vessel segmentation

Technical Details

- Language: Python 3.9+
- Dependencies: PyTorch, TorchIO, NumPy, SciPy, scikit-learn, FreeSurfer
- GPU Support: CUDA acceleration for Frangi filtering
- Data Format: NIfTI medical imaging format
- Dataset: Compatible with IXI-MRA dataset

Citation

If you use this code or results, please cite the original annotated dataset and paper:
1. Bernadotte, A., Elfimov, N., & Menshikov, I. (2025). Brain Vessel Annotated Dataset from IXI-MRA Dataset (1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.17393202
2. Bernadotte, A., Elfimov, N., & Menshikov, I. (2025). Semi-automatic annotation of brain vessels in magnetic resonance angiography images

License

The source code in this repository is licensed under the Creative Commons Attribution 4.0 International.

This repository does not contain any original IXI images or preprocessed MRA image volumes. The TOF-MRA images used in the manuscript were obtained from the IXI Dataset (Imperial College London): https://brain-development.org/ixi-dataset/. The original IXI data are released under the **CC BY-SA 3.0** license: https://creativecommons.org/licenses/by-sa/3.0/

Files

paper_code.zip

Files (11.1 MB)

Name Size
md5:d1ee2832142d99bd6c96fb3f34d6da0e
11.1 MB Preview Download

Additional details

Software

Programming language
Python

References