Unsure how to use plugin Skeletonize3D_ in Java code

Hello,

I’m working on a java program that makes use of diffferent ImageJ plugins. The program creates an instance of ImageJ that comes with some but not all plugins. I want to make use of the Skeletonize3D_ plugin so I imported it as a dependency but it does not seem to show up in the ImageJ interface, I do seem to be able to create an instance of the class and make use of its methods but I don’t believe they are very useful since it only seems to work fully when ran though ImageJ. Is there a way to make the plugin appear in the interface of ImageJ, or be able to use it through IJ.run(“Skeletonize(2D/3D)”) ? I am using eclipse for my IDE.

Thank you so much in advance

There are some example scripts here (about halfway down the page).

1 Like

Hi @John_Minter John, that’s for AnalyzeSkeleton, I can’t seem to find examples for Skeletonize 3D though.

Hi @Rody,

The source code is here.

I’d expect something like this to work:

ImagePlus imp = ...
Skeletonize3D_ alg = new Skeletonize3D_();
alg.setup( "", imp);
alg.run( imp.getProcessor());

I’m not sure what you mean here. It is true that the methods need ImageJ data structures (ImagePlus), but it’s absolutely run-able outside the gui…

Good luck,
John

1 Like

That seems to work, thanks @bogovicj !

1 Like