Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ceesem opened this issue Nov 2, 2022 · 1 comment
Open

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

ceesem opened this issue Nov 2, 2022 · 1 comment
Assignees
Labels
bug The code is not performing according to the design or a design flaw is seriously impacting users. images Pertains to volumetric image representation, interfaces, or IO.

Comments

@ceesem
Copy link
Collaborator

ceesem commented Nov 2, 2022

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
@william-silversmith william-silversmith added bug The code is not performing according to the design or a design flaw is seriously impacting users. images Pertains to volumetric image representation, interfaces, or IO. labels Nov 2, 2022
@william-silversmith william-silversmith self-assigned this Nov 2, 2022
@ceesem
Copy link
Collaborator Author

ceesem commented Nov 2, 2022

To add, it looks like there is no file named 9.7_9.7_45/166333-166589_115585-115841_3569-3601 in the watershed bucket for the PCG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The code is not performing according to the design or a design flaw is seriously impacting users. images Pertains to volumetric image representation, interfaces, or IO.
Projects
None yet
Development

No branches or pull requests

2 participants