sksurgerycore.baseclasses.tracker module¶
An abstract base class for trackers used in sksurgery
-
class
sksurgerycore.baseclasses.tracker.
SKSBaseTracker
(configuration=None, tracked_objects=None)[source]¶ Bases:
object
Abstract base class for trackers using in sksurgery. Defines methods that all trackers should implement.
-
add_frame_to_buffer
(port_handles, time_stamps, frame_numbers, tracking_rot, tracking_trans, quality, rot_is_quaternion=False)[source]¶ Called by derived classes to add data to the smoothing buffers
Parameters: - port_handles – a list of port handles
- time_stamps – list of timestamps (cpu clock), one per tool
- frame_numbers – list of framenumbers (tracker clock) one per tool
- tracking_rot – list of tracking rotations
- tracking_trans – list of tracking translations
- quality – list the tracking quality, one per tool.
- rot_is_quaternion – True if rotation is a quaternion.
-
get_frame
()[source]¶ Returns: port_numbers : list of port handles, one per tool time_stamps : list of timestamps (cpu clock), one per tool
frame_numbers : list of framenumbers (tracker clock) one per tool
tracking : list of 4x4 tracking matrices, rotation and position, or if use_quaternions is true, a list of tracking quaternions, column 0-2 is x,y,z column 3-6 is the rotation as a quaternion.
tracking_quality : list the tracking quality, one per tool.
-
get_smooth_frame
(port_handles)[source]¶ Called by derived classes to return smoothed data
Parameters: port_handles – a list of port handles to get data for Returns: port_numbers : list of port handles, one per tool time_stamps : list of timestamps (cpu clock), one per tool
frame_numbers : list of framenumbers (tracker clock) one per tool
tracking : list of 4x4 tracking matrices, rotation and position, or if use_quaternions is true, a list of tracking quaternions, column 0-2 is x,y,z column 3-6 is the rotation as a quaternion.
tracking_quality : list the tracking quality, one per tool.
-