This is the sort of thing macros are good at. This one runs when you
press the F1 key.
macro "My Filter [F1]" {
run("Smooth");
run("Smooth");
run("Find Edges");
setMinAndMax(20, 255)
run("Make Binary");
run("Dilate");
run("Outline");
}
Information about the ImageJ macro language can be found
http://rsb.info.nih.gov/ij/developer/macro/macros.html-wayne
On May 11, 2008, at 12:34 AM, Guilherme Chagas Kurtz wrote:
> Hi! I'm new to make plugins, but I want a "plugin". To tell you the
> truth I want to do JUST a plugin that do this sequence with just a
> click:
>
> Smooth
> Smooth
> Find Edges
> Adjust Brightness/Contrast - Contrast Min value to 20
> Make Binary
> Dilate
> Outline
>
>
> Until the moment I get: Smoot, Smoot and Find Edges, but I'm with
> difficulties with the others =(
> my simple code:
>
> import ij.*;
> import ij.process.*;
> import ij.gui.*;
> import java.awt.*;
> import ij.plugin.filter.*;
>
> public class Mascara2 implements PlugInFilter {
> ImagePlus imp;
>
> public int setup(String arg, ImagePlus imp) {
> this.imp = imp;
> return DOES_ALL;
> }
>
> public void run(ImageProcessor ip) {
> ip.setSnapshotCopyMode(true);
> ip.smooth();
> ip.smooth();
> ip.findEdges();
> ip.setSnapshotCopyMode(false);
> //ip.setSnapshotCopyMode(true);
> //ip.smooth();
> //ip.setSnapshotCopyMode(false);
> //return;
> }
>
> }
>
>
> Can you help me? I need this urgent :=(
>
> Thank you!!!
>
> Guilherme Kurtz
> Brazil
>
> Abra sua conta no Yahoo! Mail, o único sem limite de espaço para
> armazenamento!