So I have no idea why I get a "cannot find symbol error" for img in the following code. This code is based off an ImageJ Plugin template that works perfectly fine, so something must be eluding me...
import ij.*;
import ij.process.*;
import ij.plugin.filter.*;
public class Plug2 implements PlugInFilter
{
public int setup(String arg, ImagePlus imp)
{
return DOES_RGB;
}
public void run(ImageProcessor img)
{
int i, j, swap;
for (j = 0; j < img.getLength(); j++)
for (i= 0; i < img.getWidth(); i++)
{
swap = img.getPixel(i, j);
img.setPixel(i, j, img.getPixel(img.getWidth()-i, j));
img.setPixel(img.getWidth()-i, j, swap);
}
}
}