A python package for the extraction and analysis of graphs from 2D and 3D experimental micrographs. Image processing techniques taken from StructuralGT.
StructuralGT is easiest to from source, using conda to link dependencies. To do so, clone, build, and install from the GitHub repository. You will need to install the cython, igraph, and eigen.
git clone https://github.com/AlainKadar/StructuralGT
conda install -c conda-forge igraph eigen cython
cd StructuralGT
python setup.py install
A conda installation streamlines linking the required dependencies. To avoid using conda, please see the documentation for a more customized installation.
The following minimal example shows how the package can be used to calculate the graph theoretic parameters of a 3D structural nanofibre network:
from StructuralGT.structural import Degree
from StructuralGT.networks import Network
Nanofibre3DNetwork = Network('Nanofibre_Image_Stack')
Nanofibre3DNetwork.binarize()
Nanofibre3DNetwork.img_to_skel(crop=[0,500,0,500,0,500])
Nanofibre3DNetwork.set_graph(weight_type=['Length'])
S = Degree()
S.compute(Nanofibre3DNetwork)
print(S.average_degree)