Batch Processing

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

Batch Processing

Dan Siler
Batch Processing

Can someone please help with the following macro or plugin?

Background

I am using the following

Windows XP
ImageJ 1.35d
Java 1.5.0_03
1536 X 1024 16-bit tif gray scale images
Processing 10 to 120 images at a time

Required Steps

1) Find Directory where images are located
2) Choose all (or some of images if possible) of images to be
processed
3) Find Directory where Dark images are located
4) Choose Dark image to be used for processing
5) Subtract Dark image from each image
6) Apply Median Filter to each image (Radius 3.0 pixels)
7) Apply WCIF Pseudo-flat field plugin (Mean filter kernel size 10.0)
8) Choose to invert image (yes or no)
9) If yes invert images
10) Convert images to 16-bit tif
11) Save processed images

This could be one or more macros.


Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Batch Processing

Sullivan, Michael J (College of Med.)
You can find code to get you started by looking at the "Batch_Conveter"
plugin. --- Mike

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Dan Siler
Sent: Monday, October 17, 2005 8:34 AM
To: [hidden email]
Subject: Batch Processing

Batch Processing

Can someone please help with the following macro or plugin?

Background

I am using the following

Windows XP
ImageJ 1.35d
Java 1.5.0_03
1536 X 1024 16-bit tif gray scale images Processing 10 to 120 images at
a time

Required Steps

1) Find Directory where images are located
2) Choose all (or some of images if possible) of images to be processed
3) Find Directory where Dark images are located
4) Choose Dark image to be used for processing
5) Subtract Dark image from each image
6) Apply Median Filter to each image (Radius 3.0 pixels)
7) Apply WCIF Pseudo-flat field plugin (Mean filter kernel size 10.0)
8) Choose to invert image (yes or no)
9) If yes invert images
10) Convert images to 16-bit tif
11) Save processed images

This could be one or more macros.


Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Batch Processing

Huang, Judy C
In reply to this post by Dan Siler
Following example can give you some idea of how to do steps 1-4:

dir = getDirectory("Choose a Directory ");
list = getFileList(dir);
requires("1.34m");
totalFile=list.length;
setBatchMode(true);
for (i=1; i<=totalFile; i++)
{
    open(dir+list[i-1]);
    run("8-bit");
    run("Set Scale...", "distance=236.000 known=20 pixel=1 unit=mm global");
    setThreshold(67, 255);
    makeRectangle(280, 120, 116, 1562);
    print(dir+list[i-1]);
    fileName =substring(list[i-1],0,lengthOf(list[i-1])-4);
    run("Analyze Particles...", "minimum=100 maximum=999999 bins=20
show=Nothing display summarize");
    save("C:\\ImageJ\\Results\\" + fileName +"R"+i + ".txt");
    run("Close");
    setThreshold(67, 133);
    makeRectangle(396, 128, 116, 1562);
   run("Analyze Particles...", "minimum=100 maximum=999999 bins=20
show=Nothing display summarize");
   save("C:\\ImageJ\\Results\\" +fileName+"L"+i + ".txt");
   run("Close");
}
selectWindow("Results");
run("Close");
selectWindow("Log");
run("Text...", "save=c:\\ImageJ\\Results\\fileName.log");
run("Close");
run("Quit");


-Judy

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Dan
Siler
Sent: Monday, October 17, 2005 8:34 AM
To: [hidden email]
Subject: Batch Processing


Batch Processing

Can someone please help with the following macro or plugin?

Background

I am using the following

Windows XP
ImageJ 1.35d
Java 1.5.0_03
1536 X 1024 16-bit tif gray scale images
Processing 10 to 120 images at a time

Required Steps

1) Find Directory where images are located
2) Choose all (or some of images if possible) of images to be
processed
3) Find Directory where Dark images are located
4) Choose Dark image to be used for processing
5) Subtract Dark image from each image
6) Apply Median Filter to each image (Radius 3.0 pixels)
7) Apply WCIF Pseudo-flat field plugin (Mean filter kernel size 10.0)
8) Choose to invert image (yes or no)
9) If yes invert images
10) Convert images to 16-bit tif
11) Save processed images

This could be one or more macros.


Thanks



------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message.  If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
------------------------------------------------------------------------------