Re: [BoneJ: 415] Sphere fitting

88 views
Skip to first unread message

Michael Doube

unread,
May 7, 2013, 5:30:37 AM5/7/13
to bonej-users-a...@googlegroups.com, Pete Watson
Hi Pete

> I am trying to perform a histomorphometric analysis on trabecular
Is your image a 3D stack or a 2D image? What is the modality? Are the
images calibrated? Do you have a single instance of ImageJ running?

> Fit Sphere function the following errors are returned:-
> java.lang.ArrayIndexOutOfBoundsException: 0 at

OK, this shouldn't happen whether you are using BoneJ correctly or not.
Thanks for the bug report.

The main requirements are that the points go into the ROI manager as
individual point ROIs (i.e. click a point, hit [t] on your keyboard,
repeat), that there are multiple (more than 5 I think) point ROIs
defined and that the points are not all on the same plane (because then
a circle would fit, and any sphere with radius >= circle radius could
fit the points).

Michael

Michael Doube

unread,
May 7, 2013, 10:16:55 AM5/7/13
to bonej-users-a...@googlegroups.com
Hi Pete,


> java.lang.ArrayIndexOutOfBoundsException: 0
> at org.doube.bonej.SphereFitter.run(SphereFitter.java:97)

This bug is fixed in the testing branch, which you can try by
downloading this version:

http://bonej.org/download/testing/BoneJ_.jar

Commits are here:

https://github.com/mdoube/BoneJ/commit/aac9097518d1c11a0a4d17fc2fc1b79893484eeb

https://github.com/mdoube/BoneJ/commit/95396fbe9fb2ded68e1fb7f73a8a5f90de7baf75

But, if you use it the same way now you will just get an error message
saying that you have no points defined, instead of an ugly exception
message. So we need to work out what is going wrong with your procedure.

Michael

Pete Watson

unread,
May 7, 2013, 11:49:54 AM5/7/13
to bonej-users-a...@googlegroups.com

Hi,

Thanks for the reply and fixing the bug.

I originally import a 16-bit 3D stack which is subsequently converted into 8-bit, and the scale is set. A threshold is then applied to the image and converted into stack binary.

I have then populated the ROI manager with 14 points which should fit a sphere (they were define using one orthogonal plane but with points on different slices). When I try to fit a sphere to the points there is an error saying there are no usage points in the ROI manager (as you guessed). I am guessing I am defining the points in an incorrect way.

Thanks again,

Pete   

Reply all
Reply to author
Forward
0 new messages