Skip to contents

Convenience pipeline that optionally applies a robust space-time smoothing stage, followed by a joint bilateral or guided-filter final stage. Parameters can be estimated automatically from data and voxel size.

Usage

fmrismooth_default(
  vec,
  robust = c("huber", "tukey", "none"),
  final = c("joint_bilateral", "guided_filter"),
  backend = c("grid", "permutohedral"),
  t1 = NULL,
  probs = NULL,
  mask = NULL,
  interp_guide = 1L,
  interp_mask = 0L,
  auto_params = TRUE,
  tr = NULL,
  target_fwhm_mm = 5,
  motion_params = NULL,
  design = NULL
)

Arguments

vec

4D fMRI array or `NeuroVec`.

robust

Robust loss for pre-smoothing: one of `"huber"`, `"tukey"`, or `"none"`.

final

Final stage method: `"joint_bilateral"` or `"guided_filter"`.

backend

Joint bilateral backend label (currently routes to permutohedral).

t1

Optional 3D anatomical guide.

probs

Optional list of 3D probability maps used as additional guides.

mask

Optional 3D logical/0-1 mask.

interp_guide

Guide interpolation mode when resampling with neuroim2.

interp_mask

Mask interpolation mode when resampling with neuroim2.

auto_params

If `TRUE`, auto-estimate parameters via `recommend_params`.

tr

Repetition time (seconds) for auto-params; optional.

target_fwhm_mm

Target spatial FWHM (in mm) for auto-params.

motion_params

Optional motion regressors for temporal weighting.

design

Optional design regressor for design-aware joint bilateral.

Value

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