|
16 | 16 | from ..meshgen_utils import get_json_info |
17 | 17 |
|
18 | 18 |
|
19 | | -def _get_hierarchy(cg: ChunkedGraph, node_id: NODE_ID) -> Dict: |
| 19 | +def _get_hierarchy(cg: ChunkedGraph, node_id: np.uint64) -> Dict: |
20 | 20 | node_children = {} |
21 | 21 | layer = cg.get_chunk_layer(node_id) |
22 | 22 | if layer < 2: |
@@ -104,7 +104,7 @@ def less_msb(x: int, y: int) -> bool: |
104 | 104 |
|
105 | 105 |
|
106 | 106 | 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 |
108 | 108 | ): |
109 | 109 | """ |
110 | 110 | From neuroglancer multiscale specification: |
@@ -140,7 +140,7 @@ def build_octree( |
140 | 140 | children = node_children[current_node] |
141 | 141 | node_coords = node_coords_d[current_node] |
142 | 142 |
|
143 | | - x, y, z = node_coords |
| 143 | + x, y, z = node_coords * cg.meta.resolution |
144 | 144 | offset = OCTREE_NODE_SIZE * row_counter |
145 | 145 | octree[offset + 0] = x |
146 | 146 | octree[offset + 1] = y |
@@ -170,7 +170,7 @@ def build_octree( |
170 | 170 | return octree, octree_node_ids, octree_fragments |
171 | 171 |
|
172 | 172 |
|
173 | | -def get_manifest(cg: ChunkedGraph, node_id: NODE_ID) -> Dict: |
| 173 | +def get_manifest(cg: ChunkedGraph, node_id: np.uint64) -> Dict: |
174 | 174 | node_children = _get_hierarchy(cg, node_id) |
175 | 175 | node_ids = np.fromiter(node_children.keys(), dtype=NODE_ID) |
176 | 176 | manifest_cache = ManifestCache(cg.graph_id, initial=True) |
|
0 commit comments