BoneJ particle analyser

Hello all,
I’m trying to use the BoneJ particle analyzer, but it says “Java 3D libraries are not installed. Please install and run the ImageJ 3D Viewer, which will automatically install Java’s 3D libraries.” I installed and ran 3D viewer, but the same dialog shows up when I try to run particle analyzer.

Any thoughts?

J

1 Like

Which version of ImageJ are you running? Your issue may be a side-effect of running BoneJ in ‘new’ ImageJ, which has made quite a few changes to 3D libraries and the like. BoneJ1 expects an older version of ImageJ, installation instructions here.

2 Likes

Hey @mdoube,

following up on this: https://twitter.com/haesleinhuepf/status/1171890356763398151

I just ran into the same issue as above: I cannot run BoneJs Particle Counter, because “Java 3D” needs to be installed. Furthermore, the link on the BoneJ website towards Benes 3D Viewer doesn’t work anymore.

Addendum: Running Fijis 3D Viewer doesn’t help.

Is there a recommended procedure to get BoneJ running in a recent Fiji?

Thanks!

Cheers,
Robert

@haesleinhuepf try BoneJ2 https://imagej.net/BoneJ2

2 Likes

EDIT: (Oct 2020) Install BoneJ from the ImageJ Updater. All the dependencies will be taken care of.

2 Likes

Hi @mdoube and @haesleinhuepf ,

I have the same problem. I have installed the latest version of fiji (64-bit windows) couple of days ago and getting the Java 3D error and following your comments, I replaced 3D_Viewer-4.0.3 with ImageJ_3D_Viewer and ran the program but I could not use particle analyser because it was not compatible with bonej; then, I replaced boneJ_ with BoneJ2-bonej-7.0.7 and now there is no more particle analyser and possibility to run 3D viewer. Can you help me solve this problem please?

Thanks

Make sure you have completely removed any left over BoneJ_.jar in your Fiji plugins directories, and try again using the ImageJ Updater. Should just work. If not, please provide detailed system info here: OS, Java version, steps taken to install Fiji and BoneJ.

Hi @mdoube,

In my 64-bit os with windows 8.1 and Java version 6.0.150
I have download fiji (windows 64 bit) from https://imagej.net/Fiji/Downloads and extracted it.
I have downloaded https://github.com/fiji/3D_Viewer/archive/3D_Viewer-4.0.2.zip and https://zenodo.org/record/3894386/files/bonej-org/BoneJ2-bonej-7.0.7.zip?download=1 and copied them in fiji-win64\Fiji.app\plugins and deleted 3D_Viewer-4.0.3.jar.
Then I’ve run the application “ImageJ-win64” and clicked on Help/Update ImageJ and upgraded to V1.53e and ran the application “ImageJ-win64” again and did the “drag and drop” of my image series.
This is the result of clicking on Plugin/3D viewer
image

and

And there is no boneJ plugin in the menue.

Not what you asked for, but an non-Fiji alternative to get the particle analyser working is to use BoneJ 1 together with Bene’s old 3D viewer under ImageJ 1.x with Java 8. With ImageJ 1.x you are not limited to Java 6 as you are with Fiji and BoneJ 1; it should work with any Java version.

It does not work out of the box as the auto-installer for Java3D 1.5 (as included in the old 3D viewer) does not work, and Java3D 1.5x is also difficult to get working under Java 8. What you need to do is to install Java 3D 1.60 or 1.62 manually by downloading the relevant jars. See this post for instructions:

Please note that on some Windows installations you may need to add the sun.java2d.d3d=true Java flag.

1 Like

Edit:

I just tested an installation using the latest distribution of ImageJ 1.53x with Java8 as found on http://wsr.imagej.net/distros/win/ij153-win-java8.zip

Then I downloaded the legacy version of BoneJ and 3D viewer, Java 3D 1.62 and put it all in the 3D folder under plugins:

https://bonej.org/download/BoneJ_.jar
https://imagej.nih.gov/ij/plugins/3d-viewer/ImageJ_3D_Viewer.jar
https://jogamp.org/deployment/java3d/1.6.2/j3dcore.jar
https://jogamp.org/deployment/java3d/1.6.2/j3dutils.jar
https://jogamp.org/deployment/java3d/1.6.2/vecmath.jar
https://jogamp.org/deployment/v2.3.2/fat/jogamp-fat.jar

It worked, but there was a minor rendering issue with the outline of the bounding box being shown in front of the object. Adding the sun.java2d.d3d=true flag to ImageJ.cfg solved this. I am using Windows 10/64 bit.

I also tried a different version of Java, the one found on


The plugins worked also there (with the same rendering issue). ImageJ reports this as Java version 1.8.0_201.

You may try to put this legacy collection of jars into your Fiji installation, if you want to explore this further. You must then make sure you remove any traces of the Fiji 3D viewer, as it is incompatible with the legacy plugins.

2 Likes

Thanks @steinr for the installation instructions, which will help people with legacy BoneJ, should they need it for e.g. reproducibility purposes.

The Particle Analyser in BoneJ1 is about 30-50× slower than the one in BoneJ2.

@Esha, what is your reason for not using BoneJ2 on Fiji, following the regular instructions (roughly, install Fiji with Java 1.8 from fiji.sc, then in the running Fiji add the BoneJ update site and install it)?

2 Likes

Thanks @mdoube, I was not aware that there was such a big performance improvement with the Particle Analyser under Bone J2. Last time I tried it (about a year ago I think), the Particle Analyser was under the Legacy section of the code, so I got the impression that it was unchanged from Bone J1.

I did once compare the Particle Analyser of Bone J1 to Object_Counter3D by Fabrice P Cordelires and found BoneJ 1’s version to be much faster. I also compared BoneJ particle analyser to Avizo and found Avizo to be much faster. But I see from your recent paper that you now have revised the algorithm so that it matches Avizo, that is interesting. Thanks for this info.

1 Like

Hi @steinr Thanks for your kind help and time.
so, the steps that I took was right (in installation of fiji) and I should add other jar files that you mentioned in plugin folder and instead of bonej1_, I should put BoneJ2-bonej-7.0.7 in the plugin folder, right?

@mdoube Thanks Michael. I did not get it. which step is wrong when I installed the program and plugin. Would you let me know please.
I’ve installed https://downloads.imagej.net/fiji/latest/fiji-win64.zip and removed 3D_Viewer-4.0.3.jar and added BoneJ2-bonej-7.0.7 and 3D_Viewer-3D_Viewer-4.0.2 in plugin folder.
Is the problem from the program version that I added or the jar files? I do not get it. Should I add other files or …

No, the instructions I posted only apply for ImageJ 1. I think it will be difficult, probably impossible to install BoneJ 1 in ImageJ 2 / Fiji with Java 8.

For Fiji, just use the updater and enable the BoneJ2 update site. That should work out of the box. For me, my Fiji installation has 3D_Viewer-4.0.3 and BoneJ 7.0.7 and it works.

2 Likes

And not recommended, to avoid discussions like this thread.

These days, just take the path of least resistance: install Fiji, then add the BoneJ update site.

1 Like

It’s still ‘legacy’ design (which basically means low-level array access and ImageJ1 API calls), for performance reasons. It’s just much faster now due to improvements in implementation.

1 Like

It’s close, and there is still room for improvement. I had a weird experience that was Avizo’s Labeling module got very much slower between 2019.4 and 2020.2. Did you have the same? Its other module, Connected Components, is (or should be) deprecated because it is super slow.

I haven’t tried, I am still on 2019.4. I will upgrade to 2020.2 later this autumn.

1 Like