Learn R Programming

colocr (version 0.1.1)

roi_show: Show the selected regions of interest

Description

Show/highlight the selected regions of interest on different image channels

Usage

roi_show(img, ind = c(1, 2))

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.

Details

calling this function with img object which is returned from roi_select returns four different plots. The original image, a low resolution representation of the selected regions of interest and the two channels indicated through ind highlighted.

Examples

Run this code
# NOT RUN {
# load images
fl <- system.file('extdata', 'Image0001_.jpg', package = 'colocr')
img <- image_load(fl)

# choose and show ROI
oldpar <- par()
par(mfrow=c(2,2))

roi_select(img, threshold = 90) %>%
  roi_show()

par(oldpar)

# }

Run the code above in your browser using DataLab