I am trying to analyze several images within a folder. For each image, I want to run a directionality plugin. After the plugin has run, it outputs a table of results, which I want to save as a csv file.
The problem is that it does not continuously output CSVs. Instead, it will output the first one CSV (and maybe the second) before slowing to a stop. When it doesn’t slow to a stop, it just processes all the pictures, but does not save any CSVs. Is there anything wrong in my code? I am familiar with Python, but not ImageJ macro code. Thanks for any help!!!
Here is my code:
// Macro to measure directionality
// Show the user a dialog to select a directory of images
inputDirectory = getDirectory(“Choose a Directory of Images”);
// Get the list of files from that directory
fileList = getFileList(inputDirectory);
for (i = 0; i < fileList.length; i++)
run(“Directionality “, “method=[Fourier components] nbins=180 histogram_start=0 histogram_end=180 build display_table”);
saveAs(“Results”, inputDirectory + imageFile +”.csv”);