collapse_spec | R Documentation |
Functions for analyzing features, like particles, fragments, or fibers, in
spectral map oriented OpenSpecy
object.
collapse_spec(x, ...)
## Default S3 method:
collapse_spec(x, ...)
## S3 method for class 'OpenSpecy'
collapse_spec(x, ...)
def_features(x, ...)
## Default S3 method:
def_features(x, ...)
## S3 method for class 'OpenSpecy'
def_features(x, features, ...)
x |
an |
features |
a logical vector or character vector describing which of the
spectra are of features ( |
... |
additional arguments passed to subfunctions. |
def_features()
accepts an OpenSpecy
object and a logical or
character vector describing which pixels correspond to particles.
collapse_spec()
takes an OpenSpecy
object with particle-specific
metadata (from def_features()
) and collapses the spectra to median
intensities for each unique particle.
It also updates the metadata with centroid coordinates, while preserving the
feature information on area and Feret max.
An OpenSpecy
object appended with metadata about the features or
collapsed for the features.
Win Cowger, Zacharias Steinmetz
tiny_map <- read_extdata("CA_tiny_map.zip") |> read_any()
identified_map <- def_features(tiny_map, tiny_map$metadata$x == 0)
collapse_spec(identified_map)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.