Script to retrieve a crop based on annotations in a Neuroglancer state (either the URL or the JSON file). Works with either a point cloud, or one or several lines/bounding boxes.
- cloud-volume[zarr]
- neuroglancer
- numpy
Install all of them with:
pip install 'cloud-volume[zarr]' neuroglancer numpyPass either a Neuroglancer URL (--url) between single quotes or the path to a JSON file with a Neuroglancer state (--json).
python download_from_annotation.py --url 'https://neuroglancer-demo.appspot.com/#!...' --volume_layer_name "layer1" --annotation_layer_name "layer2" [--output_dir '/path/to/output/'] [--margin 50] [--log]python download_from_annotation.py --json '/path/to/state.json' --volume_layer_name "layer1" --annotation_layer_name "layer2" [--output_dir '/path/to/output/'] [--margin 50] [--log]