How can I use ImageJ as a library for a separate Java application?

eiowmqui picture eiowmqui · May 20, 2012 · Viewed 19.6k times · Source

In a regular Java application, I have a BufferedImage that I would like to manipulate with ImageJ. I have a macro that is exactly what I need to execute. I suspect that the first step is to make an ImagePlus object, but I am not sure how to then run a macro on the ImagePlus object from within Java. Section 7.3 of the ImageJ tutorial found here says:

If you decide to use ImagePlus as your internal image format you can also use all plugins and macros from the ImageJ distribution as well as all other ImageJ plugins.

But does not indicate how to do so. If someone could explain how, or point me towards a resource that does, I would very much appreciate it.

Answer

Hakan Serce picture Hakan Serce · May 21, 2012

The following site describes ImageJ API with examples: http://albert.rierol.net/imagej_programming_tutorials.html#ImageJ programming basics

The examples include reading images, processing pixels etc. Well, I guess you will also need to use the API documentation a lot.