BoneJ, possibly not recognising image format

Greetings from a discombobulated neophyte (i.e., please be kind)! I will start with a brief message, for I can’t get technical because I haven’t got far. I’ve managed to download ImageJ and add the plugin BoneJ. Please don’t ask how long that took. I wish to use the “Moments of Inertia” function that sits within BoneJ, but, after first importing jpg image, I get this error: No voxels are available for calculation. Check your ROI and thresholds." To me a voxel sounds like a small, borrow-dwelling mammal. I have tried various functions to convert or transform the image, but to no avail. Any advice would be more than welcome.
Yours,
Nam from Australia

1 Like

Hi nam, welcome to the forum!

I think what the error message is telling you is that BoneJ doesn’t find any foreground objects (i.e. pixels with value 255, which typically show up in white) in your image, and therefore can’t calculate the moments of inertia of anything.

What does your image look like? Are you allowed to share it (or another example image with the same problem) here? What version of ImageJ and BoneJ are you using?

Thank you SO much Alessandro! Here’s my attempt at a brief reply:

  1. BoneJ version: jars/bonej-plugins-6.1.1.jar. Release date: 18 April 2019.
  2. ImageJ version: all I could find was Window, “ImageJ bundled with 64-bit Java 1.8.0.
  3. Yes, any of the images I send can be used. Some are photos that I took of the artefact, others are overlays I constructed.
  4. This is an assignment on a necklace from Papua New Guinea. I have identified the dentaries of two species of bandicoot, the lowland ringtail possum, and the common spotted cuscus. There is also a ring of, the interest at hand. It appears to be a section of human femur.
  5. I have tried on two images, both embarrassingly poor images. In short, I am trying to visit the museum again, but arranging the visit is tricky, owing to fires and staffing. It is a 12-hour drive at minimum. On my last visit I was halted by dust storms (the drought is horrendous), and missed major road closures by 2 days. The house behind my hotel room burned to the ground on my overnight stay! I was awoken by a fireman at 2:30 am, went outside, and watched it burn for a few hours. I digress. Needless to say, these images are simply being used in my attempt to get the program working. I know they are useless: oblique angle, obscured etc. I will get a proper picture, likely in February.
  6. The “grey bone” image is my approximation of the shape. Yesterday I was getting the “voxel” error for this, now I’m getting something else (attached). I must have changed something.
  7. I also ran the movement of inertia analysis on the actual bone image, simply out of curiosity, and it returned the dreaded burrow-dwelling marsupial error.
  8. Even when I appear to get somewhere (the aforementioned screen capture), I cannot see where the moments of inertia are reported.
    Thanks again so much,
    Nam

You’re welcome! That sounds scary!

You should be able to see some inertia results (e.g. Icxx) for your “Grey bone” image if you scroll right using the scroll bar at the bottom of your “Results” window?

As to why you get the error for the “actual bone” image: it is an RGB image, which means it has three values for each pixel, a Red value, a Green value and a Blue value, so it is not suitable for a moments of inertia analysis, as you can see e. g. here under Suitable Images

Moments of inertia needs an image with just one value per pixel, and will include pixels that have values between the input parameters “Bone Min” and “Bone Max” in its calculations. You can see the value of a pixel in the status bar (see image below) if you hover your cursor over the image.

image

Hope this helps!

Thanks Alessandro. I’ll give that go. Ironically, my computer is now hanging when I try to open ImageJ. I’ll get it sorted. In short, are you saying that using the grey image is fine?
Yours,
Andrew

I got it working. I’m just trying figure out the terminology in the results.

Found it. http://bonej.org/moments
Thanks again mate! This is wonderful.

1 Like

If your aim is to know the 3D moments of inertia of the in your case (essentially) 2D object that is defined by pixels with value between say 100 and 130 (or whatever values you give for Bone Min and Bone Max) in your grey image, then yes, I expect you will get a sensible result this way.

If you run “Image->Adjust->Threshold” in ImageJ, you can figure out which values you want to use for Bone Min and Bone Max. You can see which pixels are included in your shape by varying the lower and upper threshold values of “Image->Adjust->Threshold”.

As @nam and others have pointed out, make sure you don’t confuse (3D) Moments of Inertia with the 2D second moment of area - checkout this post by @mdoube !

Thanks Alessandro. Yes, I used the grey image and it worked. I’m also getting the hang of playing with the thresholds. All is good.
Also, with some handy previous posts (Problem with the window : allow usage data collection?) I managed to get around the bug solved.
Thanks again for all your help and patience. I think the heat, dust, and smoke are getting to my brain.
Cheers,
Nam

Glad I could help! Will edit my last post for clarity in the interest of future readers of this page.

1 Like