The Mandelbrot set using ImageJ

I use ImageJ (or Fiji) quite a bit at work. It's possible to extend the function of ImageJ using the built-in macro language. Macros are a series of ImageJ commands linked together with programming commands. Plugins can also be used to extend ImageJ. These are written in Java and as a result plugins execute much more quickly than the equivalent macro.

I needed to work out how to write plugins, so chose to come up with one that calculates the Mandelbrot set. Jerome Mutterer has written an ImageJ macro that does this already, so I took the mechanics of his macro and plumbed them into a plugin. The sourcecode is shown below, and can also be downloaded here.

Code snippets