本文整理汇总了Python中DataManager.DataManager.push_point方法的典型用法代码示例。如果您正苦于以下问题:Python DataManager.push_point方法的具体用法?Python DataManager.push_point怎么用?Python DataManager.push_point使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager.DataManager
的用法示例。
在下文中一共展示了DataManager.push_point方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import push_point [as 别名]
#.........这里部分代码省略.........
self.timer_main.start(100)
@Slot()
def stop_calibration_close(self):
self.timer_calibration.stop()
self.calibration_window.close()
self.timer_main.start(100)
#------- functions about 3d digitizer ---------
@Slot()
def DIG3D_reconnect(self):
self.DIG.unconnection()
time.sleep(1)
if self.DIG.connection():
self.dig_text = "3d digitizer is connected by USB! "
self.prompt_text = "Please click new subject head to continue"
self.ui_main.statusbar.showMessage(self.dig_text + self.prompt_text)
else:
self.dig_text = "3d digitizer is not connected! "
self.prompt_text = "Please check your device then click plug logo to reconnect."
self.ui_main.statusbar.showMessage(self.dig_text + self.prompt_text)
#------- functions for data obtain or delete point -------
@Slot()
def get_digitizer_point(self):
cite_data = self.DIG.readPDIData()
if cite_data == None:
return
self.data.push_point(cite_data)
step = self.data.step
index = self.data.number_points[step]
#-update the mayaview
if step == 0:
self.ui_main.pushButton_back.setEnabled(True)
self.ui_main.MayaviQwidget.visualization.obtain_turn = index+1
self.ui_main.MayaviQwidget.visualization.show_obtain_points()
if index < 26 :
return
elif index == 26:
self.interface_before_S3R()
return
if step == 1:
#-updata the mayaview
target_turn = self.data.number_points[1]
print "target turn"+str(target_turn)
target_point = self.data.navigation_target[target_turn]
distance = np.linalg.norm(target_point-self.data.navigation_process)
self.ui_main.MayaviQwidget.visualization.target_distance = distance
self.ui_main.MayaviQwidget.visualization.navigation_current_mesh = self.data.navigation_process_mesh
self.ui_main.MayaviQwidget.visualization.navigation_current = self.data.navigation_process
self.ui_main.MayaviQwidget.visualization.navigation_flash()
@Slot()
def delete_last_point(self):
self.data.pop_point()
step = self.data.step
index = self.data.number_points[step]