Surface anaLysis And Modeling
slam is a pure Python library for analysing and modeling surfaces represented as a triangular mesh. It is an extension of Trimesh, which is an open source python module dedicated to general mesh processing: https://github.com/mikedh/trimesh
The present module will consist of extensions to adapt Trimesh for the purpose of surface analysis of brain MRI data.
-
install the lastest version of trimesh in easy (minimal dependency) mode:
pip install trimesh[easy]
-
install pyglet:
conda install -c conda-forge pyglet
-
install nibabel
pip install nibabel
-
install matplotlib
conda install matplotlib
-
install gdist
pip install cython pip install gdist
-
clone the current repo
-
try example scripts located in examples folder
. io: read/write gifti (and nifti) file format
. generate_parametric_surfaces: generation of parametric surfaces with random sampling
. geodesics: geodesic distance computation using gdist and networkx
. differential_geometry: several implementations of graph Laplacian (conformal, authalic, FEM...)
. mapping: several types of mapping between the mesh and a sphere, a disc...
. distortion: distortion measures between two meshes, for quantitative analysis of mapping properties
. remeshing: projection of vertex-level information between two meshes based on their spherical representation
. topology: mesh surgery (boundary indentification, hole closing will be added in the future)
. vertex_voronoi: compute the voronoi of each vertex of a mesh, usefull for numerous applications
. texture: a class to manage properly vertex-level information.
. plot: extension of Trimesh's pyglet viewer to visualize textures with colorbar.
-
intall flake8 and autopep8
pip install -U autopep8 flake8
-
install pytest
pip install -U pytest