cloud-volume icon indicating copy to clipboard operation
cloud-volume copied to clipboard

download mesh cutouts

Open BoyuLyu opened this issue 2 years ago • 4 comments

Do you know if we can download part of the mesh similar to the segmentation? Such as obtaining the cutout given a bounding box.

BoyuLyu avatar Mar 27 '23 17:03 BoyuLyu

Hi HHHit, this is not currently implemented, but it is possible for multi-resolution meshes since the lower levels are stored as a grid of meshes for random access.

william-silversmith avatar Mar 27 '23 18:03 william-silversmith

Does that mean I can download the mesh of only one part of a neuron using the multi-resolution mesh? How to do it? I learnt that the multi-resolution mesh can be accessed using cv.mesh.get(example_cell_id, lod=lod)[example_cell_id] But how to confine the bounding box?

BoyuLyu avatar Mar 27 '23 19:03 BoyuLyu

This is something that I didn't plan on implementing b/c I wasn't sure anyone would use it. Neuroglancer does this already to implement multi-level zoom for meshes. CloudVolume just downloads all of the LOD meshes and fuses them.

I'm a bit busy atm, so you'll have to consult and modify the CloudVolume code and/or the Neuroglancer multires spec in order to do this. Here's the code where CloudVolume downloads and parses the different mesh fragments.

https://github.com/seung-lab/cloud-volume/blob/master/cloudvolume/datasource/precomputed/mesh/multilod.py#L133-L152

william-silversmith avatar Mar 27 '23 19:03 william-silversmith

Thanks!

On Mon, Mar 27, 2023 at 3:20 PM William Silversmith < @.***> wrote:

This is something that I didn't plan on implementing b/c I wasn't sure anyone would use it. Neuroglancer does this already to implement multi-level zoom for meshes. CloudVolume just downloads all of the LOD meshes and fuses them.

I'm a bit busy atm, so you'll have to consult and modify the CloudVolume code and/or the Neuroglancer multires spec in order to do this. Here's the code where CloudVolume downloads and parses the different mesh fragments.

https://github.com/seung-lab/cloud-volume/blob/master/cloudvolume/datasource/precomputed/mesh/multilod.py#L133-L152

— Reply to this email directly, view it on GitHub https://github.com/seung-lab/cloud-volume/issues/580#issuecomment-1485736283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6AIAMVK424VWRVP5FIC3LW6HR65ANCNFSM6AAAAAAWJNVZWA . You are receiving this because you authored the thread.Message ID: @.***>

BoyuLyu avatar Mar 27 '23 19:03 BoyuLyu