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

Tile sink should accept tiles with no explicit samples dimension #1804

Closed
manthey opened this issue Feb 3, 2025 · 1 comment · Fixed by #1805
Closed

Tile sink should accept tiles with no explicit samples dimension #1804

manthey opened this issue Feb 3, 2025 · 1 comment · Fixed by #1805

Comments

@manthey
Copy link
Member

manthey commented Feb 3, 2025

Given a numpy array: data = np.zeros((4, 1040, 1388)) which is channels, y, x, this doesn't work:

sink = large_image.new()
sink.addTile(t, 0, 0, axes=['c', 'y', 'x']
sink.write('sample.tiff')

But this does:

sink = large_image.new()
sink.addTile(t[..., np.newaxis], 0, 0, axes=['c', 'y', 'x', 's']
sink.write('sample.tiff')

If axes are specified explicitly and match the number of axes of the numpy array, this should work.

@manthey
Copy link
Member Author

manthey commented Feb 3, 2025

@annehaley This was reported from a user. We should add a test case for this and make sure the first instance works.

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

Successfully merging a pull request may close this issue.

1 participant