Image-J batch processing & Image Caluculator

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

Image-J batch processing & Image Caluculator

Brian Charles

Hi All,

I have short macro that runs well in the batch processing pop-up window to process a series of 530 images. I'd like to add a 'darkframe' subtraction prior to analyzing my images. The image-calculator seems great, yet since the images don't display, I expect that there is a hiccup when running. Here is the script. Advice is greatly appreciated.

run("8-bit");
fname=getTitle;
imageCalculator("Subtract create", fname, "xyz");
setAutoThreshold("Default dark");
setThreshold(8, 255);
setOption("BlackBackground", true);
run("Convert to Mask");
run("Analyze Particles...", "size=3-Infinity show=Outlines display exclude summarize add");
wait(80)

**I took out the actual directory name of this file and replaced it with "xyz". When it runs I have an error on line 3 saying no image file. From other threads my first idea is that the 'fname' variable is not producing a string that works. if I put fname in double quotes, it still does not work.

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: Image-J batch processing & Image Caluculator

Peter Haub
Hi Brian,

The 'fname' variable should work.
Test it with:
    fname=getTitle();
    imageCalculator("Subtract create", fname, fname);

Is the image 'xyz' already loaded?
In case not you must use
    open(imgPath);
(The ImageCalculator will not open it.)

Maybe should use the ImageJ mailing lits for this kind of questions.

Regards,
Peter

On 03.05.2019 20:02, Brian Charles wrote:
Hi All,

I have short macro that runs well in the batch processing pop-up window to process a series of 530 images. I'd like to add a 'darkframe' subtraction prior to analyzing my images. The image-calculator seems great, yet since the images don't display, I expect that there is a hiccup when running. Here is the script. Advice is greatly appreciated.

run("8-bit");
fname=getTitle;
imageCalculator("Subtract create", fname, "xyz");
setAutoThreshold("Default dark");
setThreshold(8, 255);
setOption("BlackBackground", true);
run("Convert to Mask");
run("Analyze Particles...", "size=3-Infinity show=Outlines display exclude summarize add");
wait(80)

**I took out the actual directory name of this file and replaced it with "xyz". When it runs I have an error on line 3 saying no image file. From other threads my first idea is that the 'fname' variable is not producing a string that works. if I put fname in double quotes, it still does not work.

Regards



_______________________________________________
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