Login  Register

Re: ImageJ "Make Binary "

Posted by Mathias Zech on May 14, 2009; 10:38am
URL: http://imagej.273.s1.nabble.com/ImageJ-Make-Binary-tp3692538p3692541.html

Hi,

I use that functionality in the following way:

private ImagePlus createBinary(ImagePlus img, boolean scale) {
        log.log(Level.FINEST, "Creating Binary Image");
        BinaryProcessor proc = new BinaryProcessor(new
ByteProcessor(img.getImage()));
        proc.autoThreshold();
       
        log.log(Level.FINEST, "Created Binary Image");
        return new ImagePlus(img.getTitle(), proc);
    } //createBinary

There might be an easier way to do this but this works for me!

Greetings,
Mathias

kataner wrote:

> HI there,
> i hope you can help me. I'm new too ImageJ and trying to use some of the
> functions in a program i have to write. I tried to find a good way to run
> the "make binary" command but couldn't find a way. Maybe i ask too early but
> it would be great if someone could help me with this. Nice would be
> Java-Code.
>
> Greetings kataner
>
> P.S.: Excuse my bad english
>