Works without extra packages by colorizing both layers to rasters and stacking them as grobs. Great for statistical maps over T1/T2 backgrounds.
Arguments
- bgvol
Background 3D volume.
- overlay
Overlay 3D volume (same dims as bgvol).
- zlevels
Slices to plot (indices along the z/3rd axis by default).
- along
Axis for slicing (1 sagittal, 2 coronal, 3 axial).
- bg_cmap
Background palette (e.g., "grays").
- ov_cmap
Overlay palette (e.g., "inferno").
- bg_range, ov_range
"robust" or "data" for background/overlay scaling.
- probs
Quantiles for robust scaling.
- ov_thresh
Numeric threshold; values with |v| < thresh become transparent.
- ov_alpha
Global alpha for overlay (0..1).
- ncol
Number of columns in the facet layout.
- title, subtitle, caption
Optional labels.