Skip to content

Instantly share code, notes, and snippets.

@mutterer
Created January 15, 2014 20:39
Show Gist options
  • Save mutterer/8444163 to your computer and use it in GitHub Desktop.
Save mutterer/8444163 to your computer and use it in GitHub Desktop.
// creates series of montages // use case: input stack of 200 images // user wants 4x5 montage: 10 pages output.
// creates series of montages
// use case: input stack of 200 images
// user wants 4x5 montage: 10 pages output.
source = getImageID;
slices=nSlices;
cols = 4;
rows = 5;
imagesPerPage = cols*rows;
for (i=0; i<slices/imagesPerPage; i++) {
selectImage (source);
first = 1+i*imagesPerPage;
last = first + imagesPerPage;
run ("Make Montage...", "columns=&cols rows=&rows scale=1 first=&first last=&last increment=1 border=1 font=12 label");
rename ("page-"+(i+1));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment