forked from neuroinformatics/ish_image_processing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConvertSCNtoTIF.txt
23 lines (18 loc) · 908 Bytes
/
ConvertSCNtoTIF.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
input_directory = getArgument;
if (input_directory=="") exit ("No argument!");
input_latter_high = " color_mode=Default view=Hyperstack stack_order=XYCZT use_virtual_stack series_4";
input_latter_low = " color_mode=Default view=Hyperstack stack_order=XYCZT use_virtual_stack series_6";
filelist = getFileList(input_directory);
for (i=0; i<filelist.length; i++) {
split_filename = split(filelist[i], ".");
if (split_filename[1] == "scn") {
run("Bio-Formats Importer", "open=" + input_directory + filelist[i] + input_latter_low);
run("RGB Color");
run("Save", "save=" + input_directory + split_filename[0] + ".low.tif");
close();
run("Bio-Formats Importer", "open=" + input_directory + filelist[i] + input_latter_high);
run("RGB Color");
run("Save", "save=" + input_directory + split_filename[0] + ".high.tif");
close();
}
}