Skip to main content

Automated quantification of fibrous networks

Project description

Qiber3D

Automated quantification of fibrous networks

PyPi Status

Documentation

License Github issues

Coverage Build

Setup

pip install Qiber3D

You can also install the latest version directly from GitHub.

pip install -U git+https://github.com/theia-dev/Qiber3D.git#egg=Qiber3D

Usage

An image stack, or a preprocessed network can be loaded with Network.load() To follow this example you can download the image stack from figshare under doi:10.6084/m9.figshare.13655606.

import logging
from Qiber3D import Network, config

config.extract.nd2_channel_name = 'FITC'
config.log_level = logging.DEBUG

net = Network.load('microvascular_network.nd2')
print(net)
# Input file: microvascular_network.nd2
#   Number of fibers: 459 (clustered 97)
#   Number of segments: 660
#   Number of branch points: 130
#   Total length: 16056.46
#   Total volume: 1240236.70
#   Average radius: 4.990
#   Cylinder radius: 4.959
#   Bounding box volume: 681182790

net.save(save_steps=True)
# Qiber3D_core [INFO] Network saved to Exp190309_PrMECs-NPF180_gel4_ROI-c.qiber

net.render.show()
net.render.compare()

A quick way to explore the possibilities of Qiber3D is the use of the synthetic network.

from Qiber3D import IO
net = IO.load.synthetic_network()
print(net)
# Input file: memory
#   Number of fibers: 4 (clustered 2)
#   Number of segments: 11
#   Number of branch points: 5
#   Total length: 1141.44
#   Total volume: 4688.67
#   Average radius: 0.936
#   Cylinder radius: 1.143
#   Bounding box volume: 806162
net.length
# 1141.437678088988
net.volume
# 4688.667104530579
net.fiber[0]
# Fiber 0 l=451.65, V=1651.71
print(net.fiber[0])
# Fiber ID: 0
#   Number of segments: 5
#   Total length: 451.65
#   Total volume: 1651.71
#   Average radius: 0.86
#   Cylinder radius: 1.08
net.fiber[0].segment
# {0: Segment 0 l=40.19, V=17.30, 1: Segment 1 l=124.71, V=113.51, 2: Segment 2 l=32.72, V=112.79, 
#  3: Segment 3 l=154.15, V=1080.55, 4: Segment 4 l=99.88, V=327.56}
print(net.segment[1])
# Segment ID: 1
#   Number of parts: 200
#   Total length: 124.71
#   Total volume: 113.51
#   Average radius: 0.51
#   Cylinder radius: 0.54
net.render.show()
net.render.show(color_mode='segment', color_map='hsv')
net.figure.directions(out_path=None)

The full source code can be accessed on GitHub with the corresponding documentation hosted at Read the docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Qiber3D-0.5.0.tar.gz (36.6 kB view hashes)

Uploaded Source

Built Distribution

Qiber3D-0.5.0-py3-none-any.whl (39.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page