grid.java hereのコードを理解する必要があります。 ;)
dir = getDirectory("the directory with all your files");
files = getFileList(dir);
out = getDirectory ("Select output directory");
number = lengthOf(files); // normally 12 in your case
i=0;
while (i < number) {
// write a function to extract the x and y coordinates, the width and the height of each rectangle of your grid. For that, you have to understand the code of grid.java to understand how you can have the coordinates of each rectangle.
listcoordinates = yourfunction(files[i], 2923779);// return a vector of (x0, y0, width0, height0, x1, y1, etc...) => x= x coordinate on the top left of the square, y= y coordinate on the top left of the square
for(j=0; j<lengthOf(listcoordinates); j+4) //foreach coordinate that you extract
{
makeRectangle(listcoordinates[j], listcoordinates[j+1], listcoordinates[j+2], listcoordinates[j+3]);
run("Duplicate...", "title=blabla"+ i + j +".tif");
saveAs("Tiff", out+ "blabla" + i + j + ".tif");
}
}
幸運:マクロで