Skip to content

Conversation

@minnerbe
Copy link
Contributor

This PR fixes a bug where the following minimal example throws a java.lang.ArrayIndexOutOfBoundsException

final FloatProcessor ip = new ij.process.FloatProcessor(123, 34);
final NormalizeLocalContrast normalizer = new NormalizeLocalContrast(ip);                                                                      
normalizer.run(12, 21, 3, true, true);

The cause of the bug was that the loop bounds for column and row traversal in the column accumulation code were swapped. This occurred in many places throughout the code base. I cross checked with the changed files in #79, so I hope I've caught all occurrences now.

Thanks @axtimwalde for catching that bug!

Copy link
Owner

@axtimwalde axtimwalde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@axtimwalde axtimwalde merged commit d69e1e8 into axtimwalde:master Oct 14, 2025
1 check passed
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