Expand description
Bias field correction (homogeneity correction)
Implements the makehomogeneous algorithm for correcting RF receive field inhomogeneities. This uses the “boxsegment” approach with box filter Gaussian approximation.
Reference: Eckstein, K., Trattnig, S., Robinson, S.D. (2019). “A Simple Homogeneity Correction for Neuroimaging at 7T.” Proc. ISMRM 27th Annual Meeting.
Reference implementation: https://github.com/korbinian90/MriResearchTools.jl
Structs§
- Homogeneity
Params - Parameters for inhomogeneity correction (bias field removal).
Functions§
- box_
filter_ 🔒line - 1D box filter on a line (in-place), matching Julia’s boxfilterline!
- box_
filter_ 🔒line_ weighted - 1D weighted box filter on a line (in-place), matching Julia’s weighted boxfilterline!
- box_
segment 🔒 - Box segmentation for finding tissue regions
- check_
box_ 🔒sizes - Check and adjust box sizes to fit image dimensions
- fill_
and_ 🔒smooth - Fill holes and smooth the lowpass field with weighted smoothing
- fill_
holes - Fill holes in a binary mask
- flood_
fill_ 🔒component - Find connected component using flood fill (6-connectivity in 3D)
- gaussian_
smooth_ 3d - 3D Gaussian smoothing using box filter approximation
- gaussian_
smooth_ 3d_ boxsizes - Simplified smoothing with explicit box sizes (for robustmask post-processing)
- get_
box_ 🔒sizes - Calculate box sizes to approximate Gaussian with given sigma using n box filters
- get_
sensitivity - Get sensitivity (bias field) from magnitude
- idx3d 🔒
- Index into 3D array (Fortran/column-major order)
- makehomogeneous
- Make magnitude homogeneous by dividing by bias field
- nan_
box_ 🔒filter_ line - 1D box filter with NaN handling (for masked smoothing) Matches Julia’s nanboxfilterline!
- robust_
mask - Create robust mask from magnitude using quantile-based thresholding
- rss_
combine - RSS (Root Sum of Squares) magnitude combination