img_cov_matrix: Neighborhood Covariance Matrix

Description Usage Arguments Value Note

View source: R/img_cov_matrix.R

Description

Calculates the neighborhood of multiple images, and then does the covariance of each neighbor with itself in the other imaging modality

Usage

1
2
3
4
5
6
7
8
9
img_cov_matrix(
  imgs,
  mask = NULL,
  radius = rep(1, 3),
  method = c("pearson", "spearman"),
  center = TRUE,
  scale = FALSE,
  verbose = TRUE
)

Arguments

imgs

list of images of class nifti, antsImage, character

mask

Binary image of class nifti, antsImage, character. Only neighborhoods inside the mask will be taken

radius

vector of length 3 for number of voxels to go in each direction. Default is 27 neighbors (including voxel at center). Passed to getNeighborhoodInMask.

method

Type of correlation. If pearson, scaling done on original data. If spearman, the ranks. If you want a covariance, you simply need to do scale = FALSE

center

Should the data be centered

scale

Should the data be scaled

verbose

print diagnostic messages

Value

List of matrix of covariances for each voxel and the order the columns are in.

#' @export

Note

Divisor is n - 1.


neuroconductor/extrantsr documentation built on Sept. 28, 2020, 11:31 a.m.