Skip to content

Commit 1ed362f

Browse files
normanrzfm3
andauthored
RemoteDataset.used_storage_bytes and n5/neuroglancer read support (#1386)
* add RemoteDataset.used_storage_bytes * wip * wip * add tests for n5 and ng * changelog * test for storage scan * Update webknossos/webknossos/dataset/remote_dataset.py Co-authored-by: Florian M <[email protected]> * _tensorstore_data_format --------- Co-authored-by: Florian M <[email protected]>
1 parent e45dbf1 commit 1ed362f

File tree

20 files changed

+876
-415
lines changed

20 files changed

+876
-415
lines changed

webknossos/Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ For upgrade instructions, please check the respective _Breaking Changes_ section
2727
### Breaking Changes
2828
- The `endpoint_url` in `UPath` objects is now stored directly in the `storage_options` dict, instead of being stored in the `storage_options["client_kwargs"]` dict. [#1365](https://github.com/scalableminds/webknossos-libs/pull/1365)
2929
- Removed Docker image `scalableminds/webknossos-cli` build. It will not be released further. [#1376](https://github.com/scalableminds/webknossos-libs/pull/1376)
30+
- Removed inference of channels in case `numChannels` is not set in the `datasource-properties.json`. `numChannels == 1` is assumed and fails upon reading, if otherwise. [#1386](https://github.com/scalableminds/webknossos-libs/pull/1386)
3031

3132
### Added
3233
- Dataset.add_layer_as_ref() now accepts RemoteLayer objects as well as Layer objects. [#1371](https://github.com/scalableminds/webknossos-libs/pull/1371])
3334
- RemoteDataset.annotation_id is now exposed, when available. [#1380](https://github.com/scalableminds/webknossos-libs/pull/1380)
3435
- RemoteDataset.open() now accepts an annotation url as well. [#1380](https://github.com/scalableminds/webknossos-libs/pull/1380)
3536
- RemoteAnnotation, now has a get_agglomerate_graph method, to make working with proofreading annotations easier. [#1361](https://github.com/scalableminds/webknossos-libs/pull/1361)
37+
- Added `RemoteDataset.used_storage_bytes` property. [#1386](https://github.com/scalableminds/webknossos-libs/pull/1386)
38+
- Added read support for N5 and neuroglancer precomputed data formats. [#1386](https://github.com/scalableminds/webknossos-libs/pull/1386)
3639

3740
### Changed
3841
- Ported `test.sh` to `test.py`, run with `uv run test.py`. [#1379](https://github.com/scalableminds/webknossos-libs/pull/1379)
2.43 KB
Binary file not shown.
2.43 KB
Binary file not shown.
2.43 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"blockSize":[1,32,32,32],"compression":{"level":-1,"type":"gzip","useZlib":false},"dataType":"uint32","dimensions":[3,24,24,24]}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"version": 1,
3+
"id": {
4+
"name": "simple_n5_dataset",
5+
"team": ""
6+
},
7+
"scale": [1.0, 1.0, 1.0],
8+
"dataLayers": [
9+
{
10+
"name": "color",
11+
"category": "color",
12+
"boundingBox": {
13+
"topLeft": [0, 0, 0],
14+
"width": 24,
15+
"height": 24,
16+
"depth": 24
17+
},
18+
"elementClass": "uint24",
19+
"dataFormat": "n5",
20+
"mags": [
21+
{
22+
"mag": [1, 1, 1],
23+
"path": "./color/1"
24+
}
25+
],
26+
"numChannels": 3,
27+
"defaultViewConfiguration": {
28+
"color": [255, 0, 0]
29+
}
30+
}
31+
],
32+
"defaultViewConfiguration": {
33+
"position": [12, 12, 12]
34+
}
35+
}
358 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"@type":"neuroglancer_multiscale_volume","data_type":"uint8","num_channels":3,"scales":[{"chunk_sizes":[[64,64,64]],"encoding":"png","key":"1","png_level":5,"resolution":[1.0,1.0,1.0],"size":[24,24,24],"voxel_offset":[0,0,0]}],"type":"image"}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"version": 1,
3+
"id": {
4+
"name": "simple_n5_dataset",
5+
"team": ""
6+
},
7+
"scale": [1.0, 1.0, 1.0],
8+
"dataLayers": [
9+
{
10+
"name": "color",
11+
"category": "color",
12+
"boundingBox": {
13+
"topLeft": [0, 0, 0],
14+
"width": 24,
15+
"height": 24,
16+
"depth": 24
17+
},
18+
"elementClass": "uint24",
19+
"dataFormat": "neuroglancerPrecomputed",
20+
"mags": [
21+
{
22+
"mag": [1, 1, 1],
23+
"path": "./color/1"
24+
}
25+
],
26+
"numChannels": 3,
27+
"defaultViewConfiguration": {
28+
"color": [255, 0, 0]
29+
}
30+
}
31+
],
32+
"defaultViewConfiguration": {
33+
"position": [12, 12, 12]
34+
}
35+
}
183 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)