ROI with holes - Problem using the Trabecular Thickness and Spacing measurement

Skip to first unread message


Jan 31, 2014, 11:48:04 AM1/31/14
Good afternoon,

I am using BoneJ to study 2D images of rabbit's femur head and am now quantifying the quality of the bone surrounding a cylindrical implant.

The ROI I am using corresponds to the milimeter surrounding the implant, and thus is "donut-like". I actually select the implant perimeter, save it in the ROI manager, dilate the selection by 1mm and save it again to the ROI. Next, I use a XOR operator with these two ROIs to get my "donut" ROI.

Although the measurement of Tb.Th and Tb.Sp is perfect for the whole bone, I do not manage to make it work for my selection. Indeed, instead of obtaining something around 35 pixels (corresponding to 100 microns using the scale), I get as output a constant 2 pixels in the Tb.Th mean and Max and 0 in StDev when activating the "Use the ROI manager" option.

I also tried to measure Tb.Th on a simple circular selection and obtained a correct graphic results (my selection in a square window) but still obtain a "2"pixels value.

Do you have any clue on what is actually happening?

Thank you in advance,


Michael Doube

Jan 31, 2014, 3:17:57 PM1/31/14
Hi David,

> Do you have any clue on what is actually happening?

Not really... :-/ A thickness of 2px sounds like the ROI is being
interpreted as just the lines rather than the space between the lines.

Better ROI handling is one of the goals of future BoneJ development,
should BBSRC decide to help us with that by funding our much-needed

You might be able to get around this by generating an image containing
just your 1mm cylinder wall of bone, by making an annular ROI (I think
there's more than one way to do that? Check the user guide) and copying
its contents into a new image. Or alternatively and hackily:

1. binarise your input image
2. draw an ROI corresponding to implant
3. fill it with 0 (i.e. background)
4. draw an ROI 1mm wider
5. Edit > Selection > Make Inverse
6. fill it with 0
7. Run BoneJ's Thickness command on the resulting pixels, which should
now represent bone within 1mm of the implant. That will work for Tb.Th.
For Tb.Sp you have to do something similar, but fill the implant and
outside area with foreground first.

You might get quite a lot of artefact from cut off edges (i.e. creating
sides where there are none) with this approach, so another approach is
to run Thickness on the whole lot of binarised bone, then analyse the
pixel values in the resulting thickness images, in only your annular ROI
(ignoring 0 values as these are background). Bear in mind that you have
to mask out (convert to foreground) big areas of background when
measuring Tb.Sp, because it gets exponentially slower as the radius of
the features increases.


Nicolas Anne-Archard

Jul 23, 2015, 1:53:00 PM7/23/15
to BoneJ Users and Developers,
Hi Michael, 

I was wondering if you have another idea for this problem of Tb.Th used with ROI ("2 px value"). 
Maybe my problem is a bit different as my ROIs are homogenous and I want to determine the local thickness of each ROIs (not the local thickness of trabecular or whatever inside the ROI).

I was, until now, working with the imageJ measures but local thickness is much more accurate for my purpose. My image is binarized with the ROIs being 2D sections of vessels with a value of 255, background is 0. 

I also ask this question because I've sometimes up to 50 ROIs in a single image (I work on 2D microscopic slides) and I cannot see how to proceed easily.

I have also worked on cancellous bone with your plugin (really nice!) and that let me think about this hijacked use.

Thank you for any help, I'm really interesting in this use of your plugin!!


Michael Doube

Jul 23, 2015, 1:58:06 PM7/23/15
Hi Nicolas,

If I understand it correctly, you just have to do the thickness of the whole image (sans ROIs), and output a thickness image. Then draw your ROIs on the thickness image and take the stats of each ROI. The pixel values of the Thickness image are the thicknesses at each point.

You received this message because you are subscribed to the Google Groups "BoneJ Users and Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit


Jul 23, 2015, 2:30:04 PM7/23/15
Thanks for your fast answer!

Good and functional idea! You've understood correctly!

Feeling a bit stupid !! :-)

You received this message because you are subscribed to a topic in the Google Groups "BoneJ Users and Developers" group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to
Reply all
Reply to author
0 new messages