OrientationJ (FIJI plugin) Sliding Window Macro Issue

Does anyone know how to call and use functions within an OrientationJ plugin when writing a macro? I attempted to create a sliding window to analyze several regions of interest within an image. No matter what iteration of this code I attempt, I hit the following snag because I cannot find a way to run any of the functions within the plugin.

Sample Code:

open("C:/Users/gawel/Desktop/TilburyLab_PancreaticSamples/Healthy Samples/R15-0397/890ex_582_64filter_230pk_40x_2z_area81.tif");

makeRectangle(165, 55, 127, 138);
makeRectangle(347, 346, 142, 140);

run("OrientationJ Measure");
selectWindow("890ex_582_64filter_230pk_40x_2z_area81.tif");
selectWindow("890ex_582_64filter_230pk_40x_2z_area81.tif");
???

This is just a basic test code. run("OrientationJ Measure") does not run the analysis part of the program, but rather opens the plugin. Once I hit the measure button to run the analysis, the macro recorder adds the selectWindow lines.

When I create and run the macro, no analysis occurs. The last ROI rectangle is displayed, and nothing happens. Am I missing a command to use a function within a plugin? The OrientationJ webpage suggests that I add a sigma argument to the run function, but this also did not work. I attempted putting run("OrientationJ Measure") after each rectangle, but did not have a different result.

Here is the OrientationJ site if it helps: BIG > OrientationJ

1 Like

Hi Gerren @gawelch97 ,

have you tried the code on the website you linked?

e.g.

run("OrientationJ Analysis", "tensor=1.0 gradient=0 color-survey=on hue=Orientation sat=Coherency bri=Original-Image ");

Let us know if this works :slightly_smiling_face:

Best,
Robert

Thanks. I did try this one earlier, but is there any way to get the orientation and coherency numbers out of the Analysis plugin? I don’t really see what analysis I could do with the colors.

That is what I got, but when I use the Measure part of OrientationJ and call it with the macro, all I get is this:

I haven’t found a way to have the macro click the measure button pictured (recorder doesn’t do it), and no analysis has been done here. It just presents me the last ROI specified and opens the plugin.

If I click that measure button manually, the desired analysis occurs for the ROI shown. My other problem is getting the ROIs to persist. I could either run the measure function after every ROI drawn, or I’d need to use the ROI manager I’d assume.