x3p_fuzzyselect: Interactive selection of region of interest

Description Usage Arguments Value Examples

View source: R/x3p_select.R

Description

Interactive selection of region of interest

Usage

1
x3p_fuzzyselect(x3p, col = "#FF0000", mad = 5, type = "plane", update = TRUE)

Arguments

x3p

x3p file

col

character value of the selection color

mad

scalar

type

only "plane" is implemented at the moment

update

boolean value, whether the rgl window should be updated to show the selected rectangle

Value

x3p file with updated mask

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
if (interactive) {
  if (!file.exists("fadul1-1.x3p")) {
    url <- "https://tsapps.nist.gov/NRBTD/Studies/CartridgeMeasurement/DownloadMeasurement"
    file <- "2d9cc51f-6f66-40a0-973a-a9292dbee36d"
    download.file(file.path(url, file), destfile="fadul1-1.x3p")
  }
  x3p <- x3p_read("fadul1-1.x3p")
  x3p_image(x3p, size=c(500,500), zoom=.8)
  x3p <- x3p_fuzzyselect(x3p, update=TRUE, col="#FF0000") 

  logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
  x3p_image(logo, size=c(500,500), zoom = 1)
  x3p_fuzzyselect(logo, update=TRUE, col="#00FF00") 
}
## End(Not run)

x3ptools documentation built on Nov. 27, 2021, 1:06 a.m.