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

ArrayOutOfBoundsException when using UIService to show image with origin not at zero #68

Open
maarzt opened this issue Jun 15, 2017 · 4 comments

Comments

@maarzt
Copy link
Member

maarzt commented Jun 15, 2017

Minimal example:

RandomAccessibleInterval<FloatType> image = Views.translate(ArrayImgs.floats(10, 10), 50, 50);
new Context().service(UIService.class).show(image);

produces several an ArrayOutOfBoundExceptions.

@maarzt
Copy link
Member Author

maarzt commented Jun 15, 2017

The error seems to be cause by DefaultDatasetView. In DefaultDatasetView#rebuild() CompositeXYProjector is used to project the image to screenImage which has different bounds.
In DefaultDatasetView#autoscale() seems to be a second unrelated error which as well causes ArrayOutOfBoundsExceptions.

@ctrueden
Copy link
Member

Seems reminiscent of imglib/imglib2#161. @maarzt Did you get a chance to talk to @tpietzsch about this?

@ctrueden
Copy link
Member

And I certainly agree that regardless of the correctness of CompositeXYProjector behavior, this is a bug... in something somewhere! Your example above should clearly work, not throw exceptions.

@tpietzsch
Copy link
Member

tpietzsch commented Jun 16, 2017

Did you get a chance to talk to @tpietzsch about this?

Yes, I suggested that @maarzt files an issue...

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

No branches or pull requests

3 participants