Skip to content

Commit 9f318f4

Browse files
committed
try octree coordinates in nm
1 parent 8be91dc commit 9f318f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pychunkedgraph/meshing/manifest/multiscale.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from ..meshgen_utils import get_json_info
1717

1818

19-
def _get_hierarchy(cg: ChunkedGraph, node_id: NODE_ID) -> Dict:
19+
def _get_hierarchy(cg: ChunkedGraph, node_id: np.uint64) -> Dict:
2020
node_children = {}
2121
layer = cg.get_chunk_layer(node_id)
2222
if layer < 2:
@@ -104,7 +104,7 @@ def less_msb(x: int, y: int) -> bool:
104104

105105

106106
def build_octree(
107-
cg: ChunkedGraph, node_id: NODE_ID, node_children: Dict, mesh_fragments: Dict
107+
cg: ChunkedGraph, node_id: np.uint64, node_children: Dict, mesh_fragments: Dict
108108
):
109109
"""
110110
From neuroglancer multiscale specification:
@@ -140,7 +140,7 @@ def build_octree(
140140
children = node_children[current_node]
141141
node_coords = node_coords_d[current_node]
142142

143-
x, y, z = node_coords
143+
x, y, z = node_coords * cg.meta.resolution
144144
offset = OCTREE_NODE_SIZE * row_counter
145145
octree[offset + 0] = x
146146
octree[offset + 1] = y
@@ -170,7 +170,7 @@ def build_octree(
170170
return octree, octree_node_ids, octree_fragments
171171

172172

173-
def get_manifest(cg: ChunkedGraph, node_id: NODE_ID) -> Dict:
173+
def get_manifest(cg: ChunkedGraph, node_id: np.uint64) -> Dict:
174174
node_children = _get_hierarchy(cg, node_id)
175175
node_ids = np.fromiter(node_children.keys(), dtype=NODE_ID)
176176
manifest_cache = ManifestCache(cg.graph_id, initial=True)

0 commit comments

Comments
 (0)