本文整理汇总了Python中DataManager.DataManager.compute_navigation_target方法的典型用法代码示例。如果您正苦于以下问题:Python DataManager.compute_navigation_target方法的具体用法?Python DataManager.compute_navigation_target怎么用?Python DataManager.compute_navigation_target使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager.DataManager
的用法示例。
在下文中一共展示了DataManager.compute_navigation_target方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import compute_navigation_target [as 别名]
#.........这里部分代码省略.........
def check_new(self):
subject_name = self.new.lineEdit.text()
if subject_name == "":
QMessageBox.warning(self,"Error","Please input subject's name or ID",QMessageBox.Ok)
else:
self.data.subjectName = subject_name
print self.data.subjectName
self.new.close()
self.interface_after_new()
def give_up_new(self):
self.new.close()
#------ function to load reference data, including reference subject's 1020 system points and four plate points ------
@Slot()
def load(self):
filename,selectedFilter = QFileDialog.getOpenFileName(filter="*.mat")
if filename == '' and selectedFilter == '':
return
file_handle = sio.loadmat(file_name = filename)
try:
ref_1020 = file_handle['l1020']
ref_plate = file_handle['plate']
except:
QMessageBox.warning(self,"Error","The .mat file is not contain reference subject's 1020 system points and plate information",QMessageBox.Ok)
return
self.data.ref_1020 = ref_1020
self.data.ref_plate = ref_plate
self.data.compute_navigation_target()
navigation_target_mesh = self.data.navigation_target_mesh
self.ui_main.MayaviQwidget.visualization.navigation_target = self.data.navigation_target
self.ui_main.MayaviQwidget.visualization.navigation_target_mesh = navigation_target_mesh
self.ui_main.MayaviQwidget.visualization.sub_1020_mesh = self.data.sub_1020_mesh
self.ui_main.MayaviQwidget.visualization.hide_head()
self.ui_main.MayaviQwidget.visualization.show_target()
self.interface_after_load()
#------- functions for navigation
@Slot()
def navigation_start(self):
self.interface_before_navigation()
if self.timer_main.isActive() == False:
self.timer_main.start(100)
#------- functions about calibration ---------
@Slot()
def start_calibration(self):
#stop the main timer
self.timer_main.stop()
#show the calibration window
self.calibration_window.show()
self.calibration_window.setModal(True)
#set up calibration data
self.calibration_window.first_point = None
self.calibration_window.second_point = None
self.calibration_window.start_calibration()
self.timer_calibration.start(100)