Refactor VTKLUSSimulator to accept rot matrices for rendering
Closed this issue ยท 6 comments
Issue Description
Currently, the set pose method for the VTKLUSSimulator accepts Euler angles, which are then converted into a rot matrix for rendering.
It would be useful to be able to directly pass rot matrices into the renderer, to avoid having to convert rot m -> euler angle -> back into rot m if the user is using rot ms.
I can't find the setpose method. I found set_camera_pose inherherited from vtk_overlay_window but that seems to use matrices. Can you point to the setpose method please.
It is because it is set_pose method I guess which is in
sksurgeryvtk/widgets/vtk_lus_simulator.py
In testing it is tested
tests/camera/test_vtk_camera_model.py
and tests/camera/test_lus_simulator.py
Found it now, thanks. set_pose, not setpose
https://github.com/UCL/scikit-surgeryvtk/blob/master/sksurgeryvtk/widgets/vtk_lus_simulator.py#L92
Try and avoid having 2 methods with duplicate code. You could create set_pose_with_matrices, but then refactor the current set_pose method so all it does is convert the the pose parameters to matrices then calls set_pose_with_matrices
@thompson318 see changes in #169