I have different objects coming from DICOM files (isolated bones) loaded with vtk as meshes (vtkPolyData). Each one has a different orientation and I'm trying to rotate them at the appropriate angles so that all of them share the same maximum variance direction (that I expect to be the longest dimension of the bone). The idea is like ordering the bones parallelly. I was thinking in getting the maximum variance direction with PCA or a similar technique and rotating the bone at the corresponding degrees to match a particular direction (for example Z-axis). I have no idea how to compute the maximum variance direction of a vtkPolyData object. Any idea?. Could I extract this information from the Cell Data Normals? Any other proposal to re-orient the bones?
Any suggestion will be highly appreciated. Thanks a lot.