|
1 | 1 | from typing import Optional, Union
|
2 | 2 |
|
| 3 | +import os |
| 4 | + |
3 | 5 | from .image import PrecomputedImageSource
|
4 | 6 | from .metadata import PrecomputedMetadata
|
5 | 7 | from .mesh import PrecomputedMeshSource
|
@@ -63,13 +65,15 @@ def create_precomputed(
|
63 | 65 | if meta.info.get("@type", "") == "neuroglancer_skeletons":
|
64 | 66 | info = meta.info
|
65 | 67 | meta = synthetic_meta(cloudpath, config, cache_service)
|
| 68 | + meta.info["skeletons"] = os.path.basename(cloudpath) |
66 | 69 | skeleton = PrecomputedSkeletonSource(meta, cache_service, config, readonly, info=info)
|
67 | 70 | else:
|
68 | 71 | skeleton = PrecomputedSkeletonSource(meta, cache_service, config, readonly)
|
69 | 72 |
|
70 | 73 | if meta.info.get("@type", "") in ["neuroglancer_legacy_mesh", "neuroglancer_multilod_draco"]:
|
71 | 74 | info = meta.info
|
72 | 75 | meta = synthetic_meta(cloudpath, config, cache_service)
|
| 76 | + meta.info["mesh"] = os.path.basename(cloudpath) |
73 | 77 | mesh = PrecomputedMeshSource(meta, cache_service, config, readonly, info=info)
|
74 | 78 | else:
|
75 | 79 | mesh = PrecomputedMeshSource(meta, cache_service, config, readonly)
|
@@ -135,7 +139,7 @@ def synthetic_meta(cloudpath, config, cache_service) -> PrecomputedMetadata:
|
135 | 139 | volume_size=[1,1,1],
|
136 | 140 | )
|
137 | 141 | return PrecomputedMetadata(
|
138 |
| - cloudpath, |
| 142 | + os.path.dirname(cloudpath), |
139 | 143 | config=config,
|
140 | 144 | cache=cache_service,
|
141 | 145 | info=info, provenance=None,
|
|
0 commit comments