funkelab / gunpowder

A library to facilitate machine learning on multi-dimensional images.
https://funkelab.github.io/gunpowder/
MIT License
79 stars 56 forks source link

Implement graphs #79

Closed pattonw closed 4 years ago

pattonw commented 4 years ago

Fairly major breaking change. Replace Points, PointsKey, PointsKeys, PointsSpec and Point with Graph, GraphKey, GraphKeys, GraphSpec, and Node. Graph API is quite different from what Points was. points.data was replaced with points.nodes and points.edges depending on what data you want. Adding and removing keys is now done via graph.add_node, graph.add_edge, graph.remove_node, graph.remove_edge instead of adding and removing keys from points.data.

Points, PointsKey, PointsKeys, PointsSpec and Point still exist as aliases to new versions simply without edges. Old functionality such as graph.data still exists for backwards compatibility, but modifying graph.data will not modify the graph from which it came.