Find extrema of set of values given a connectivity graph
Arguments
- data_map
A vector or text file of values to search for peaks
- graph
An igraph object describing the connectivity, in most cases this will be a mesh graph produced by obj_to_graph
- mindist
the search radius (in number of neighbours) to consider when finding a peak. A node is considered a peak if it is more extreme than any element in it's neighbourhood up to
mindistedges away- direction
Either positive, negative, or both indicating whether to consider maxima, minima or both.
- threshold
threshold above or below which to consider peaks. In the both direction case a two element vector may be passed indicating positive and negative thresholds respectively. If a single element is passed in the both direction case, it is treated as
c(threshold, -threshold). Defaults to 0.- output
Either mask or indices, indicating whether a logical mask or a vector of indices is desired.