Login  Register

Re: AnalyzeSkeleton in JavaScript: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

Posted by Ignacio Arganda-Carreras-2 on Feb 16, 2016; 7:47am
URL: http://imagej.273.s1.nabble.com/AnalyzeSkeleton-in-JavaScript-Exception-in-thread-AWT-EventQueue-0-java-lang-NullPointerException-tp5015617p5015647.html

Hello Sarah,

I'm glad it worked!

On your script, you use the duplicate command from the GUI:

IJ.run("Duplicate...", "name");

And then catch the image with the focus on:

imp = IJ.getImage();

That's always risky because it depends on the focus of the GUI.

Does it make sense?

ignacio


On Mon, Feb 15, 2016 at 6:16 PM, SarahBerlin <[hidden email]> wrote:

> Hello Ignacio.
>
>  > Can you check it you on your side?
>
> It works and spits out some meaningful numbers. Thank you very much. :)
>
> Sarah
>
> ps.
> As far as I see you mainly changed the following step:
>
> >          // duplicate ROI = Image_Plus (image to work on)
> >          imp = imp1.duplicate();
>
> Any clue why it works with the method duplicate but not with the class
> Duplicator?
>
>
>
>
>
>
> --
> View this message in context:
> http://imagej.1557.x6.nabble.com/AnalyzeSkeleton-in-JavaScript-Exception-in-thread-AWT-EventQueue-0-java-lang-NullPointerException-tp5015617p5015640.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Ikerbasque Research Fellow
Departamento de Ciencias de la Computacion e Inteligencia Artificial
Facultad de Informatica, Universidad del Pais Vasco
Paseo de Manuel Lardizabal, 1
20018 Donostia-San Sebastian
Guipuzcoa, Spain

Phone : +34 943 01 73 25
Website: http://sites.google.com/site/iargandacarreras/
<http://biocomp.cnb.csic.es/~iarganda/index_EN.html>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html