Hello everyone.
I modified the SSIM index plugin to be able to use it more flexible via macro language. This is working but for batch mode I have to print the result to a window which is at least not shown. I can do this by not using.. > rt.show("Results"); But then there will be an invisible ResultsTable after executing the plugin. As far as I can say this Window (its content) is overwritten due to the name. So I guess it is not that bad. I don't want to use the log window for this either, since this prints status information during macro execution. Which way is recommended for such things? Best regards, Rainer -- Rainer M. Engel, Dipl. Digital Artist scientific|Media GbR Pichelsdorfer Str. 143 13595 Berlin -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
No. It does not work like expected with my limited knowledge here.
I'm looking for a way to print values to a list from a plugin, so that these values can be obtained later via macro. Not showing the "Results" doesn't work with "getResultString()" from macro. I don't want to use the Log or results window. I'm looking for another way so that no window is popping on and off during batch mode. Any tip is much appreciated. Regards, Rainer Am 18.02.2014 17:30, schrieb Rainer M. Engel: > Hello everyone. > > I modified the SSIM index plugin to be able to use it more flexible via > macro language. This is working but for batch mode I have to print the > result to a window which is at least not shown. > > I can do this by not using.. >> rt.show("Results"); > > But then there will be an invisible ResultsTable after executing the > plugin. As far as I can say this Window (its content) is overwritten due > to the name. So I guess it is not that bad. > I don't want to use the log window for this either, since this prints > status information during macro execution. > > Which way is recommended for such things? > > Best regards, > Rainer > > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Rainer,
if you want to access data from a plugin without passing them via the ResultsTable, here are two options that come into my mind: - A temporary file - The plugin could implement the MacroExtension, which makes it callable from macros with Ext.yourCommandName(arguments). I have no experience with this, but it seems that it can handle arrays. Michael ________________________________________________________________ On Feb 19, 2014, at 12:34, Rainer M. Engel wrote: > No. It does not work like expected with my limited knowledge here. > > I'm looking for a way to print values to a list from a plugin, so that > these values can be obtained later via macro. Not showing the "Results" > doesn't work with "getResultString()" from macro. > > I don't want to use the Log or results window. I'm looking for another > way so that no window is popping on and off during batch mode. > > Any tip is much appreciated. > > Regards, > Rainer > > > > Am 18.02.2014 17:30, schrieb Rainer M. Engel: >> Hello everyone. >> >> I modified the SSIM index plugin to be able to use it more flexible via >> macro language. This is working but for batch mode I have to print the >> result to a window which is at least not shown. >> >> I can do this by not using.. >>> rt.show("Results"); >> >> But then there will be an invisible ResultsTable after executing the >> plugin. As far as I can say this Window (its content) is overwritten due >> to the name. So I guess it is not that bad. >> I don't want to use the log window for this either, since this prints >> status information during macro execution. >> >> Which way is recommended for such things? >> >> Best regards, >> Rainer >> >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
I have never been successful in returning arrays from a macro extension function but would love to know how if it is possible. So far, I have gotten around this by creating macro extensions which return the array one value at a time. Of course, this is rather inefficient. Another option is to return a delimited (e.g. tab) string and then parse it from the macro.
Note that in addition to the methods suggested by Michael, macros can call static methods from plugins with the call function. Again output is limited--in this case to a string. Jay -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Schmid Sent: Wednesday, February 26, 2014 5:45 AM To: [hidden email] Subject: Re: plugin output, ResultsTable vs. List Hi Rainer, if you want to access data from a plugin without passing them via the ResultsTable, here are two options that come into my mind: - A temporary file - The plugin could implement the MacroExtension, which makes it callable from macros with Ext.yourCommandName(arguments). I have no experience with this, but it seems that it can handle arrays. Michael ________________________________________________________________ On Feb 19, 2014, at 12:34, Rainer M. Engel wrote: > No. It does not work like expected with my limited knowledge here. > > I'm looking for a way to print values to a list from a plugin, so that > these values can be obtained later via macro. Not showing the "Results" > doesn't work with "getResultString()" from macro. > > I don't want to use the Log or results window. I'm looking for another > way so that no window is popping on and off during batch mode. > > Any tip is much appreciated. > > Regards, > Rainer > > > > Am 18.02.2014 17:30, schrieb Rainer M. Engel: >> Hello everyone. >> >> I modified the SSIM index plugin to be able to use it more flexible >> via macro language. This is working but for batch mode I have to >> print the result to a window which is at least not shown. >> >> I can do this by not using.. >>> rt.show("Results"); >> >> But then there will be an invisible ResultsTable after executing the >> plugin. As far as I can say this Window (its content) is overwritten >> due to the name. So I guess it is not that bad. >> I don't want to use the log window for this either, since this prints >> status information during macro execution. >> >> Which way is recommended for such things? >> >> Best regards, >> Rainer >> >> > > -- > 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 |
Thank you Michael and Jay for your replies..
I managed to bring a modified plugin to this state, which sort of works for us. Nothing special.. https://dl.dropboxusercontent.com/u/414433/imagej/plugins/SSIM_index.java Maybe I'll try what you suggested. Regards, Rainer Am 26.02.2014 17:13, schrieb Unruh, Jay: > I have never been successful in returning arrays from a macro extension function but would love to know how if it is possible. So far, I have gotten around this by creating macro extensions which return the array one value at a time. Of course, this is rather inefficient. Another option is to return a delimited (e.g. tab) string and then parse it from the macro. > > Note that in addition to the methods suggested by Michael, macros can call static methods from plugins with the call function. Again output is limited--in this case to a string. > > Jay > > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Schmid > Sent: Wednesday, February 26, 2014 5:45 AM > To: [hidden email] > Subject: Re: plugin output, ResultsTable vs. List > > Hi Rainer, > > if you want to access data from a plugin without passing them via the ResultsTable, here are two options that come into my mind: > - A temporary file > - The plugin could implement the MacroExtension, which makes it callable from macros with Ext.yourCommandName(arguments). I have no experience with this, but it seems that it can handle arrays. > > Michael > ________________________________________________________________ > On Feb 19, 2014, at 12:34, Rainer M. Engel wrote: > >> No. It does not work like expected with my limited knowledge here. >> >> I'm looking for a way to print values to a list from a plugin, so that >> these values can be obtained later via macro. Not showing the "Results" >> doesn't work with "getResultString()" from macro. >> >> I don't want to use the Log or results window. I'm looking for another >> way so that no window is popping on and off during batch mode. >> >> Any tip is much appreciated. >> >> Regards, >> Rainer >> >> >> >> Am 18.02.2014 17:30, schrieb Rainer M. Engel: >>> Hello everyone. >>> >>> I modified the SSIM index plugin to be able to use it more flexible >>> via macro language. This is working but for batch mode I have to >>> print the result to a window which is at least not shown. >>> >>> I can do this by not using.. >>>> rt.show("Results"); >>> >>> But then there will be an invisible ResultsTable after executing the >>> plugin. As far as I can say this Window (its content) is overwritten >>> due to the name. So I guess it is not that bad. >>> I don't want to use the log window for this either, since this prints >>> status information during macro execution. >>> >>> Which way is recommended for such things? >>> >>> Best regards, >>> Rainer >>> >>> >> >> -- >> 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 |
Free forum by Nabble | Edit this page |