Batch process 32bit float images

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

Batch process 32bit float images

Jörg Hammel
Hello everyone,

 

I´m new to programming ImageJ plugins and didn´t manage to solve the
following problem. I couldn’t find a solution in the archive of the mailing
list and among the published plugins and macros.

I want to batch process a number of images (raw files 32 bit float) in a
folder, apply new min and max values to the image, and save them in a new
folder as bmp files. I never managed to get the import raw command running
in my batch process plugin/ or macro without getting a prompt to click
“select” for each of the images. Probably there is a simply solution.

 

 

Thanks …

 

             Jörg Hammel

 
Reply | Threaded
Open this post in threaded view
|

Re: Batch process 32bit float images

Wayne Rasband
Use the command recorder to generate code to run the File>Import>Raw
command. This code, generated by the recorder, opens a 32-bit raw
image:

run("Raw...", "open=[/Users/wayne/ct.raw] image=[32-bit Real] width=888
height=495 offset=0 number=1 gap=0");

Use string concatenation to pass variables to the run() function. This
example makes the path, width and height variables:

path = getDirectory("home")+"ct.raw";
width = 888;
height = 495;
run("Raw...", "open=["+path+"] image=[32-bit Real] width="+width+"
height="+height+" offset=0 number=1 gap=0");

-wayne

On Jun 18, 2007, at 11:33 AM, Jörg Hammel wrote:

> Hello everyone,
>
>
>
> I´m new to programming ImageJ plugins and didn´t manage to solve the
> following problem. I couldn’t find a solution in the archive of the
> mailing
> list and among the published plugins and macros.
>
> I want to batch process a number of images (raw files 32 bit float) in
> a
> folder, apply new min and max values to the image, and save them in a
> new
> folder as bmp files. I never managed to get the import raw command
> running
> in my batch process plugin/ or macro without getting a prompt to click
> “select” for each of the images. Probably there is a simply solution.
>
>
>
>
>
> Thanks …
>
>
>
>              Jörg Hammel
>
>
>