Skip to main content

Module vasculature

Module vasculature 

Source
Expand description

Vasculature Mask Generation for QSMART

This module generates a binary mask identifying blood vessels in the brain. The vasculature mask is used in QSMARTโ€™s two-stage processing to separate tissue from vessel regions, reducing streaking artifacts near veins.

The algorithm:

  1. Apply morphological bottom-hat filtering to enhance dark tubular structures
  2. Apply Frangi vesselness filter to detect vessels
  3. Threshold: vesselness above 0.2% of maximum = vessel (noise floor filtering)
  4. Return complementary mask (1 = tissue, 0 = vessel)

Structsยง

SphereKernel ๐Ÿ”’
Spherical structuring element with pre-computed linear offsets for fast access
VasculatureParams
Parameters for vasculature mask generation

Functionsยง

dilate_grayscale_optimized ๐Ÿ”’
Optimized grayscale dilation with spherical structuring element Uses pre-computed linear offsets and separates interior from boundary processing
erode_grayscale_optimized ๐Ÿ”’
Optimized grayscale erosion with spherical structuring element
generate_vasculature_mask
Generate vasculature mask from magnitude image
generate_vasculature_mask_default
Simple wrapper with default parameters
generate_vasculature_mask_with_progress
Generate vasculature mask with progress callback
morphological_bottom_hat ๐Ÿ”’
Morphological bottom-hat filter (closing - original)