Skip to content

Commit bf1079c

Browse files
committed
Fixed missing keyword for post-processing
1 parent 1d1adee commit bf1079c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flamingo_tools/segmentation/postprocessing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,10 @@ def components_sgn(
377377
Returns:
378378
Subgraph components as lists of label_ids of dataframe.
379379
"""
380+
if keyword not in table:
381+
distance_avg = nearest_neighbor_distance(table, n_neighbors=100)
382+
table[keyword] = list(distance_avg)
383+
380384
centroids = list(zip(table["anchor_x"], table["anchor_y"], table["anchor_z"]))
381385
labels = [int(i) for i in list(table["label_id"])]
382386

0 commit comments

Comments
 (0)