Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pychunkedgraph/app/app_utils.py
Original file line number Diff line number Diff line change
@@ -230,6 +230,8 @@ def ccs(coordinates_nm_):

coordinates = np.array(coordinates, dtype=int)
coordinates_nm = coordinates * cg.meta.resolution
max_dist_steps = np.array([4, 8, 14, 28], dtype=float) * np.mean(cg.meta.resolution)

node_ids = np.array(node_ids, dtype=np.uint64)
if len(coordinates.shape) != 2:
raise cg_exceptions.BadRequest(
@@ -242,7 +244,8 @@ def ccs(coordinates_nm_):
node_id_m = node_ids == node_id
for cc in ccs(coordinates_nm[node_id_m]):
m_ids = np.where(node_id_m)[0][cc]
for max_dist_nm in [75, 150, 250, 500]:

for max_dist_nm in max_dist_steps:
atomic_ids_sub = cg.get_atomic_ids_from_coords(
coordinates[m_ids], parent_id=node_id, max_dist_nm=max_dist_nm
)
@@ -251,7 +254,7 @@ def ccs(coordinates_nm_):
if atomic_ids_sub is None:
raise cg_exceptions.BadRequest(
f"Could not determine supervoxel ID for coordinates "
f"{coordinates} - Validation stage."
f"{coordinates} - Lookup stage."
)
atomic_ids[m_ids] = atomic_ids_sub
return atomic_ids

0 comments on commit a434335

Please sign in to comment.