Skip to contents

as_streamline() converts a supported object into a streamline.

Usage

as_streamline(x, ...)

Arguments

x

An object to coerce.

...

Additional arguments (currently unused).

Value

A streamline object.

Details

Currently supported input classes:

  • streamline: returned unchanged.

  • dwiFiber (from dti): the object must contain exactly one fiber. For multi-fiber objects use as_bundle() instead.

Examples

pts <- matrix(runif(15), ncol = 3, dimnames = list(NULL, c("X", "Y", "Z")))
sl <- streamline(points = pts)
identical(as_streamline(sl), sl)  # TRUE — identity coercion
#> [1] TRUE