View source: R/selectProfiles.R
selectProfiles | R Documentation |
Uses a line to select a profile (or a region of interest), when selecting a radius the line should start at the pith side and end at the bark side of the sample.
selectProfiles(im, nPixel = 50, cal = NULL, multiple = TRUE)
im |
an image |
nPixel |
the width of the line |
cal |
calibration |
multiple |
a single or several profiles |
a vector with the average grayvalue along the selected line when a multiple is TRUE and a list when multiple is FALSE
if (interactive()) { # read a sample file im <- imRead(file = system.file("img", "AFO1046.1200dpi.png", package = "xRing")) # to display the image imDisplay(im) # select a profile profile <- selectProfile(im) # to display the profile plot(profile, type = "l") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.