Login  Register

Trouble with plugin / image backgrounds

Posted by Benjamin Blonder on Jul 19, 2005; 2:58pm
URL: http://imagej.273.s1.nabble.com/Trouble-with-plugin-image-backgrounds-tp3705226.html

Hello,
 I'm trying to write a plugin filter for 8-bit grayscale images. I'd like to
have a method that takes an ImageProcessor, angle, and grayscale value, and
then rotates the image by the requested number of degrees, filling in the
background with the value.

 Right now I have

public void rotate(ImageProcessor ip, int degrees)
{
 double average = // calculated here
 ip.setBackgroundValue(average);
 ip.rotate(degrees);
}

This doesn't compile, however. I get this error:

C:\Program Files\ImageJ\plugins\SPR_Position.java:51: Method
setBackgroundValue(double) not found in class ij.process.ImageProcessor.

ip.setBackgroundValue(average);

                     ^

1 error

All the ImageJ documentation has this method listed as existing, and I'm
positive that ip is a ByteProcessor, so it ought to do what it claims. Any
suggestions on how to fix this? I'm using ImageJ 1.33u on Windows XP.

Thanks,
Ben