Using macro to execute a button within a plugin?
Posted by
pezferoz on
Feb 28, 2013; 7:44pm
URL: http://imagej.273.s1.nabble.com/Using-macro-to-execute-a-button-within-a-plugin-tp5001917.html
Hey all, new to ImageJ and was trying to make a macro to run OrientationJ on images and save the distribution of fiber orientation. I am able to save an image of the distribution but unable to get the macro to "click" a button within a pop up figure and then save that as a txt file. Could anyone help me with what's missing in my macro? Thanks so much!
Screenshots to better describe my problem:
Here OrientationJ takes the image (StretchingIntima-25strain...) and makes a nice distribution of the orientations of the fibers which pops up as the window titled "S-distribution-1"
[URL=
http://imageshack.us/photo/my-images/812/orientationjproblem.png/][IMG]
http://imageshack.us/a/img812/8728/orientationjproblem.png[/IMG][/URL]
From there I'd like the macro to use the "List" button on the bottom left of the S-distribution-1 window to create another pop up labeled "Plot Values"
[URL=
http://imageshack.us/photo/my-images/12/orientationjproblem2.png/][IMG]
http://imageshack.us/a/img12/8624/orientationjproblem2.png[/IMG][/URL]
From there I think I can get it to save the plot values as a txt file but getting the extra window to pop up has me puzzled...
current section of the macro that I have...
// Blue channel
// Save the blue channel
saveAs("Tif", dir2+"Blue"+list[i]);
//Run OrientationJ with settings
run("OrientationJ Distribution", "log=0.0 tensor=1.0 gradient=0 min-coherency=70.0 min-energy=2.0 harris-index=on s-distribution=on hue=Orientation sat=Coherency bri=Original-Image ");
//choose distribution window and save image
selectWindow("S-Distribution-1");
saveAs("Tif", dir2+"dist"+list[i]);
//something here to use List button and save that as txt
// Close the blue channel
close();