You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, fetching the size of all supervoxels in the body requires two API calls:
In [343]: svs=requests.get('http://emdata3:8900/api/node/8e72/segmentation/supervoxels/5813024978').json()
In [344]: sizes=requests.get('http://emdata3:8900/api/node/8e72/segmentation/sizes?supervoxels=true', json=svs).json()
The first call is quite fast (63 ms), but the second is very slow (1 minute). I assume that's because the LabelIndex data structure is completely traversed for every supervoxel in the list. But if you know that the supervoxels all belong to the same body, the LabelIndex can be traversed only once.
The text was updated successfully, but these errors were encountered:
Per conversation with Stuart, I will provide GET /index/{body_id} endpoint as fetch version of the POST on that same endpoint. It will return a protobuf serialization of the label index that includes supervoxels in the body as well as the voxel distribution across blocks. This should be a very fast GET since it will return a label index with minimal processing.
For particularly large bodies, this feature would indeed be useful. In particular, it would simplify things for NeuTu/neu3, and would fix the problem seen in janelia-flyem/NeuTu#375.
In fact, as a related point: If someone runs GET .../sizes?supervoxels=true, it would be great if DVID could check to see which bodies those supervoxels belong to, and only read each relevant labelindex one time, rather than reading each labelindex N times repeatedly for N supervoxels which happen to share the same body.
It would be nice if I could query for all of a body's supervoxels and their sizes simultaneously. The API could be something like this:
...which would return something like this:
Right now, fetching the size of all supervoxels in the body requires two API calls:
The first call is quite fast (63 ms), but the second is very slow (1 minute). I assume that's because the LabelIndex data structure is completely traversed for every supervoxel in the list. But if you know that the supervoxels all belong to the same body, the LabelIndex can be traversed only once.
The text was updated successfully, but these errors were encountered: