upsample¶
The upsample command upsamples a WEBKNOSSOS dataset. It works with both local datasets and datasets hosted on a WEBKNOSSOS server.
Usage¶
webknossos upsample [OPTIONS] SOURCE
Arguments¶
- SOURCE
Path to a local WEBKNOSSOS dataset, or URL to a dataset on a WEBKNOSSOS server.
Examples:
/path/to/datasethttps://webknossos.org/datasets/Organization_X/my_dataset
Options¶
-
--from-magMagnification level to start upsampling from. Accepts a single number or a minus-separated string (e.g.,2or2-2-2). Example:--from-mag 2. -
--sampling-modeThe sampling mode to use for upsampling. Options:anisotropic,isotropic,constant_z. Default:anisotropic. -
--layer-nameName of the layer that should be upsampled. If not provided, all layers are processed. Example:--layer-name gray_matter.
WEBKNOSSOS context¶
-
--tokenAuthentication token for the WEBKNOSSOS instance (see https://webknossos.org/auth/token). Can also be provided via theWK_TOKENenvironment variable. Required when SOURCE is a WEBKNOSSOS server URL pointing to a non-public dataset. -
--transfer-modeRequired for remote datasets. The transfer mode to use. Available options arecopy,move+symlink,symlink,http.copy,move+symlink,symlinkrequire direct filesystem access to the WEBKNOSSOS datastore. -
--access-modeHow to access the remote dataset's data. Available options aredirect_path,zarr_streaming,proxy_path. Defaults todirect_pathwhen--transfer-modeis nothttp, otherwiseproxy_path.
Executor options¶
-
--jobsNumber of processes to be spawned for parallel execution. Default: Number of CPU cores. Example:--jobs 4. -
--distribution-strategyStrategy to distribute the task across CPUs or nodes. Options:multiprocessing,slurm,kubernetes,sequential. Default:multiprocessing. -
--job-resourcesSpecify resources for jobs when using the SLURM distribution strategy. Should be a JSON string. Example:--job-resources '{"mem": "10M"}'.
Example Commands¶
Upsample all layers of a local dataset:¶
webknossos upsample --from-mag 2 /path/to/dataset
Upsample a specific layer:¶
webknossos upsample --from-mag 2 --layer-name gray_matter /path/to/dataset
Upsample with parallel execution using SLURM:¶
webknossos upsample --from-mag 2 --distribution-strategy slurm --job-resources '{"mem": "10M"}' /path/to/dataset
Upsample a dataset on a WEBKNOSSOS server:¶
webknossos upsample --from-mag 2 --token YOUR_TOKEN --transfer-mode copy https://webknossos.org/datasets/Organization_X/my_dataset
Upsample a specific layer of a remote dataset:¶
webknossos upsample --from-mag 2 --layer-name gray_matter --token YOUR_TOKEN --transfer-mode copy https://webknossos.org/datasets/Organization_X/my_dataset
Notes¶
- Local and remote datasets are distinguished automatically: a URL (starting with
http://orhttps://) is treated as a remote dataset; any other path is treated as local. --tokenis only required when accessing non-public remote datasets. It can be set once via theWK_TOKENenvironment variable.--transfer-modeis required for remote datasets and ignored for local datasets.- If
--layer-nameis omitted, all layers in the dataset are upsampled.
- Get Help
- Community Forums
- Email Support