Point Cloud Alignment with PCA
git pull https://github.com/lukemshepherd/PCA_2.git
conda env create -f environment.yml
conda activate PCA2
pip install PCA2
git pull https://github.com/lukemshepherd/PCA_2.git
pip install -e .
from PCA2.core import *
from mayavi import mlab # for calling the plots
bone.filter_level = 0.3
tibia_f2 = bone.from_matlab_path(matlab_file='data/tibia_f2.mat')
tibia_f1 = bone.from_matlab_path(matlab_file='data/phantom_tibia_f1.mat')
tibia_f1.default_color = (0.8, 0.3, 0)
rotate(tibia_f1, tibia_f2)
Plotting with mayavi is very similar to matplotplib where you build a scene and call it with show()
You can plot bones by calling the .plot()
method and then mlab.show()
# tibia_f2.plot()
# mlab.show()
df_angles(tibia_f1, tibia_f2, name='tibia')