Hello all,

I am not sure this is the right place to ask this question, but I’m wondering about the math behind the PCA implementation in “vtkPrincipalAxesAlign” as well as some other steps in the ACPCTransform module. I’ve been trying to develop a registration pipeline in python, and while I have results that mirror the Slicer c++ function, I’m a little unsure about why it works. I tried using a function I had which implements PCA with a simple SVD, but got different results. I have limited background in c++, and was hoping for some additional assistance in understanding.

Any links to the rationale behind this function? Primarily, I don’t quite understand how the eigenvalueProblem matrix is constructed.

Second, I am wondering if there is any resources to understand how the transformation matrix is constructed from the resulting lowest valued eigenvalue eigenvector. I think I’m missing the point of the various operations to implement the 3x3 core transformation.