pyfibre.model.tools.network_extraction module

pyfibre.model.tools.network_extraction.build_network(image, scale=1, alpha=0.5, sigma=0.5, nuc_thresh=2, nuc_radius=11, lmp_thresh=0.15, angle_thresh=70, r_thresh=7)[source]

Uses the FibeR Extraction algorithm to extract a fibre network from provided image

Parameters
  • image (array_like, (float); shape=(nx, ny)) – Image to perform FIRE upon

  • scale (float) – Scaling factor to apply to image before performing algorithm

  • alpha (float) – Alpha metric to use in hysteresis threshold algorithm

  • sigma (float) – Gaussian standard deviation to filter distance image

  • nuc_thresh (float) – Minimum distance pixel threshold to be classed as nucleation point

  • nuc_radius (float) – Minimum pixel radii between nucleation points

  • lmp_thresh (float) – Minimum distance pixel threshold to be classed as lmp point

  • angle_thresh (float) – Maximum angular deviation of new lmp from fibre trajectory

  • r_thresh (float) – Maximum length of edges between nodes

Returns

network – Networkx graph object representing fibre network

Return type

nx.Graph

pyfibre.model.tools.network_extraction.clean_network(network, r_thresh=2)[source]

Cleans network by removing isolated nodes, combining any two nodes that are located too close together into one, and removing any components that are too small to be considered fibres

pyfibre.model.tools.network_extraction.fibre_network_assignment(network)[source]

Extract sub-networks, simplified sub-networks and Fibre objects from a networkx Graph generated by modified FIRE algorithm