pub fn extract_csf(
r2s: &[f64],
mask: &[u8],
grid: &Grid,
r2s_threshold: f64,
erode: bool,
) -> Vec<u8> ⓘExpand description
extract_CSF.m (MEDI toolbox 2024.11.26): the ventricular CSF mask for MEDI+0.
Low-R2* voxels (r2s < r2s_threshold) form 6-connected regions twice: inside a 30 mm sphere
at the mask’s centroid, and inside the mask (eroded first, when erode, to where the 10 mm
SMV.m of the mask exceeds 0.999). The CSF mask is every region of the second kind that
touches one of the three largest regions of the first kind. extract_CSF.m errors when
there are fewer than three central regions; this uses those there are.
§Arguments
r2s- R2* in Hz (arlo.m,arlo)mask- Brain mask, 1 = braingrid- Volume grid (dimensions and voxel sizes in mm)r2s_threshold-thresh_R2s(default 5 Hz)erode-flag_erode(default on)
§Returns
The CSF mask, 1 = CSF