Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch analysis #13

Open
JlvtNicolas opened this issue Mar 21, 2024 · 1 comment
Open

Batch analysis #13

JlvtNicolas opened this issue Mar 21, 2024 · 1 comment

Comments

@JlvtNicolas
Copy link

Hi

I was wondering if there is a way to process batch analysis (aka: opening several stacks of images, and run the plugin to analyse all the stack one-by-one without re-lunch the analysis)?

bet regards

NJ

@HannahSHeil
Copy link
Collaborator

HannahSHeil commented Mar 22, 2024

Hi
sure, the easiest way to batch process is creating a Macro to run through all files in a folder.
This is an example:

// Get path to temp directory
dir = "D:\!!!ADD PATH!!!";
print("\Clear");
savedir = "D:\!!!ADD Path!!!";

list = getFileList(dir);
setBatchMode(true);
for (i = 0; i < lengthOf(list); i++) {
// for (i = 0; i < 1; i++) {
if (endsWith(list[i], ".nd2")){
print("---------------------");
print(list[i]);
print("---------------------");
run("Bio-Formats Windowless Importer", "open=["+dir+"\"+list[i]+"]");
run("eSRRF - Analysis", "magnification=5 radius=1.50 sensitivity=3 #=100 vibration avg wide-field #_0=25 axial=400");

	selectWindow(list[i]+" - eSRRF (AVG)");
	saveAs("Tiff", savedir+"//"+list[i]+" - eSRRF (AVG)"+".tif");
	//selectWindow(list[i]+" - eSRRF (STD)");
	//saveAs("Tiff", savedir+"//"+list[i]+" - eSRRF (STD)"+".tif");
	selectWindow(list[i]+" - interpolated image");
	saveAs("Tiff", savedir+"//"+list[i]+" - interpolated image"+".tif");
	run("Close All");
}

}

setBatchMode(false);
print("-----------------");
print("All done.");

Let me know if you need more support.
Best, Hannah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants