Awesome
CloudVolume
Julia wrapper for cloud-volume from Python.
Installation
Install cloud-volume, following the steps in its documentation.
Within Julia, clone this package,
Pkg.clone("https://github.com/seung-lab/CloudVolume.jl")
Quickstart
Note that indexing is inclusive, like Julia.
using CloudVolume
# CloudVolume object
vol = CloudVolumeWrapper("<path to precomputed file directory>")
img = vol[1000:1100, 2000:2100, 100:200] # download images
vol[1000:1100, 2000:2100, 100:200] = img # upload images
# Storage object
s = StorageWrapper("<path to storage directory>")
s["filename"] = "content"
s["filename"] == "content" # returns true
delete!(s, "filename")
Note that uploaded CloudVolume data must be chunk-aligned. For more details, see the cloud-volume documentation.
Troubleshooting
If you installed the CloudVolume Python package inside a virtualenv, you many need to rebuild PyCall
to use that virtualenv.
- Activate the virtualenv you created.
- Open Julia.
- Run
rm(Pkg.dir("PyCall","deps","PYTHON")); Pkg.build("PyCall")
Credits
Thanks to @jonathanzung for an earlier version of this wrapper.