You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: the error appears only when specifying the Ball element and for some combinations of radii (e.g. 4,4,1 or 8,8,2)
I suspect that this is due to some rounding error when adding and removing the borders, but I was not able to pinpoint the piece of code.
The error can be reproduced with these two macro commands
(Fiji Is Just) ImageJ 2.14.0/1.54f; Java 1.8.0_322 [64-bit]; Windows 10 10.0; 858MB of 65386MB (1%)
java.lang.IllegalArgumentException: Crop bounds exceed image bounds
at inra.ijpb.shape.ImageShape.cropRect(ImageShape.java:208)
at inra.ijpb.morphology.strel.AbstractStrel3D.closing(AbstractStrel3D.java:341)
at inra.ijpb.morphology.filter.Closing.process(Closing.java:82)
at inra.ijpb.morphology.Morphology.closing(Morphology.java:507)
at inra.ijpb.morphology.Morphology$Operation.apply(Morphology.java:176)
at inra.ijpb.plugins.MorphologicalFilter3DPlugin.process(MorphologicalFilter3DPlugin.java:169)
at inra.ijpb.plugins.MorphologicalFilter3DPlugin.run(MorphologicalFilter3DPlugin.java:110)
at ij.IJ.runUserPlugIn(IJ.java:244)
at ij.IJ.runPlugIn(IJ.java:210)
at ij.Executer.runCommand(Executer.java:152)
at ij.Executer.run(Executer.java:67)
at ij.IJ.run(IJ.java:326)
at ij.IJ.run(IJ.java:337)
at ij.macro.Functions.doRun(Functions.java:703)
at ij.macro.Functions.doFunction(Functions.java:99)
at ij.macro.Interpreter.doStatement(Interpreter.java:281)
at ij.macro.Interpreter.doStatements(Interpreter.java:267)
at ij.macro.Interpreter.run(Interpreter.java:163)
at ij.macro.Interpreter.run(Interpreter.java:93)
at ij.macro.Interpreter.run(Interpreter.java:107)
at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:164)
at ij.IJ.runMacro(IJ.java:165)
at ij.IJ.runMacro(IJ.java:154)
at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:1186)
at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:1182)
at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:1133)
at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:1182)
at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:145)
at org.scijava.script.ScriptModule.run(ScriptModule.java:173)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
The text was updated successfully, but these errors were encountered:
It looks like a rounding error indeed! Actually, I could not reproduce, but I'm pretty sure the problem simply comes from the control that throws the exception. I try to check this more in details soon!
thank you for looking into it. If it is of any help, I tried on two different Windows machine and on a fresh installation of Fiji, and I always get the error.
I also tried previous versions of the plugin, and the error is present in 1.6.0 but not in 1.5.0 (as packaged in sites.imagej.net)
I found a mistake in the way the "offset" of the structuring element was computed. I fixed it in 355b6c8, this made the bug disappear for me (I could finally reproduce on another computer).
giocard
changed the title
Error when applying opening/closing with an ellipsoid strcutring element
Error when applying opening/closing with an ellipsoid structuring element
Mar 12, 2024
Note: the error appears only when specifying the Ball element and for some combinations of radii (e.g. 4,4,1 or 8,8,2)
I suspect that this is due to some rounding error when adding and removing the borders, but I was not able to pinpoint the piece of code.
The error can be reproduced with these two macro commands
newImage("HyperStack", "8-bit grayscale-mode", 512, 512, 1, 32, 1);
run("Morphological Filters (3D)", "operation=Opening element=Ball x-radius=4 y-radius=4 z-radius=1");
The error message is
(Fiji Is Just) ImageJ 2.14.0/1.54f; Java 1.8.0_322 [64-bit]; Windows 10 10.0; 858MB of 65386MB (1%)
java.lang.IllegalArgumentException: Crop bounds exceed image bounds
at inra.ijpb.shape.ImageShape.cropRect(ImageShape.java:208)
at inra.ijpb.morphology.strel.AbstractStrel3D.closing(AbstractStrel3D.java:341)
at inra.ijpb.morphology.filter.Closing.process(Closing.java:82)
at inra.ijpb.morphology.Morphology.closing(Morphology.java:507)
at inra.ijpb.morphology.Morphology$Operation.apply(Morphology.java:176)
at inra.ijpb.plugins.MorphologicalFilter3DPlugin.process(MorphologicalFilter3DPlugin.java:169)
at inra.ijpb.plugins.MorphologicalFilter3DPlugin.run(MorphologicalFilter3DPlugin.java:110)
at ij.IJ.runUserPlugIn(IJ.java:244)
at ij.IJ.runPlugIn(IJ.java:210)
at ij.Executer.runCommand(Executer.java:152)
at ij.Executer.run(Executer.java:67)
at ij.IJ.run(IJ.java:326)
at ij.IJ.run(IJ.java:337)
at ij.macro.Functions.doRun(Functions.java:703)
at ij.macro.Functions.doFunction(Functions.java:99)
at ij.macro.Interpreter.doStatement(Interpreter.java:281)
at ij.macro.Interpreter.doStatements(Interpreter.java:267)
at ij.macro.Interpreter.run(Interpreter.java:163)
at ij.macro.Interpreter.run(Interpreter.java:93)
at ij.macro.Interpreter.run(Interpreter.java:107)
at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:164)
at ij.IJ.runMacro(IJ.java:165)
at ij.IJ.runMacro(IJ.java:154)
at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:1186)
at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:1182)
at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:1133)
at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:1182)
at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:145)
at org.scijava.script.ScriptModule.run(ScriptModule.java:173)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
The text was updated successfully, but these errors were encountered: