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

ImageJFunction.show can throw ArrayIndexOutOfBoundsException #33

Open
ctrueden opened this issue Jul 12, 2022 · 1 comment
Open

ImageJFunction.show can throw ArrayIndexOutOfBoundsException #33

ctrueden opened this issue Jul 12, 2022 · 1 comment

Comments

@ctrueden
Copy link
Member

From this Image.sc Forum topic: using the shearView op and then showing it as an ImagePlus using ImageJFunctions.show can throw an ArrayIndexOutOfBoundsException. Try opening the Bat Cochlea Volume sample (File → Open Samples menu), then running the following Groovy script:

#@ Img img

import net.imglib2.view.*
import bdv.util.BdvFunctions
import net.imglib2.img.display.imagej.ImageJFunctions

IntervalView imgShear12 = Views.interval( 
                Views.shear( Views.extendZero( img ), 1, 2 ),
                img );

//BdvFunctions.show( imgShear12, "shear 12" );  // looks good
ImageJFunctions.show( imgShear12 ); // CRASHES (see below)

Then move the C slider of the resultant image, and observe the message on stderr:

Exception in thread "zSelector" java.lang.ArrayIndexOutOfBoundsException

This may or may not actually be a bug in imglib2-ij, but I file it here in the absence of a better idea, until it gets investigated.

@imagesc-bot
Copy link

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/cant-access-output-after-using-ij2-op-shearview/8458/15

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

2 participants