Bug with Directionality Plugin on large stacks

Hi All and @tinevez,

I am attempting to use the Directionality plugin in large video stacks. Unfortunately I cannot use the plugin directly on stacks longer than 5 images, and our videos tend to be 500-700 frames long. We get this error when we run the plugin. Could you recommend how we could proceed?

java.lang.ArrayIndexOutOfBoundsException: 0
at ij.measure.CurveFitter.makeInitialParamsAndVariations(CurveFitter.java:924)
at ij.measure.CurveFitter.doFit(CurveFitter.java:200)
at ij.measure.CurveFitter.doFit(CurveFitter.java:169)
at fiji.analyze.directionality.Directionality_.fitHistograms(Directionality_.java:884)
at fiji.analyze.directionality.Directionality_.run(Directionality_.java:500)
at ij.IJ.runUserPlugIn(IJ.java:229)
at ij.IJ.runPlugIn(IJ.java:193)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at ij.plugin.Hotkeys.run(Hotkeys.java:26)
at ij.IJ.runPlugIn(IJ.java:199)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:748)

Thanks for your help,

Hi Sarah,

Apparently the error happens at the curve fitting stage. I do not know how it relates to the image size.

Could you post it here to me so that I can check?

@tinevez, it does not relate to the image size, rather to its content. I can reproduce the same error message by running Directionality on an empty image.
This error disappears if I downgrade imagej to the latest 1.51 release (1.51w), but the result is a NaN. So something changed in between.
Lastly, this behavior of CurveFitter had been already highlighted in java.lang.ArrayIndexOutOfBoundsException: 0 with ImageJ 1.52p


1 Like

Thank you @tinevez and @gcardone. I used the 1.51 release and it worked. You’re right, my videos contain some complete blank frames because we remove them for quality.