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

BufferedSliceWriter Erroneous on Mags > 1 #1168

Open
Tobias314 opened this issue Aug 13, 2024 · 2 comments
Open

BufferedSliceWriter Erroneous on Mags > 1 #1168

Tobias314 opened this issue Aug 13, 2024 · 2 comments
Assignees
Labels

Comments

@Tobias314
Copy link

Context

  • Affected library: e.g. webknossos
  • Creating a BufferedSliceWriter for a mag view with mag > 1 and an offset != 0 does not seem to work correctly

Expected Behavior

  • Correctly writing the data

Current Behavior

  • Data is written with wrong offset

Possible Fix:

Change line 199
from
absolute_bounding_box=chunk_bbox.from_mag_to_mag1(self._view._mag)
to
absolute_bounding_box=chunk_bbox

@markbader
Copy link
Contributor

I just took a look and tested if the possible fix already solves the issue sufficiently. The change of line 199 leads to two failing wk-libs tests:
FAILED tests/dataset/test_add_layer_from_images.py::test_repo_images[test_rgb.tif-kwargs2-uint8-1-1-size2] - AssertionError: bottomright Vec3Int(32,32,3) is not aligned with the mag 2. Use BoundingBox.align_with_mag().
FAILED tests/dataset/test_add_layer_from_images.py::test_repo_images[rgb_tiff-kwargs3-uint32-1-1-size3] - AssertionError: bottomright Vec3Int(32,32,3) is not aligned with the mag 2. Use BoundingBox.align_with_mag().

We should check what causes these failures and how to avoid them.

@aaronkanzer
Copy link

Hi @markbader and @Tobias314 -- is there any update on this bug being resolved?

cc @jingjingwu1225 @kabilar -- it seems that this is somewhat of a blocker for Jingjing's script -- @jingjingwu1225 perhaps you could provide more context here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants