Skip to content

Commit

Permalink
docs: mentioned region_graph function
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Jun 13, 2019
1 parent 30b8f91 commit d179e78
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 @@ -47,6 +47,11 @@ N = np.max(labels_out)
for segid in range(1, N+1):
extracted_image = labels_out * (labels_out == segid)
process(extracted_image)

# We also include a 26-connected region adjacency graph function
# that returns a set of undirected edges. It is not optimized
# (100x slower than connected_components) but it could be improved.
graph = cc3d.region_graph(labels_out)
```

If you know approximately how many labels you are going to generate, you can save substantial memory by specifying a number a safety factor above that range. The max label ID in your input labels must be less than `max_labels`.
Expand Down

0 comments on commit d179e78

Please sign in to comment.