Easy problem: Batch processing multiple output photos

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Easy problem: Batch processing multiple output photos

Tattlelord
Hi all,

I am very new at ImageJ. So i think I have a very easy problem. As follows:

I have several images of leaves which are partly green and partly red. I have a simple script that analyses the area of both colors. I copied this into the batch processing box (process>batch>macro) (see code below).

I selected an input and output folder for the images. However, it only saves the images analyzed in the first block "bladoppervlakte" (leaf surface) images. It does not save the "rode delen" (red parts) images. How can I adjust to let it save both images in the output folder? Or perhaps ion two seperate folders.

Thank you :)

a=getTitle();
 
run("RGB Stack");
run("Stack to Images");
 
selectWindow("Blue");
rename(a+" bladoppervlakte");
setThreshold(0, 100);
run("Analyze Particles...", "size=10000-Infinity circularity=0.00-1.00 show=Nothing display summarize");

selectWindow("Green");
rename(a+" rode delen");
setThreshold(0, 20);
run("Analyze Particles...", "size=250-Infinity circularity=0.00-1.00 show=Nothing display summarize");

selectWindow("Red");
run("Close");

Reply | Threaded
Open this post in threaded view
|

Re: Easy problem: Batch processing multiple output photos

ctrueden
Hi,

Maybe you want to use the more flexible "Process Folder" macro template?

See:
http://imagej.net/Batch_Processing#Flexible_option

Then you can do/save whatever you want for each loop iteration.

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Mon, Apr 10, 2017 at 3:00 AM, Tattlelord <[hidden email]>
wrote:

> Hi all,
>
> I am very new at ImageJ. So i think I have a very easy problem. As follows:
>
> I have several images of leaves which are partly green and partly red. I
> have a simple script that analyses the area of both colors. I copied this
> into the batch processing box (process>batch>macro) (see code below).
>
> I selected an input and output folder for the images. However, it only
> saves
> the images analyzed in the first block "bladoppervlakte" (leaf surface)
> images. It does not save the "rode delen" (red parts) images. How can I
> adjust to let it save both images in the output folder? Or perhaps ion two
> seperate folders.
>
> Thank you :)
>
> a=getTitle();
>
> run("RGB Stack");
> run("Stack to Images");
>
> selectWindow("Blue");
> rename(a+" bladoppervlakte");
> setThreshold(0, 100);
> run("Analyze Particles...", "size=10000-Infinity circularity=0.00-1.00
> show=Nothing display summarize");
>
> selectWindow("Green");
> rename(a+" rode delen");
> setThreshold(0, 20);
> run("Analyze Particles...", "size=250-Infinity circularity=0.00-1.00
> show=Nothing display summarize");
>
> selectWindow("Red");
> run("Close");
>
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.
> com/Easy-problem-Batch-processing-multiple-output-photos-tp5018487.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Easy problem: Batch processing multiple output photos

Tattlelord
Thanks!

Ill give it a try soon.

Cheers