stat_img: Create Statistics Image

Description Usage Arguments Value Note

View source: R/image_func.R

Description

Creates output from a list of images, performing voxel-wise operations to create a statistic image

Usage

1
2
3
4
5
6
7
8
9
stat_img(
  imgs,
  func = c("mean", "median", "mode", "pct", "peak", "sd", "var", "mad", "sum", "prod",
    "z", "quantile", "staple_prob", "staple_label"),
  finite = TRUE,
  masks = NULL,
  na_masks = TRUE,
  ...
)

Arguments

imgs

Character vector, list of characters, or object of class nifti

func

Function to perform voxel-wise on list of images

finite

Should non-finite values be removed?

masks

Character vector, list of characters, or object of class nifti same length as images.

na_masks

if masks are given, should values of 0 be turned into NA?

...

Addictional arguments to pass to func

Value

Object of class nifti

Note

When func = "mode", the data is tabulated and then max.col is run. The user can pass ties.method to determine how to break ties. The default is "first" as compared to max.col where it is "random". When func = "peak", density is run on each voxel and the value with the maximum. If the number of unique values is only 1, that value is returned.


muschellij2/extrantsr documentation built on July 27, 2021, 7:41 a.m.