Skip to main content

gradient_mask

Function gradient_mask 

Source
pub(crate) fn gradient_mask(
    mag: &[f64],
    mask: &[bool],
    grid: &Grid,
    percentage: f64,
) -> [Vec<f64>; 3]
Expand description

gradient_mask.m (binary mode): 1 where |∇(iMag.*Mask)| is at or below a threshold, per direction, over the whole volume. The threshold starts at 1% of max(iMag) and is scaled by 1.05 or 0.95 until the number of gradient components above it, over the number of voxels in the mask, crosses percentage.