[Insight-users] ImageMomentsCalculator question
Benjamin King
king.benjamin at mh-hannover.de
Thu Jul 14 03:02:56 EDT 2005
Hi Luis,
> "Principal moments"
> *ARE*
> "variances of the sample
> along the principal axes".
Here's a snippet of the output my test produces:
-----
Moments after principal axis transformation
[...]
Second central moments:
1147.43 -0.595038
-0.595038 6623.77
Principal Moments: [1.0136e+10, 5.85124e+10]
-----
The principal moments are not the eigenvalues of the second central moments
matrix, but from your explanation I understand that the should be.
I found the reason for this in line 172 of itkImageMomentsCalculator.txx:
The eigenvalues of the second central moments matrix are multiplied with the
total mass to give the vector reported by GetPrincipalMoments().
Is that a feature? To me, that behaviour wasn't obvious from the documentation
or the comments in the code, so it feels more like a bug.
I did not find any usage of GetPrincipalMoments() in neither the ITK source
nor the Insight Applications, so I think it would not break much code if the
multiplication would be removed.
Cheers,
Benjamin
More information about the Insight-users
mailing list