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?


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.


Hey @mdoube,

following up on this:

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?



@haesleinhuepf try BoneJ2


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


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?


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 and extracted it.
I have downloaded and and copied them in fiji-win64\\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


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


I just tested an installation using the latest distribution of ImageJ 1.53x with Java8 as found on

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:

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.


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, then in the running Fiji add the BoneJ update site and install it)?


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 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.


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

OK - keep us posted.

It turns out that I was unable to reproduce the very fast timings I thought I had before, and neither were the Avizo engineers, and so BoneJ’s connected components labeller goes about 15× faster than Avizo’s ‘Labeling’ module.