imagej - Calculating surface and storing as Excel file -
i'm new imagej , trying analyze several images: have code can analyze color threshold set of images in directory , store them separately:
input = "/m_3/imagej/test_folder/"; output = "/m_3/imagej/finished2/"; function action(input, output, filename) { open(input + filename); run("set scale...", "distance=872 known=9 pixel=1 unit=cm"); run("color threshold..."); // color thresholder 1.48v // autogenerated macro, single images only! . . . // colour thresholding------------- saveas("jpeg", output + filename); close(); } setbatchmode(true); list = getfilelist(input); (i = 0; < list.length; i++) action(input, output, list[i]); setbatchmode(false);
now want calculate area of newly saved images , should work function measure..
run("measure");
how can store calculations in .xls or .csv -files? possible calculate area of files in 1 directory , store results in 1 .xls or .csv -file?
have @ explanation how apply common operation complete directory on fiji wiki. can open each of newly save images, set threshold, measure, , close each image follows:
open("/path/to/your/image.jpg"); setautothreshold("default"); run("measure"); close();
and paste code process folder template (templates > ij1 macro > process folder) of script editor.
the results table can afterwards saved .xls file via file > save as... or:
saveas("results", "/path/to/your/file.xls");
Comments
Post a Comment