Batch processing a folder of images

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Batch processing a folder of images

Brian Charles

Hi..

I have been working on a basic macro to batch process a set of images, currently 528 images are in the folder. I would like to concatenate all of the analysis results from the individual images. MM-IJ is great in providing a summary, yet I would like to save all of the individual results in one file.

This is the simple macro now:

    run("8-bit");
    //run("Brightness/Contrast...");
    run("Enhance Contrast", "saturated=0.35");
    setAutoThreshold("Default dark");
    //run("Threshold...");
    //setThreshold(6, 255);
    setOption("BlackBackground", true);
    run("Convert to Mask");
    run("Analyze Particles...", "size=3-Infinity show=Outlines display exclude clear summarize add");
    close();
    run("Close");

If you have tips, I am all ears.

Regards.

--
Brian Charles
Sr. Laboratory Engineer
Laboratory for Laser Energetics
University of Rochester
250 E. River Road
Rochester, NY 14623
(585) 273-3190
[hidden email]


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Batch processing a folder of images

Robert Haase
Hey Brian,

if you remove the "clear" from the line run("Analyze Particles... does it put more than one result in the summary table?

Cheers,
Robert


--
Robert Haase, Dr. rer. medic.Post-doc, Myers Lab
Center for Systems Biology Dresden
Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstr. 108
01307 Dresden




On Tue, Apr 30, 2019 at 10:35 PM +0200, "Brian Charles" <[hidden email]> wrote:

Hi..

I have been working on a basic macro to batch process a set of images, currently 528 images are in the folder. I would like to concatenate all of the analysis results from the individual images. MM-IJ is great in providing a summary, yet I would like to save all of the individual results in one file.

This is the simple macro now:

    run("8-bit");
    //run("Brightness/Contrast...");
    run("Enhance Contrast", "saturated=0.35");
    setAutoThreshold("Default dark");
    //run("Threshold...");
    //setThreshold(6, 255);
    setOption("BlackBackground", true);
    run("Convert to Mask");
    run("Analyze Particles...", "size=3-Infinity show=Outlines display exclude clear summarize add");
    close();
    run("Close");

If you have tips, I am all ears.

Regards.

--
Brian Charles
Sr. Laboratory Engineer
Laboratory for Laser Energetics
University of Rochester
250 E. River Road
Rochester, NY 14623
(585) 273-3190
[hidden email]


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Batch processing a folder of images

Chon U Chan
In reply to this post by Brian Charles
You can use  File -> Import -> Image sequence to create a "image
stack" and work from there. Alternatively, you can choose to save the
data as a single image stack file in MMG, which is usually beneficial.

Regards,

Chon

On Tue, 30 Apr 2019 at 16:33, Brian Charles <[hidden email]> wrote:

>
> Hi..
>
> I have been working on a basic macro to batch process a set of images, currently 528 images are in the folder. I would like to concatenate all of the analysis results from the individual images. MM-IJ is great in providing a summary, yet I would like to save all of the individual results in one file.
>
> This is the simple macro now:
>
>     run("8-bit");
>     //run("Brightness/Contrast...");
>     run("Enhance Contrast", "saturated=0.35");
>     setAutoThreshold("Default dark");
>     //run("Threshold...");
>     //setThreshold(6, 255);
>     setOption("BlackBackground", true);
>     run("Convert to Mask");
>     run("Analyze Particles...", "size=3-Infinity show=Outlines display exclude clear summarize add");
>     close();
>     run("Close");
>
> If you have tips, I am all ears.
>
> Regards.
>
> --
> Brian Charles
> Sr. Laboratory Engineer
> Laboratory for Laser Energetics
> University of Rochester
> 250 E. River Road
> Rochester, NY 14623
> (585) 273-3190
> [hidden email]
> _______________________________________________
> micro-manager-general mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/micro-manager-general


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Batch processing a folder of images

Brian Charles
In reply to this post by Robert Haase

Robert,

I will give that a try. This script was created from recording a macro, so I have not dug into all of the individual details.

Thanks a lot!

Brian

On 4/30/2019 4:44 PM, Robert Haase wrote:
Hey Brian,

if you remove the "clear" from the line run("Analyze Particles... does it put more than one result in the summary table?

Cheers,
Robert


--
Robert Haase, Dr. rer. medic.Post-doc, Myers Lab
Center for Systems Biology Dresden
Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstr. 108
01307 Dresden




On Tue, Apr 30, 2019 at 10:35 PM +0200, "Brian Charles" <[hidden email]> wrote:

Hi..

I have been working on a basic macro to batch process a set of images, currently 528 images are in the folder. I would like to concatenate all of the analysis results from the individual images. MM-IJ is great in providing a summary, yet I would like to save all of the individual results in one file.

This is the simple macro now:

    run("8-bit");
    //run("Brightness/Contrast...");
    run("Enhance Contrast", "saturated=0.35");
    setAutoThreshold("Default dark");
    //run("Threshold...");
    //setThreshold(6, 255);
    setOption("BlackBackground", true);
    run("Convert to Mask");
    run("Analyze Particles...", "size=3-Infinity show=Outlines display exclude clear summarize add");
    close();
    run("Close");

If you have tips, I am all ears.

Regards.

--
Brian Charles
Sr. Laboratory Engineer
Laboratory for Laser Energetics
University of Rochester
250 E. River Road
Rochester, NY 14623
(585) 273-3190
[hidden email]


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
--
Brian Charles
Sr. Laboratory Engineer
Laboratory for Laser Energetics
University of Rochester
250 E. River Road
Rochester, NY 14623
(585) 273-3190
[hidden email]


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Batch processing a folder of images

Brian Charles

Robert,

It worked perfect. Thanks for the suggestion.

Brian

On 5/1/2019 8:16 AM, Brian Charles wrote:

Robert,

I will give that a try. This script was created from recording a macro, so I have not dug into all of the individual details.

Thanks a lot!

Brian

On 4/30/2019 4:44 PM, Robert Haase wrote:
Hey Brian,

if you remove the "clear" from the line run("Analyze Particles... does it put more than one result in the summary table?

Cheers,
Robert


--
Robert Haase, Dr. rer. medic.Post-doc, Myers Lab
Center for Systems Biology Dresden
Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstr. 108
01307 Dresden




On Tue, Apr 30, 2019 at 10:35 PM +0200, "Brian Charles" <[hidden email]> wrote:

Hi..

I have been working on a basic macro to batch process a set of images, currently 528 images are in the folder. I would like to concatenate all of the analysis results from the individual images. MM-IJ is great in providing a summary, yet I would like to save all of the individual results in one file.

This is the simple macro now:

    run("8-bit");
    //run("Brightness/Contrast...");
    run("Enhance Contrast", "saturated=0.35");
    setAutoThreshold("Default dark");
    //run("Threshold...");
    //setThreshold(6, 255);
    setOption("BlackBackground", true);
    run("Convert to Mask");
    run("Analyze Particles...", "size=3-Infinity show=Outlines display exclude clear summarize add");
    close();
    run("Close");

If you have tips, I am all ears.

Regards.

--
Brian Charles
Sr. Laboratory Engineer
Laboratory for Laser Energetics
University of Rochester
250 E. River Road
Rochester, NY 14623
(585) 273-3190
[hidden email]


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
--
Brian Charles
Sr. Laboratory Engineer
Laboratory for Laser Energetics
University of Rochester
250 E. River Road
Rochester, NY 14623
(585) 273-3190
[hidden email]


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
--
Brian Charles
Sr. Laboratory Engineer
Laboratory for Laser Energetics
University of Rochester
250 E. River Road
Rochester, NY 14623
(585) 273-3190
[hidden email]


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general