[Insight-users] ImageMomentsCalculator question
Benjamin King
king.benjamin at mh-hannover.de
Wed Jul 6 09:17:48 EDT 2005
Hello,
I'm a little lost with the itk::ImageMomentsCalculator. What I want to know is
the variance of a point set in the direction of greatest spread. I thought, I
could use GetPrincipalMoments() for this, but apparently this is not the
value that I'm looking for (see below).
Right now, I'm using the following method:
1) Use one ImageMomentsCalculator to perform PCA
2) Iterate over the transformed image to compute the mean index
3) Iterate over the transformed image to compute the index variance.
- OR -
2) Use another ImageMomentsCalculator to find the second central moments
matrix m.
3) m[end][end] is close to the variance I'm looking for.
What's correct? Is there an easier way? Maybe I should have paid more
attention during statistics class... ;)
Thanks for your help,
Benjamin
PS:
For an example binary data set (rounded cuboid), I'm getting these values from
the two ImageMomentCalculators:
Moments before principal axis transformation:
-----
Zeroth Moment about origin: 2.10095e+08
First Moment about origin: [127.062, 127.223, 127.987]
Second Moment about origin:
501.084 49.4927 123.275
49.4927 417.388 57.1835
123.275 57.1835 536.871
Center of Gravity: [127.062, 127.223, 127.987]
Second central moments:
501.084 49.4927 123.275
49.4927 417.388 57.1835
123.275 57.1835 536.871
Principal Moments: [8.2863e+10, 8.2868e+10, 1.40029e+11]
Principal axes:
0.776758 -0.313056 -0.546482
-0.0677716 -0.904218 0.421659
-0.626142 -0.290491 -0.723575
Moments after principal axis transformation:
-----
Zeroth Moment about origin: 2.10081e+08
First Moment about origin: [127.062, 127.222, 127.987]
Second Moment about origin:
394.452 0.0174592 -0.0375555
0.0174592 394.533 0.00182282
-0.0375555 0.00182282 666.542
Center of Gravity: [127.062, 127.222, 127.987]
Second central moments:
394.452 0.0174592 -0.0375555
0.0174592 394.533 0.00182282
-0.0375555 0.00182282 666.542
Principal Moments: [8.28659e+10, 8.28844e+10, 1.40027e+11]
Principal axes:
0.979273 -0.202545 0.000136521
-0.202545 -0.979273 -2.14026e-05
0.000138026 -6.69248e-06 -1
More information about the Insight-users
mailing list