Posted by
Mauricio Aguirre Morales on
Oct 13, 2016; 12:55pm
URL: http://imagej.273.s1.nabble.com/Stitching-in-batch-tp5017365.html
Dear Community,
I am trying to stitch 25 images in a 5x5 tile. I have written these
lines but the script is only processing the first 25 images in a folder
where 100 images are saved. Any hint on how to solve this problem is
highly appreciated!
macro "Stitching in imageJ" {
dir = getDirectory("Choose an input directory ");
dir2 = getDirectory("Choose a destination directory ");
list = getFileList(dir);
setBatchMode(true);
for (i=0; i<list.length; i++) {
path = dir+list[i];
showProgress(i, list.length);
if (!File.isDirectory(path)) {
open(path);
//
//....
run("Grid/Collection stitching", "type=[Grid: row-by-row] order=[Right &
Down ] grid_size_x=5 grid_size_y=5 tile_overlap=5
first_file_index_i=1 directory=[C:\\Users\\Mauricio\\Desktop\\New
folder\\] file_names={i}.jpg output_textfile_name=TileConfiguration.txt
fusion_method=[Linear Blending] regression_threshold=0.30
max/avg_displacement_threshold=2.50 absolute_displacement_threshold=3.50
compute_overlap computation_parameters=[Save memory (but be slower)]
image_output=[Fuse and display]");
saveAs("TIFF", dir2+list[i]);
//....
//
//wait(3000);
//selectWindow("Summary");
//save(pathsaveres);
}
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html