Dear Stephan(s),
When using the excellent Grid/Collection Stitching and picking up the command from the recorder, it outputs "[Right & Down ]" for the direction, including the spaces. Not adding the spaces gives a "Command not recognized" It's mostly aesthetics, but I just thought you should know. All the best Oli Olivier Burri Engineer - Image Processing & Software Development EPFL - SV - PTECH - PTBIOP -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Oliver,
thanks for pointing that out. Unfortunately it is not a bug ... I needed to do that so that when the Dialog is initialized the dropdown text field is large enough, so that when other options are selected the text is not cropped. Not sure if this makes sense now the way I wrote it, but it is the only way I could figure out that works. Cheers, Stephan --- Dr. Stephan Preibisch HFSP Fellow Robert H. Singer / Eugene Myers lab Albert Einstein College of Medicine / HHMI Janelia Farm / MPI-CBG email: [hidden email] / [hidden email] / [hidden email] web: http://www.preibisch.net/ On Apr 22, 2014, at 11:16 , Burri Olivier wrote: > Dear Stephan(s), > > When using the excellent Grid/Collection Stitching and picking up the command from the recorder, it outputs > "[Right & Down ]" for the direction, including the spaces. Not adding the spaces gives a "Command not recognized" > > It's mostly aesthetics, but I just thought you should know. > > All the best > > Oli > > Olivier Burri > Engineer - Image Processing > & Software Development > EPFL - SV - PTECH - PTBIOP > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Stephan,
Thanks for the info. Auto-sized menus can be problematic indeed. All the best Oli Olivier Burri Engineer - Image Processing & Software Development EPFL - SV - PTECH - PTBIOP > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Stephan Preibisch > Sent: mardi 22 avril 2014 12:25 > To: [hidden email] > Subject: Re: Small Bug in Grid/Collection Stitching > > Hi Oliver, > > thanks for pointing that out. Unfortunately it is not a bug ... I needed to do > that so that when the Dialog is initialized the dropdown text field is large > enough, so that when other options are selected the text is not cropped. Not > sure if this makes sense now the way I wrote it, but it is the only way I could > figure out that works. > > Cheers, > Stephan > --- > > Dr. Stephan Preibisch > HFSP Fellow > Robert H. Singer / Eugene Myers lab > > Albert Einstein College of Medicine / HHMI Janelia Farm / MPI-CBG > > email: [hidden email] / [hidden email] / > [hidden email] > web: http://www.preibisch.net/ > > On Apr 22, 2014, at 11:16 , Burri Olivier wrote: > > > Dear Stephan(s), > > > > When using the excellent Grid/Collection Stitching and picking up the > command from the recorder, it outputs > > "[Right & Down ]" for the direction, including the spaces. Not adding > the spaces gives a "Command not recognized" > > > > It's mostly aesthetics, but I just thought you should know. > > > > All the best > > > > Oli > > > > Olivier Burri > > Engineer - Image Processing > > & Software Development > > EPFL - SV - PTECH - PTBIOP > > > > > > -- > > 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 |
Dear all,
In plugins it is possible to set launching arguments as a String parameter: public void run (final String arg) {..... And for example in the Radial_Profile_Angle_Ext plugin there are two menu entries defined in a plugins.config file that are defining the following entries: Plugins, "Radial Profile Angle", Radial_Profile_Angle_Ext Help>About Plugins, "Radial Profile Angle...", Radial_Profile_Angle_Ext("about") And thus to run either one or other defined entry from a macro, it is simply done: Run("Radial Profile Angle"); or Run("Radial Profile Angle..."); My question: is it possible to directly run a plugin with a launching argument without defining it in a plugins.config file similarly to such a way: Run("Radial Profile Angle", ("about")); Or something like this? My best regards, Philippe Philippe CARL Laboratoire de Biophotonique et Pharmacologie UMR 7213 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 41 84 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Philippe,
not perfectly sure what you like to see but it may help to have a look at what is called "Generic Dialog" of an IJ-Plugin. You may find help in the excellent tutorial "Writing ImageJ Plugins" by Werner Bailer that is downloadable from the IJ-website. HTH Herbie ::::::::::::::::::::::::::::::::::::::: On 22.04.14 16:09, Philippe CARL wrote: > Dear all, > In plugins it is possible to set launching arguments as a String parameter: > public void run (final String arg) {..... > And for example in the Radial_Profile_Angle_Ext plugin there are two menu > entries defined in a plugins.config file that are defining the following > entries: > Plugins, "Radial Profile Angle", Radial_Profile_Angle_Ext > Help>About Plugins, "Radial Profile Angle...", > Radial_Profile_Angle_Ext("about") > And thus to run either one or other defined entry from a macro, it is simply > done: > Run("Radial Profile Angle"); > or > Run("Radial Profile Angle..."); > My question: is it possible to directly run a plugin with a launching > argument without defining it in a plugins.config file similarly to such a > way: > Run("Radial Profile Angle", ("about")); > Or something like this? > My best regards, > Philippe > > Philippe CARL > Laboratoire de Biophotonique et Pharmacologie > UMR 7213 CNRS - Université de Strasbourg > Faculté de Pharmacie > 74 route du Rhin > 67401 ILLKIRCH > Tel : +33(0)3 68 85 41 84 > > -- > 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 CARL Philippe (LBP)
Hi Philippe,
> it is possible to set launching arguments as a String parameter Use the Macro Recorder (Plugins > Macros > Record) to learn how to write the code for a command you want to execute, including its arguments (harvested from a GenericDialog). See this page for details: http://fiji.sc/Introduction_into_Macro_Programming#The_recorder > Run("Radial Profile Angle", ("about")); Like Herbie, I am not sure what you are trying to do there... Regards, Curtis On Tue, Apr 22, 2014 at 9:09 AM, Philippe CARL <[hidden email]>wrote: > Dear all, > In plugins it is possible to set launching arguments as a String parameter: > public void run (final String arg) {..... > And for example in the Radial_Profile_Angle_Ext plugin there are two menu > entries defined in a plugins.config file that are defining the following > entries: > Plugins, "Radial Profile Angle", Radial_Profile_Angle_Ext > Help>About Plugins, "Radial Profile Angle...", > Radial_Profile_Angle_Ext("about") > And thus to run either one or other defined entry from a macro, it is > simply > done: > Run("Radial Profile Angle"); > or > Run("Radial Profile Angle..."); > My question: is it possible to directly run a plugin with a launching > argument without defining it in a plugins.config file similarly to such a > way: > Run("Radial Profile Angle", ("about")); > Or something like this? > My best regards, > Philippe > > Philippe CARL > Laboratoire de Biophotonique et Pharmacologie > UMR 7213 CNRS - Université de Strasbourg > Faculté de Pharmacie > 74 route du Rhin > 67401 ILLKIRCH > Tel : +33(0)3 68 85 41 84 > > -- > 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 CARL Philippe (LBP)
Hi Philippe,
calling plugins, including passing the 'arg' String to them, is handled in IJ.runPlugIn(String commandName, String className, String arg) In a plugin, you can call this method directly. For calling a plugin with an 'arg' in a macro, without defining it in plugins.conf, you can write a simple plugin that has a static method with three string arguments and passes them to this method. Then you can use the 'call' macro directive, e.g. call("My_Dispatcher_Plugin.dispatchPlugin", "Radial Profile Angle", "Radial_Profile_Angle_Ext", "about"); assuming that My_Dispatcher_Plugin has a method public static void dispatchPlugin(String commandName, String className, String arg) { IJ.runPlugIn(commandName, className, arg); } The argument passed to the run(arg) method is unrelated to the arguments passed to GenericDialogs. Michael ________________________________________________________________ On Apr 22, 2014, at 16:09, Philippe CARL wrote: > Dear all, > In plugins it is possible to set launching arguments as a String parameter: > public void run (final String arg) {..... > And for example in the Radial_Profile_Angle_Ext plugin there are two menu > entries defined in a plugins.config file that are defining the following > entries: > Plugins, "Radial Profile Angle", Radial_Profile_Angle_Ext > Help>About Plugins, "Radial Profile Angle...", > Radial_Profile_Angle_Ext("about") > And thus to run either one or other defined entry from a macro, it is simply > done: > Run("Radial Profile Angle"); > or > Run("Radial Profile Angle..."); > My question: is it possible to directly run a plugin with a launching > argument without defining it in a plugins.config file similarly to such a > way: > Run("Radial Profile Angle", ("about")); > Or something like this? > My best regards, > Philippe > > Philippe CARL > Laboratoire de Biophotonique et Pharmacologie > UMR 7213 CNRS - Université de Strasbourg > Faculté de Pharmacie > 74 route du Rhin > 67401 ILLKIRCH > Tel : +33(0)3 68 85 41 84 > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Michael,
You have perfectly understand and answered my question. Thanks a lot. Kindest regards, Philippe Le Mardi 22 Avril 2014 19:16 CEST, Michael Schmid <[hidden email]> a écrit: > Hi Philippe, > > calling plugins, including passing the 'arg' String to them, is handled in > IJ.runPlugIn(String commandName, String className, String arg) > > In a plugin, you can call this method directly. > > For calling a plugin with an 'arg' in a macro, without defining it in plugins.conf, you can write a simple plugin that has a static method with three string arguments and passes them to this method. Then you can use the 'call' macro directive, e.g. > > call("My_Dispatcher_Plugin.dispatchPlugin", "Radial Profile Angle", "Radial_Profile_Angle_Ext", "about"); > > assuming that My_Dispatcher_Plugin has a method > > public static void dispatchPlugin(String commandName, String className, String arg) { > IJ.runPlugIn(commandName, className, arg); > } > > The argument passed to the run(arg) method is unrelated to the arguments passed to GenericDialogs. > > > Michael > ________________________________________________________________ > On Apr 22, 2014, at 16:09, Philippe CARL wrote: > > > Dear all, > > In plugins it is possible to set launching arguments as a String parameter: > > public void run (final String arg) {..... > > And for example in the Radial_Profile_Angle_Ext plugin there are two menu > > entries defined in a plugins.config file that are defining the following > > entries: > > Plugins, "Radial Profile Angle", Radial_Profile_Angle_Ext > > Help>About Plugins, "Radial Profile Angle...", > > Radial_Profile_Angle_Ext("about") > > And thus to run either one or other defined entry from a macro, it is simply > > done: > > Run("Radial Profile Angle"); > > or > > Run("Radial Profile Angle..."); > > My question: is it possible to directly run a plugin with a launching > > argument without defining it in a plugins.config file similarly to such a > > way: > > Run("Radial Profile Angle", ("about")); > > Or something like this? > > My best regards, > > Philippe > > > > Philippe CARL > > Laboratoire de Biophotonique et Pharmacologie > > UMR 7213 CNRS - Université de Strasbourg > > Faculté de Pharmacie > > 74 route du Rhin > > 67401 ILLKIRCH > > Tel : +33(0)3 68 85 41 84 > > > > -- > > 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 |
Free forum by Nabble | Edit this page |