Second Moment of Area Imin and Imax

Hi All,

So, I have used the slice geometry plugin in BoneJ to find Imax and Imin. However, they are not labeled on my image. How do I know which is Imax and which is Imin? As well, I am suppose to calculate the Imax/Imin and it should be >1. But, with the values I was given my Imax/Imin is <1. Hoping to get some clarity on this and I have included the annotated image below (with lines for Imax and Imin).

Thanks in advance for any help!
Hayley

Annotated_BN-12 image 3 x20.tif (1.8 MB)

There are quite a few things you need to sort out before BoneJ can give you a sensible estimate of Imax and Imin.

First you have to ensure that the pixels you want to be included in the calculation are foreground (255), and those you want to be ignored are background (0), or alternatively lie within the min and max ranges in the setup dialog. You can also set a rectangular ROI to exclude foreground pixels outside the ROI from the calculation. Make sure you exclude pixels you don’t want in the measurement by setting them to a background value (0 or less than your greyscale min) prior to running Slice Geometry.

The lines that are drawn on the image are not Imax and Imin, they are the maximal and minimal principal axes, around which Imax and Imin are calculated. You will see the principal axes better if you run Slice Geometry on a greyscale image rather than a binarised image.

There is some inconsistency about Imax and Imin and how they relate to maximal and minimal principal axes. You can calculate second moments of area around any arbitrary axes, such as image x and y or anatomical axes. The numerical result Iwhatever axis is the second moment around the axis. This leads to the confusing result that Imax is smaller than Imin, because the same area is on average closer to the longer (maximal) axis than it is to the shorter (minimal) axis.

If your image is calibrated in µm, you should expect Imax and Imin to be very much greater than 1, more like 1×10⁶ or 1×10⁹ µm⁴. You should state the units which are strictly m⁴ but for small samples like this mm⁴ or µm⁴.

@mdoube thank you for replying to my post! I have to say that this is a bit confusing to me, as I am very new to imageJ. I made my image an 8-bit greyscale and the results did change from when it was binarized. I tried to add an ROI but when I tried to add the orientation and slice geometry I received an error message (will include the message below. How do I exclude pixels by making them 0? I have tried doing this various times but cannot seem to fully grasps the settings/tools.

I have set the scale for my images to 1mm. What I meant by Imax and Imin being <1 was the ratio I was calculating (Imax/Imin). Because other papers that I have read display the ratio of Imax/Imin being more than 1, but I cannot seem to get this unless I switch the numbers (Imin/Imax).

Thank you in advance for your help!

Hey @Hayley,

To exclude pixels, did you try create a region of interest (ROI)? You can fill the ROI to change the color. To create a ROI, follow the steps: (1) select the region and (2) Edit > Selection > Add to Manager (or CTRL + T. The next animation illustrate the process.

The error message that you received (java.lang.NullPointerException) is due ImageJ try to access a memory position that does not exist. It’s impossible to say why the error happened without more information of the steps that you did before the error.

As mentioned above, there is inconsistency in the nomenclature across the field, to which I’m sorry to say, BoneJ has contributed. For the record, from here on in (and as was originally coded), this is how BoneJ treats it:

I max < I min

The subscripts relate to the principal axis around which (not in the direction of) the second moment is calculated. So max means the longest (maximal) principal axis. The pixels are closer on average to it than to the shorter (minimal) principal axis, so I max is consequently less than I min. The reason for this is to maintain consistency with other axis labels that may be used in the subscript, see e.g. this discussion:

For the purposes of calculating an I m–/I m– ratio, it doesn’t matter what you call them, as long as you put the big one over the smaller one, or vice versa depending on what you are comparing your work to. All that has changed is the labels: the values are the same.

@raniere.silva, thank you for your reply! I was able to make an ROI with the steps you provided. I then added the orientation in BoneJ but when I tried to use slice geometry it I received another error message. I exact steps were, Adjust>type>8-bit, Set scale, create ROI using the steps you provided me, plugins>boneJ>analyze>orientation, plugins>boneJ>slice geometry. I have included an screen shot in this message. Also, do I need to make the ROI white? I did not in this instance but I am just curious what this is used for?

Thank you!
Hayley

Hello @Hayley. You do not need to make the ROI white. I made the ROI white in my illustration to help the reader to see what the ROI was and to answer how to change the value of pixels. I will let Michael reply your other question.

It has to be a rectangular ROI - if a non-rectangular ROI is supplied, it is treated like a rectangle, by getting the limits in x and y of the supplied ROI.

You should also “clear outside” or invert the selection and fill the outside with your background grey value (the light grey from the medullary cavity would be good), to make sure the only pixels getting included in your analysis are from the cortex.

The exception shouldn’t be thrown and is due to the limits of the ROI falling outside the image boundaries. While we fix that bug, you can work around it by making sure your ROI is totally contained within the image boundaries. An ROI is not needed if the single cortical ring is the only structure in the foreground of the image.

@mdoube, thank you for your reply! I was able to make and apply a rectangular ROI. I then used a binary image again (I just find it easier to work with 0, 255). I also used the paint brush tool to whiteout anything I didn’t want in the foreground (that way the only pixels included in the ROI are from the cortex). I assumed that in the options for slice geometry that Bone Min should be 0 and Bone Max should be 255, similarly the Background and Foreground should be the same. Am I correct in this assumption? I have tried using slice geometry doing this but the image/results never load when set to 0 and 255. They do load, however, if I do not alter them. So the Bone Min/Background= 128 and the Bone Max/Foreground= 255. I just want to make sure that this is ok and that the difference in Bone Min/Background will not effect my results.

Thank you again!
Hayley

Leave the default values for bone min = 128 and bone max = 255 if using a binary image. Setting bone min to 0 leaves no values for background (an 8-bit image has values from 0-255, so if all of them are used for foreground, there can be no background!)

@mdoube that makes complete sense! Thank you so much for all of your help.