[issue] Find Peaks BAR tool some issues with setting parameters

Hi to all,
I am facing a problem with Find Peaks of BAR toolbox (http://imagej.net/Find_Peaks).
It worked well since some months ago, today I am trying to using it but I cannot change parameters anymore.
For example if i put the Max. value of minima to -1 (like in example, and like I have to do since I want to extract only maxima) it throws out this error:

javax.script.ScriptException: Sourced file: eval stream : Not an array : at Line: 103 : in file: eval stream : [ pos2 ]
in eval stream at line number 103
at bsh.engine.BshScriptEngine.evalSource(BshScriptEngine.java:93)
at bsh.engine.BshScriptEngine.eval(BshScriptEngine.java:52)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
at org.scijava.script.ScriptModule.run(ScriptModule.java:173)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

It happens the same even if I change Min. peak distance from 0.00 to any number I think… it throws the same error.

I used it many times, also in some of mine plugins/jython scripts… maybe could it be a new java/mac compatibilty?

A note, at the moment I am updating it using the BAR update sites.

Thank you very much,
have a nice day
Emanuele Martini

Hi @emartini,

I think this is side effect of updating BeanShell bsh-2.0b6 ( Discussed here ) that introduced breaking changes. @ctrueden is trying hard to fix it. I’ve tried to fix some of of BAR BeanShell scripts with some ugly shenanigans but I stopped doing it because it should be fixed soon… Can you wait?

1 Like

I got carried away updating components, and it has turned into a substantial new release of ImageJ. :smile:

The good news is:

  • I am almost done! I am really pushing to have things uploaded by end of (U.S.) day today.
  • There will be several shiny new bits and bobs.
  • And of course, the void problem with BeanShell will be fixed.
2 Likes

Everything is uploaded! The following BeanShell script now prints NULL as expected again:

a = null;
System.out.println(a == null ? "NULL" : "HUH?");

@emartini Can you update (with Java-8 update site enabled) and try again, and report back whether it works now?

1 Like

Thank you very much @ctrueden!
now it works fine

Have a nice day,
Emanuele

1 Like