Start IJ instance from another app

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

Start IJ instance from another app

Eric Barnhill
I am finishing up a Java standalone that processes DICOMs. Thanks to the IJ community for the terrific DICOM parser which I have made use of.

Ideally, I would like the app to end with an OptionDialog offering "save to DICOM" or "open in ImageJ". In the latter case, the program would then open or spawn an ImageJ instance. Are there best practices or example code for starting up ImageJ from within another app?

I am tempted to use ProcessBuilder for this, but don't know how I would pass the image data to the spawned process.

Eric

Sent from [ProtonMail](https://protonmail.ch), encrypted email based in Switzerland.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Start IJ instance from another app

ctrueden
Hi Eric,

> Are there best practices or example code for starting up ImageJ from
> within another app?

If you want to do it in-process, check out the ImageJ tutorials:
  https://github.com/imagej/imagej-tutorials

If you want to do it inter-process, then you can certainly spawn another
ImageJ process by calling the ImageJ Launcher (http://imagej.net/Launcher)
and feeding it the arguments you want.

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - http://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Wed, Jan 27, 2016 at 12:40 AM, ericbarnhill <
[hidden email]> wrote:

> I am finishing up a Java standalone that processes DICOMs. Thanks to the
> IJ community for the terrific DICOM parser which I have made use of.
>
> Ideally, I would like the app to end with an OptionDialog offering "save
> to DICOM" or "open in ImageJ". In the latter case, the program would then
> open or spawn an ImageJ instance. Are there best practices or example code
> for starting up ImageJ from within another app?
>
> I am tempted to use ProcessBuilder for this, but don't know how I would
> pass the image data to the spawned process.
>
> Eric
>
> Sent from [ProtonMail](https://protonmail.ch), encrypted email based in
> Switzerland.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html