I am writing a blog post for biologists about different measurements including the ones provided by simpleITK and have problems to understand the measurements for principal axis and principal moments. I know that they are somehow used to compute a matrix, so are they maybe used to compute another measurement?

If so, could you please point me to these measurements and the formulas needed to compute them?

My aim is to explain these measurements in a way that it easy to understand.

Thanks for the hint. It would be super cool if you or somebody else could explain this code to me as I have a hard time understanding it. I am interested in:

Here is some additional code documentation about the computation:

There are a couple aspects of what is implemented in ITK that makes it more complicated than basic index based moment calculations. First the computation take into considerations the image’s geometry which includes the pixel spaces and the direction cosine matrix. Second, it is optimized for the run-length encoding that the LabelObject used to store each label.

If you want to explain the computation is an easy way, the above optimization and spacial awareness should be omitted. And the wikipedia use for the standard index based computations as a reference.