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

A new case where download_point with size=1 on null data fails

Open ceesem opened this issue 2 years ago • 1 comments

When doing a supervoxel lookup from a point outside of the volume bounds of a graphene segmentation, we are getting the an error using cv.download_point(pt, size=1). In this case, the region is within the bounding box, but there is no data at the location. I'm attaching a screenshot of the bad location with the z-axis along the horizontal, so you can see how the segmentation comes and goes at the same x,y location. image

The same point correctly returns an array of zeros with size=2 or higher, and points outside of the dataset bounding box work correctly now.

The error is:

File Read Error: 0 bytes, Bbox([166333, 115585, 3569],[166589, 115841, 3601], dtype=int64), 9.7_9.7_45/166333-166589_115585-115841_3569-3601, errors: index out of range

Traceback (most recent call last):
  File "/app/materializationengine/workflows/ingest_new_annotations.py", line 495, in get_sv_id
    cv.download_point(pt=pos_array, size=1, coord_resolution=coord_resolution)
  File "/usr/local/lib/python3.7/site-packages/cloudvolume/frontends/graphene.py", line 122, in download_point
    return self.download(bbox, mip, parallel=parallel, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/cloudvolume/frontends/graphene.py", line 327, in download
    img = super(CloudVolumeGraphene, self).download(bbox, mip=mip, parallel=parallel, renumber=renumber)
  File "/usr/local/lib/python3.7/site-packages/cloudvolume/frontends/precomputed.py", line 630, in download
    bbox.astype(np.int64), mip, parallel=parallel, renumber=bool(renumber)
  File "/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/precomputed/image/__init__.py", line 183, in download
    background_color=int(self.background_color),
  File "/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/precomputed/image/rx.py", line 148, in download
    secrets, renumber, background_color,
  File "/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/precomputed/image/rx.py", line 254, in download_single_voxel_unsharded
    partial(decode_single_voxel, requested_bbox.minpt - chunk_bbx.minpt)
  File "/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/precomputed/image/rx.py", line 429, in download_chunk
    background_color=background_color)
  File "/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/precomputed/image/rx.py", line 533, in decode_single_voxel
    mip, background_color,
  File "/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/precomputed/image/rx.py", line 559, in _decode_helper
    background_color=background_color
  File "/usr/local/lib/python3.7/site-packages/cloudvolume/chunks.py", line 296, in read_voxel
    out[0,0,0,0] = arr[tuple(xyz)]
  File "src/compressed_segmentation.pyx", line 399, in compressed_segmentation.CompressedSegmentationArray.__getitem__
  File "src/compressed_segmentation.pyx", line 358, in compressed_segmentation.CompressedSegmentationArray.get
IndexError: index out of range

ceesem avatar Nov 02 '22 21:11 ceesem