Perform co-localization test statistics.
Usage
roi_test(img, ind = c(1, 2), type = "pcc")Arguments
- img
A
cimgobject or alistof multiple images such as the one returned fromroi_select- ind
A
numericobject of length two. For the channel indexes. or alistof similar vectors for each ofimgitems.- type
A
charactervector 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
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()
#> pcc
#> 1 0.9049954
