0

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.

Amit Joshi
  • 15,448
  • 21
  • 77
  • 141
Luis
  • 159
  • 4
  • 12

1 Answers1

0

Found this but it's extremely resource-demanding for high resolutions meshes:

https://kitware.github.io/vtk-examples/site/Python/PolyData/AlignTwoPolyDatas/

But I can do the job if no alternatives are found.

Luis
  • 159
  • 4
  • 12