Skip to content

Commit

Permalink
docs: add example to README
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed May 22, 2024
1 parent 8ef3a11 commit 164e573
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ edges = cc3d.region_graph(labels_out, connectivity=connectivity)
# See help(cc3d.voxel_connectivity_graph) for details.
graph = cc3d.voxel_connectivity_graph(labels, connectivity=connectivity)

# ...and turn it back into labeled values (probably
# not exactly the same ones). Note: this function currently
# assumes an undirected graph, so single voxel alterations are
# likely to go awry.
new_labels = cc3d.color_connectivity_graph(graph, connectivity=connectivity)
```

*Note: C and Fortran order arrays will be processed in row major and column major order respectively, so the numbering of labels will be "transposed". The scare quotes are there because the dimensions of the array will not change.*
Expand Down

0 comments on commit 164e573

Please sign in to comment.