Hello,
I need to run the plugin differentials (http://bigwww.epfl.ch/thevenaz/differentials/) with the option "Gradient Magnitude" from a macro When I choose Macro Record in ImageJ menu, it just records:" run("Differentials "); " , which opens the plugin window if I run it from a macro. What I actually need is to run the plugin WITH the option "Gradient Magnitude" with no option window at all. I tried already " run("Differentials ", "Gradient Magnitude"); " with no success. Is there anyway to do it? Thanks RMarino |
On Aug 26, 2012, at 8:35 PM, rrmarino wrote:
> Hello, > > I need to run the plugin differentials > (http://bigwww.epfl.ch/thevenaz/differentials/) with the option "Gradient > Magnitude" from a macro > > When I choose Macro Record in ImageJ menu, it just records:" > run("Differentials "); " , which opens the plugin window if I run it from a > macro. > > What I actually need is to run the plugin WITH the option "Gradient > Magnitude" with no option window at all. I tried already " > run("Differentials ", "Gradient Magnitude"); " with no success. > > Is there anyway to do it? This plugin is not compatible with the ImageJ macro language because it does not use the GenericDialog class. Fortunately, the source code is available so you can easily work around this problem. Copy the file "Differentials_.java" into the ImageJ plugins folder, open it by dragging and dropping it onto the "ImageJ" window, change the line private static int operation = LAPLACIAN; to private static int operation = GRADIENT_MAGNITUDE; remove, or comment out, these 10 lines differentialsDialog dialog = new differentialsDialog(IJ.getInstance(), "Differentials", true, operation); GUI.center(dialog); dialog.setVisible(true); cancel = dialog.getCancel(); operation = dialog.getOperation(); dialog.dispose(); if (cancel) { return; } then compile and run the plugin using Plugins>Compile and Run command. -wayne -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
You are the best Wayne! Thank you!
That's why ImageJ is the best image processing software in the market! Rodrigo
On Mon, Aug 27, 2012 at 11:43 PM, Rasband, Wayne (NIH/NIMH) [E] [via ImageJ] <[hidden email]> wrote: On Aug 26, 2012, at 8:35 PM, rrmarino wrote: |
Free forum by Nabble | Edit this page |