Re: open next
Posted by Wayne Rasband on Oct 15, 2009; 2:19pm
URL: http://imagej.273.s1.nabble.com/open-next-tp3690744p3690746.html
> Hello,
>
> I want a macro to open an image, perfrom an operation, save
> it to another location, and open the next image in the
> original folder. Is this possible without the user having
> to specify the source folder each time?
>
> This is where i am at so far:
>
>
> dir = getDirectory("Choose Destination Directory ");
> open();
> name = dir+getTitle();
> run("Rolling Ball Background", "rolling=50");
> save(name+".tif");
> run("Open Next");
>
> This macro only opens the next file in the destination
> folder. How can I specify to open the next file in the
> source folder?
The easy way to run a macro on all the images in a folder is to use the
new Process>Batch>Macro command, available in ImageJ 1.43f or later.
1. Specify the source folder in "Input"
2. Specify the output folder in "Output"
3. Select the output file format
4. Paste the macro into the text area
5. Press "Test" to test the macro on the first image in the input
folder
6. Press "Process" to run the macro on all the images in the input
folder
-wayne