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


Python DataManager.push_point方法代码示例

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


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