Created
September 11, 2019 00:25
-
-
Save william-silversmith/d0f2f6fb49913c038319bca396761033 to your computer and use it in GitHub Desktop.
Accessing FlyWire Proofread Reconstructions with CloudVolume
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cloudvolume import CloudVolume | |
cv = CloudVolume( | |
'graphene://https://fafbv2.dynamicannotationframework.com/segmentation/1.0/fly_v31', # neuroglancer layer | |
use_https=True # uses the public access interface | |
) | |
# Download and Save a Mesh to Disk | |
mesh = cv.mesh.get(720575940621065107) | |
with open('720575940621065107.ply', 'wb') as f: | |
f.write(mesh.to_ply()) | |
# Extracting a Volumetric Image Label from an ROI | |
img = cv.download_point( | |
(161493, 46884, 2759), # point in neuroglancer | |
segids=[ 720575940627678160 ], | |
mip=0, size=(256, 256, 256), | |
coord_resolution=(4,4,40) # neuroglancer display resolution | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requires cloud-volume >= 0.61.0
For installation instructions, check out the main CloudVolume repository here:
https://github.com/seung-lab/cloud-volume
pip install cloud-volume
usually suffices though.