How to create plugin from source code?

Hello there,

For work, I have been trying to alter a pre-existing ImageJ plugin that takes in as input a set of images with varying z-values and allows the user to choose the fractional intensity of each pixel of the image. Specifically, I have been trying to directly alter the source code of the Z Project plugin under Stacks.

I have altered the program and when I open ImageJ →Plugins→New→Plugin, copy and paste the altered code—in which I have saved it in ./ImageJ/plugins/—and compile and run the code, an error arises:

``Applications/ImageJ/plugins/ cannot find symbol symbol : method create() location: class ij.gui.Overlay Overlay overlay2 = overlay.create();’’

I also compiled and ran the un-altered plugin and the same error occurred, (suggesting that I am doing something entirely incorrect!). I am not sure how to resolve this issue.

Any help would be greatly appreciated for a very inexperienced Java programmer :slight_smile:

What version of ImageJ are you using? The Overlay.create() method is only available in ImageJ 1.49 or later.

It’s this line, right?

You are probably getting this error because you are using an outdated version of ImageJ. The create() method of the Overlay class is not available in inversions of ImageJ older than 1.49. The current version is 1.51h.