Dear all,
I’m using a plugin having 2 windows (i.e. 2 GenericDialogs, one following the other) and for which macro extension features have been implemented. When I record the plugin via the macro recorder, all the parameters of the macro are well recorded (i.e. the parameters of the 2 GenericDialogs). And when I play again the plugin via a macro, the parameters of the first GenericDialog are well passed as it can be checked with the macro extension features of the parameters. But the parameters of the second GenericDialog are not passed (as it can be checked with the macro extension features of the parameters) and the default parameters of the macro are used for running. Should something additional be done when using a plugin having 2 GenericDialogs through a macro or is this not possible? I thank you very much in advance for your lights about this issue. My best regards, Philippe -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hello Philippe,
Which plugin are you using? In a macro, the first macro-recorded command from the plugin will start the plugin, but the second GeneriDialog information should be handled by the plugin code itself, which is not always the case. As a user there is nothing you can do but to contact the plugin author to fix this behavior. Cheers! ignacio On Wed, Feb 10, 2016 at 9:46 PM, CARL Philippe (PHA) < [hidden email]> wrote: > Dear all, > I’m using a plugin having 2 windows (i.e. 2 GenericDialogs, one following > the other) and for which macro extension features have been implemented. > When I record the plugin via the macro recorder, all the parameters of the > macro are well recorded (i.e. the parameters of the 2 GenericDialogs). > And when I play again the plugin via a macro, the parameters of the first > GenericDialog are well passed as it can be checked with the macro extension > features of the parameters. > But the parameters of the second GenericDialog are not passed (as it can > be checked with the macro extension features of the parameters) and the > default parameters of the macro are used for running. > Should something additional be done when using a plugin having 2 > GenericDialogs through a macro or is this not possible? > I thank you very much in advance for your lights about this issue. > My best regards, > Philippe > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- Ignacio Arganda-Carreras, Ph.D. Ikerbasque Research Fellow Departamento de Ciencias de la Computacion e Inteligencia Artificial Facultad de Informatica, Universidad del Pais Vasco Paseo de Manuel Lardizabal, 1 20018 Donostia-San Sebastian Guipuzcoa, Spain Phone : +34 943 01 73 25 Website: http://sites.google.com/site/iargandacarreras/ <http://biocomp.cnb.csic.es/~iarganda/index_EN.html> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear ignacio,
I very unfortunately expected such an answer. The plugin with which I have this issue is the fit_RICS_jru_v1 from Jay Unruh: https://github.com/jayunruh/Jay_Plugins/blob/master/fit_RICS_jru_v1.java who very kindly provides the source code of his codes. I have already reformatted quite a lot its code (with the addition of the macro extension features and other small things) and thus following your answer I will now modify the code in order to compress both windows within a single one. My best regards, Philippe -----Message d'origine----- De : ImageJ Interest Group [mailto:[hidden email]] De la part de Ignacio Arganda-Carreras Envoyé : jeudi 11 février 2016 10:00 À : [hidden email] Objet : Re: Marco recording on plugin with 2 GenericDialogs Hello Philippe, Which plugin are you using? In a macro, the first macro-recorded command from the plugin will start the plugin, but the second GeneriDialog information should be handled by the plugin code itself, which is not always the case. As a user there is nothing you can do but to contact the plugin author to fix this behavior. Cheers! ignacio On Wed, Feb 10, 2016 at 9:46 PM, CARL Philippe (PHA) < [hidden email]> wrote: > Dear all, > I’m using a plugin having 2 windows (i.e. 2 GenericDialogs, one > following the other) and for which macro extension features have been implemented. > When I record the plugin via the macro recorder, all the parameters of > the macro are well recorded (i.e. the parameters of the 2 GenericDialogs). > And when I play again the plugin via a macro, the parameters of the > first GenericDialog are well passed as it can be checked with the > macro extension features of the parameters. > But the parameters of the second GenericDialog are not passed (as it > can be checked with the macro extension features of the parameters) > and the default parameters of the macro are used for running. > Should something additional be done when using a plugin having 2 > GenericDialogs through a macro or is this not possible? > I thank you very much in advance for your lights about this issue. > My best regards, > Philippe > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- Ignacio Arganda-Carreras, Ph.D. Ikerbasque Research Fellow Departamento de Ciencias de la Computacion e Inteligencia Artificial Facultad de Informatica, Universidad del Pais Vasco Paseo de Manuel Lardizabal, 1 20018 Donostia-San Sebastian Guipuzcoa, Spain Phone : +34 943 01 73 25 Website: http://sites.google.com/site/iargandacarreras/ <http://biocomp.cnb.csic.es/~iarganda/index_EN.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 Ignacio Arganda-Carreras-2
Hello again, Philippe,
If you are already modifying the code and don't want to merge both GenericDialogs into one, you can follow the same strategy I used on some of my plugins: https://github.com/ijpb/MorphoLibJ/blob/master/src/main/java/inra/ijpb/plugins/MorphologicalSegmentation.java#L1108-L1113 https://github.com/ijpb/MorphoLibJ/blob/master/src/main/java/inra/ijpb/plugins/MorphologicalSegmentation.java#L272-L290 Basically, you have to 1) manually record the calls to the parts of the plugins you're interested on (through other dialogs or simply buttons, etc) as call( "package.name-of-your-static-method", "options" ) and 2) create static methods for each of those calls See how it is done on the Morphological Segmentation plugin <http://fiji.sc/Morphological_Segmentation>: http://fiji.sc/Morphological_Segmentation#Macro_language_compatibility Best, ignacio On Thu, Feb 11, 2016 at 10:36 AM, Philippe CARL <[hidden email]> wrote: > Dear ignacio, > I very unfortunately expected such an answer. > The plugin with which I have this issue is the fit_RICS_jru_v1 from Jay > Unruh: > https://github.com/jayunruh/Jay_Plugins/blob/master/fit_RICS_jru_v1.java > who very kindly provides the source code of his codes. > I have already reformatted quite a lot its code (with the addition of the > macro extension features and other small things) and thus following your > answer I will now modify the code in order to compress both windows within > a single one. > My best regards, > Philippe > > -----Message d'origine----- > De : ImageJ Interest Group [mailto:[hidden email]] De la part de > Ignacio Arganda-Carreras > Envoyé : jeudi 11 février 2016 10:00 > À : [hidden email] > Objet : Re: Marco recording on plugin with 2 GenericDialogs > > Hello Philippe, > > Which plugin are you using? In a macro, the first macro-recorded command > from the plugin will start the plugin, but the second GeneriDialog > information should be handled by the plugin code itself, which is not > always the case. As a user there is nothing you can do but to contact the > plugin author to fix this behavior. > > Cheers! > > ignacio > > On Wed, Feb 10, 2016 at 9:46 PM, CARL Philippe (PHA) < > [hidden email]> wrote: > > > Dear all, > > I’m using a plugin having 2 windows (i.e. 2 GenericDialogs, one > > following the other) and for which macro extension features have been > implemented. > > When I record the plugin via the macro recorder, all the parameters of > > the macro are well recorded (i.e. the parameters of the 2 > GenericDialogs). > > And when I play again the plugin via a macro, the parameters of the > > first GenericDialog are well passed as it can be checked with the > > macro extension features of the parameters. > > But the parameters of the second GenericDialog are not passed (as it > > can be checked with the macro extension features of the parameters) > > and the default parameters of the macro are used for running. > > Should something additional be done when using a plugin having 2 > > GenericDialogs through a macro or is this not possible? > > I thank you very much in advance for your lights about this issue. > > My best regards, > > Philippe > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > > > -- > Ignacio Arganda-Carreras, Ph.D. > Ikerbasque Research Fellow > Departamento de Ciencias de la Computacion e Inteligencia Artificial > Facultad de Informatica, Universidad del Pais Vasco Paseo de Manuel > Lardizabal, 1 > 20018 Donostia-San Sebastian > Guipuzcoa, Spain > > Phone : +34 943 01 73 25 > Website: http://sites.google.com/site/iargandacarreras/ > <http://biocomp.cnb.csic.es/~iarganda/index_EN.html> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- Ignacio Arganda-Carreras, Ph.D. Ikerbasque Research Fellow Departamento de Ciencias de la Computacion e Inteligencia Artificial Facultad de Informatica, Universidad del Pais Vasco Paseo de Manuel Lardizabal, 1 20018 Donostia-San Sebastian Guipuzcoa, Spain Phone : +34 943 01 73 25 Website: http://sites.google.com/site/iargandacarreras/ <http://biocomp.cnb.csic.es/~iarganda/index_EN.html> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Ignacio Arganda-Carreras-2
Hi Philippe,
in general, a plugin can display any number of GenericDialogs in a row and they are all recordable and work correctly when being run from a macro command (without the need of implementing customized recording strings). In your case, the aberrant macro behavior might be due to the second dialog gd2 being in the run() method of the plugin that implements PluginFilter. https://github.com/jayunruh/Jay_Plugins/blob/master/fit_RICS_jru_v1.java#L42-L64 Instead, all dialog should be called from the showDialog() method. Here's an example of a recordable plugin displaying up to six subsequent dialogs (depending on previous input): https://github.com/angiogenesis/Sprout_Analysis/blob/master/src/main/java/sprouting/Sprout_Analyzer.java (Note that this plugin implements ExtendedPluginFilter instead of just PluginFilter.) Hope that might help you. Jan On 11.02.2016 10:36, Philippe CARL wrote: > Dear ignacio, > I very unfortunately expected such an answer. > The plugin with which I have this issue is the fit_RICS_jru_v1 from Jay Unruh: > https://github.com/jayunruh/Jay_Plugins/blob/master/fit_RICS_jru_v1.java > who very kindly provides the source code of his codes. > I have already reformatted quite a lot its code (with the addition of the macro extension features and other small things) and thus following your answer I will now modify the code in order to compress both windows within a single one. > My best regards, > Philippe > > -----Message d'origine----- > De : ImageJ Interest Group [mailto:[hidden email]] De la part de Ignacio Arganda-Carreras > Envoyé : jeudi 11 février 2016 10:00 > À : [hidden email] > Objet : Re: Marco recording on plugin with 2 GenericDialogs > > Hello Philippe, > > Which plugin are you using? In a macro, the first macro-recorded command from the plugin will start the plugin, but the second GeneriDialog information should be handled by the plugin code itself, which is not always the case. As a user there is nothing you can do but to contact the plugin author to fix this behavior. > > Cheers! > > ignacio > > On Wed, Feb 10, 2016 at 9:46 PM, CARL Philippe (PHA) < [hidden email]> wrote: > >> Dear all, >> I’m using a plugin having 2 windows (i.e. 2 GenericDialogs, one >> following the other) and for which macro extension features have been implemented. >> When I record the plugin via the macro recorder, all the parameters of >> the macro are well recorded (i.e. the parameters of the 2 GenericDialogs). >> And when I play again the plugin via a macro, the parameters of the >> first GenericDialog are well passed as it can be checked with the >> macro extension features of the parameters. >> But the parameters of the second GenericDialog are not passed (as it >> can be checked with the macro extension features of the parameters) >> and the default parameters of the macro are used for running. >> Should something additional be done when using a plugin having 2 >> GenericDialogs through a macro or is this not possible? >> I thank you very much in advance for your lights about this issue. >> My best regards, >> Philippe >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > > > -- > Ignacio Arganda-Carreras, Ph.D. > Ikerbasque Research Fellow > Departamento de Ciencias de la Computacion e Inteligencia Artificial Facultad de Informatica, Universidad del Pais Vasco Paseo de Manuel Lardizabal, 1 > 20018 Donostia-San Sebastian > Guipuzcoa, Spain > > Phone : +34 943 01 73 25 > Website: http://sites.google.com/site/iargandacarreras/ > <http://biocomp.cnb.csic.es/~iarganda/index_EN.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 |
Aha! I didn't know that. Thanks, Jan for pointing out!
On Thu, Feb 11, 2016 at 11:18 AM, Jan Eglinger <[hidden email]> wrote: > Hi Philippe, > > in general, a plugin can display any number of GenericDialogs in a row and > they are all recordable and work correctly when being run from a macro > command (without the need of implementing customized recording strings). > > In your case, the aberrant macro behavior might be due to the second > dialog gd2 being in the run() method of the plugin that implements > PluginFilter. > > https://github.com/jayunruh/Jay_Plugins/blob/master/fit_RICS_jru_v1.java#L42-L64 > > Instead, all dialog should be called from the showDialog() method. > > Here's an example of a recordable plugin displaying up to six subsequent > dialogs (depending on previous input): > > https://github.com/angiogenesis/Sprout_Analysis/blob/master/src/main/java/sprouting/Sprout_Analyzer.java > > (Note that this plugin implements ExtendedPluginFilter instead of just > PluginFilter.) > Hope that might help you. > > Jan > > > On 11.02.2016 10:36, Philippe CARL wrote: > >> Dear ignacio, >> I very unfortunately expected such an answer. >> The plugin with which I have this issue is the fit_RICS_jru_v1 from Jay >> Unruh: >> https://github.com/jayunruh/Jay_Plugins/blob/master/fit_RICS_jru_v1.java >> who very kindly provides the source code of his codes. >> I have already reformatted quite a lot its code (with the addition of the >> macro extension features and other small things) and thus following your >> answer I will now modify the code in order to compress both windows within >> a single one. >> My best regards, >> Philippe >> >> -----Message d'origine----- >> De : ImageJ Interest Group [mailto:[hidden email]] De la part de >> Ignacio Arganda-Carreras >> Envoyé : jeudi 11 février 2016 10:00 >> À : [hidden email] >> Objet : Re: Marco recording on plugin with 2 GenericDialogs >> >> Hello Philippe, >> >> Which plugin are you using? In a macro, the first macro-recorded command >> from the plugin will start the plugin, but the second GeneriDialog >> information should be handled by the plugin code itself, which is not >> always the case. As a user there is nothing you can do but to contact the >> plugin author to fix this behavior. >> >> Cheers! >> >> ignacio >> >> On Wed, Feb 10, 2016 at 9:46 PM, CARL Philippe (PHA) < >> [hidden email]> wrote: >> >> Dear all, >>> I’m using a plugin having 2 windows (i.e. 2 GenericDialogs, one >>> following the other) and for which macro extension features have been >>> implemented. >>> When I record the plugin via the macro recorder, all the parameters of >>> the macro are well recorded (i.e. the parameters of the 2 >>> GenericDialogs). >>> And when I play again the plugin via a macro, the parameters of the >>> first GenericDialog are well passed as it can be checked with the >>> macro extension features of the parameters. >>> But the parameters of the second GenericDialog are not passed (as it >>> can be checked with the macro extension features of the parameters) >>> and the default parameters of the macro are used for running. >>> Should something additional be done when using a plugin having 2 >>> GenericDialogs through a macro or is this not possible? >>> I thank you very much in advance for your lights about this issue. >>> My best regards, >>> Philippe >>> >>> -- >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >>> >>> >> >> >> -- >> Ignacio Arganda-Carreras, Ph.D. >> Ikerbasque Research Fellow >> Departamento de Ciencias de la Computacion e Inteligencia Artificial >> Facultad de Informatica, Universidad del Pais Vasco Paseo de Manuel >> Lardizabal, 1 >> 20018 Donostia-San Sebastian >> Guipuzcoa, Spain >> >> Phone : +34 943 01 73 25 >> Website: http://sites.google.com/site/iargandacarreras/ >> <http://biocomp.cnb.csic.es/~iarganda/index_EN.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 > -- Ignacio Arganda-Carreras, Ph.D. Ikerbasque Research Fellow Departamento de Ciencias de la Computacion e Inteligencia Artificial Facultad de Informatica, Universidad del Pais Vasco Paseo de Manuel Lardizabal, 1 20018 Donostia-San Sebastian Guipuzcoa, Spain Phone : +34 943 01 73 25 Website: http://sites.google.com/site/iargandacarreras/ <http://biocomp.cnb.csic.es/~iarganda/index_EN.html> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Jan Eglinger
Dear Jan and Ignacio,
I thank you very much for your answers and proposed solutions. My best regards, Philippe -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |