Login  Register

problems migrating frpm macros to API

Posted by Aryeh Weiss on Feb 05, 2015; 2:28pm
URL: http://imagej.273.s1.nabble.com/problems-migrating-frpm-macros-to-API-tp5011457.html

I am once again trying to work in python, and am encountering difficulties.
I have trouble knowing how to find the methods that correspond to
commands in macros
For commands that appear in the menus, I can use the Command finder, but
I dont know what to do with
something like isOpen(imageTitle), or many other macro features that are
not part of the command menu structure.
WindowManager has a method for returning a list of nonImageWindows, but
where do I get a list of image windows?

Even when I find the method, I dont always know how to handle the
arguments. For example:
IJ.run("Image Sequence...", "open="+inputDirPath+"
file=x"+str(xLoc).zfill(3)+"_y"+str(yLoc).zfill(3)+" sort")
will open an image sequence, appropriately filtering the file names.
When I try to do it with FolderOpener(), I see how to create a filtered
file list (getFilteredList), butI dont see how to pass that filtered list to
openFolder(). So openFolder opens everything in the director (about 275
images instead of 11)

I think that I am not the only one who started with the IJ macro
language, so my main question is, how can I find the methods that
correspond to the macro commands -- particularly the ones that are not
in the menus?

Right now, I hope someone can tell me how to open that sequence with the
filtered list, and which method provides a list of open image window titles.

Thanks in advance for your help.

--aryeh

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html