Smooth the stored geometry using a centered moving-average filter applied to
profile coordinates. This is useful for cleaning digitized outlines before
canonicalization or model runs. For canonical Shape objects, the result is
returned as an Arbitrary shape because the edited profile is no longer
guaranteed to preserve the canonical class geometry.
Usage
smooth_shape(
object,
span = 5,
component = NULL,
preserve_ends = TRUE,
containment = c("warn", "error", "ignore")
)Arguments
- object
Shape or Scatterer object.
- span
Centered moving-average span. Even values are rounded up to the next odd integer.
- component
Optional component name for scatterers. Defaults to the primary geometry (
"body"for most scatterers and"shell"forESS).- preserve_ends
Logical; whether to keep the first and last profile points fixed.
- containment
Containment policy used when a moved swimbladder or backbone is checked against its body:
"warn","error", or"ignore".
