Creating a basic PlugInFilter
To create a
PlugInFilter
implementation, we add the implements
keyword behind the class name and specify PlugInFilter
as the implementation. When you do this using an IDE, such as NetBeans, it will place a red squiggly underline under this statement. When you place the cursor on the line with the squiggly underline and press Alt + Enter (in NetBeans), the editor will give you a list of suggestions to rectify the mistake that we made. The first complaint is that NetBeans cannot find the PlugInFilter
symbol because we haven't added it yet. Press Alt + Enter and select the option called Add import for ij.plugin.filter.PlugInFilter
. You will now see that the import statement is added to your source file (usually at the top of the source file). We now still have a squiggly underline in our class statement as it is missing the overrides for the abstract setup and run methods. As explained in Chapter 8, Anatomy of ImageJ Plugins PlugInFilter
requires these two methods...