From 8c526577530f7bb73533c7a732c31029157d0d86 Mon Sep 17 00:00:00 2001 From: Renan Date: Tue, 12 Oct 2021 08:12:02 +0300 Subject: [PATCH] ENH: more name refractor --- invesalius/data/elfin_processing.py | 10 +++++----- invesalius/navigation/robot.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/invesalius/data/elfin_processing.py b/invesalius/data/elfin_processing.py index 426b0dc..555894b 100644 --- a/invesalius/data/elfin_processing.py +++ b/invesalius/data/elfin_processing.py @@ -96,7 +96,7 @@ class TrackerProcessing: return velocity, distance - def versors(self, init_point, final_point): + def compute_versors(self, init_point, final_point): init_point = np.array(init_point) final_point = np.array(final_point) norm = (sum((final_point - init_point) ** 2)) ** 0.5 @@ -109,7 +109,7 @@ class TrackerProcessing: pc = coord_head[0], coord_head[1], coord_head[2], coord_inv[3], coord_inv[4], coord_inv[5] - versorfactor1 = self.versors(pc, actual_point) + versorfactor1 = self.compute_versors(pc, actual_point) init_ext_point = actual_point[0] + versorfactor1[0], \ actual_point[1] + versorfactor1[1], \ actual_point[2] + versorfactor1[2], \ @@ -120,12 +120,12 @@ class TrackerProcessing: (p1[2] + actual_point[2]) / 2, 0, 0, 0) - newarr = (np.array(self.versors(pc, middle_point))) * 2 + newarr = (np.array(self.compute_versors(pc, middle_point))) * 2 middle_arc_point = middle_point[0] + newarr[0], \ middle_point[1] + newarr[1], \ middle_point[2] + newarr[2] - versorfactor3 = self.versors(pc, p1) + versorfactor3 = self.compute_versors(pc, p1) final_ext_arc_point = p1[0] + versorfactor3[0], \ p1[1] + versorfactor3[1], \ @@ -136,7 +136,7 @@ class TrackerProcessing: return init_ext_point, target_arc - def head_move_threshold(self, current_ref): + def compute_head_move_threshold(self, current_ref): self.coord_vel.append(current_ref) self.timestamp.append(time()) if len(self.coord_vel) >= 10: diff --git a/invesalius/navigation/robot.py b/invesalius/navigation/robot.py index 87337db..f7c7444 100644 --- a/invesalius/navigation/robot.py +++ b/invesalius/navigation/robot.py @@ -194,7 +194,7 @@ class ControlRobot(threading.Thread): self.trck_init_robot.SendCoordinates(coord, self.arc_motion_step_flag) - def control(self, coords_tracker_in_robot, coord_robot_raw, markers_flag): + def robot_control(self, coords_tracker_in_robot, coord_robot_raw, markers_flag): coord_ref_tracker_in_robot = coords_tracker_in_robot[1] coord_obj_tracker_in_robot = coords_tracker_in_robot[2] @@ -202,7 +202,7 @@ class ControlRobot(threading.Thread): current_ref = coord_ref_tracker_in_robot if current_ref is not None and markers_flag[1]: current_ref_filtered = self.process_tracker.kalman_filter(current_ref) - if self.process_tracker.head_move_threshold(current_ref_filtered): + if self.process_tracker.compute_head_move_threshold(current_ref_filtered): coord_inv = self.process_tracker.head_move_compensation(current_ref_filtered, self.m_change_robot_to_head) if self.coord_inv_old is None: @@ -237,4 +237,4 @@ class ControlRobot(threading.Thread): self.target_flag = self.object_at_target_queue.get_nowait() self.object_at_target_queue.task_done() - self.control(coords_tracker_in_robot, coord_robot_raw, markers_flag) + self.robot_control(coords_tracker_in_robot, coord_robot_raw, markers_flag) -- libgit2 0.21.2