Network / Fiber / Segment¶
- class Qiber3D.Network(data)¶
Class representing the complete network
- Parameters
data (dict) – metadata and segment data collection
- Variables
average_radius (float) – average radius
cylinder_radius (float) – radius if segment is interpreted as single cylinder
average_diameter (float) – average diameters
length (float) – overall length
volume (int) – overall volume modeled as truncated cones
number_of_fibers – fiber count
vector (ndarray) – vectors between points
direction (ndarray) – vector pointing from start to end
bbox (float) – bounding box corners
bbox_volume – bounding box volume
center (ndarray) – bounding box center
bbox_size (ndarray) – bounding box size
- export(out_path='.', overwrite=False, mode=None, **kwargs)¶
Export the network data. Available file types:
.json
,.qiber
,.swc
,.xlsx
,.csv
,.static
,.tif
or.mv3d
. For more details seeQiber3D.io.IO
.- Parameters
out_path (str, Path) – file or folder path where to save the network
overwrite –
mode –
kwargs –
- Returns
- static load(path, **kwargs)¶
Load a
Network
. Available file types:.tif
,.nd2
,.json
,.qiber
,.swc
,.ntr
,.csv
, or.mv3d
. For more details seeQiber3D.io.IO
.- Parameters
path (str, Path) – file path to input file
- Returns
- save(out_path='.', overwrite=False, save_steps=False)¶
Save network to file.
- Parameters
out_path (str, Path) – file or folder path where to save the network
overwrite (bool) – allow file overwrite
save_steps (bool) – add extraction steps to the saved file
- Returns
path to saved file
- Return type
Path
- class Qiber3D.Fiber(network, fiber_id, segment_ids)¶
Class representing the large elements in a network
- Parameters
network (
Network
) – overarching networkfiber_id (int) – unique fiber identifier
segment_ids (list) – list of segment identifier forming the Fiber
- Variables
fid – unique fiber identifier
average_radius (float) – average radius
cylinder_radius (float) – radius if segment is interpreted as single cylinder
average_diameter (float) – average diameters
length (float) – overall length
volume (float) – overall volume modeled as truncated cones
graph (nx.Graph) –
Fiber
represented as networkx graph
- class Qiber3D.Segment(point, radius, segment_index)¶
Class representing the small element in a network
- Parameters
point (ndarray) – ordered list of points forming the Segment
radius (ndarray) – radii (same order as point)
segment_index (int) – unique identifier
- Variables
sid – unique segment identifier
point (ndarray) – ordered points forming the Segment
x (ndarray) – ordered list of x coordinates
y (ndarray) – ordered list of y coordinates
z (ndarray) – ordered list of z coordinates
radius (ndarray) – radii in same order as point (also available as r)
average_radius (float) – average radius
cylinder_radius (float) – radius if segment is interpreted as single cylinder
diameter (ndarray) – diameters in same order as point (also available as d)
average_diameter (float) – average diameters
start (tuple) – start point coordinates
end (tuple) – end point coordinates
vector (ndarray) – vectors between points
direction (ndarray) – vector pointing from start to end
length (float) – length from start to end
volume (float) – Segment volume modeled as truncated cones