-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDoG_filter.ijm
More file actions
35 lines (33 loc) · 887 Bytes
/
DoG_filter.ijm
File metadata and controls
35 lines (33 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* DoG FILTER 1.1
* --------------
*
* A Difference-of-gaussians filter for fluorescence images
*
* Changes in 1.1 (Feb 2021)
* - Added dialog to choose min and max sigma.
*
* Federico N. Soria
* ACHUCARRO BASQUE CENTER FOR NEUROSCIENCE
* January 2020
*/
Dialog.create("Difference of Gaussians Filter");
Dialog.addNumber("Minimum sigma", 1);
Dialog.addNumber("Maximum sigma", 50);
Dialog.show();
gmin=Dialog.getNumber();
gmax=Dialog.getNumber();
name=getTitle();
selectWindow(name);
run("Grays");
run("Duplicate...", "title=min duplicate");
run("Gaussian Blur...", "sigma="+gmin+" stack");
selectWindow(name);
run("Duplicate...", "title=max duplicate");
run("Gaussian Blur...", "sigma="+gmax+" stack");
imageCalculator("Subtract stack", "min","max");
selectWindow("max");
close();
selectWindow("min");
run("Enhance Contrast", "saturated=0.35");
rename(name+"-DoG");