Skip to contents

Applies joint bilateral filtering across space and time. Temporal coupling is modeled via an extra feature; an optional design regressor can be added to the lattice features.

Usage

fast_bilateral_lattice4d(
  vec,
  sigma_sp = 2.5,
  sigma_t = 0.5,
  sigma_r = 1,
  guide_spatial = NULL,
  guides = NULL,
  design = NULL,
  sigma_d = 1,
  blur_iters = 1L,
  mask = NULL
)

Arguments

vec

4D fMRI array or `NeuroVec`.

sigma_sp

Spatial sigma (voxels).

sigma_t

Temporal sigma (frames).

sigma_r

Range sigma(s) for guide intensity dimensions. Scalar or vector matching `guide_spatial` + length(`guides`). Has an effect only when `guide_spatial` and/or `guides` are provided; otherwise the filter is purely spatial (plus optional temporal/design features) and `sigma_r` is ignored.

guide_spatial

Optional 3D spatial guide.

guides

Optional list of 3D guides (probability maps, etc.).

design

Optional numeric vector of length T (frames) for design-aware features.

sigma_d

Sigma for design regressor feature.

blur_iters

Integer number of lattice blur iterations.

mask

Optional 3D logical/0-1 mask.

Value

Smoothed 4D data, wrapped like `vec` when possible.