Login  Register

Re: Skeletonize BufferedImage with imagej

Posted by Indara on Dec 06, 2007; 1:48am
URL: http://imagej.273.s1.nabble.com/Skeletonize-BufferedImage-with-imagej-tp3697853p3697855.html

This is the code..

        Opener imageOpener = new Opener();
        Image img, imgresult;
        ImagePlus imp = imageOpener.openImage("image.jpg");
        imp.setProcessor(imp.getTitle(),imp.getProcessor().convertToByte(true));
        img = imp.getImage();
        ByteProcessor byteprocessor = new ByteProcessor(img);
        imp.setProcessor(imp.getTitle(),byteprocessor.skeletonize());
        imgresult = imp.getImage();

Please take a look at the code Thanks.


Albert Cardona wrote
> I am trying to skeletonize a bufferedimage with imageJ and save the result
> of skeleton in buffered image.
> I am confuse on how to do it. Can anyone please help me, and give example of
> the sourcecode.
>  


Indara,

Show some working code, and I'll help you fix it.
It's not hard. Just have a look at the API, classes ImagePlus and
ByteProcessor.

http://rsb.info.nih.gov/ij/developer/api/index.html


Albert

--
Albert Cardona
http://www.mcdb.ucla.edu/Research/Hartenstein/acardona