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

fix bug in KDTreeUtils unflatten() #371

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

StephanPreibisch
Copy link
Member

threw an ArrayIndexOutOfBoundsException for the following use-case:

// input: [1.0, 1.0, 1.0, 0.0, 1.0, 0.5, 0.0, 0.0, 0.0, 1.0], dim=2

// the should-be result with the fix
deep: [[1.0, 1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.5, 0.0, 1.0]]

// without the fix
java.lang.ArrayIndexOutOfBoundsException: 5
at net.imglib2.kdtree.KDTreeUtils.unflatten(KDTreeUtils.java:229)

threw an ArrayIndexOutOfBoundsException for the following use-case:

// input: [1.0, 1.0, 1.0, 0.0, 1.0, 0.5, 0.0, 0.0, 0.0, 1.0], dim=2

// the should-be result with the fix
deep: [[1.0, 1.0, 1.0, 0.0, 0.0], [1.0, 0.0, 0.5, 0.0, 1.0]]

// without the fix
java.lang.ArrayIndexOutOfBoundsException: 5
	at net.imglib2.kdtree.KDTreeUtils.unflatten(KDTreeUtils.java:229)
@tpietzsch tpietzsch merged commit 58f18c6 into imglib:master Oct 15, 2024
1 check passed
@tpietzsch
Copy link
Member

thanks!

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 this pull request may close these issues.

2 participants