Hi,
I'm trying to implement a plugin from Digital Image Processing (by Burger and Burge) that shifts an image to the left by a specified number of pixels. The shifting part of the plugin in works fine, but the initial part of the code gives me an error when I compile it. Here's are the first 30 lines of the plugin:
/**
* This sample code is made available as part of the book "Digital Image
* Processing - An Algorithmic Introduction using Java" by Wilhelm Burger
* and Mark J. Burge, Copyright (C) 2005-2008 Springer-Verlag Berlin,
* Heidelberg, New York.
* Note that this code comes with absolutely no warranty of any kind.
* See
http://www.imagingbook.com for details and licensing conditions.
*
* Date: 2010/01/27
*/
import ij.ImagePlus;
import ij.plugin.filter.PlugInFilter;
import ij.process.ImageProcessor;
public class XY_plugin implements PlugInFilter {
ImagePlus im; // instance variable of this plugin object
public int setup(String arg, ImagePlus im) {
if (im==null) {
IJ.noImage(); //currently no image is open
return DONE;
}
this.im = im; // keep a reference to the image im
return DOES_8G;
}
--------
The error message is:
XY_plugin.java:24: cannot find symbol
symbol: variable IJ
location: class XY_plugin
IJ.noImage(); //currently no image is open
^
1 error
----------
Any suggestions for fixing this would be appreciated.
Thanks,
Kevin Hallock