当前位置: 首页>>代码示例>>Python>>正文


Python DataManager.compute_navigation_target方法代码示例

本文整理汇总了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)
开发者ID:eventual,项目名称:re-experiment,代码行数:70,代码来源:re_main.py


注:本文中的DataManager.DataManager.compute_navigation_target方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。