question about AnalyzeSkeleton_ API

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

question about AnalyzeSkeleton_ API

Aryeh Weiss
Analyze>Skeleton>Analyze Skeleton (2D/3D) , when run interactively,
generates a Results table that contains summary information of each tree
in the rows of the table -- one row per tree. It also can generate a
second table called
"Branch information", in which each row represents a branch, and it is
sorted by tree number (ascending) and then branch length (descending).

I called AnalyzeSkeleton_ through the API, using the following code snippet:

skel = AnalyzeSkeleton_()
skel.calculateShortestPath = False
skel.setup("", tmpImp)
skelResult = skel.run(AnalyzeSkeleton_.NONE, False, False, None, True,
True)meanBL = skelResult.getAverageBranchLength()  # just to check that
it is working.
print "Frame: ", i, len(meanBL)

Now, skelResult is a SkeletonResult
<http://javadoc.scijava.org/Fiji/sc/fiji/analyzeSkeleton/SkeletonResult.html>
object that contains all of the information that is in the Results table.
For example, skelResult.getAverageBranchLength() returns the
corresponding column in the Results table that is generated during the
interactive run.

However, I have not found corresponding methods that return the
information in the "Branch information" table.
This table is generated in the source code
<https://github.com/fiji/AnalyzeSkeleton/blob/AnalyzeSkeleton_-3.3.0/src/main/java/sc/fiji/analyzeSkeleton/AnalyzeSkeleton_.java#L1406
as an extra results table called extra_rt.

Is there a way to get this table (either displayed or as methods that
return the entries) through the API?

Alternatively, I can roll my own by copying the code into my own
function, but I prefer to ask before I re-invent the wheel.

Thanks in advance
--aryeh

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: question about AnalyzeSkeleton_ API

Ignacio Arganda-Carreras-2
Hello Aryeh!

Sorry for the huge delay on answering you, I'm not used anymore to the
mailing list. In the forum you have what I believe is the answer you need
<https://forum.image.sc/t/3d-image-analyzeskeleton/5404/6>. You can get all
the information from the skeleton graph.

Cheers!

ignacio

On Sun, Jul 8, 2018 at 10:24 AM, Aryeh Weiss <[hidden email]> wrote:

> Analyze>Skeleton>Analyze Skeleton (2D/3D) , when run interactively,
> generates a Results table that contains summary information of each tree in
> the rows of the table -- one row per tree. It also can generate a second
> table called
> "Branch information", in which each row represents a branch, and it is
> sorted by tree number (ascending) and then branch length (descending).
>
> I called AnalyzeSkeleton_ through the API, using the following code
> snippet:
>
> skel = AnalyzeSkeleton_()
> skel.calculateShortestPath = False
> skel.setup("", tmpImp)
> skelResult = skel.run(AnalyzeSkeleton_.NONE, False, False, None, True,
> True)meanBL = skelResult.getAverageBranchLength()  # just to check that
> it is working.
> print "Frame: ", i, len(meanBL)
>
> Now, skelResult is a SkeletonResult <http://javadoc.scijava.org/Fi
> ji/sc/fiji/analyzeSkeleton/SkeletonResult.html> object that contains all
> of the information that is in the Results table.
> For example, skelResult.getAverageBranchLength() returns the
> corresponding column in the Results table that is generated during the
> interactive run.
>
> However, I have not found corresponding methods that return the
> information in the "Branch information" table.
> This table is generated in the source code <https://github.com/fiji/Analy
> zeSkeleton/blob/AnalyzeSkeleton_-3.3.0/src/main/java/sc/
> fiji/analyzeSkeleton/AnalyzeSkeleton_.java#L1406>  as an extra results
> table called extra_rt.
>
> Is there a way to get this table (either displayed or as methods that
> return the entries) through the API?
>
> Alternatively, I can roll my own by copying the code into my own function,
> but I prefer to ask before I re-invent the wheel.
>
> Thanks in advance
> --aryeh
>
> --
> Aryeh Weiss
> Faculty of Engineering
> Bar Ilan University
> Ramat Gan 52900 Israel
>
> Ph:  972-3-5317638
> FAX: 972-3-7384051
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Ignacio Arganda-Carreras, Ph.D.
Ikerbasque Research Fellow
Departamento de Ciencia 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/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: question about AnalyzeSkeleton_ API

Aryeh Weiss
Hi Ignacio,

Thank you very much for your reply. I see that this indeed does what I
asked about.

Best regards
--aryeh

On 04/09/2018 15:41, Ignacio Arganda-Carreras wrote:

> Hello Aryeh!
>
> Sorry for the huge delay on answering you, I'm not used anymore to the
> mailing list. In the forum you have what I believe is the answer you
> need <https://forum.image.sc/t/3d-image-analyzeskeleton/5404/6>. You
> can get all the information from the skeleton graph.
>
> Cheers!
>
> ignacio
>
> On Sun, Jul 8, 2018 at 10:24 AM, Aryeh Weiss <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Analyze>Skeleton>Analyze Skeleton (2D/3D) , when run
>     interactively, generates a Results table that contains summary
>     information of each tree in the rows of the table -- one row per
>     tree. It also can generate a second table called
>     "Branch information", in which each row represents a branch, and
>     it is sorted by tree number (ascending) and then branch length
>     (descending).
>
>     I called AnalyzeSkeleton_ through the API, using the following
>     code snippet:
>
>     skel = AnalyzeSkeleton_()
>     skel.calculateShortestPath = False
>     skel.setup("", tmpImp)
>     skelResult = skel.run(AnalyzeSkeleton_.NONE, False, False, None,
>     True, True)meanBL = skelResult.getAverageBranchLength()  # just to
>     check that it is working.
>     print "Frame: ", i, len(meanBL)
>
>     Now, skelResult is a SkeletonResult
>     <http://javadoc.scijava.org/Fiji/sc/fiji/analyzeSkeleton/SkeletonResult.html
>     <http://javadoc.scijava.org/Fiji/sc/fiji/analyzeSkeleton/SkeletonResult.html>>
>     object that contains all of the information that is in the Results
>     table.
>     For example, skelResult.getAverageBranchLength() returns the
>     corresponding column in the Results table that is generated during
>     the interactive run.
>
>     However, I have not found corresponding methods that return the
>     information in the "Branch information" table.
>     This table is generated in the source code
>     <https://github.com/fiji/AnalyzeSkeleton/blob/AnalyzeSkeleton_-3.3.0/src/main/java/sc/fiji/analyzeSkeleton/AnalyzeSkeleton_.java#L1406
>     <https://github.com/fiji/AnalyzeSkeleton/blob/AnalyzeSkeleton_-3.3.0/src/main/java/sc/fiji/analyzeSkeleton/AnalyzeSkeleton_.java#L1406>>
>     as an extra results table called extra_rt.
>
>     Is there a way to get this table (either displayed or as methods
>     that return the entries) through the API?
>
>     Alternatively, I can roll my own by copying the code into my own
>     function, but I prefer to ask before I re-invent the wheel.
>
>     Thanks in advance
>     --aryeh
>
>     --
>

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


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