Issues creating neuroglancer dataset from schema
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
While creating a new dataset using the `neuroglancer_precomputed` driver, I encountered three specific issues regarding schema parameters and serialization. The code I used is at the end.
**1. missing sharding configuration options**
I am unable to set certain `sharding` parameters via the schema, specifically `minishard_index_encoding`. It appears to default to `gzip` with no way to override it. So it would be nice to have the option to set these parameters like it is possible with `shard_data_encoding`.
**2. data_encoding default for sharding**
When `encoding` is set to `png`, the `data_encoding` within shards defaults to `gzip`. The documentation states that `jpeg` and `compressed_segmentation` default to `raw`. I think png encoding should also default to raw.
**3. png_level missing from dataset.spec()**
Even when `png_level` is explicitly set in the initial open request, it disappears when calling `dataset.spec().to_json()`. It is correctly set in the info file but the TensorStore spec object does not show it.
This was the dataset i endet up creating:
```
dataset = ts.open(
{
"driver": "neuroglancer_precomputed",
"schema": {
"rank": 4,
"dtype": "uint8",
"chunk_layout": {
"write_chunk": {"shape_soft_constraint": [1024, 1024, 128, 1]},
"read_chunk": {"shape": [128, 128, 128, 1]},
},
"codec": {
"driver": "neuroglancer_precomputed",
"encoding": "png",
"png_level": 6,
"shard_data_encoding": "raw",
},
"domain": {
"shape": [100000, 100000, 8, 1],
},
"dimension_units": [[10, "nm"], [10, "nm"], [100, "nm"], None],
},
"kvstore": {
"driver": "memory",
},
"create": True,
}
).result()
json_spec = dataset.spec().to_json()
```
I hope these findings are usefull.
Contributor guide
Assessment
This issue has not been assessed yet.