seglist2swc: Recalculate Neurons's SWCData using SegList and point...

View source: R/seglist.R

seglist2swcR Documentation

Recalculate Neurons's SWCData using SegList and point information

Description

Uses the SegList field (indices into point array) to recalculate point numbers and parent points for SWC data field (d).

Usage

seglist2swc(x, d, RecalculateParents = TRUE, ...)

Arguments

x

Neuron containing both the SegList and d fields or a plain seglist

d

SWC data block (only expected if x is a SegList)

RecalculateParents

Whether to recalculate parent points (default T)

...

Additional arguments passed to normalise_swc

Details

If any columns are missing then they are set to default values by normalise_swc. In particular

  • PointNo integer 1:npoints

  • Label = 0 (unknown)

  • W NA_real

Note that each numeric entry in the incoming SegList is a raw index into the block of vertex data defined by d.

Value

A neuron if x was a neuron otherwise dataframe of swc data

See Also

as.neuron.data.frame, normalise_swc, neuron


nat documentation built on May 29, 2024, 10:36 a.m.