tmd.io.swc¶
Python module that contains the functions about reading swc files.
Functions
|
Load a swc file containing a list of sections, into a 'Data' format. |
|
Transforms data as loaded from read_swc into a set of 'meaningful' lists. |
|
Transform swc to data to be used in make_tree. |
- tmd.io.swc.read_swc(input_file, line_delimiter='\n')¶
Load a swc file containing a list of sections, into a ‘Data’ format.
- tmd.io.swc.swc_data_to_lists(data)¶
Transforms data as loaded from read_swc into a set of ‘meaningful’ lists.
The lists are the following:
- x: list of floats
x-coordinates
- y: list of floats
y-coordinates
- z: list of floats
z-coordinates
- d: list of floats
diameters
- t: list of ints
tree type
- p: list of ints
parent id
- ch: dictionary
children id(s)
- tmd.io.swc.swc_to_data(data_swc)¶
Transform swc to data to be used in make_tree.