create_mask_manual {pressuRe}R Documentation

Create masking

Description

Allows user to manually define mask regions

Usage

create_mask_manual(
  pressure_data,
  mask_definition = "by_vertices",
  n_masks = 1,
  n_verts = 4,
  n_sens = 4,
  threshold = 0.005,
  plot_existing_masks = TRUE,
  mask_names = "default",
  plot = TRUE
)

Arguments

pressure_data

List. First item is a matrix covering each timepoint of the measurement.

mask_definition

String. "by_vertices" or "by_sensors". The first option let's you draw a shape around the area you want to select, the second allows you to define this area by clicking on specific sensors

n_masks

Numeric. Number of masks to add

n_verts

Numeric. Number of vertices in mask

n_sens

Numeric. Number of sensors mask will contain

threshold

Numeric. Distance between adjacent mask vertices before sharing vertex coordinates

plot_existing_masks

Logical. Show existing masks

mask_names

List. Mask names. Default is "custom_mask#"

plot

Logical. Show new maks on pressure image

Value

List. Mask(s) are added to pressure data variable

Examples


emed_data <- system.file("extdata", "emed_test.lst", package = "pressuRe")
pressure_data <- load_emed(emed_data)
pressure_data <- create_mask_manual(pressure_data, mask_definition = "by_vertices",
n_masks = 1, n_verts = 4)
pressure_data <- create_mask_manual(pressure_data, mask_definition = "by_sensors",
n_masks = 1, n_sens = 8)


[Package pressuRe version 0.2.4 Index]