Description Usage Arguments Value Author(s) References Examples
View source: R/SpatCorrImage.R
This function is to estimate and test voxel-wise spatially varying correlation between two groups of 3D images
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
img_1 |
a V by n matrix for n images with V voxels |
img_2 |
a V by n matrix for n images with V voxels |
coords |
a V by d matrix of coordinates of the d-dimensional image
#'@param voxel_neighbors a list object contains two matrices: |
mask |
a vector of length V for the mask taking logical values. The default is NULL. |
rho_list |
a vector of correlation values to be tested. |
adj_dist |
the distance of adjacent nodes. |
size |
the minimum clutersize. |
n_cor |
the correlation between neighboring voxels for smoothing. |
pos_prob |
positive correlation cluster threshold probablity. |
neg_prob |
negative correlation cluster threshold probablity. |
est_cormat |
TRUE or FALSE indicating that whether a minimum contrast method is used to estimate the spatial correlations within each imaging modality. Default is TRUE |
a list of objects containing all the results
A correlation map
A smoothed correlation map
A logical image for all clusters with positive correlation
A logical image for all clusters with negative correlation
A list of voxel indices for all clusters with negative correlation
A list of voxel indices for all clusters with positive correlation
A list of voxel indices for all clusters
A vector of mean correlation estimates within clusters
A list objects of the MLEs and likelihood ratio tests results
A summary of results
preprocessed images for img_1 with each raw representing one image in vector format
preprocessed images for img_2 with each raw representing one image in vector format
locations for all voxels
Jian Kang <jiankang@umich.edu>
Li L, Kang J, Lockhart SN, Adams J, Jagust WJ. (2019) Spatially adaptive varying correlation analysis for multimodal neuroimaging data. IEEE Trans Med Imaging. 38(1):113-123. PMCID: PMC6324929
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | set.seed(1000)
dim_img = c(10,10,10)
num_voxels = prod(dim_img)
n = 50
grids <- lapply(1:3,function(i) seq(-round(dim_img[i]/2)+1,round(dim_img[i]/2),length=dim_img[i]))
img_1 <- array(rnorm(num_voxels*n),dim=c(num_voxels,n))
img_2 <- array(rnorm(num_voxels*n),dim=c(num_voxels,n))
cor_region <- create_sphere_mask(grids,radius=3)
cor_region_list <- array(cor_region,dim=dim(img_2))
img_2 <- ifelse(cor_region_list,img_1+rnorm(num_voxels*n,sd=0.5),img_2)
mask <- c(create_sphere_mask(grids,radius=5))
cor_img <- comp_images_corr(img_1,img_2,mask)
plot_3D_image_slices(array(cor_img,dim=dim_img),grids,c(-2,2))
voxel_neighbors <- find_image_neighbors(grids)
coords <- expand.grid(grids)
res <- Spat_Corr_images(img_1,img_2,coords,voxel_neighbors,mask=mask,pos_prob=0.90,neg_prob=0.90,n_cor=0.5,size=10)
plot_3D_image_slices(list(cor=array(res$cor_img,dim=dim_img),
smooth_cor=array(res$smooth_cor_est,dim=dim_img),
pos_cluster=array(res$pos_cluster,dim=dim_img)),grids,c(-3,3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.