getResults("# Branches", 0) always gives NaN with results from Analyze Skeleton 2D/3D

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

getResults("# Branches", 0) always gives NaN with results from Analyze Skeleton 2D/3D

gabejackson
Hello,

I wrote a macro that makes use of the AnalzyeSkeleton 2D/3D which is in Fiji. The Plugin is described here:
http://imagejdocu.tudor.lu/doku.php?id=plugin:analysis:analyzeskeleton:start

It gives a results table with the following headers: "# Branches", "# Junctions", etc..

this is an excerpt of my macro code:

   run("Clear Results");                                                                        
   run("Skeletonize (2D/3D)");                                                                  
   run("Analyze Skeleton (2D/3D)", "prune=none");                                                                                                                                                            
                                                                                               
   print(nResults);      // this gives 1                                                                
   print(getResult("# Branches", 0))    // this gives NaN

the results table contains these results:
  # Branches # Junctions # End-point voxels # Junction voxels # Slab voxels Average Branch Length # Triple points # Quadruple points Maximum Branch Length
1 1 0 0 0 416 0.003 0 0 0.003

Can somebody tell me why any getResult("header", 0) i try gives me NaN?

Thanks a lot in advance!

Greetings from Switzerland,

Gabe
Reply | Threaded
Open this post in threaded view
|

Re: getResults("# Branches", 0) always gives NaN with results from Analyze Skeleton 2D/3D

gabejackson
I found the error. The problem was that the plugin was using the deprecated setHeading() instead of just addValue(). I changed the code of the plugin, recompiled, made a jar and put it back in ImageJ and it worked. will let the maintainer know
Reply | Threaded
Open this post in threaded view
|

Re: getResults("# Branches", 0) always gives NaN with results from Analyze Skeleton 2D/3D

Michael Doube
On 07/06/10 17:39, gabejackson wrote:
> I found the error. The problem was that the plugin was using the deprecated
> setHeading() instead of just addValue(). I changed the code of the plugin,
> recompiled, made a jar and put it back in ImageJ and it worked. will let the
> maintainer know

Gabe,

I already made the same changes so I'll Cc Ignacio to get him to pull
them into the official version - didn't realise it would cause this bug,
sorry.

(Ignacio, from here:
http://github.com/mdoube/BoneJ/commit/a9a06a5f59137a174f5406e0e84931f28efc994f 
)

Michael
Reply | Threaded
Open this post in threaded view
|

Re: getResults("# Branches", 0) always gives NaN with results from Analyze Skeleton 2D/3D

gabejackson
Hi Michael,

I already wrote Ignacio a mail with the issue. Thanks for your message. Incase you message him anyway, make sure you also mention the head[x] entries just above. Your path is for the extra_head[x] entries.

Greetings,

Gabe
Reply | Threaded
Open this post in threaded view
|

Re: getResults("# Branches", 0) always gives NaN with results from Analyze Skeleton 2D/3D

Ignacio Arganda-Carreras
Hello everybody,

Thanks for reporting!

This is fixed now in Fiji master branch and it will be released very soon!

ignacio

On Mon, Jun 7, 2010 at 1:01 PM, gabejackson <[hidden email]> wrote:

> Hi Michael,
>
> I already wrote Ignacio a mail with the issue. Thanks for your message.
> Incase you message him anyway, make sure you also mention the head[x]
> entries just above. Your path is for the extra_head[x] entries.
>
> Greetings,
>
> Gabe
> --
> View this message in context: http://imagej.588099.n2.nabble.com/getResults-Branches-0-always-gives-NaN-with-results-from-Analyze-Skeleton-2D-3D-tp5149474p5150047.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>



--
Ignacio Arganda-Carreras, Ph.D.
Seung's lab, 46-5065
Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St.
Cambridge, MA 02139
USA

Phone: (001) 617-452-4976
Website: http://bioweb.cnb.csic.es/~iarganda/index_EN.html