-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
theta angle #30
Comments
Hi, thanks for this interesting observation. The lines of code you refer too simply consist in converting 3D rotation matrix into three Euler angles. This code is rather common, and I'm surprised there is such a difference with theory. There may be some discretization effects, but I suppose you considered ellipsoids "large enough"? Have you noticed similar biaswith other library/software? I will try to investigate this effect. Best, |
Hi, I have made some additionnal checks, and did not exhibit any suspect behaviour. However, I think I understood why you obtained such curve. It depends on the way you generate the orientation of ellipsoids. Let us suppose that ellipsoids are elongated, with equal second and third radius (i.e., "prolate" ellipsoids). Then, the orientation is solely determined by the (phi, theta) pair.
Can you confirm? If yes we can close. |
Hi @dlegland , Bellowing are the comparisons. I think 2000 particles are kind of sufficient albeit there are some deviations (gray line) compared to the theoretical values (orange line). |
Hi @dlegland , Could it be because of the different definitions of inertia of moments? In your codes:
for (Voxel3D voxel : voxels) { In BoneJ, similar to 3D Suite,
Best regards, |
Well, I used definition of statistical moments, widely described in image analysis books, and also implemented in Matlab. For information, I attached a small report that gathers the references, and some investigations on the normalization coefficient for ellipsoid radius. The explanations for conversion of angles can be obtained here: |
Hi, I am also interested to know how much the results are different by the two different treatments. It is very easy to adapt your current codes. Can you teach me how to compile your repo with ImageJ package? |
Thanks for the link! to compile the repo, we use Eclipse plateform, and the maven configuration file. When properly installed, using "File->import->maven->Existing maven project", and selecting the pom.xml file of MorphoLibJ should install all dependencies (well... mainly ImageJ itslef, and the JAMA matrix package). David |
Hi, Best, |
Hi @dlegland ,
thanks for the codes.
I want to measure 3D ellipsoid particle orientation in 3D space. To test your code, I made around 2000 ellipsoids digitally which are randomly distributed in space. I sorted their theta angles (-90-90) with a bin size of 5 degrees. It seems most of the particles have a -45 and 45-degree theta angle. Theoretical calculation suggests that particles that around theta=0 are the most, as reported in this figure. I also tried real randomly packed particles which are obtained from X-ray CT, the results are similar.
I am wondering if these results have something to do with these lines in your codes? thanks
// extract |cos(theta)|
Matrix mat = svd.getU();
double tmp = hypot(mat.get(0, 0), mat.get(1, 0));
double phi, theta, psi;
The text was updated successfully, but these errors were encountered: