import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.filter.*;
public class ejemplo_neg3 implements PlugInFilter
{
ImagePlus imp;
public int setup(String arg, ImagePlus imp)
{
this.imp = imp;
return DOES_ALL;
}
public void run(ImageProcessor ip)
{
int w=ip.getWidth();
int n=ip.getHeight();
for(int i=0;i
for(int j=0;j
int p=ip.getPixel(i,j);
p=(int)(p*0.5+1.5);
ip.putPixel(i,j,255-p);
}
ip.setPixel(i,j,255+p);
}
}
}
No hay comentarios:
Publicar un comentario