roi_test {colocr}R Documentation

Test Co-localization

Description

Perform co-localization test statistics.

Usage

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

# 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()


[Package colocr version 0.1.1 Index]