Posted by
Василий Попков on
Jan 26, 2016; 2:19pm
URL: http://imagej.273.s1.nabble.com/Simple-Macro-tp5015462p5015463.html
Hey. Well, I have the opposite macros for unstacking and saving images
under different names. So maybe you can use it as an example
n=nSlices();
n=20;
run("Stack to Images");
dir = getDirectory("Choose a source directory ");
for (i=1; i<=n; i++)
{
a=i+100;
showProgress(i, n);
//setSlice(i);
saveAs("Tiff", dir+a+".tif");
close();
g=dir+a;
}
Your macros should be something like (havent checked it, just I think so)
n=20;
dir = getDirectory("Choose a source directory ");
for (i=1; i<=n; i++)
{ open("w000_t000_tt00"+a+".tif");
}
run("Images to stack");
2016-01-26 16:40 GMT+03:00 Jessica Davis <
[hidden email]>:
> Hello everyone,
>
> I am looking for help to write a simple macro to open different single
> images in the same folder, combine them into a stack, and save the stack
> under a different name in a different folder.
>
> The images I want to combine have similar titles. For example:
> "w000_t000_tt000" , "w000_t000_tt001" , "w000_t000_tt002"... and
> "w001_t000_tt000" , "w001_t000_tt0001" , "w001_t000_tt002" ...
>
> Can this be done?
>
> Many thanks.
>
> Kind Regards,
>
> Jessica
>
> --
>
> Jessica Davis MSc.
>
> Conway Institute of Biomolecular and Biomedical Research,
> University College Dublin,
> Belfield, Dublin 4.
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
Vasily A Popkov
Lab.Structure and function of mitochondria
A.N.Belozersky Institute of Physico-Chemical Biology
Moscow State University
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html