roi_test: Test Co-localization

Description Usage Arguments Details Value Examples

View source: R/methods.R

Description

Perform co-localization test statistics.

Usage

1
roi_test(img, ind = c(1, 2), type = "pcc")

Arguments

img

A cimg object or a list of multiple images such as the one returned from roi_select

ind

A numeric object of length two. For the channel indexes. or a list of similar vectors for each of img items.

type

A character vector of the desired co-localization statistics. Default is 'pcc', other inputs are 'moc' or 'both'.

Details

The co-localization stats requested in type is returned as a column for each. When different labels are provided, the stats are calculated for each label individually. When is img is a list a list of such data.frames is returned

Value

A data.frame or a list of data.frames.

Examples

1
2
3
4
5
6
7
# load images
fl <- system.file('extdata', 'Image0001_.jpg', package = 'colocr')
img <- image_load(fl)

# choose roi and test colocalization
roi_select(img, threshold = 90) %>%
  roi_test()

MahShaaban/colocr documentation built on Jan. 6, 2020, 2:08 a.m.