From 164e5734bc3a22cce8c06261deb7f7fb1ee933f9 Mon Sep 17 00:00:00 2001 From: William Silversmith Date: Tue, 21 May 2024 21:33:05 -0400 Subject: [PATCH] docs: add example to README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index fb38663..8688342 100644 --- a/README.md +++ b/README.md @@ -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.*