Hi,
I'm having a problem returning arrays in Javascript. I have a function that calculates things and returns an array of values. When I try to return an array, I get the following red warning message in the console: [WARNING] Ignoring unsupported output: result [sun.org.mozilla.javascript.internal.NativeArray] Also, I'm having trouble reproducing the problem, since it often disappears for an unknown reason, and then I can't reproduce it. Thanks, Avital -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Avital,
> [WARNING] Ignoring unsupported output: result > [sun.org.mozilla.javascript.internal.NativeArray] This warning comes from the SciJava script framework -- part of ImageJ2. It means that the last computation of your script produced an array of values, which the system wants to display, but doesn't know how. Any chance you could share a minimal script which illustrates the issue? Also, which version of Java and which OS are you using? Regards, Curtis On Mon, Aug 24, 2015 at 7:02 AM, Avital Steinberg <[hidden email] > wrote: > Hi, > I'm having a problem returning arrays in Javascript. I have a function that > calculates things and returns an array of values. When I try to return an > array, I get the following red warning message in the console: > > [WARNING] Ignoring unsupported output: result > [sun.org.mozilla.javascript.internal.NativeArray] > > Also, I'm having trouble reproducing the problem, since it often disappears > for an unknown reason, and then I can't reproduce it. > > Thanks, > Avital > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Curtis,
I'm using ImageJ 2.0.0-rc-30/1.50a on a 10.9.5 mac. The reason I didn't share the code is that I'm having trouble reproducing the error message. That is - it disappeared and it's likely to reappear, because I didn't do anything to solve it. Thanks, Avital On Mon, Aug 24, 2015 at 10:36 PM, Curtis Rueden <[hidden email]> wrote: > Hi Avital, > > > [WARNING] Ignoring unsupported output: result > > [sun.org.mozilla.javascript.internal.NativeArray] > > This warning comes from the SciJava script framework -- part of ImageJ2. It > means that the last computation of your script produced an array of values, > which the system wants to display, but doesn't know how. > > Any chance you could share a minimal script which illustrates the issue? > > Also, which version of Java and which OS are you using? > > Regards, > Curtis > > On Mon, Aug 24, 2015 at 7:02 AM, Avital Steinberg < > [hidden email] > > wrote: > > > Hi, > > I'm having a problem returning arrays in Javascript. I have a function > that > > calculates things and returns an array of values. When I try to return an > > array, I get the following red warning message in the console: > > > > [WARNING] Ignoring unsupported output: result > > [sun.org.mozilla.javascript.internal.NativeArray] > > > > Also, I'm having trouble reproducing the problem, since it often > disappears > > for an unknown reason, and then I can't reproduce it. > > > > Thanks, > > Avital > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Avital,
> The reason I didn't share the code is that I'm having trouble > reproducing the error message. That is - it disappeared and it's > likely to reappear, because I didn't do anything to solve it. OK. Well, it's definitely related to the last statement of your script. The script framework implicitly stores the script's return value in an output called "result" which it then tries to display. If you see the error again, maybe that helps to boil it down to a minimal example. One potential fix for this "bug" might be to ignore values in the "result" output when they cannot be displayed, rather than to issue that warning. Regards, Curtis On Tue, Aug 25, 2015 at 7:04 AM, Avital Steinberg <[hidden email] > wrote: > Hi Curtis, > I'm using ImageJ 2.0.0-rc-30/1.50a on a 10.9.5 mac. The reason I didn't > share the code is that I'm having trouble reproducing the error message. > That is - it disappeared and it's likely to reappear, because I didn't do > anything to solve it. > > Thanks, > Avital > > On Mon, Aug 24, 2015 at 10:36 PM, Curtis Rueden <[hidden email]> wrote: > > > Hi Avital, > > > > > [WARNING] Ignoring unsupported output: result > > > [sun.org.mozilla.javascript.internal.NativeArray] > > > > This warning comes from the SciJava script framework -- part of ImageJ2. > It > > means that the last computation of your script produced an array of > values, > > which the system wants to display, but doesn't know how. > > > > Any chance you could share a minimal script which illustrates the issue? > > > > Also, which version of Java and which OS are you using? > > > > Regards, > > Curtis > > > > On Mon, Aug 24, 2015 at 7:02 AM, Avital Steinberg < > > [hidden email] > > > wrote: > > > > > Hi, > > > I'm having a problem returning arrays in Javascript. I have a function > > that > > > calculates things and returns an array of values. When I try to return > an > > > array, I get the following red warning message in the console: > > > > > > [WARNING] Ignoring unsupported output: result > > > [sun.org.mozilla.javascript.internal.NativeArray] > > > > > > Also, I'm having trouble reproducing the problem, since it often > > disappears > > > for an unknown reason, and then I can't reproduce it. > > > > > > Thanks, > > > Avital > > > > > > -- > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Avital Steinberg
Hi all,
I'm struggling to setup some shortcuts for macros within imageJ. I'm aiming for three things: 1. macro installs automatically at start up 2. macro is available through the >> toolbars menu 3. macro can be assigned an icon as a shortcut in the toolbar 1. I have added the following line to startup macros.txt file: macro "AutoRun" { run("Run…", "run=[//Applications//Micro-Manager1.4//macros//RGB Composite Action Tool.txt]"); } This doesn't work for some reason. Initially i didn't have any spaces in the file name but used the underscore "_" it still didn't work with this though. 2. I have added the macro to the Plugins>Tools folder This hasn't worked. 3. How do i give the macro an icon and add it to the toolbar? I should also say that this is Imagej bundled with Micro-Manager so in fact the Tools folder within the Plugins folder didn't exist so i created the folder and added my macro to it but it doesn't appear. Can anyone help we figure out where i'm going wrong with this? Thanks a lot, Matt -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Matthew,
My answer won't solve your issue with macro installation but (if you didn't try it yet) I would suggest you to use the ActionBar plugin : http://imagejdocu.tudor.lu/doku.php?id=plugin:utilities:action_bar:start We use it a lot here, Cheers, Romain --------------------------------------------------------------- Dr. Romain Guiet Bioimaging and Optics Platform (PT-BIOP) Ecole Polytechnique Fédérale de Lausanne (EPFL) Faculty of Life Sciences Station 19, AI 0140 CH-1015 Lausanne Phone: [+4121 69] 39629 http://biop.epfl.ch/ --------------------------------------------------------------- ________________________________________ De : ImageJ Interest Group [[hidden email]] de la part de PEARSON Matthew [[hidden email]] Envoyé : mardi 25 août 2015 16:02 À : [hidden email] Objet : Imagej macro action tool Hi all, I'm struggling to setup some shortcuts for macros within imageJ. I'm aiming for three things: 1. macro installs automatically at start up 2. macro is available through the >> toolbars menu 3. macro can be assigned an icon as a shortcut in the toolbar 1. I have added the following line to startup macros.txt file: macro "AutoRun" { run("Run…", "run=[//Applications//Micro-Manager1.4//macros//RGB Composite Action Tool.txt]"); } This doesn't work for some reason. Initially i didn't have any spaces in the file name but used the underscore "_" it still didn't work with this though. 2. I have added the macro to the Plugins>Tools folder This hasn't worked. 3. How do i give the macro an icon and add it to the toolbar? I should also say that this is Imagej bundled with Micro-Manager so in fact the Tools folder within the Plugins folder didn't exist so i created the folder and added my macro to it but it doesn't appear. Can anyone help we figure out where i'm going wrong with this? Thanks a lot, Matt -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Romain,
Thanks for the link, that looks like a very useful tool! Wayne came to the rescue on my installation issues. cheers, Matt On 7 Sep 2015, at 13:49, Romain Guiet <[hidden email]> wrote: > Hi Matthew, > > My answer won't solve your issue with macro installation but (if you didn't try it yet) I would suggest you to use the ActionBar plugin : http://imagejdocu.tudor.lu/doku.php?id=plugin:utilities:action_bar:start > We use it a lot here, > > Cheers, > > Romain > > --------------------------------------------------------------- > Dr. Romain Guiet > Bioimaging and Optics Platform (PT-BIOP) > Ecole Polytechnique Fédérale de Lausanne (EPFL) > Faculty of Life Sciences > Station 19, AI 0140 > CH-1015 Lausanne > > Phone: [+4121 69] 39629 > http://biop.epfl.ch/ > --------------------------------------------------------------- > > ________________________________________ > De : ImageJ Interest Group [[hidden email]] de la part de PEARSON Matthew [[hidden email]] > Envoyé : mardi 25 août 2015 16:02 > À : [hidden email] > Objet : Imagej macro action tool > > Hi all, > > I'm struggling to setup some shortcuts for macros within imageJ. I'm aiming for three things: > 1. macro installs automatically at start up > 2. macro is available through the >> toolbars menu > 3. macro can be assigned an icon as a shortcut in the toolbar > > 1. I have added the following line to startup macros.txt file: > macro "AutoRun" { > run("Run…", "run=[//Applications//Micro-Manager1.4//macros//RGB Composite Action Tool.txt]"); > } > > This doesn't work for some reason. Initially i didn't have any spaces in the file name but used the underscore "_" it still didn't work with this though. > > 2. I have added the macro to the Plugins>Tools folder > > This hasn't worked. > > 3. How do i give the macro an icon and add it to the toolbar? > > I should also say that this is Imagej bundled with Micro-Manager so in fact the Tools folder within the Plugins folder didn't exist so i created the folder and added my macro to it but it doesn't appear. > > Can anyone help we figure out where i'm going wrong with this? > > Thanks a lot, > > Matt > > > > > > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Indeed it's very useful and very easy to install (ideal for a core facility that offers generic and specific tools).
If you are interested we developed a small library of functions that is useful to handles the parameters for the macros, the file opening and saving...it's available on our fiji update site : "PTBIOP" Cheers, Romain --------------------------------------------------------------- Dr. Romain Guiet Bioimaging and Optics Platform (PT-BIOP) Ecole Polytechnique Fédérale de Lausanne (EPFL) Faculty of Life Sciences Station 19, AI 0140 CH-1015 Lausanne Phone: [+4121 69] 39629 http://biop.epfl.ch/ --------------------------------------------------------------- ________________________________________ De : ImageJ Interest Group [[hidden email]] de la part de PEARSON Matthew [[hidden email]] Envoyé : lundi 7 septembre 2015 14:57 À : [hidden email] Objet : Re: Imagej macro action tool Hi Romain, Thanks for the link, that looks like a very useful tool! Wayne came to the rescue on my installation issues. cheers, Matt On 7 Sep 2015, at 13:49, Romain Guiet <[hidden email]> wrote: > Hi Matthew, > > My answer won't solve your issue with macro installation but (if you didn't try it yet) I would suggest you to use the ActionBar plugin : http://imagejdocu.tudor.lu/doku.php?id=plugin:utilities:action_bar:start > We use it a lot here, > > Cheers, > > Romain > > --------------------------------------------------------------- > Dr. Romain Guiet > Bioimaging and Optics Platform (PT-BIOP) > Ecole Polytechnique Fédérale de Lausanne (EPFL) > Faculty of Life Sciences > Station 19, AI 0140 > CH-1015 Lausanne > > Phone: [+4121 69] 39629 > http://biop.epfl.ch/ > --------------------------------------------------------------- > > ________________________________________ > De : ImageJ Interest Group [[hidden email]] de la part de PEARSON Matthew [[hidden email]] > Envoyé : mardi 25 août 2015 16:02 > À : [hidden email] > Objet : Imagej macro action tool > > Hi all, > > I'm struggling to setup some shortcuts for macros within imageJ. I'm aiming for three things: > 1. macro installs automatically at start up > 2. macro is available through the >> toolbars menu > 3. macro can be assigned an icon as a shortcut in the toolbar > > 1. I have added the following line to startup macros.txt file: > macro "AutoRun" { > run("Run…", "run=[//Applications//Micro-Manager1.4//macros//RGB Composite Action Tool.txt]"); > } > > This doesn't work for some reason. Initially i didn't have any spaces in the file name but used the underscore "_" it still didn't work with this though. > > 2. I have added the macro to the Plugins>Tools folder > > This hasn't worked. > > 3. How do i give the macro an icon and add it to the toolbar? > > I should also say that this is Imagej bundled with Micro-Manager so in fact the Tools folder within the Plugins folder didn't exist so i created the folder and added my macro to it but it doesn't appear. > > Can anyone help we figure out where i'm going wrong with this? > > Thanks a lot, > > Matt > > > > > > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |