CN104580973A - Recording and playback method and device of virtual surgical simulation process - Google Patents
Recording and playback method and device of virtual surgical simulation process Download PDFInfo
- Publication number
- CN104580973A CN104580973A CN201410841513.5A CN201410841513A CN104580973A CN 104580973 A CN104580973 A CN 104580973A CN 201410841513 A CN201410841513 A CN 201410841513A CN 104580973 A CN104580973 A CN 104580973A
- Authority
- CN
- China
- Prior art keywords
- recording
- playback
- integer
- scene state
- timer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 191
- 230000008569 process Effects 0.000 title claims abstract description 128
- 238000004088 simulation Methods 0.000 title claims abstract description 105
- 230000004044 response Effects 0.000 claims abstract description 100
- 238000009877 rendering Methods 0.000 claims abstract description 29
- 238000001356 surgical procedure Methods 0.000 claims abstract description 15
- 239000012634 fragment Substances 0.000 claims description 32
- FGUUSXIOTUKUDN-IBGZPJMESA-N C1(=CC=CC=C1)N1C2=C(NC([C@H](C1)NC=1OC(=NN=1)C1=CC=CC=C1)=O)C=CC=C2 Chemical compound C1(=CC=CC=C1)N1C2=C(NC([C@H](C1)NC=1OC(=NN=1)C1=CC=CC=C1)=O)C=CC=C2 FGUUSXIOTUKUDN-IBGZPJMESA-N 0.000 claims description 4
- GNFTZDOKVXKIBK-UHFFFAOYSA-N 3-(2-methoxyethoxy)benzohydrazide Chemical compound COCCOC1=CC=CC(C(=O)NN)=C1 GNFTZDOKVXKIBK-UHFFFAOYSA-N 0.000 claims description 2
- YTAHJIFKAKIKAV-XNMGPUDCSA-N [(1R)-3-morpholin-4-yl-1-phenylpropyl] N-[(3S)-2-oxo-5-phenyl-1,3-dihydro-1,4-benzodiazepin-3-yl]carbamate Chemical compound O=C1[C@H](N=C(C2=C(N1)C=CC=C2)C1=CC=CC=C1)NC(O[C@H](CCN1CCOCC1)C1=CC=CC=C1)=O YTAHJIFKAKIKAV-XNMGPUDCSA-N 0.000 claims description 2
- 238000013507 mapping Methods 0.000 abstract description 8
- 238000006073 displacement reaction Methods 0.000 description 8
- 241000699666 Mus <mouse, genus> Species 0.000 description 6
- 239000000872 buffer Substances 0.000 description 6
- 230000002526 effect on cardiovascular system Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 238000013519 translation Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 210000004204 blood vessel Anatomy 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 4
- 210000000056 organ Anatomy 0.000 description 4
- 238000005316 response function Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 239000000243 solution Substances 0.000 description 3
- 230000009466 transformation Effects 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 241000699670 Mus sp. Species 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000005094 computer simulation Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000002347 injection Methods 0.000 description 2
- 239000007924 injection Substances 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 210000001835 viscera Anatomy 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002059 diagnostic imaging Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000007654 immersion Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Processing Or Creating Images (AREA)
Abstract
Description
技术领域technical field
本发明是关于一种虚拟手术数据的处理技术,具体地,是关于一种虚拟手术模拟过程的录制、回放方法及装置。The present invention relates to a virtual surgery data processing technology, in particular to a method and device for recording and replaying a virtual surgery simulation process.
背景技术Background technique
虚拟手术是利用医学影像数据,使用虚拟现实技术在计算机中建立虚拟环境,使医生能够借助虚拟环境中的信息进行手术计划、训练,以及实际手术中引导手术的技术。采用虚拟现实技术来虚拟手术环境,可以使医务工作者沉浸于虚拟的场景内,可以通过视、听、触觉感知并学习各种手术实际操作,体验并学习如何应付临床手术中的实际情况。这样节约了培训医务人员的费用和时间,使非熟练人员进行手术的风险性大大降低,对提高医学教育与训练的效率和质量以及改善医学手术水平的发展不平衡的现状有着特殊的意义。Virtual surgery is a technology that uses medical imaging data and uses virtual reality technology to create a virtual environment in the computer, enabling doctors to use the information in the virtual environment to plan, train, and guide surgery in actual operations. The use of virtual reality technology to virtualize the surgical environment can immerse medical workers in the virtual scene, perceive and learn various surgical operations through sight, hearing, and touch, and experience and learn how to deal with the actual situation in clinical operations. This saves the cost and time of training medical personnel, greatly reduces the risk of unskilled personnel performing operations, and has special significance for improving the efficiency and quality of medical education and training and improving the current situation of unbalanced development of medical operations.
目前的虚拟手术过程录制方法主要有以下三种:Currently, there are mainly three methods for recording virtual surgical procedures:
(1)屏幕录像软件。(1) Screen recording software.
该方法在进行模拟手术过程之前,先打开CamStudio、Camtasia Studio等屏幕录像软件,对整个屏幕进行录制。In this method, before simulating the surgical process, first open the screen recording software such as CamStudio and Camtasia Studio to record the entire screen.
此方法存在的缺陷如下:首先,这种方法不仅操作繁琐复杂,不符合用户习惯,同时也增加了虚拟手术模拟软件对第三方软件(屏幕录制软件)的依赖性,极大地增加了虚拟手术模拟环境搭建的复杂度和工程量。其次,该方法对屏幕的录制需要占用较大的系统资源,会对虚拟手术本身的模拟过程产生影响,具体体现在模拟帧率的大幅度下降,极大地损害了手术本身的模拟体验。最后,该方法的本质是以某帧率从帧缓冲区提取屏幕截图并进行视频转码输出通用的视频格式(通常为avi格式)。因此采用该方法对模拟手术过程的录制,实际上是手术过程中整个屏幕上所有变化的录制,因此会记录大量与虚拟手术界面无关的冗余信息。The defects of this method are as follows: First, this method is not only cumbersome and complicated to operate, and does not conform to user habits, but also increases the dependence of virtual surgery simulation software on third-party software (screen recording software), which greatly increases virtual surgery simulation. The complexity and engineering volume of environment construction. Secondly, this method requires a lot of system resources to record the screen, which will have an impact on the simulation process of the virtual surgery itself, specifically reflected in the significant drop in the simulation frame rate, which greatly damages the simulation experience of the surgery itself. Finally, the essence of this method is to extract screenshots from the frame buffer at a certain frame rate and perform video transcoding to output a common video format (usually avi format). Therefore, the recording of the simulated surgical process using this method is actually the recording of all changes on the entire screen during the surgical process, so a large amount of redundant information irrelevant to the virtual surgical interface will be recorded.
(2)从图形API(应用程序编程接口)帧缓冲区提取图像进行录制。(2) Extract images from the graphics API (Application Programming Interface) frame buffer for recording.
虚拟手术为了提高场景渲染的真实度和用户的视觉沉浸感,通常采用图形API(OpenGL或DirectX)进行手术场景和模型的绘制。为了生成动态、连续的画面效果,此类图形API具有前后两个帧缓冲区分别进行在线(On-Screen)显示和离屏(Off-Screen)渲染。该方法以一定频率从帧缓冲区中提取连续图像,或者进行视频编码进行通用文件格式输出,或者保存到硬盘中作回放时使用(以一定帧率重新显示保存的图像)。In order to improve the reality of scene rendering and the user's visual immersion in virtual surgery, graphics API (OpenGL or DirectX) is usually used to draw surgical scenes and models. In order to generate dynamic and continuous picture effects, this type of graphics API has two front and rear frame buffers for On-Screen display and Off-Screen rendering respectively. This method extracts continuous images from the frame buffer at a certain frequency, or performs video encoding for common file format output, or saves them to the hard disk for playback (redisplays the saved images at a certain frame rate).
此方法存在的弊端在于:提取的原始图像通常体积较大,若不加处理进行保存,对存储空间的消耗极大。通过实时压缩的方式减少图像空间占用,会对虚拟手术模拟的实时性产生影响,导致模拟帧率的降低。通过降低图像质量的方式减少空间占用,会降低回放时的画面质量,导致用户体验的下降。因此,该方法通常会面临画面质量、存储空间以及模拟效率三者之间的取舍,无法同时进行优化。The disadvantage of this method is that the extracted original image is usually large in size, and if it is saved without processing, it will consume a lot of storage space. Reducing the image space occupied by real-time compression will affect the real-time performance of virtual surgery simulation, resulting in a decrease in the simulation frame rate. Reducing the space occupied by reducing the image quality will reduce the image quality during playback, resulting in a decline in user experience. Therefore, this method usually faces a trade-off between image quality, storage space, and simulation efficiency, and cannot be optimized at the same time.
(3)通过记录每帧的渲染状态进行录制。(3) Record by recording the rendering state of each frame.
虚拟手术场景在渲染过程中,图形API和场景中的物体存在逐帧变化的“渲染状态”,通常包括变换矩阵状态、模型形变状态等等。该方法通过保存渲染过程中每帧的渲染状态,间接记录模拟过程的每帧画面。回放时,通过逐帧恢复先前保存的渲染状态,实现手术过程的画面回放。During the rendering process of the virtual surgery scene, the graphics API and the objects in the scene have a "rendering state" that changes frame by frame, usually including the state of the transformation matrix, the state of the model deformation, and so on. This method indirectly records each frame of the simulation process by saving the rendering state of each frame during the rendering process. When playing back, by restoring the previously saved rendering state frame by frame, the screen playback of the surgical process is realized.
此方法存在的问题主要有:其空间占用和时间效率与虚拟手术场景的复杂度成正比。场景的复杂度越高,动态模型数量越大,每帧需要保存的渲染状态越多,所占用的系统资源就越大。因此,该方法局限性较大,只适用于虚拟手术场景相对简单的应用场合。The main problems of this method are: its space occupation and time efficiency are directly proportional to the complexity of the virtual surgery scene. The higher the complexity of the scene, the larger the number of dynamic models, the more rendering states need to be saved in each frame, and the larger the system resources occupied. Therefore, this method has relatively large limitations and is only suitable for applications where the virtual surgery scene is relatively simple.
发明内容Contents of the invention
本发明实施例的主要目的在于提供一种虚拟手术模拟过程的录制、回放方法及装置,以实现针对性强、资源占用少、画面质量好、占用空间少、无冗余数据的虚拟手术模拟过程录制和回放步骤。The main purpose of the embodiments of the present invention is to provide a method and device for recording and replaying a virtual surgery simulation process, so as to realize a virtual surgery simulation process with strong pertinence, less resource occupation, good picture quality, less space occupation, and no redundant data Record and playback steps.
为了实现上述目的,本发明实施例提供一种虚拟手术模拟过程的录制、回放方法,所述的虚拟手术模拟过程的录制、回放方法包括:事件预分类步骤:获取不同手术类型中的多个操作信号,将每一所述操作信号抽象为一响应事件,并将所述响应事件映射至一包含多个整数标识的整数集中,所述响应事件与所述整数标识一一对应;录制步骤:存储初始场景状态,依次获取当前手术类型的多个所述操作信号,同时根据获取的所述操作信号查询并存储与所述当前手术类型的多个所述操作信号分别对应的多个整数标识;根据存储的多个整数标识及所述的初始场景状态生成录制片段;回放步骤:获取所述初始场景状态,按存储顺序依次获取所述录制片段中的多个整数标识,同时根据获取的整数标识及所述的初始场景状态进行响应、渲染,生成并显示新的场景状态。In order to achieve the above object, an embodiment of the present invention provides a method for recording and replaying a virtual surgery simulation process. The method for recording and replaying a virtual surgery simulation process includes: an event pre-classification step: acquiring multiple operations in different types of surgery signal, each of the operation signals is abstracted into a response event, and the response event is mapped to an integer set containing a plurality of integer identifiers, and the response event is in one-to-one correspondence with the integer identifiers; the recording step: storing In the initial scene state, a plurality of the operation signals of the current operation type are sequentially obtained, and at the same time, a plurality of integer identifiers respectively corresponding to the plurality of operation signals of the current operation type are queried and stored according to the obtained operation signals; according to A plurality of integer identifiers stored and the initial scene state generate a recording segment; playback step: obtain the initial scene state, sequentially obtain a plurality of integer identifiers in the recording segment according to the order of storage, and simultaneously obtain the integer identifier and The initial scene state responds, renders, generates and displays a new scene state.
在一实施例中,上述的录制步骤包括:步骤a:初始化录制定时器,设置所述录制定时器的录制刷新频率及录制触发时刻;所述的录制定时器用于将连续的时间离散成固定长度的录制时间片段,所述录制时间片段的长度为各录制触发时刻之间的录制定时间隔;步骤b:接收一开始录制信号,根据所述的开始录制信号进行录制;步骤c:存储所述的初始场景状态于一标准库容器中,所述初始场景状态包括:获取所述初始场景状态时的模型状态及渲染状态;步骤d:获取当前录制触发时刻的操作信号;In one embodiment, the above recording step includes: Step a: Initialize the recording timer, set the recording refresh frequency and recording trigger moment of the recording timer; the recording timer is used to discretize the continuous time into a fixed length The recording time segment, the length of the recording time segment is the recording timing interval between each recording trigger moment; step b: receive a start recording signal, and record according to the described start recording signal; step c: store the described The initial scene state is in a standard library container, and the initial scene state includes: obtaining the model state and rendering state when the initial scene state is obtained; step d: obtaining the operation signal at the trigger moment of the current recording;
步骤e:从所述整数集中查询并获取所述当前录制触发时刻的操作信号对应的整数标识,并存储获取的整数标识于所述的标准库容器中;步骤f:在所述录制定时器的下一个录制触发时刻,返回执行所述的步骤d~步骤f,直至所述步骤d中获取的操作信号为录制结束信号时,从所述整数集中查询并获取所述录制结束信号在所述整数集中对应的录制结束整数标识,并存储所述录制结束整数标识于所述的标准库容器中;步骤g:根据存储的多个整数标识、录制结束整数标识及所述的初始场景状态生成所述录制片段。Step e: Query and obtain the integer identifier corresponding to the operation signal at the current recording trigger moment from the integer set, and store the obtained integer identifier in the standard library container; Step f: In the recording timer At the next recording trigger moment, return to and execute the above step d to step f until the operation signal obtained in the step d is the recording end signal, query and obtain the recording end signal from the integer set in the integer Concentrate the corresponding recording end integer identifiers, and store the recording end integer identifiers in the standard library container; step g: generate the Record the clip.
在一实施例中,上述录制步骤的录制帧率与所述录制刷新频率的关系通过以下公式表示:m/f=1000,其中,m为所述的录制帧率,f为所述的录制刷新频率。In one embodiment, the relationship between the recording frame rate in the recording step and the recording refresh rate is expressed by the following formula: m/f=1000, where m is the recording frame rate and f is the recording refresh rate frequency.
在一实施例中,当在所述录制定时器的录制触发时刻并无所述操作信号时,所述响应事件为空事件,所述的空事件与所述整数集中的整数标识0相对应。In an embodiment, when there is no operation signal at the recording triggering time of the recording timer, the response event is a null event, and the null event corresponds to the integer identifier 0 in the integer set.
在一实施例中,上述的回放步骤包括:步骤h:初始化回放定时器,设置所述回放定时器的回放刷新频率及回放触发时刻;所述回放定时器用于将连续的时间离散成固定长度的回放时间片段,所述回放时间片段的长度为各所述回放触发时刻之间的回放定时间隔;步骤i:接收一开始回放信号,根据所述开始回放信号进行回放;步骤j:将回放开始时的场景状态压栈保存至预设的堆栈数据结构中;步骤k:从所述标准库容器中获取所述的初始场景状态;步骤l:在所述回放定时器的当前的回放触发时刻,获取存储于所述标准库容器中的一整数标识;步骤m:判断所述步骤l中获取的整数标识是否为录制结束整数标识;若否,根据获取的整数标识所对应的响应事件及待响应场景状态响应生成响应场景状态,并渲染所述的响应场景状态,生成并显示所述新的场景状态,所述回放定时器更新至下一个回放触发时刻,将所述的待响应场景状态更新为所述的新的场景状态,并返回执行所述的步骤l;若是,从所述堆栈数据结构中获取并显示所述的回放开始时的场景状态;其中,在所述回放定时器的第一个回放触发时刻,所述的待响应场景状态为所述的初始场景状态;其中,所述步骤l中,在不同的回放触发时刻,按所述录制片段中整数标识的存储顺序,依次获取一所述的整数标识。In one embodiment, the above playback steps include: Step h: Initialize the playback timer, set the playback refresh frequency and playback triggering time of the playback timer; the playback timer is used to discretize continuous time into fixed-length Playback time segment, the length of the playback time segment is the playback timing interval between each described playback trigger moment; step i: receive a start playback signal, and play back according to the start playback signal; step j: set the playback start time The scene state is pushed onto the stack and stored in the preset stack data structure; step k: obtain the initial scene state from the standard library container; step l: at the current playback trigger moment of the playback timer, obtain An integer identifier stored in the standard library container; step m: judging whether the integer identifier obtained in the step 1 is the integer identifier of the recording end; if not, according to the corresponding response event and the scene to be responded to by the obtained integer identifier The state response generates a response scene state, and renders the response scene state, generates and displays the new scene state, updates the playback timer to the next playback trigger moment, and updates the scene state to be responded to the said new scene state, and return to execute said step 1; if so, acquire and display the scene state at the beginning of said playback from said stack data structure; wherein, at the first of said playback timer At the playback trigger moment, the scene state to be responded to is the initial scene state; wherein, in the step 1, at different playback trigger moments, according to the storage sequence of the integer identifier in the recording segment, sequentially acquire a The integer ID described above.
在一实施例中,在所述回放定时器的其中一回放触发时刻,当所述的步骤m中获取的整数标识为所述整数标识0时,渲染所述其中一回放触发时刻对应的待响应场景状态,生成所述空事件对应的新的场景状态。In an embodiment, at one of the playback triggering moments of the playback timer, when the integer identifier obtained in the step m is the integer identifier 0, render the pending response corresponding to one of the playback triggering moments Scene state, generating a new scene state corresponding to the empty event.
在一实施例中,当所述回放定时间隔等于所述录制定时间隔时,在所述回放步骤中,以与所述录制步骤相同的速度回放所述的录制片段;当所述回放定时间隔小于所述录制定时间隔时,在所述回放步骤中,以快于所述录制步骤的速度回放所述的录制片段;当所述回放定时间隔大于所述录制定时间隔时,在所述回放步骤中,以慢于所述录制步骤的速度回放所述的录制片段。In one embodiment, when the playback timing interval is equal to the recording timing interval, in the playback step, the recorded segment is played back at the same speed as the recording step; when the playback timing interval is less than During the recording timing interval, in the playback step, playback the recorded segment at a speed faster than the recording step; when the playback timing interval is greater than the recording timing interval, in the playback step , to play back said recorded segment at a speed slower than said recorded step.
在一实施例中,当在每个所述回放定时间隔读取n个所述响应事件时,在所述回放步骤中,以n倍速快放所述的录制片段;当在每个所述回放定时间隔读取1/n个所述响应事件时,在所述回放步骤中,以n倍速慢放所述的录制片段,其中,n为正整数。In one embodiment, when reading n response events at each of the playback timing intervals, in the playback step, fast-play the recorded segment at n times speed; When reading 1/n of the response events at regular intervals, in the playback step, slow down the recorded segment at n times speed, wherein n is a positive integer.
本发明实施例还提供一种虚拟手术模拟过程的录制、回放装置,所述的虚拟手术模拟过程的录制、回放装置包括:事件预分类单元,用于获取不同手术类型中的多个操作信号,将每一所述操作信号抽象为一响应事件,并将所述响应事件映射至一包含多个整数标识的整数集中,所述响应事件与所述整数标识一一对应;录制单元,用于存储初始场景状态,依次获取当前手术类型的多个所述操作信号,同时根据获取的所述操作信号查询并存储与所述当前手术类型的多个所述操作信号分别对应的多个整数标识;根据存储的多个整数标识及所述的初始场景状态生成录制片段;回放单元,用于获取所述初始场景状态,按存储顺序依次获取所述录制片段中的多个整数标识,同时根据获取的整数标识及所述的初始场景状态进行响应、渲染,生成并显示新的场景状态。An embodiment of the present invention also provides a recording and playback device for a virtual surgery simulation process. The recording and playback device for a virtual surgery simulation process includes: an event pre-classification unit for acquiring multiple operation signals in different types of surgery, Abstracting each of the operation signals into a response event, and mapping the response event to an integer set including a plurality of integer identifiers, the response event corresponds to the integer identifiers one by one; the recording unit is used to store In the initial scene state, a plurality of the operation signals of the current operation type are sequentially obtained, and at the same time, a plurality of integer identifiers respectively corresponding to the plurality of operation signals of the current operation type are queried and stored according to the obtained operation signals; according to A plurality of stored integer identifiers and the initial scene state generate a recording segment; a playback unit is used to obtain the initial scene state, sequentially obtain a plurality of integer identifiers in the recording segment according to the order of storage, and at the same time according to the obtained integer Identify and describe the initial scene state to respond, render, generate and display a new scene state.
在一实施例中,上述的的录制单元包括:录制初始化模块,用于初始化录制定时器,设置所述录制定时器的录制刷新频率及录制触发时刻;所述的录制定时器用于将连续的时间离散成固定长度的录制时间片段,所述录制时间片段的长度为各录制触发时刻之间的录制定时间隔;录制模块,用于接收一开始录制信号,根据所述的开始录制信号进行录制;初始场景状态存储模块,用于存储所述的初始场景状态于一标准库容器中,所述初始场景状态包括:获取所述初始场景状态时的模型状态及渲染状态;操作信号获取模块,用于获取当前录制触发时刻的操作信号;整数标识获取模块,用于从所述整数集中查询并获取所述当前录制触发时刻的操作信号对应的整数标识,并存储获取的整数标识于所述的标准库容器中;录制结束整数标识获取模块,用于在所述整数标识获取模块获取的操作信号为录制结束信号时,从所述整数集中查询并获取所述录制结束信号在所述整数集中对应的录制结束整数标识,并存储所述录制结束整数标识于所述的标准库容器中;录制片段生成模块,用于根据存储的多个整数标识、录制结束整数标识及所述的初始场景状态生成所述录制片段。In one embodiment, the above-mentioned recording unit includes: a recording initialization module, configured to initialize a recording timer, and set the recording refresh frequency and recording trigger moment of the recording timer; the recording timer is used to set the continuous time Discretized into fixed-length recording time segments, the length of the recording time segment is the recording timing interval between each recording trigger moment; the recording module is used to receive a recording start signal, and record according to the recording start signal; initial The scene state storage module is used to store the initial scene state in a standard library container, and the initial scene state includes: the model state and rendering state when obtaining the initial scene state; the operation signal acquisition module is used to obtain The operation signal at the current recording trigger moment; an integer identifier acquisition module, configured to query and obtain the integer identifier corresponding to the operation signal at the current recording trigger moment from the integer set, and store the obtained integer identifier in the standard library container middle; the recording end integer identification acquisition module is used to query and obtain the recording end corresponding to the recording end signal in the integer set from the integer set when the operation signal acquired by the integer identification acquisition module is a recording end signal An integer identifier, and store the recording end integer identifier in the standard library container; a recording segment generation module, configured to generate the recording according to the stored multiple integer identifiers, the recording end integer identifier and the initial scene state fragment.
在一实施例中,上述录制单元的录制帧率与所述录制刷新频率的关系通过以下公式表示:m/f=1000,其中,m为所述的录制帧率,f为所述的录制刷新频率。In one embodiment, the relationship between the recording frame rate of the recording unit and the recording refresh rate is expressed by the following formula: m/f=1000, where m is the recording frame rate and f is the recording refresh rate frequency.
在一实施例中,当在所述录制定时器的录制触发时刻并无所述操作信号时,所述响应事件为空事件,所述的空事件与所述整数集中的整数标识0相对应。In an embodiment, when there is no operation signal at the recording triggering time of the recording timer, the response event is a null event, and the null event corresponds to the integer identifier 0 in the integer set.
在一实施例中,上述的回放单元包括:回放初始化模块,用于初始化回放定时器,设置所述回放定时器的回放刷新频率及回放触发时刻;所述回放定时器用于将连续的时间离散成固定长度的回放时间片段,所述回放时间片段的长度为各所述回放触发时刻之间的回放定时间隔;回放模块,用于接收一开始回放信号,根据所述开始回放信号进行回放;回放时场景状态存储模块,用于将回放开始时的场景状态压栈保存至预设的堆栈数据结构;初始场景状态获取模块,用于从所述标准库容器中获取所述的初始场景状态;整数标识获取模块,用于在所述回放定时器的当前的回放触发时刻,获取存储于所述标准库容器中的一整数标识;其中,在不同的回放触发时刻,整数标识获取模块按所述录制片段中整数标识的存储顺序,依次获取一所述的整数标识;新场景状态生成模块,用于判断所述新场景状态生成模块获取的整数标识是否为录制结束整数标识;若否,根据获取的整数标识所对应的响应事件及待响应场景状态响应生成响应场景状态,并渲染所述的响应场景状态,生成并显示所述新的场景状态,所述回放定时器更新至下一个回放触发时刻,将所述的待响应场景状态更新为所述的新的场景状态,再次触发所述的整数标识获取模块;若是,则触发回放时场景状态显示模块;其中,在所述回放定时器的第一个回放触发时刻,所述的待响应场景状态为所述的初始场景状态;回放时场景状态显示模块,用于从所述堆栈数据结构中获取并显示所述的回放开始时的场景状态。In one embodiment, the above-mentioned playback unit includes: a playback initialization module, configured to initialize a playback timer, set the playback refresh frequency and playback triggering moment of the playback timer; the playback timer is used to discretize continuous time into A playback time segment of a fixed length, the length of the playback time segment is the playback timing interval between each described playback trigger moment; the playback module is used to receive a playback signal at the beginning, and playback is performed according to the playback start signal; during playback The scene state storage module is used to push and save the scene state at the beginning of playback to a preset stack data structure; the initial scene state acquisition module is used to obtain the initial scene state from the standard library container; the integer identifier The acquisition module is used to acquire an integer identifier stored in the standard library container at the current playback trigger moment of the playback timer; wherein, at different playback trigger moments, the integer identifier acquisition module presses the recording segment The storage order of the integer identification in the middle, obtains one described integer identification successively; The new scene state generating module is used to judge whether the integer identification obtained by the new scene state generating module is the recording end integer identification; if not, according to the obtained integer Identify the corresponding response event and the scene state to be responded to respond to generate a response scene state, and render the response scene state, generate and display the new scene state, update the playback timer to the next playback trigger moment, and set The scene state to be responded to is updated to the new scene state, triggering the integer identification acquisition module again; if so, triggering the scene state display module during playback; wherein, in the first one of the playback timer When playback is triggered, the scene state to be responded to is the initial scene state; the scene state display module during playback is used to obtain and display the scene state at the beginning of playback from the stack data structure.
在一实施例中,上述的新场景状态生成模块还用于:当获取的整数标识为所述整数标识0时,渲染当前的场景状态,生成所述空事件对应的新的场景状态。In an embodiment, the above-mentioned new scene state generating module is further configured to: when the acquired integer identifier is the integer identifier 0, render the current scene state and generate a new scene state corresponding to the empty event.
在一实施例中,当所述回放定时间隔等于所述录制定时间隔时,所述的回放单元以与所述录制单元录制所述录制片段的速度相同的速度回放所述的录制片段;当所述回放定时间隔小于所述录制定时间隔时,所述的回放单元以快于所述录制单元录制所述录制片段的速度回放所述的录制片段;当所述回放定时间隔大于所述录制定时间隔时,所述的回放单元以慢于所述录制单元录制所述录制片段的速度回放所述的录制片段。In one embodiment, when the playback timing interval is equal to the recording timing interval, the playback unit plays back the recording segment at the same speed as the recording unit records the recording segment; when the When the playback timing interval is less than the recording timing interval, the playback unit playbacks the recording segment at a speed faster than the recording unit recording the recording segment; when the playback timing interval is greater than the recording timing interval , the playback unit plays back the recorded segment at a speed slower than that recorded by the recording unit.
在一实施例中,当在每个所述回放定时间隔读取n个所述响应事件时,所述的回放单元以n倍速快放所述的录制片段;当在每个所述回放定时间隔读取1/n个所述响应事件时,所述的回放单元以n倍速慢放所述的录制片段,其中,n为正整数。In one embodiment, when reading n response events at each of the playback timing intervals, the playback unit fast-plays the recorded segment at n times speed; when at each of the playback timing intervals When reading 1/n of the response events, the playback unit slows down the recording segment at n times speed, wherein n is a positive integer.
本发明实施例的有益效果在于,通过本发明,可以实现针对性强、资源占用少、画面质量好、占用空间少、无冗余数据的虚拟手术模拟过程录制和回放步骤。The beneficial effects of the embodiments of the present invention are that, through the present invention, the recording and playback steps of the virtual surgery simulation process with strong pertinence, less resource occupation, good picture quality, less space occupation and no redundant data can be realized.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only of the present invention. For some embodiments, those of ordinary skill in the art can also obtain other drawings based on these drawings without paying creative efforts.
图1为根据本发明实施例的虚拟手术模拟过程的录制、回放方法的流程图;Fig. 1 is the flow chart of the method for recording and replaying a virtual surgery simulation process according to an embodiment of the present invention;
图2为根据本发明实施例的录制步骤2的流程图;FIG. 2 is a flow chart of recording step 2 according to an embodiment of the present invention;
图3为根据本发明实施例的回放步骤3的流程图;3 is a flow chart of playback step 3 according to an embodiment of the present invention;
图4为根据本发明实施例的虚拟手术模拟过程的录制、回放装置的结构示意图;4 is a schematic structural diagram of a recording and playback device for a virtual surgery simulation process according to an embodiment of the present invention;
图5为根据本发明实施例的录制单元5的结构示意图;FIG. 5 is a schematic structural diagram of a recording unit 5 according to an embodiment of the present invention;
图6为根据本发明实施例的回放单元6的结构示意图。FIG. 6 is a schematic structural diagram of the playback unit 6 according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
本发明实施例提供一种虚拟手术模拟过程的录制、回放方法及装置。以下结合附图对本发明进行详细说明。Embodiments of the present invention provide a method and device for recording and playing back a virtual surgery simulation process. The present invention will be described in detail below in conjunction with the accompanying drawings.
本发明实施例提供一种虚拟手术模拟过程的录制、回放方法,如图1所示,该虚拟手术模拟过程的录制、回放方法包括:Embodiments of the present invention provide a recording and playback method of a virtual surgery simulation process, as shown in Figure 1, the recording and playback method of the virtual surgery simulation process includes:
事件预分类步骤1:获取不同手术类型中的多个操作信号,将每一操作信号抽象为一响应事件,并将响应事件映射至一包含多个整数标识的整数集中,响应事件与整数标识一一对应(S1)。Event pre-classification step 1: Obtain multiple operation signals in different operation types, abstract each operation signal into a response event, and map the response event to an integer set containing multiple integer identifiers. The response event and the integer identifier are the same One-to-one correspondence (S1).
录制步骤2:存储初始场景状态,依次获取当前手术类型的多个操作信号,同时根据获取的操作信号查询并存储与当前手术类型的多个操作信号分别对应的多个整数标识;根据存储的多个整数标识及初始场景状态生成录制片段(S2)。Recording step 2: store the initial scene state, obtain multiple operation signals of the current operation type in sequence, and at the same time query and store multiple integer identifiers corresponding to the multiple operation signals of the current operation type according to the obtained operation signals; An integer identifier and an initial scene state generate a recording segment (S2).
回放步骤3:获取初始场景状态,按存储顺序依次获取录制片段中的多个整数标识,根据获取的多个整数标识及初始场景状态进行响应、渲染,生成并显示新的场景状态(S3)。Playback step 3: Obtain the initial scene state, obtain multiple integer identifiers in the recorded clips in sequence according to the storage order, respond and render according to the obtained multiple integer identifiers and the initial scene state, and generate and display a new scene state (S3).
本发明实施例的虚拟手术模拟过程的录制、回放方法,将虚拟手术模拟过程中产生的各种操作信号所对应的响应事件抽象映射为通用数据类型标识(例如整数标识),在录制过程中对各响应事件发生的时间顺序,对响应事件对应的整数标识进行存储,生成录制片段。在回放过程中,按存储的时序读取存储的整数标识,并进行重新响应,显示每一整数标识所对应的新的场景状态,从而实现对录制片段的回放。通过本发明实施例的虚拟手术模拟过程的录制、回放方法实现虚拟手术模拟过程的录制及回放,能够实现运行资源占用少、存储空间占用少、处理速度快的虚拟手术模拟过程的录制和回放过程。The recording and playback method of the virtual surgery simulation process in the embodiment of the present invention abstractly maps the response events corresponding to the various operation signals generated in the virtual surgery simulation process into general data type identifiers (such as integer identifiers), and during the recording process The time sequence of each response event is stored, and the integer identifier corresponding to the response event is stored to generate a recording segment. During the playback process, the stored integer identifiers are read according to the stored timing, and a new response is performed to display the new scene state corresponding to each integer identifier, so as to realize the playback of the recorded segment. The recording and playback method of the virtual surgery simulation process in the embodiment of the present invention realizes the recording and playback of the virtual surgery simulation process, and can realize the recording and playback process of the virtual surgery simulation process with less operating resource occupation, less storage space occupation, and fast processing speed .
以下结合实例对本发明实施例的虚拟手术模拟过程的录制、回放方法的过程进行具体的描述。The process of the method for recording and replaying the virtual surgery simulation process of the embodiment of the present invention will be specifically described below in conjunction with examples.
虚拟手术的模拟过程,实际上是操作者操作手术器械与计算机模拟的虚拟手术器械模型进行交互的过程。在实际应用中,可通过计算机呈现出各种不同类型的虚拟手术的模拟过程。在本发明实施例中,是以心脑血管介入手术模拟过程为例进行说明,但本发明并不限于此。在心脑血管介入手术模拟过程中,操作者操作导管和导丝等手术器械,控制计算机模拟的虚拟手术器械模型,与计算机模拟呈现的3D人体血管和器官模型进行实时交互。The simulation process of virtual surgery is actually a process in which the operator operates the surgical instrument and interacts with the computer-simulated virtual surgical instrument model. In practical application, the simulation process of various types of virtual surgery can be presented by computer. In the embodiment of the present invention, the simulation process of cardiovascular and cerebrovascular interventional surgery is taken as an example for illustration, but the present invention is not limited thereto. In the simulation process of cardiovascular and cerebrovascular interventional surgery, the operator operates surgical instruments such as catheters and guide wires, controls the computer-simulated virtual surgical instrument model, and interacts with the 3D human blood vessel and organ models presented by computer simulation in real time.
具体地,在心脑血管介入手术模拟过程中可包括操作者对C型臂的升降和旋转、对导管导丝等手术器械的旋转和平移以及造影注射、支架放置、球囊扩张等多种模拟操作。这些操作均为虚拟手术实施者与模拟系统进行交互的响应事件,这些响应事件分别对应着相应的操作信号。虚拟手术模拟过程中的操作信号的来源主要有导丝运动捕捉感应器、C形臂操作传感器等运动传感器所捕捉到的虚拟手术器械的操作信号,以及通过例如键盘、鼠标外设设备输入的用于下达指令的操作信号等。对于运动传感器,可通过采用定时查询的方法访问运动传感器的信号值并将其转换为虚拟手术器械的位移量。对于键盘、鼠标等操作信号,MFC(微软基础类库)软件框架通过消息映射及消息队列机制对该操作信号进行处理。即,在所有信号源发生地记录所有可虚拟手术模拟过程中进行交互的操作信号。Specifically, in the simulation process of cardiovascular and cerebrovascular interventional surgery, it can include the operator's lifting and rotation of the C-arm, the rotation and translation of surgical instruments such as catheter guide wires, and various simulations such as contrast injection, stent placement, and balloon expansion. operate. These operations are all response events for the virtual operator to interact with the simulation system, and these response events correspond to corresponding operation signals. The sources of operation signals in the virtual surgery simulation process mainly include the operation signals of virtual surgical instruments captured by motion sensors such as guide wire motion capture sensors and C-arm operation sensors, as well as user input input through peripheral devices such as keyboards and mice. Operation signals for issuing instructions, etc. For the motion sensor, the signal value of the motion sensor can be accessed by using the method of timing query and converted into the displacement of the virtual surgical instrument. For operation signals such as keyboard and mouse, MFC (Microsoft Foundation Class Library) software framework processes the operation signals through message mapping and message queue mechanism. That is, all operational signals that can be interacted with during the virtual surgery simulation are recorded where all signal sources occur.
各种不同类型的虚拟手术中均可包含多种不同的操作信号,而每一操作信号均对应一响应事件,且各个操作信号的发出者各不相同,在本发明实施例的虚拟手术模拟过程的录制、回放方法中,是将虚拟手术的模拟过程中所有可能出现的可响应操作信号抽象为响应事件,并将该响应事件映射到一个包含整数0-Emax的整数集中,用Emax+1个整数作为每个响应事件的整数标识。另外,在所有的响应事件中有一种特殊事件,该特殊事件在操作者没有与计算机或虚拟手术器械模型进行任何交互时发生,此时并不会产生操作信号,这类特殊事件对应的响应事件称为空事件,该空事件与整数集中的整数标识0相对应。Different types of virtual surgery can contain a variety of different operating signals, and each operating signal corresponds to a response event, and the senders of each operating signal are different. In the virtual surgery simulation process of the embodiment of the present invention In the recording and playback methods of the virtual surgery, all possible respondable operation signals that may appear in the simulation process of virtual surgery are abstracted into response events, and the response events are mapped to an integer set containing integers 0-E max , and E max + 1 integer as an integer ID for each response event. In addition, among all the response events, there is a special event that occurs when the operator does not interact with the computer or the virtual surgical instrument model, and no operation signal is generated at this time. The response event corresponding to this special event is is called the null event, which corresponds to the integer identity 0 in the integer set.
在上述的事件预分类步骤1中,将不同类型的虚拟手术模拟过程中的多种操作进行了整理,映射到一整数集当中。为后续的录制过程提供了统一的可记录的整数格式类型,该类型占用字节数较少,节省存储空间。In the above-mentioned event pre-classification step 1, various operations in different types of virtual surgery simulation processes are organized and mapped into an integer set. A unified recordable integer format type is provided for the subsequent recording process, which occupies less bytes and saves storage space.
具体实施时,如图2所示,上述的录制步骤2可包括以下各步骤:During specific implementation, as shown in Figure 2, the above-mentioned recording step 2 may include the following steps:
步骤201:初始化录制定时器,设置该录制定时器的录制刷新频率及录制触发时刻(S201)。在虚拟手术开始时,首先通过初始化录制定时器,设置录制刷新频率以及录制触发时刻。该录制定时器用于将连续的时间离散成固定长度的录制时间片段,该录制时间片段的长度为各录制触发时刻之间的录制定时间隔。Step 201: Initialize the recording timer, and set the recording refresh frequency and recording triggering time of the recording timer (S201). At the beginning of the virtual surgery, first set the recording refresh frequency and recording trigger moment by initializing the recording timer. The recording timer is used to discretize continuous time into recording time segments of fixed length, and the length of the recording time segments is the recording timing interval between recording triggering moments.
由于录制过程发生在每帧画面的渲染过程中,因此录制的帧率与模拟渲染的帧率相同。录制帧率m与录制定时器定时值t的关系是:m=1000/t,而录制帧率m与录制刷新频率f的关系是:m/f=1000。Since the recording process occurs during the rendering of each frame, the frame rate of the recording is the same as the frame rate of the simulated rendering. The relationship between the recording frame rate m and the recording timer timing value t is: m=1000/t, and the relationship between the recording frame rate m and the recording refresh frequency f is: m/f=1000.
为了保证虚拟手术模拟过程的实时性和操作者视觉上的流畅体验,录制定时器定时值t的值通常不超过33毫秒,即模拟画面的刷新频率在30Hz以上。这意味着所有的交互模拟操作和渲染过程必须在t毫秒内完成。In order to ensure the real-time of the virtual surgery simulation process and smooth visual experience of the operator, the recording timer timing value t usually does not exceed 33 milliseconds, that is, the refresh rate of the simulation screen is above 30 Hz. This means that all interactive simulation operations and rendering processes must be completed within t milliseconds.
步骤202:接收一开始录制信号,根据该开始录制信号进行录制(S202)。完成对录制定时器的设置后,接收操作者发出的开始录制信号,并根据该开始录制信号进行虚拟手术的模拟过程的录制。Step 202: Receive a recording start signal, and record according to the recording start signal (S202). After the setting of the recording timer is completed, the recording start signal sent by the operator is received, and the simulation process of the virtual surgery is recorded according to the recording start signal.
步骤203:存储初始场景状态于一标准库容器中(S203)。当接收到操作者的开始录制信号时,首先保存当前时刻的初始场景状态至一个标准库容器(vector)(例如:C++标准库容器)中。该初始场景状态主要包括两部分内容,第一部分是模型状态,即人体器官模型(内脏、血管等)和手术器械模型(导管、导丝、球囊支架等)的位置及形变状态;第二部分是渲染状态,即与三维模型的实时渲染相关的状态,包括坐标变换矩阵、材质、纹理等等。Step 203: Store the initial scene state in a standard library container (S203). When the recording start signal from the operator is received, the initial scene state at the current moment is first saved in a standard library container (vector) (for example: C++ standard library container). The initial scene state mainly includes two parts. The first part is the model state, that is, the position and deformation state of the human organ model (viscera, blood vessel, etc.) and the surgical instrument model (catheter, guide wire, balloon stent, etc.); the second part It is the rendering state, that is, the state related to the real-time rendering of the 3D model, including coordinate transformation matrix, material, texture, etc.
步骤204:获取当前录制触发时刻的操作信号(S204)。录制过程开始之后,在录制定时器的触发时刻,从外部传感器(该外部传感器器可接收的信号既包含手术器械模型对应的操作信号,也包含鼠标、键盘等的操作信号)读取不同的手术操作过程读取各种不同的操作信号,例如:手术器械的位移信号等。Step 204: Obtain the operation signal at the current recording trigger moment (S204). After the recording process starts, at the triggering moment of the recording timer, read different operation data from the external sensor (the signal that the external sensor can receive includes not only the operation signal corresponding to the surgical instrument model, but also the operation signal of the mouse, keyboard, etc.). The operation process reads various operation signals, such as: displacement signals of surgical instruments, etc.
步骤205:从整数集中查询并获取当前录制触发时刻的操作信号对应的整数标识,并存储获取的整数标识于的标准库容器中(S205)。将该位移信号转化为抽象后的虚拟手术的响应事件后,从上述的整数集中查询并获取该响应事件所对应的整数标识。由于响应事件与整数集中整数标识的映射关系实际已经在上述的事件预分类步骤1中一一对应产生,在录制过程中是根据该位移信号查询并读取相应的整数标识,并将读取到的整数标识保存在上述的标准库容器之中。Step 205: Query and acquire the integer identifier corresponding to the operation signal at the current recording trigger moment from the integer set, and store the acquired integer identifier in the standard library container (S205). After the displacement signal is transformed into an abstract response event of the virtual surgery, the integer identifier corresponding to the response event is queried and obtained from the above-mentioned integer set. Since the mapping relationship between the response event and the integer identifier in the integer set has actually been generated in one-to-one correspondence in the above-mentioned event pre-classification step 1, the corresponding integer identifier is queried and read according to the displacement signal during the recording process, and the read to The integer identifiers for are stored in the standard library containers described above.
步骤206:在录制定时器的下一个触发时刻,再次获取虚拟手术模拟过程中的操作信号,查询并获取该操作信号在整数集中相应的整数标识,并将该整数标识保存到上述的标准库容器中(S206)。Step 206: At the next triggering moment of the recording timer, obtain the operation signal in the virtual surgery simulation process again, query and obtain the corresponding integer identifier of the operation signal in the integer set, and save the integer identifier to the above-mentioned standard library container middle (S206).
按照上述的步骤204~步骤206,在录制定时器的每一个触发时刻,分别获取虚拟手术模拟过程中的一个操作信号,并在获取到该操作信号的同时,即从上述的整数集中查询并获取该操作信号对应的整数标识,并保存至上述的标准库容器中。According to the above steps 204 to 206, at each triggering moment of the recording timer, an operation signal in the virtual surgery simulation process is respectively obtained, and when the operation signal is obtained, it is queried and obtained from the above integer set The integer identifier corresponding to the operation signal, and saved to the above-mentioned standard library container.
而当上述步骤204中获取的操作信号为录制结束信号时,从上述的整数集中查询并获取该录制结束信号在整数集中对应的录制结束整数标识,并存储该录制结束整数标识于上述的标准库容器中。该录制结束信号同样对应一个响应事件,即录制结束事件,该录制结束事件与上述整数集中的录制结束整数标识相对应,该录制结束整数标识作为该录制过程的结束标志。And when the operation signal obtained in the above step 204 is a recording end signal, query and obtain the recording end integer identifier corresponding to the recording end signal in the integer set from the above-mentioned integer set, and store the recording end integer identifier in the above-mentioned standard library in the container. The recording end signal also corresponds to a response event, that is, the recording end event. The recording end event corresponds to the recording end integer identifier in the above-mentioned integer set, and the recording end integer identifier serves as the end mark of the recording process.
步骤207:根据存储的多个整数标识、录制结束整数标识及初始场景状态生成录制片段(S207)。在获取上述的录制结束整数标识后,停止记录所有响应事件,并且将录制开始时保存的场景状态与录制过程中记录的响应事件对应的整数标识一起构成录制片段并进行保存,以便后续的回放过程使用。Step 207: Generate a recording segment according to the stored multiple integer identifiers, the recording end integer identifier and the initial scene state (S207). After obtaining the above-mentioned recording end integer identifier, stop recording all response events, and form a recording segment together with the scene state saved at the beginning of the recording and the integer identifier corresponding to the response event recorded during the recording process, and save it for subsequent playback process use.
以上即为本发明实施例的虚拟手术模拟过程的录制、回放方法中的录制步骤2,通过该录制步骤2,存储记录了开始录制那个时刻的唯一一个场景状态,以及后续每一录制触发时刻的操作信号所对应的整数标识。可见,该录制过程所记录的内容所占用的空间较小,也便于查询和获取。The above is the recording step 2 in the recording and playback method of the virtual surgery simulation process according to the embodiment of the present invention. Through the recording step 2, the only scene state at the moment when the recording is started is stored and recorded, as well as each subsequent recording trigger moment. Integer ID corresponding to the action signal. It can be seen that the content recorded in the recording process occupies less space and is also convenient for query and acquisition.
如图3所示,上述的回放步骤3主要包括以下各步骤:As shown in Figure 3, the playback step 3 above mainly includes the following steps:
步骤301:初始化回放定时器,设置该回放定时器的回放刷新频率及回放触发时刻(S301)。该回放定时器用于将连续的时间离散成固定长度的回放时间片段,回放时间片段的长度为各个回放触发时刻之间的回放定时间隔。Step 301: Initialize the playback timer, and set the playback refresh frequency and playback triggering time of the playback timer (S301). The playback timer is used to discretize continuous time into playback time segments of fixed length, and the length of the playback time segment is the playback timing interval between each playback trigger moment.
步骤302:接收一开始回放信号,根据该开始回放信号进行回放(S302)。设置完成回放定时器后,接收操作者发出的开始回放信号,并根据该开始回放信号进行虚拟手术的模拟过程的回放。Step 302: Receive a playback start signal, and perform playback according to the playback start signal (S302). After the playback timer is set, the playback start signal sent by the operator is received, and the simulation process of the virtual surgery is played back according to the playback start signal.
步骤303:将回放开始时的场景状态压栈保存至预设的堆栈数据结构中(S303)。在根据操作者发出的开始回放信号开始回放的时刻,首先将此时的场景状态在一个预先设置好的数据堆栈结构中进行压栈保存。Step 303: Push and save the scene state at the beginning of playback to a preset stack data structure (S303). At the moment when the playback starts according to the playback start signal sent by the operator, the scene state at this time is first pushed and saved in a pre-set data stack structure.
步骤304:从标准库容器中获取初始场景状态(S304)。在将开始回放时刻的场景状态进行压栈保存后,读取上述录制步骤2中保存的初始场景状态,并将其设置为回放开始时的初始场景状态。Step 304: Get the initial scene state from the standard library container (S304). After the scene state at the start of playback is pushed and saved, read the initial scene state saved in step 2 of the recording above, and set it as the initial scene state at the beginning of playback.
步骤305:在回放定时器的当前的回放触发时刻,获取存储于标准库容器中的一整数标识(S305);Step 305: At the current playback triggering moment of the playback timer, obtain an integer identifier stored in the standard library container (S305);
步骤306:判断所述步骤305中获取的整数标识是否为录制结束整数标识;若否,根据获取的整数标识所对应的响应事件及待响应场景状态响应生成响应场景状态,并渲染所述的响应场景状态,生成并显示所述新的场景状态,所述回放定时器更新至下一个回放触发时刻,将所述的待响应场景状态更新为所述的新的场景状态,返回执行所述的步骤305;若是,从所述堆栈数据结构中获取并显示所述的回放开始时的场景状态(S306)。Step 306: Determine whether the integer identifier obtained in step 305 is the integer identifier of the recording end; if not, generate a response scene state according to the response event corresponding to the obtained integer identifier and the scene state response to be responded, and render the response Scene state, generate and display the new scene state, update the playback timer to the next playback trigger moment, update the scene state to be responded to the new scene state, return to execute the steps 305: If yes, acquire and display the scene state at the beginning of the playback from the stack data structure (S306).
在实际回放过程中,在回放定时器的第一个触发时刻t1,按照录制步骤2中各整数标识存储于标准库容器中的顺序,从存储于标准库容器的录制片段中读取一个整数标识。在读取到该整数标识之后,判断该整数标识是否为上述的录制结束整数标识。如果该整数标识不是录制结束整数标识,则根据该整数标识的种类重新对上述的初始场景状态进行响应。具体地,是触发MFC的消息映射机制,调用相应的响应函数(此处的响应函数,实际上可通过一段响应程序来实现。在虚拟手术模拟过程中,针对虚拟手术模型、鼠标或键盘的每一种操作,都会有相对应的一段程序对该操作进行处理计算。例如,接收到外界导丝平移信号,就会根据这个信号调用特别针对处理导丝平移的那一段程序,从而对外界不同的操作进行针对性的处理计算)根据与整数标识相应的响应事件的类型对场景状态进行响应。然后,对响应后的场景状态重新渲染,渲染完成后,生成并显示结合有读取的整数标识所对应的响应事件的新的场景状态,此时,该回放定时器的当前触发时刻t1的所有工作完成,进入等待阶段,等待回放定时器的下一个回放触发时刻。In the actual playback process, at the first triggering time t1 of the playback timer, read an integer identifier from the recording segment stored in the standard library container according to the order in which the integer identifiers are stored in the standard library container in the recording step 2 . After the integer identifier is read, it is judged whether the integer identifier is the above-mentioned recording end integer identifier. If the integer identifier is not the integer identifier of the end of recording, the above-mentioned initial scene state is re-responsed according to the type of the integer identifier. Specifically, it is to trigger the message mapping mechanism of MFC, and call the corresponding response function (the response function here can actually be realized through a section of response program. During the virtual surgery simulation process, for each virtual surgery model, mouse or keyboard For any operation, there will be a corresponding program to process and calculate the operation. For example, when receiving the translation signal of the external guide wire, it will call the program specially for the translation of the guide wire according to this signal, so as to control the different external The operation performs targeted processing and calculation) to respond to the scene state according to the type of the response event corresponding to the integer identifier. Then, re-render the scene state after the response. After the rendering is completed, generate and display a new scene state combined with the response event corresponding to the read integer identifier. At this time, all the current triggering time t1 of the playback timer After the work is completed, enter the waiting stage and wait for the next playback trigger moment of the playback timer.
在回放定时器的下一个回放触发时刻t2,将回放触发时刻t1生成的场景状态更新为回放触发时刻t2的当前的场景状态,并返回执行上述的步骤305,根据上述录制步骤2中将各个整数标识存储至标准库容器中的顺序,从标准库容器存储的录制片段中读取下一个整数标识。在读取到整数标识之后,执行上述步骤306,判断该整数标识是否为上述的录制结束整数标识。如果该整数标识不是录制结束整数标识,则根据该整数标识的种类对在回放触发时刻t1生成的新的场景状态进行响应,并对响应后的场景重新渲染,生成并显示结合回放触发时刻t2获取的整数标识所对应的响应事件的场景状态,并等待回放定时器的下一个回放触发时刻。At the next playback trigger time t2 of the playback timer, update the scene state generated at the playback trigger time t1 to the current scene state at the playback trigger time t2, and return to execute the above-mentioned step 305. The order in which ids are stored into the standard library container, the next integer id is read from the recording segment stored in the standard library container. After the integer identifier is read, the above step 306 is executed to determine whether the integer identifier is the above-mentioned recording end integer identifier. If the integer identifier is not the integer identifier of the recording end, respond to the new scene state generated at the playback trigger time t1 according to the type of the integer identifier, and re-render the scene after the response, generate and display combined with the playback trigger time t2 acquisition The integer identifies the scene state of the corresponding response event, and waits for the next playback trigger moment of the playback timer.
在生成结合有回放触发时刻t2所获取的整数标识的新的场景状态后,在回放定时器的下一个回放触发时刻t3,将回放触发时刻t2生成的场景状态更新为回放触发时刻t3的当前的场景状态,并返回执行上述的步骤305,按录制片段中整数标识的存储顺序,获取下一个存储于标准库容器中的整数标识。在读取到整数标识之后,执行上述步骤306,判断该整数标识是否为上述的录制结束整数标识。如果该整数标识不是录制结束整数标识,则根据回放触发时刻t3获取的整数标识所对应的响应事件及在回放触发时刻t2生成的新的场景状态进行响应并渲染,从而生成并显示回放触发时刻t3所对应的新的场景状态,并等待回放定时器的下一个回放触发时刻t4。如此重复执行上述的步骤305及步骤306,从而生成并显示各个回放触发时刻t1~tn所对应的场景状态,直至在某一个回放触发时刻,上述步骤306中判断步骤305中所获取的整数标识为上述的录制结束整数标识。After generating a new scene state combined with the integer identifier obtained at the playback trigger time t2, at the next playback trigger time t3 of the playback timer, update the scene state generated at the playback trigger time t2 to the current scene state at the playback trigger time t3 The scene state, and return to execute the above step 305, and obtain the next integer identifier stored in the standard library container according to the storage order of the integer identifiers in the recording segment. After the integer identifier is read, the above step 306 is executed to determine whether the integer identifier is the above-mentioned recording end integer identifier. If the integer identifier is not the integer identifier of the recording end, respond and render according to the response event corresponding to the integer identifier acquired at the playback trigger moment t3 and the new scene state generated at the playback trigger moment t2, thereby generating and displaying the playback trigger moment t3 The corresponding new scene state, and wait for the next playback trigger time t4 of the playback timer. The above-mentioned steps 305 and 306 are repeatedly executed in this way, thereby generating and displaying the scene states corresponding to each playback triggering time t1-tn, until at a certain playback triggering time, the above-mentioned step 306 judges that the integer obtained in step 305 is identified as Integer identifier of the end of recording as described above.
当上述步骤305中获取的整数标识为录制结束整数标识时,从上述堆栈数据结构中获取并显示回放开始时的场景状态。在回放定时器的每个触发时刻,均从标准库容器中取一个整数标识并进行处理。当获取的整数标识为上述的录制结束整数标识时,表明当前录制片段已经回放完毕,此时通过出栈操作从上述堆栈数据结构中获取回放开始时压入栈顶的场景状态并进行恢复,至此为止,完成对上述录制片段的回放。When the integer identifier obtained in the above step 305 is the integer identifier of the end of recording, the scene state at the beginning of the playback is obtained from the above stack data structure and displayed. At each triggering moment of the playback timer, an integer identifier is taken from the standard library container and processed. When the obtained integer identifier is the above-mentioned recording end integer identifier, it indicates that the playback of the current recording segment has been completed. At this time, the scene state pushed to the top of the stack at the beginning of the playback is obtained from the above stack data structure through the stack operation and restored. So far Until now, the playback of the above recorded segment is completed.
通过上述的描述可知,由于不同数据类型可表示的数据范围不同,本发明实施例的虚拟手术模拟过程的录制、回放方法在事件预分类阶段可以根据响应事件数量的不同,映射到字符型、短整型、无符号整形、长整形等多种不同的数据类型。该调整会对录制片段的大小产生影响,映射到的数据类型位宽越小,模拟片段占用空间越小,从而实现针对性强、资源占用少、画面质量好、占用空间少、无冗余数据的虚拟手术模拟过程录制和回放过程。From the above description, it can be seen that due to the different data ranges that can be represented by different data types, the recording and playback method of the virtual surgery simulation process in the embodiment of the present invention can be mapped to character type, short Integer, unsigned integer, long integer and many other data types. This adjustment will affect the size of the recording segment. The smaller the bit width of the data type mapped to, the smaller the space occupied by the analog segment, so as to achieve strong pertinence, less resource occupation, good picture quality, less space occupation, and no redundant data. The recording and playback process of the virtual surgery simulation process.
在一实施例中,当上述步骤305中获取的整数标识为整数标识0时,说明当前回放触发时刻的响应事件为空事件,即表示在录制步骤2中对应的录制触发时刻,外部传感器和MFC都没有接收到操作者的操作信号,因此,没有响应事件需要进行处理,只需要重新渲染整个场景即可。In one embodiment, when the integer identifier obtained in the above step 305 is an integer identifier of 0, it means that the response event at the current playback trigger moment is an empty event, which means that at the corresponding recording trigger moment in recording step 2, the external sensor and MFC None of them receive the operator's operation signal, so there is no response event to be processed, only the entire scene needs to be re-rendered.
在一实施例中,当回放步骤3的回放定时器间隔等于录制步骤2的录制定时器间隔时,回放步骤3以与录制步骤2录制该录制片段的速度相同的速度播放该录制片段。并且,通过在回放步骤3中设置与录制步骤2不同的定时器间隔,可以以不同于录制帧率的速度进行回放:当回放步骤3的回放定时器间隔小于录制步骤2的录制定时器间隔时,回放步骤3以快于录制步骤2录制该录制片段的速度快速播放该录制片段;当回放步骤3的定时器间隔大于录制步骤2的定时器间隔时,回放步骤3以慢于录制步骤2录制该录制片段的速度慢放该录制片段。In one embodiment, when the playback timer interval of the playback step 3 is equal to the recording timer interval of the recording step 2, the playback step 3 plays the recording segment at the same speed as the recording step 2 recording the recording segment. And, by setting a different timer interval in playback step 3 than in recording step 2, playback can be performed at a different speed than the recording frame rate: when the playback timer interval of playback step 3 is smaller than the recording timer interval of recording step 2 , the playback step 3 plays the recording segment at a speed faster than that of the recording step 2; when the timer interval of the playback step 3 is greater than the timer interval of the recording step 2, the playback step 3 is recorded slower than the recording step 2 The speed of the recording slows down the recording.
在另一实施例中,通过调整每次定时器间隔读取的事件个数,也可以实现以不同于录制帧率的速度进行播放,从而实现快进功能。假设在每个定时器间隔读取2个事件进行模拟,那么回放时一帧的显示结果相当于录制时的两帧,从而实现了2倍速的播放。因此,如果每个定时器间隔读取n个事件,那么回放步骤3就实现了n倍速的快进播放。当在每个回放定时间隔读取1/n个所述响应事件时,在回放步骤3中,以n倍速慢放所述的录制片段,其中,上述的n为正整数。In another embodiment, by adjusting the number of events read at each timer interval, playback at a speed different from the recording frame rate can also be realized, thereby realizing the fast-forward function. Assuming that 2 events are read at each timer interval for simulation, then the display result of one frame during playback is equivalent to two frames during recording, thus achieving 2x speed playback. Therefore, if each timer interval reads n events, then playback step 3 realizes fast-forward playback at n times speed. When reading 1/n of the response events at each playback timing interval, in the playback step 3, slow down the recorded segment at n times speed, wherein the above n is a positive integer.
实际应用中,在录制步骤2中,通过为录制定时器设定不同的定时值,可以实现不同帧率的录制。例如,当定时值为16毫秒时,可实现60帧/秒的视频录制,当定时值为33毫秒时,可实现30帧/秒的视频录制。In practical applications, in the recording step 2, recording at different frame rates can be achieved by setting different timing values for the recording timer. For example, when the timing value is 16 milliseconds, video recording at 60 frames per second can be realized, and when the timing value is 33 milliseconds, video recording at 30 frames per second can be realized.
以下是分别采用背景技术中所提及的屏幕录像软件、图形API帧缓冲区截图、通过记录每帧的渲染状态进行录制和本发明实施例的虚拟手术模拟过程的录制、回放方法,在相同的环境下进行的实际的录制过程实验,实验结果如下表一所示:The following are the screen recording software mentioned in the background technology, the screenshot of the graphics API frame buffer, recording by recording the rendering state of each frame and the recording and playback method of the virtual surgery simulation process in the embodiment of the present invention, in the same The actual recording process experiment carried out in the environment, the experimental results are shown in Table 1 below:
表一Table I
如表一所示,采用本发明实施例的虚拟手术模拟过程的录制、回放方法进行录制的实验结果在渲染帧率上没有任何降低。内存占用相比于背景技术中提及的三种方法极低,对CPU的占用的提升也基本可以忽略不计。由于API帧缓冲区截图方法和渲染状态记录方法都需要将录制结果临时保存到内存,然后转移到硬盘,所以这两种方法的内存占用较大。从实验结果可以看出,采用本发明实施例的虚拟手术模拟过程的录制、回放方法进行虚拟手术模拟过程的录制和回放具有资源占用少、空间占用低、不影响原始模拟过程的显著优势。As shown in Table 1, the experimental results of the recording and playback method of the virtual surgery simulation process according to the embodiment of the present invention do not reduce the rendering frame rate. Compared with the three methods mentioned in the background technology, the memory usage is extremely low, and the improvement of the CPU usage is basically negligible. Both the API frame buffer screenshot method and the rendering state recording method need to temporarily save the recording results to the memory and then transfer them to the hard disk, so these two methods occupy a large amount of memory. It can be seen from the experimental results that using the recording and playback method of the virtual surgery simulation process in the embodiment of the present invention to record and playback the virtual surgery simulation process has significant advantages of less resource occupation, low space occupation, and no influence on the original simulation process.
在回放方面,本发明实施例的虚拟手术模拟过程的录制、回放方法在画质方面没有任何损失,可以以60帧/秒的速度和1920×1080的分辨率进行回放。并且可以通过回放参数设置,进行快进与慢放。回放结果与原始模拟完全相同。In terms of playback, the recording and playback method of the virtual surgery simulation process in the embodiment of the present invention has no loss in image quality, and can be played back at a speed of 60 frames per second and a resolution of 1920×1080. And you can set the playback parameters to perform fast forward and slow playback. The replay results are exactly the same as the original simulation.
综上所述,通过本发明实施例的虚拟手术模拟过程的录制、回放方法,可以以极小的系统资源占用完成高分辨率、高画质、高帧率的模拟过程录制,录制得到的信息无冗余,占用空间少,无需进行格式转换即可马上进行播放。In summary, through the recording and playback method of the virtual surgery simulation process in the embodiment of the present invention, it is possible to complete the recording of the simulation process with high resolution, high image quality, and high frame rate with minimal occupation of system resources, and the recorded information No redundancy, takes up less space, and can be played immediately without format conversion.
本发明实施例还提供一种虚拟手术模拟过程的录制、回放装置,如图4所示,该虚拟手术模拟过程的录制、回放装置包括:事件预分类单元4、录制单元5及回放单元6。以下结合实例对事件预分类单元4、录制单元5及回放单元6分别进行详细的描述。The embodiment of the present invention also provides a recording and playback device for a virtual surgery simulation process. As shown in FIG. The event pre-classification unit 4, the recording unit 5 and the playback unit 6 are described in detail below in conjunction with examples.
虚拟手术的模拟过程,实际上是操作者操作手术器械与计算机模拟的虚拟手术器械模型进行交互的过程。在实际应用中,可通过计算机呈现出各种不同类型的虚拟手术的模拟过程。在本发明实施例中,是以心脑血管介入手术模拟过程为例进行说明,但本发明并不限于此。在心脑血管介入手术模拟过程中,操作者操作导管和导丝等手术器械,控制计算机模拟的虚拟手术器械模型,与计算机模拟呈现的3D人体血管和器官模型进行实时交互。The simulation process of virtual surgery is actually a process in which the operator operates the surgical instrument and interacts with the computer-simulated virtual surgical instrument model. In practical application, the simulation process of various types of virtual surgery can be presented by computer. In the embodiment of the present invention, the simulation process of cardiovascular and cerebrovascular interventional surgery is taken as an example for illustration, but the present invention is not limited thereto. In the simulation process of cardiovascular and cerebrovascular interventional surgery, the operator operates surgical instruments such as catheters and guide wires, controls the computer-simulated virtual surgical instrument model, and interacts with the 3D human blood vessel and organ models presented by computer simulation in real time.
具体地,在心脑血管介入手术模拟过程中可包括操作者对C型臂的升降和旋转、对导管导丝等手术器械的旋转和平移以及造影注射、支架放置、球囊扩张等多种模拟操作。这些操作均为虚拟手术实施者与模拟系统进行交互的响应事件,这些响应事件分别对应着相应的操作信号。虚拟手术模拟过程中的操作信号的来源主要有导丝运动捕捉感应器、C形臂操作传感器等运动传感器所捕捉到的虚拟手术器械的操作信号,以及通过例如键盘、鼠标外设设备输入的用于下达指令的操作信号等。对于运动传感器,可通过采用定时查询的方法访问运动传感器的信号值并将其转换为虚拟手术器械的位移量。对于键盘、鼠标等操作信号,MFC(微软基础类库)软件框架通过消息映射及消息队列机制对该操作信号进行处理。即,在所有信号源发生地记录所有可虚拟手术模拟过程中进行交互的操作信号。Specifically, in the simulation process of cardiovascular and cerebrovascular interventional surgery, it can include the operator's lifting and rotation of the C-arm, the rotation and translation of surgical instruments such as catheter guide wires, and various simulations such as contrast injection, stent placement, and balloon expansion. operate. These operations are all response events for the virtual operator to interact with the simulation system, and these response events correspond to corresponding operation signals. The sources of operation signals in the virtual surgery simulation process mainly include the operation signals of virtual surgical instruments captured by motion sensors such as guide wire motion capture sensors and C-arm operation sensors, as well as user input input through peripheral devices such as keyboards and mice. Operation signals for issuing instructions, etc. For the motion sensor, the signal value of the motion sensor can be accessed by using the method of timing query and converted into the displacement of the virtual surgical instrument. For operation signals such as keyboard and mouse, MFC (Microsoft Foundation Class Library) software framework processes the operation signals through message mapping and message queue mechanism. That is, all operational signals that can be interacted with during the virtual surgery simulation are recorded where all signal sources occur.
各种不同类型的虚拟手术中均可包含多种不同的操作信号,而每一操作信号均对应一响应事件,且各个操作信号的发出者各不相同,在本发明实施例的虚拟手术模拟过程的录制、回放装置,是将虚拟手术的模拟过程中所有可能出现的可响应操作信号抽象为响应事件,并将该响应事件映射到一个包含整数0-Emax的整数集中,用Emax+1个整数作为每个响应事件的整数标识。另外,在所有的响应事件中有一种特殊事件,该特殊事件在操作者没有与计算机或虚拟手术器械模型进行任何交互时发生,此时并不会产生操作信号,这类特殊事件对应的响应事件称为空事件,该空事件与整数集中的整数标识0相对应。Different types of virtual surgery can contain a variety of different operating signals, and each operating signal corresponds to a response event, and the senders of each operating signal are different. In the virtual surgery simulation process of the embodiment of the present invention The recording and playback device of the virtual surgery abstracts all possible respondable operational signals in the simulation process of virtual surgery into response events, and maps the response events to an integer set containing integers 0-E max , using E max +1 integers as an integer ID for each response event. In addition, among all the response events, there is a special event that occurs when the operator does not interact with the computer or the virtual surgical instrument model, and no operation signal is generated at this time. The response event corresponding to this special event is is called the null event, which corresponds to the integer identity 0 in the integer set.
上述的事件预分类单元4用于将不同类型的虚拟手术模拟过程中的多种操作进行了整理,映射到一整数集当中。为后续的录制过程提供了统一的可记录的整数格式类型,该类型占用字节数较少,节省存储空间。The above-mentioned event pre-classification unit 4 is used to sort out various operations in different types of virtual surgery simulation processes and map them into an integer set. A unified recordable integer format type is provided for the subsequent recording process, which occupies less bytes and saves storage space.
具体实施时,如图5所示,上述的录制单元5主要由以下几部分组成:录制初始化模块51、录制模块52、初始场景状态存储模块53、操作信号获取模块54、整数标识获取模块55、录制结束整数标识获取模块56及录制片段生成模块57。During specific implementation, as shown in Figure 5, the above-mentioned recording unit 5 mainly consists of the following parts: a recording initialization module 51, a recording module 52, an initial scene state storage module 53, an operation signal acquisition module 54, an integer identification acquisition module 55, The recording end integer identifier acquisition module 56 and the recording segment generation module 57 .
上述的录制初始化模块51用于初始化录制定时器,设置该录制定时器的录制刷新频率及录制触发时刻。在虚拟手术开始时,首先通过初始化录制定时器,设置录制刷新频率以及录制触发时刻。该录制定时器用于将连续的时间离散成固定长度的录制时间片段,该录制时间片段的长度为各录制触发时刻之间的录制定时间隔。The above-mentioned recording initialization module 51 is used to initialize the recording timer, and set the recording refresh frequency and recording trigger time of the recording timer. At the beginning of the virtual surgery, first set the recording refresh frequency and recording trigger moment by initializing the recording timer. The recording timer is used to discretize continuous time into recording time segments of fixed length, and the length of the recording time segments is the recording timing interval between recording triggering moments.
由于录制过程发生在每帧画面的渲染过程中,因此录制的帧率与模拟渲染的帧率相同。录制帧率m与录制定时器定时值t的关系是:m=1000/t,而录制帧率m与录制刷新频率f的关系是:m/f=1000。Since the recording process occurs during the rendering of each frame, the frame rate of the recording is the same as the frame rate of the simulated rendering. The relationship between the recording frame rate m and the recording timer timing value t is: m=1000/t, and the relationship between the recording frame rate m and the recording refresh frequency f is: m/f=1000.
为了保证虚拟手术模拟过程的实时性和操作者视觉上的流畅体验,录制定时器定时值t的值通常不超过33毫秒,即模拟画面的刷新频率在30Hz以上。这意味着所有的交互模拟操作和渲染过程必须在t毫秒内完成。In order to ensure the real-time of the virtual surgery simulation process and smooth visual experience of the operator, the recording timer timing value t usually does not exceed 33 milliseconds, that is, the refresh rate of the simulation screen is above 30 Hz. This means that all interactive simulation operations and rendering processes must be completed within t milliseconds.
录制模块52用于接收一开始录制信号,根据该开始录制信号进行录制。完成对录制定时器的设置后,接收操作者发出的开始录制信号,并根据该开始录制信号进行虚拟手术的模拟过程的录制。The recording module 52 is configured to receive a recording start signal, and perform recording according to the recording start signal. After the setting of the recording timer is completed, the recording start signal sent by the operator is received, and the simulation process of the virtual surgery is recorded according to the recording start signal.
初始场景状态存储模块53用于存储初始场景状态于一标准库容器中。当接收到操作者的开始录制信号时,首先保存当前时刻的初始场景状态至一个标准库容器(vector)(例如:C++标准库容器)中。该初始场景状态主要包括两部分内容,第一部分是模型状态,即人体器官模型(内脏、血管等)和手术器械模型(导管、导丝、球囊支架等)的位置及形变状态;第二部分是渲染状态,即与三维模型的实时渲染相关的状态,包括坐标变换矩阵、材质、纹理等等。The initial scene state storage module 53 is used to store the initial scene state in a standard library container. When the recording start signal from the operator is received, the initial scene state at the current moment is first saved in a standard library container (vector) (for example: C++ standard library container). The initial scene state mainly includes two parts. The first part is the model state, that is, the position and deformation state of the human organ model (viscera, blood vessel, etc.) and the surgical instrument model (catheter, guide wire, balloon stent, etc.); the second part It is the rendering state, that is, the state related to the real-time rendering of the 3D model, including coordinate transformation matrix, material, texture, etc.
操作信号获取模块54用于获取当前录制触发时刻的操作信号。录制过程开始之后,在录制定时器的触发时刻,从外部传感器(该外部传感器器可接收的信号既包含手术器械模型对应的操作信号,也包含鼠标、键盘等的操作信号)读取不同的手术操作过程读取各种不同的操作信号,例如:手术器械的位移信号等。The operation signal obtaining module 54 is used to obtain the operation signal at the current recording trigger moment. After the recording process starts, at the triggering moment of the recording timer, read different operation data from the external sensor (the signal that the external sensor can receive includes not only the operation signal corresponding to the surgical instrument model, but also the operation signal of the mouse, keyboard, etc.). The operation process reads various operation signals, such as: displacement signals of surgical instruments, etc.
整数标识获取模块55用于从整数集中查询并获取当前录制触发时刻的操作信号对应的整数标识,并存储获取的整数标识于的标准库容器中。将该位移信号转化为抽象后的虚拟手术的响应事件后,从上述的整数集中查询并获取该响应事件所对应的整数标识。由于响应事件与整数集中整数标识的映射关系实际已经通过上述的事件预分类单元4一一对应产生,在录制过程中是根据该位移信号查询并读取相应的整数标识,并将读取到的整数标识保存在上述的标准库容器之中。The integer identifier acquisition module 55 is configured to query and acquire the integer identifier corresponding to the operation signal at the current recording trigger moment from the integer set, and store the acquired integer identifier in the standard library container. After the displacement signal is transformed into an abstract response event of the virtual surgery, the integer identifier corresponding to the response event is queried and obtained from the above-mentioned integer set. Since the mapping relationship between the response event and the integer identifier in the integer set has actually been generated by the one-to-one correspondence of the above-mentioned event pre-classification unit 4, the corresponding integer identifier is queried and read according to the displacement signal during the recording process, and the read Integer IDs are stored in the standard library containers described above.
录制结束整数标识获取模块56用于在录制定时器的下一个触发时刻,再次获取虚拟手术模拟过程中的操作信号,查询并获取该操作信号在整数集中相应的整数标识,并将该整数标识保存到上述的C++标准库容器中。在录制定时器的每一个触发时刻,分别获取虚拟手术模拟过程中的一个操作信号,并在获取到该操作信号的同时,即从上述的整数集中查询并获取该操作信号对应的整数标识,并保存至上述的标准库容器中。The recording end integer identification acquisition module 56 is used to obtain the operation signal in the virtual surgery simulation process again at the next triggering moment of the recording timer, query and obtain the corresponding integer identification of the operation signal in the integer set, and save the integer identification into the C++ Standard Library container described above. At each triggering moment of the recording timer, an operation signal in the virtual surgery simulation process is obtained respectively, and at the same time when the operation signal is obtained, the integer identifier corresponding to the operation signal is queried and obtained from the above-mentioned integer set, and Save to the standard library container described above.
而当上述操作信号获取模块54获取的操作信号为录制结束信号时,从上述的整数集中查询并获取该录制结束信号在整数集中对应的录制结束整数标识,并存储该录制结束整数标识于上述的标准库容器中。该录制结束信号同样对应一个响应事件,即录制结束事件,该录制结束事件与上述整数集中的录制结束整数标识相对应,该录制结束整数标识作为该录制过程的结束标志。And when the operation signal acquired by the above-mentioned operation signal acquisition module 54 is a recording end signal, query and obtain the recording end integer identifier corresponding to the recording end signal in the integer set from the above-mentioned integer set, and store the recording end integer identifier in the above-mentioned in the standard library container. The recording end signal also corresponds to a response event, that is, the recording end event. The recording end event corresponds to the recording end integer identifier in the above-mentioned integer set, and the recording end integer identifier serves as the end mark of the recording process.
录制片段生成模块57用于根据存储的多个整数标识、录制结束整数标识及所述的初始场景状态生成所述录制片段。在获取上述的录制结束整数标识后,停止记录所有响应事件,并且将录制开始时保存的场景状态与录制过程中记录的响应事件对应的整数标识一起构成录制片段并进行保存,以便后续的回放过程使用。The recording segment generating module 57 is configured to generate the recording segment according to the stored multiple integer identifiers, the recording end integer identifier and the initial scene state. After obtaining the above-mentioned recording end integer identifier, stop recording all response events, and form a recording segment together with the scene state saved at the beginning of the recording and the integer identifier corresponding to the response event recorded during the recording process, and save it for subsequent playback process use.
以上即为本发明实施例的虚拟手术模拟过程的录制、回放装置中的录制单元5,通过该录制单元5存储记录了开始录制那个时刻的唯一一个场景状态,以及后续每一录制触发时刻的操作信号所对应的整数标识。可见,该录制过程所记录的内容所占用的空间较小,也便于查询和获取。The above is the recording unit 5 in the recording and playback device of the virtual surgery simulation process in the embodiment of the present invention, through which the recording unit 5 stores and records the only scene state at the moment when the recording starts, and the operation at each subsequent recording triggering moment Integer ID corresponding to the signal. It can be seen that the content recorded in the recording process occupies less space and is also convenient for query and acquisition.
如图6所示,上述的回放单元6主要由以下几部分组成:回放初始化模块61、回放模块62、回放时场景状态存储模块63、初始场景状态获取模块64、整数标识获取模块65、新场景状态生成模块66及回放时场景状态显示模块67。As shown in Figure 6, above-mentioned playback unit 6 mainly is made up of following several parts: playback initialization module 61, playback module 62, scene state storage module 63 during playback, initial scene state acquisition module 64, integer identification acquisition module 65, new scene A state generation module 66 and a scene state display module 67 during playback.
上述的回放初始化模块61用于初始化回放定时器,设置该回放定时器的回放刷新频率及回放触发时刻。该回放定时器用于将连续的时间离散成固定长度的回放时间片段,回放时间片段的长度为各个回放触发时刻之间的回放定时间隔。The playback initialization module 61 mentioned above is used to initialize the playback timer, and set the playback refresh frequency and playback triggering time of the playback timer. The playback timer is used to discretize continuous time into playback time segments of fixed length, and the length of the playback time segment is the playback timing interval between each playback trigger moment.
回放模块62用于接收一开始回放信号,根据该开始回放信号进行回放。设置完成回放定时器后,接收操作者发出的开始回放信号,并根据该开始回放信号进行虚拟手术的模拟过程的回放。The playback module 62 is configured to receive a playback start signal, and perform playback according to the playback start signal. After the playback timer is set, the playback start signal sent by the operator is received, and the simulation process of the virtual surgery is played back according to the playback start signal.
回放时场景状态存储模块63用于将回放开始时的场景状态压栈保存至预设的堆栈数据结构中。在根据操作者发出的开始回放信号开始回放的时刻,首先将此时的场景状态在一个预先设置好的数据堆栈结构中进行压栈保存。The scene state storage module 63 during playback is used to push and save the scene state at the start of playback into a preset stack data structure. At the moment when the playback starts according to the playback start signal sent by the operator, the scene state at this time is first pushed and saved in a pre-set data stack structure.
初始场景状态获取模块64用于从标准库容器中获取初始场景状态。在将开始回放时刻的场景状态进行压栈保存后,读取上述录制单元5保存的初始场景状态,并将其设置为回放开始时的初始场景状态。The initial scene state obtaining module 64 is used to obtain the initial scene state from the standard library container. After the scene state at the start of playback is pushed and saved, read the initial scene state saved by the recording unit 5 and set it as the initial scene state at the beginning of playback.
整数标识获取模块65用于按录制片段中整数标识的存储顺序,在回放定时器的当前的回放触发时刻,获取存储于标准库容器中的一整数标识。The integer identifier obtaining module 65 is used for obtaining an integer identifier stored in the standard library container at the current playback triggering moment of the playback timer according to the storage order of the integer identifiers in the recording segments.
新场景状态生成模块66用于判断所述新场景状态生成模块获取的整数标识是否为录制结束整数标识;若否,根据获取的整数标识所对应的响应事件及待响应场景状态响应生成响应场景状态,并渲染所述的响应场景状态,生成并显示所述新的场景状态,所述回放定时器更新至下一个回放触发时刻,将所述的待响应场景状态更新为所述的新的场景状态,再次触发整数标识获取模块65;若是,则触发回放时场景状态显示模块67。以下对整数标识获取模块65及新场景状态生成模块66之间的关系及具体应用做详细说明。New scene state generation module 66 is used for judging whether the integer mark that described new scene state generation module obtains is the recording end integer mark; If not, according to the response event corresponding to the integer mark that obtains and the scene state response to be responded to generate response scene state , and render the response scene state, generate and display the new scene state, update the playback timer to the next playback trigger moment, and update the scene state to be responded to the new scene state , trigger the integer identifier acquisition module 65 again; if so, trigger the scene state display module 67 during playback. The relationship and specific applications between the integer identifier acquisition module 65 and the new scene state generation module 66 will be described in detail below.
在实际回放过程中,在回放定时器的第一个触发时刻t1,整数标识获取模块65按照录制单元5录制过程中将各整数标识存储于标准库容器中的顺序,从存储于标准库容器的录制片段中读取一个整数标识。在整数标识获取模块65读取到该整数标识之后,新场景状态生成模块66判断该整数标识是否为上述的录制结束整数标识。如果该整数标识不是录制结束整数标识,则根据该整数标识的种类重新对上述的初始场景状态进行响应。具体地,是触发MFC的消息映射机制,调用相应的响应函数(此处的响应函数,实际上可通过一段响应程序来实现。在虚拟手术模拟过程中,针对虚拟手术模型、鼠标或键盘的每一种操作,都会有相对应的一段程序对该操作进行处理计算。例如,接收到外界导丝平移信号,就会根据这个信号调用特别针对处理导丝平移的那一段程序,从而对外界不同的操作进行针对性的处理计算)根据与整数标识相应的响应事件的类型对场景状态进行响应。然后,对响应后的场景状态重新渲染,渲染完成后,生成并显示结合有读取的整数标识所对应的响应事件的新的场景状态,此时,该回放定时器的当前触发时刻t1的所有工作完成,进入等待阶段,等待回放定时器的下一个回放触发时刻。In the actual playback process, at the first trigger moment t1 of the playback timer, the integer identifier acquisition module 65 stores the integer identifiers in the standard library container according to the order in which the integer identifiers are stored in the standard library container during the recording process of the recording unit 5, from the stored in the standard library container. An integer identifier read from the recording segment. After the integer identifier acquisition module 65 reads the integer identifier, the new scene state generation module 66 judges whether the integer identifier is the above-mentioned recording end integer identifier. If the integer identifier is not the integer identifier of the end of recording, the above-mentioned initial scene state is re-responsed according to the type of the integer identifier. Specifically, it is to trigger the message mapping mechanism of MFC, and call the corresponding response function (the response function here can actually be realized through a section of response program. During the virtual surgery simulation process, for each virtual surgery model, mouse or keyboard For any operation, there will be a corresponding program to process and calculate the operation. For example, when receiving the translation signal of the external guide wire, it will call the program specially for the translation of the guide wire according to this signal, so as to control the different external The operation performs targeted processing and calculation) to respond to the scene state according to the type of the response event corresponding to the integer identifier. Then, re-render the scene state after the response. After the rendering is completed, generate and display a new scene state combined with the response event corresponding to the read integer identifier. At this time, all the current triggering time t1 of the playback timer After the work is completed, enter the waiting stage and wait for the next playback trigger moment of the playback timer.
在回放定时器的下一个回放触发时刻t2,新场景状态生成模块66将回放触发时刻t1生成的场景状态更新为回放触发时刻t2的当前的场景状态,并触发上述的整数标识获取模块65。通过该整数标识获取模块65,根据上述录制单元5将各个整数标识存储至标准库容器中的顺序,从标准库容器存储的录制片段中读取下一个整数标识。在整数标识获取模块65读取到该整数标识之后,新场景状态生成模块66判断该整数标识是否为上述的录制结束整数标识。如果该整数标识不是录制结束整数标识,则根据该整数标识的种类对回放触发时刻t1生成的新的场景状态进行响应,并对响应后的场景重新渲染,生成并显示结合回放触发时刻t2获取的整数标识所对应的响应事件的场景状态,并等待回放定时器的下一个回放触发时刻。At the next playback trigger time t2 of the playback timer, the new scene state generation module 66 updates the scene state generated at the playback trigger time t1 to the current scene state at the playback trigger time t2, and triggers the above-mentioned integer identifier acquisition module 65. Through the integer identifier obtaining module 65, according to the order in which the recording unit 5 stores each integer identifier in the standard library container, the next integer identifier is read from the recorded segment stored in the standard library container. After the integer identifier acquisition module 65 reads the integer identifier, the new scene state generation module 66 judges whether the integer identifier is the above-mentioned recording end integer identifier. If the integer identifier is not the integer identifier of the end of recording, then respond to the new scene state generated at the playback trigger moment t1 according to the type of the integer identifier, and re-render the scene after the response, generate and display the scene obtained in conjunction with the playback trigger moment t2 The integer identifies the scene state corresponding to the response event, and waits for the next playback trigger moment of the playback timer.
在生成结合有回放触发时刻t2所获取的整数标识的场景状态后,在回放定时器的下一个回放触发时刻t3,新场景状态生成模块66将回放触发时刻t2生成的新的场景状态更新为当前的场景状态,并触发上述的整数标识获取模块65。通过该整数标识获取模块65,按录制片段中整数标识的存储顺序,获取下一个存储于标准库容器中的整数标识。在整数标识获取模块65读取到该整数标识之后,新场景状态生成模块66判断该整数标识是否为上述的录制结束整数标识。如果该整数标识不是录制结束整数标识,则根据回放触发时刻t3获取的整数标识所对应的响应事件及在回放触发时刻t2生成的新的场景状态进行响应并渲染,从而生成并显示回放触发时刻t3所对应的新的场景状态,并等待回放定时器的下一个回放触发时刻t4,以此类推,通过上述的整数标识获取模块65及新场景状态生成模块66,在回放定时器的各个回放触发时刻,分别生成并显示各个回放触发时刻t1~tn所对应的场景状态,直至在某一个回放触发时刻,上述新场景状态生成模块66判断出整数标识获取模块65所获取的整数标识为录制结束整数标识。After generating the scene state combined with the integer identifier acquired at the playback triggering moment t2, at the next playback triggering moment t3 of the playback timer, the new scene state generation module 66 updates the new scene state generated at the playback triggering moment t2 to the current scene state, and trigger the above-mentioned integer identifier acquisition module 65. Through the integer identifier acquiring module 65, the next integer identifier stored in the standard library container is acquired according to the storage order of the integer identifiers in the recorded segments. After the integer identifier acquisition module 65 reads the integer identifier, the new scene state generation module 66 judges whether the integer identifier is the above-mentioned recording end integer identifier. If the integer identifier is not the integer identifier of the recording end, respond and render according to the response event corresponding to the integer identifier acquired at the playback trigger moment t3 and the new scene state generated at the playback trigger moment t2, thereby generating and displaying the playback trigger moment t3 The corresponding new scene state, and wait for the next playback trigger moment t4 of the playback timer, and so on, through the above-mentioned integer identification acquisition module 65 and the new scene state generation module 66, at each playback trigger moment of the playback timer , respectively generate and display the scene states corresponding to each playback triggering moment t1-tn, until at a certain playback triggering moment, the above-mentioned new scene state generating module 66 judges that the integer identifier acquired by the integer identifier acquiring module 65 is the recording end integer identifier .
当新场景状态生成模块66判断出整数标识获取模块65所获取的整数标识为录制结束整数标识时,触发上述的回放时场景状态显示模块67,该回放时场景状态显示模块67用于从堆栈数据结构中获取并显示回放开始时的场景状态。在回放定时器的每个触发时刻,均从标准库容器中取一个整数标识并进行处理。当获取的整数标识为上述的录制结束整数标识时,表明当前录制片段已经回放完毕,此时通过出栈操作从上述堆栈数据结构中获取回放开始时压入栈顶的场景状态并进行恢复,至此为止,完成对上述录制片段的回放。When the new scene state generation module 66 judges that the integer mark obtained by the integer mark acquisition module 65 is the recording end integer mark, it triggers the above-mentioned scene state display module 67 during playback. Structure to get and display the state of the scene when playback starts. At each triggering moment of the playback timer, an integer identifier is taken from the standard library container and processed. When the obtained integer identifier is the above-mentioned recording end integer identifier, it indicates that the playback of the current recording segment has been completed. At this time, the scene state pushed to the top of the stack at the beginning of the playback is obtained from the above stack data structure through the stack operation and restored. So far Until now, the playback of the above recorded segment is completed.
通过上述的描述可知,由于不同数据类型可表示的数据范围不同,本发明实施例的虚拟手术模拟过程的录制、回放装置在事件预分类阶段可以根据响应事件数量的不同,映射到字符型、短整型、无符号整形、长整形等多种不同的数据类型。该调整会对录制片段的大小产生影响,映射到的数据类型位宽越小,模拟片段占用空间越小,从而实现针对性强、资源占用少、画面质量好、占用空间少、无冗余数据的虚拟手术模拟过程录制和回放过程。From the above description, it can be seen that due to the different data ranges that can be represented by different data types, the recording and playback device of the virtual surgery simulation process in the embodiment of the present invention can be mapped to character type, short Integer, unsigned integer, long integer and many other data types. This adjustment will affect the size of the recording segment. The smaller the bit width of the data type mapped to, the smaller the space occupied by the analog segment, so as to achieve strong pertinence, less resource occupation, good picture quality, less space occupation, and no redundant data. The recording and playback process of the virtual surgery simulation process.
在一实施例中,当上述新场景状态生成模块66获取的整数标识为上述的整数标识0时,说明当前回放触发时刻的响应事件为空事件,即表示在录制单元5进行录制时对应的录制触发时刻,外部传感器和MFC都没有接收到操作者的操作信号,因此,没有响应事件需要进行处理,只需要重新渲染整个场景即可。In one embodiment, when the integer identifier acquired by the new scene state generating module 66 is the above integer identifier 0, it means that the response event at the trigger moment of the current playback is an empty event, which means that the corresponding recording event when the recording unit 5 is recording At the moment of triggering, neither the external sensor nor the MFC has received the operator's operation signal. Therefore, there is no response event to be processed, and only the entire scene needs to be re-rendered.
在一实施例中,当回放单元6中设置的回放定时器间隔等于录制单元5中设置的录制定时器间隔时,回放单元6以与录制单元5录制该录制片段的速度相同的速度播放该录制片段。并且,通过在回放单元6中设置与录制单元5不同的定时器间隔,可以以不同于录制帧率的速度进行回放:当回放单元6的回放定时器间隔小于录制单元5的录制定时器间隔时,回放单元6以快于录制单元5录制该录制片段的速度播放该录制片段;当回放单元6的定时器间隔大于录制单元5的定时器间隔时,回放单元6以慢于录制单元5录制该录制片段的速度播放该录制片段。In one embodiment, when the playback timer interval set in the playback unit 6 is equal to the recording timer interval set in the recording unit 5, the playback unit 6 plays the recording at the same speed at which the recording unit 5 records the recording segment. fragment. And, by setting a timer interval different from that of the recording unit 5 in the playback unit 6, playback can be performed at a speed different from the recording frame rate: when the playback timer interval of the playback unit 6 is smaller than the recording timer interval of the recording unit 5 , the playback unit 6 plays the recording segment at a speed faster than the recording unit 5 recording the recording segment; The recording is played at the recorded speed.
在另一实施例中,通过调整每次定时器间隔读取的事件个数,也可以实现以不同于录制帧率的速度进行播放,从而实现快进功能。假设在每个定时器间隔读取2个事件进行模拟,那么回放时一帧的显示结果相当于录制时的两帧,从而实现了2倍速的播放。因此,如果每个定时器间隔读取n个事件,那么回放单元6就实现了n倍速的快进播放。当在每个回放定时间隔读取1/n个所述响应事件时,回放单元6以n倍速慢放所述的录制片段,其中,上述的n为正整数。In another embodiment, by adjusting the number of events read at each timer interval, playback at a speed different from the recording frame rate can also be realized, thereby realizing the fast-forward function. Assuming that 2 events are read at each timer interval for simulation, then the display result of one frame during playback is equivalent to two frames during recording, thus achieving 2x speed playback. Therefore, if n events are read at intervals of each timer, the playback unit 6 realizes n-fold fast-forward playback. When reading 1/n of the response events at each playback timing interval, the playback unit 6 slows down the recorded segment at n times speed, wherein the above n is a positive integer.
实际应用中,录制单元5可通过为录制定时器设定不同的定时值,可以实现不同帧率的录制。例如,当定时值为16毫秒时,可实现60帧/秒的视频录制,当定时值为33毫秒时,可实现30帧/秒的视频录制。In practical applications, the recording unit 5 can realize recording at different frame rates by setting different timing values for the recording timer. For example, when the timing value is 16 milliseconds, video recording at 60 frames per second can be realized, and when the timing value is 33 milliseconds, video recording at 30 frames per second can be realized.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读取存储介质中,比如ROM/RAM、磁碟、光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as ROM/RAM, disk , CD, etc.
以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施例而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments described above have further described the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific embodiments of the present invention and are not intended to limit the scope of the present invention. Protection scope, within the spirit and principles of the present invention, any modification, equivalent replacement, improvement, etc., shall be included in the protection scope of the present invention.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410841513.5A CN104580973B (en) | 2014-12-30 | 2014-12-30 | A kind of recording, back method and the device of virtual surgery simulation process |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410841513.5A CN104580973B (en) | 2014-12-30 | 2014-12-30 | A kind of recording, back method and the device of virtual surgery simulation process |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104580973A true CN104580973A (en) | 2015-04-29 |
CN104580973B CN104580973B (en) | 2018-03-23 |
Family
ID=53096055
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410841513.5A Active CN104580973B (en) | 2014-12-30 | 2014-12-30 | A kind of recording, back method and the device of virtual surgery simulation process |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104580973B (en) |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105825752A (en) * | 2016-04-22 | 2016-08-03 | 吉林大学 | Force feedback device-based virtual corneal surgery training system |
CN105933724A (en) * | 2016-05-23 | 2016-09-07 | 福建星网视易信息系统有限公司 | Video producing method, device and system |
CN105979187A (en) * | 2015-07-24 | 2016-09-28 | 乐视致新电子科技(天津)有限公司 | Data recording method and device |
CN107025165A (en) * | 2017-03-07 | 2017-08-08 | 腾讯科技(深圳)有限公司 | Game automated testing method and relevant apparatus |
CN108600668A (en) * | 2018-03-27 | 2018-09-28 | 维沃移动通信有限公司 | A kind of record screen frame per second method of adjustment and mobile terminal |
WO2018205809A1 (en) * | 2017-05-09 | 2018-11-15 | 腾讯科技(深圳)有限公司 | Virtual reality application data processing method, computer device and storage medium |
CN108922282A (en) * | 2018-08-09 | 2018-11-30 | 贵州华宁科技股份有限公司 | Multimedia simulation tutoring system |
CN109862378A (en) * | 2018-12-29 | 2019-06-07 | 广州中智达信科技有限公司 | A kind of operation record method and apparatus |
CN109907826A (en) * | 2019-04-12 | 2019-06-21 | 江西省人民医院 | Coronary artery disease simulation diagnosis and treatment system based on 3D model and VR technology |
CN110265094A (en) * | 2019-06-10 | 2019-09-20 | 广东盛利医疗科技有限公司 | Surgical recording method, device and computer-readable storage medium |
CN111539266A (en) * | 2020-04-02 | 2020-08-14 | 威迈(宁波)医疗科技有限公司 | Medical instrument identification device and method and blood vessel intervention training equipment |
CN112612580A (en) * | 2020-11-25 | 2021-04-06 | 北京思特奇信息技术股份有限公司 | Combined event triggering method and triggering system |
CN112881052A (en) * | 2021-01-14 | 2021-06-01 | 深圳市杉川机器人有限公司 | Method and device for constructing working scene of mobile robot |
CN113985815A (en) * | 2021-09-17 | 2022-01-28 | 上海三一重机股份有限公司 | Recording playback method, system, equipment and operation machine |
CN116017082A (en) * | 2022-12-31 | 2023-04-25 | 联想(北京)有限公司 | Information processing method and electronic equipment |
WO2023137747A1 (en) * | 2022-01-24 | 2023-07-27 | 上海莉莉丝科技股份有限公司 | Virtual scene playback method, medium, electronic device, and computer program product |
CN117936053A (en) * | 2024-03-21 | 2024-04-26 | 吉林大学第一医院 | Operation flow information management method based on digital operating room |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101520884A (en) * | 2008-02-29 | 2009-09-02 | 国际商业机器公司 | Method and system for obtaining and replaying events occurring in a virtual world |
US20100062405A1 (en) * | 2008-08-21 | 2010-03-11 | Lincoln Global, Inc. | System and method providing arc welding training in a real-time simulated virtual reality environment using real-time weld puddle feedback |
CN101739879A (en) * | 2009-12-22 | 2010-06-16 | 天津市天堰医教科技开发有限公司 | Real-time pose capture-based surgery simulation system, method and graph rendering module |
-
2014
- 2014-12-30 CN CN201410841513.5A patent/CN104580973B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101520884A (en) * | 2008-02-29 | 2009-09-02 | 国际商业机器公司 | Method and system for obtaining and replaying events occurring in a virtual world |
US20100062405A1 (en) * | 2008-08-21 | 2010-03-11 | Lincoln Global, Inc. | System and method providing arc welding training in a real-time simulated virtual reality environment using real-time weld puddle feedback |
CN101739879A (en) * | 2009-12-22 | 2010-06-16 | 天津市天堰医教科技开发有限公司 | Real-time pose capture-based surgery simulation system, method and graph rendering module |
Non-Patent Citations (2)
Title |
---|
周萌萌: "虚拟手术系统中行为引擎的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
唐忠: "医学手术仿真教学系统的设计与实现", 《桂林工学院学报》 * |
Cited By (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105979187A (en) * | 2015-07-24 | 2016-09-28 | 乐视致新电子科技(天津)有限公司 | Data recording method and device |
CN105825752A (en) * | 2016-04-22 | 2016-08-03 | 吉林大学 | Force feedback device-based virtual corneal surgery training system |
CN105933724A (en) * | 2016-05-23 | 2016-09-07 | 福建星网视易信息系统有限公司 | Video producing method, device and system |
CN107025165A (en) * | 2017-03-07 | 2017-08-08 | 腾讯科技(深圳)有限公司 | Game automated testing method and relevant apparatus |
CN108874267A (en) * | 2017-05-09 | 2018-11-23 | 腾讯科技(深圳)有限公司 | Virtual reality applications data processing method, computer equipment and storage medium |
WO2018205809A1 (en) * | 2017-05-09 | 2018-11-15 | 腾讯科技(深圳)有限公司 | Virtual reality application data processing method, computer device and storage medium |
CN108874267B (en) * | 2017-05-09 | 2022-12-09 | 腾讯科技(深圳)有限公司 | Virtual reality application data processing method, computer device and storage medium |
US11307891B2 (en) * | 2017-05-09 | 2022-04-19 | Tencent Technology (Shenzhen) Company Ltd | Virtual reality application data processing method, computer device and storage medium |
CN108600668A (en) * | 2018-03-27 | 2018-09-28 | 维沃移动通信有限公司 | A kind of record screen frame per second method of adjustment and mobile terminal |
CN108922282A (en) * | 2018-08-09 | 2018-11-30 | 贵州华宁科技股份有限公司 | Multimedia simulation tutoring system |
CN108922282B (en) * | 2018-08-09 | 2021-05-07 | 贵州华宁科技股份有限公司 | Multimedia simulation teaching system |
CN109862378B (en) * | 2018-12-29 | 2021-05-18 | 广州中智达信科技有限公司 | Operation recording method |
CN109862378A (en) * | 2018-12-29 | 2019-06-07 | 广州中智达信科技有限公司 | A kind of operation record method and apparatus |
CN109907826A (en) * | 2019-04-12 | 2019-06-21 | 江西省人民医院 | Coronary artery disease simulation diagnosis and treatment system based on 3D model and VR technology |
CN110265094A (en) * | 2019-06-10 | 2019-09-20 | 广东盛利医疗科技有限公司 | Surgical recording method, device and computer-readable storage medium |
CN111539266A (en) * | 2020-04-02 | 2020-08-14 | 威迈(宁波)医疗科技有限公司 | Medical instrument identification device and method and blood vessel intervention training equipment |
CN112612580A (en) * | 2020-11-25 | 2021-04-06 | 北京思特奇信息技术股份有限公司 | Combined event triggering method and triggering system |
CN112881052A (en) * | 2021-01-14 | 2021-06-01 | 深圳市杉川机器人有限公司 | Method and device for constructing working scene of mobile robot |
CN112881052B (en) * | 2021-01-14 | 2024-02-20 | 深圳市杉川机器人有限公司 | Method and device for constructing working scene of mobile robot |
CN113985815A (en) * | 2021-09-17 | 2022-01-28 | 上海三一重机股份有限公司 | Recording playback method, system, equipment and operation machine |
WO2023137747A1 (en) * | 2022-01-24 | 2023-07-27 | 上海莉莉丝科技股份有限公司 | Virtual scene playback method, medium, electronic device, and computer program product |
CN116017082A (en) * | 2022-12-31 | 2023-04-25 | 联想(北京)有限公司 | Information processing method and electronic equipment |
CN117936053A (en) * | 2024-03-21 | 2024-04-26 | 吉林大学第一医院 | Operation flow information management method based on digital operating room |
Also Published As
Publication number | Publication date |
---|---|
CN104580973B (en) | 2018-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104580973B (en) | A kind of recording, back method and the device of virtual surgery simulation process | |
JP7221989B2 (en) | Application virtual scene recognition and interaction key matching method, and computing device | |
WO2020207250A1 (en) | Vertical synchronization method and apparatus, terminal, and storage medium | |
WO2020207251A1 (en) | Image update method and apparatus, and terminal and storage medium | |
WO2020156132A1 (en) | Gpu performance bottleneck determining method and device, terminal, and storage medium | |
CN111862280A (en) | Virtual character control method, system, medium and electronic device | |
KR20090122445A (en) | Image generating apparatus, image processing method, information recording medium and program | |
US6392665B1 (en) | Capture mechanism for computer generated motion video images | |
CN111491208A (en) | Video processing method, apparatus, electronic device and computer readable medium | |
CN112673400A (en) | Avatar animation | |
CN107977184A (en) | A kind of method for playing music and device based on virtual reality technology | |
US20240054714A1 (en) | Method and apparatus for adding animation to video, and device and medium | |
CN114143568A (en) | Method and equipment for determining augmented reality live image | |
CN109739648B (en) | Animation playing control method, device, equipment and storage medium | |
CN110992453B (en) | Scene object display method and device, electronic equipment and storage medium | |
US20050021552A1 (en) | Video playback image processing | |
CN111787391A (en) | Information card display method, device, equipment and storage medium | |
CN117959703A (en) | Interactive method, device, computer readable storage medium and computer program product | |
CN112929685B (en) | Interaction method and device for VR live broadcast room, electronic device and storage medium | |
CN109616117A (en) | A kind of mobile phone games control system and method based on speech recognition technology | |
CN113350780A (en) | Cloud game control method and device, electronic equipment and storage medium | |
WO2014024255A1 (en) | Terminal and video playback program | |
CN114339308A (en) | A video stream loading method, electronic device and storage medium | |
CN117065357A (en) | Media data processing method, device, computer equipment and storage medium | |
CN112367295A (en) | Plug-in display method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |