Where can I find it with all the arguments ?
Thank you. PS: I am new to ImageJ. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
You can use the recorder to collect the info for run(): Plugins > Macros > Record...
Run()executes an ImageJ menu command see: https://imagej.nih.gov/ij/developer/macro/functions.html#R The imageJ user guide can be found at https://imagej.nih.gov/ij/docs/guide/index.html or https://imagej.nih.gov/ij/docs/guide/index.html Best wishes Kees Dr Ir K.R. Straatman Senior Experimental Officer Advanced Imaging Facility Centre for Core Biotechnology Services University of Leicester www.le.ac.uk/advanced-imaging-facility -----Original Message----- From: shaleen jain [mailto:[hidden email]] Sent: 31 May 2018 08:16 To: [hidden email] Subject: Is there any list of commands which could be used inside run() in a macro ? Where can I find it with all the arguments ? Thank you. PS: I am new to ImageJ. -- 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 shaleenanuj
Dear Shaleen
I guess you intention is to start to write macros. And to do so you should first use the "Plugins->Macro->Record..." option which will already generate all the "run()" commands for you. And you can complete this with: https://imagej.nih.gov/ij/developer/macro/functions.html My best regards, Philippe Philippe CARL Laboratoire de Bioimagerie et Pathologies UMR 7021 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 41 84 -----Message d'origine----- De : ImageJ Interest Group [mailto:[hidden email]] De la part de shaleen jain Envoyé : jeudi 31 mai 2018 09:16 À : [hidden email] Objet : Is there any list of commands which could be used inside run() in a macro ? Where can I find it with all the arguments ? Thank you. PS: I am new to ImageJ. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thank you.
Actually I am a bit using them, my actual doubt is how to decide that what can go as the argument of run(); Can all the functions listed inside run ? I have seen functions like run("Median...","Radius=3"); what is the meaning of that then ? Where can I get the arguments for run() ? -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Shaleenanuj,
A "run" function is a transcript of the GUI of a plugin. The first argument is the "tool" you are using, in your example the "Median..." filter. And the next arguments are all the values shown up in the GUI of the tool or plugin you are using separated by spaces. So in your example of the "Median..." filter, there is only one parameter "Radius" and the value you had set when using it was 3, which is thus written "Radius=3". In run("Rotate... ", "angle=15 grid=1 interpolation=Bilinear fill"); I'm using the tool "Image->Transform->Rotate..." which has 6 parameters where I had set: - "Angle (degrees)" to 15, - "Grid Lines" to 1 - "Interpolation" to Bilinear - selected the option "Fill with Background color" since "fill" is in the list of arguments - not selected the option "Enlarge image to fit results" since "enlarge" is not in the list of arguments - not selected the option " Preview" since "preview" is not in the list of arguments Please note that the parameters are only listed up to their first space. It is possible to have longer argument names when using underscores "_". So in my example of the " Image->Transform->Rotate..." tool, if the line 117 of the file: https://imagej.net/ij/download/tools/source/ij/plugin/filter/Rotator.java would be replaced from: gd.addNumericField("Grid Lines:", gridLines, 0); into gd.addNumericField("Grid_Lines:", gridLines, 0); The launching of the tool would then be recorded by: run("Rotate... ", "angle=15 grid_line=1 interpolation=Bilinear fill"); But don't try to make things complicated by trying to "write" your needed run() function yourself and just use the marvelous "Plugins->Macro->Record..." tool. My best regards, Philippe Philippe CARL Laboratoire de Bioimagerie et Pathologies UMR 7021 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 41 84 -----Message d'origine----- De : ImageJ Interest Group [mailto:[hidden email]] De la part de shaleenanuj Envoyé : jeudi 31 mai 2018 10:48 À : [hidden email] Objet : Re: Is there any list of commands which could be used inside run() in a macro ? Thank you. Actually I am a bit using them, my actual doubt is how to decide that what can go as the argument of run(); Can all the functions listed inside run ? I have seen functions like run("Median...","Radius=3"); what is the meaning of that then ? Where can I get the arguments for run() ? -- Sent from: http://imagej.1557.x6.nabble.com/ -- 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 |