Skip to content

Commit f80136f

Browse files
authored
Update docs for zarr as default data type (#1322)
* update convert.md. * Updated link to supported dtype table. * update args of from_images and add_layer_from_images.
1 parent b29dacf commit f80136f

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

docs/src/cli/convert.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ webknossos convert [OPTIONS] SOURCE TARGET
5454
- `--data-format`
5555
Data format to store the target dataset.
5656
Options: `wkw`, `zarr`, `zarr3`
57-
Default: `wkw`.
57+
Default: `zarr3`.
5858

5959
- `--chunk-shape`
6060
Number of voxels to be stored as a chunk in the output format.
@@ -134,7 +134,7 @@ webknossos convert-knossos [OPTIONS] SOURCE TARGET
134134
- `--data-format`
135135
Data format to store the target dataset.
136136
Options: `wkw`, `zarr`, `zarr3`
137-
Default: `wkw`
137+
Default: `zarr3`
138138

139139
- `--chunk-shape`
140140
Number of voxels to be stored as a chunk in the output format.
@@ -218,7 +218,7 @@ webknossos convert-raw [OPTIONS] SOURCE TARGET
218218
- `--data-format`
219219
Data format to store the target dataset.
220220
Options: `wkw`, `zarr`, `zarr3`
221-
Default: `wkw`.
221+
Default: `zarr3`.
222222

223223
- `--chunk-shape`
224224
Number of voxels to be stored as a chunk in the output format.
@@ -290,7 +290,7 @@ webknossos convert-zarr [OPTIONS] SOURCE TARGET
290290
- `--data-format`
291291
Data format to store the target dataset.
292292
Options: `wkw`, `zarr`, `zarr3`
293-
Default: `wkw`.
293+
Default: `zarr3`.
294294

295295
- `--chunk-shape`
296296
Number of voxels to be stored as a chunk in the output format.

webknossos/webknossos/dataset/dataset.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ def from_images(
864864
voxel_size_with_unit: Optional voxel size with unit specification
865865
layer_name: Optional name for layer(s)
866866
layer_category: Optional category override (LayerCategoryType.color / LayerCategoryType.segmentation)
867-
data_format: Format to store data in ('wkw'/'zarr')
867+
data_format: Format to store data in ('wkw'/'zarr'/'zarr3)
868868
chunk_shape: Optional. Shape of chunks to store data in
869869
shard_shape: Optional. Shape of shards to store data in
870870
chunks_per_shard: Deprecated, use shard_shape. Optional. number of chunks per shard
@@ -1317,7 +1317,8 @@ def add_layer(
13171317
if dtype_per_channel.name not in color_dtypes:
13181318
raise ValueError(
13191319
f"Cannot add color layer with dtype {dtype_per_channel.name}. "
1320-
f"Supported dtypes are: {', '.join(color_dtypes)}.",
1320+
f"Supported dtypes are: {', '.join(color_dtypes)}."
1321+
"For an overview of supported dtypes, see https://docs.webknossos.org/webknossos/data/upload_ui.html",
13211322
)
13221323
else:
13231324
segmentation_dtypes = (
@@ -1333,7 +1334,8 @@ def add_layer(
13331334
if dtype_per_channel.name not in segmentation_dtypes:
13341335
raise ValueError(
13351336
f"Cannot add segmentation layer with dtype {dtype_per_channel.name}. "
1336-
f"Supported dtypes are: {', '.join(segmentation_dtypes)}.",
1337+
f"Supported dtypes are: {', '.join(segmentation_dtypes)}."
1338+
"For an overview of supported dtypes, see https://docs.webknossos.org/webknossos/data/upload_ui.html",
13371339
)
13381340

13391341
if layer_name in self.layers.keys():
@@ -1671,7 +1673,7 @@ def add_layer_from_images(
16711673
Further Arguments:
16721674
16731675
* `category`: `color` by default, may be set to "segmentation"
1674-
* `data_format`: by default wkw files are written, may be set to "zarr"
1676+
* `data_format`: by default zarr3 files are written, may be set to "wkw" or "zarr" to write in these formats.
16751677
* `mag`: magnification to use for the written data
16761678
* `chunk_shape`, `chunks_per_shard`, `shard_shape`, `compress`: adjust how the data is stored on disk
16771679
* `topleft`: set an offset in Mag(1) to start writing the data, only affecting the output

0 commit comments

Comments
 (0)