calling ImageJ from Perl

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

calling ImageJ from Perl

Punita Sharma
Hi All,

I was writing a Perl script to automate some routine tasks and wanted to
call ImageJ from within the script to open images, count nuclei in the
images and output the log file to a certain directory from where it will
be read by another script to do further processing.

Is there a way by which I can call ImageJ from my perl script?

Punita

--
--------------------------------------------------------------------------------
Punita Sharma, PhD
Gladstone Institutue of Neurological Diseases
The J. David Gladstone Institutes
University of California at San Francisco
1650 Owens Street
San Francisco, CA 94158
USA

Lab Phone: 415-734-2619
Reply | Threaded
Open this post in threaded view
|

Re: calling ImageJ from Perl

Dimiter Prodanov
Hi,
I think the easiest way is to call the JVM like that
java -jar ij.jar ij.ImageJ -something -something
I don't know to what extent perl and java are integrated.

best

Dimiter

IMAGEJ automatic digest system wrote:

> There is 1 message totalling 32 lines in this issue.
>
> Topics of the day:
>
>   1. calling ImageJ from Perl
>
> ----------------------------------------------------------------------
>
> Date:    Sat, 6 Jan 2007 02:10:32 -0800
> From:    Punita Sharma <[hidden email]>
> Subject: calling ImageJ from Perl
>
> Hi All,
>
> I was writing a Perl script to automate some routine tasks and wanted to
> call ImageJ from within the script to open images, count nuclei in the
> images and output the log file to a certain directory from where it will
> be read by another script to do further processing.
>
> Is there a way by which I can call ImageJ from my perl script?
>
> Punita
>
>  
Reply | Threaded
Open this post in threaded view
|

Re: calling ImageJ from Perl

dscho
In reply to this post by Punita Sharma
Hi,

On Sat, 6 Jan 2007, Punita Sharma wrote:

> Is there a way by which I can call ImageJ from my perl script?

I do this routinely, but from Tcl instead of Perl. Basically, I construct
a script, put it into a temporary file, and call

java -mx1500m -jar $ijpath/ij.jar -ijpath $pluginspath -batch script.ijm

The option "-mx1500m" reserves 1.5G for java.

Warning: if you plan to execute multiple instances of ImageJ in parallel,
you have to have separate names for the script, _and_ you need to make
sure that ImageJ instances are _not_ reused (the macros _will_ be confused
otherwise) by adding "-port1" for the first instance, "-port2" for the
second, etc.

Hth,
Dscho