plot_3D_image_slices: Plot 3D Images by Slices by Slices

Description Usage Arguments Author(s) Examples

View source: R/SpatCorrImage.R

Description

Plot 3D Images by Slices by Slices

Usage

1
2
3
4
5
6
7
8
plot_3D_image_slices(
  images,
  grids,
  Z_range,
  Z_slices = NULL,
  gridnames = c("X", "Y", "Z"),
  image_names = NULL
)

Arguments

images

either an array for one image or a list of arrays for multiple images

grids

a list of grids for each dimension of the image.

Z_range

lower and upper bound of Z slices

Z_slices

a vector of Z slices

gridnames

X, Y, Z axis names

image_names

the name label for the images

Author(s)

Jian Kang <jiankang@umich.edu>

Examples

1
2
3
4
5
6
7
8
9
grids = lapply(1:3,function(i) seq(-29,29,by=1))
dim_img = sapply(1:3,function(i) length(grids[[i]]))
neighbors = find_image_neighbors(grids,radius=1)
sphere_mask = create_sphere_mask(grids,radius=20)
raw_img = ifelse(sphere_mask,rnorm(sum(sphere_mask)),NA)
smooth_img = spatial_kernel_smooth(raw_img,grids,sphere_mask,neighbors=neighbors,n_cor=0.5)
pg <- plot_3D_image_slices(images=list(raw=raw_img,smooth=smooth_img),
grids,Z_slices=seq(-18,18,by=9))
plot(pg)

kangjian2016/SpatCorrImage documentation built on Oct. 22, 2021, 1:21 a.m.