Calculates the neighborhood of multiple images, and then does the covariance of each neighbor with itself in the other imaging modality
img_cov_matrix( imgs, mask = NULL, radius = rep(1, 3), method = c("pearson", "spearman"), center = TRUE, scale = FALSE, verbose = TRUE )
imgs | list of images of class |
---|---|
mask | Binary image of class |
radius | vector of length 3 for number of voxels to go in each direction.
Default is 27 neighbors (including voxel at center).
Passed to |
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
|
center | Should the data be centered |
scale | Should the data be scaled |
verbose | print diagnostic messages |
List of matrix of covariances for each voxel and the order the columns are in.
#' @export
Divisor is n - 1
.