These plugins demonstrate how JOGL graphics can be used in an ImageJ plugin.
The first shows how to transfer an OpenGL image to an ImageJ image, while the
second demonstrates the opposite.
JOGL is an open source Java implementation of the OpenGL API, and can be
downloaded here. That site also has
introductory articles and demos.|
Because JOGL graphics and their pixels live outside of the realm of normal Java operations, they can only be accessed through the JOGL API, not through standard Java API calls. JOGL also doesn't work well in multi-threaded environments, meaning its objects should only ever be accessed from a single thread.
The plugin is compatible with the JSR-231 JOGL release.
It has been tested on Mac OS X only; I'd be interested to hear about experiences on other operating systems.
You can download the source files OpenGLExample1_.java and
OpenGLExample2_.java, and compile it using the "Compile and Run"
command, or download the class files OpenGLExample1_.class,
OpenGLExample2_$1.class and put them into the plugins folder.
After restarting ImageJ, they should show up in the plugins menu.|
JOGL needs to be installed, and the jogl.jar file must be in ImageJ's classpath.