Utilities#

swick.split_swc()#

Splits an SWC object into one or more SWC objects, each containing a single root node. Node IDs are not modified by this process.

Parameters:

swc – the SWC object to be split

Returns:

a list of SWC objects each containing one root node

swick.combine_swcs()#

Combines each of the SWC objects in the list into a single SWC. Node IDs for all but the first SWC in the list may be modified by this process in order to avoid collisions between node IDs: for each SWC in the list, the node IDs it contains will be offset by the greatest node ID in the previous SWC.

Parameters:

swcs – a list of SWC objects to be combined

Returns:

a single SWC object containing all Nodes from the input