Suture simulation method, operation simulator and medium
By dynamically adjusting the segmentation level and scale of suture and instrument model, the problem of multi-scale collision detection in the prior art is difficult to adapt to complex suture and knotting scenes, achieving efficient and accurate detection results.
Patent Information
- Application Number
- CN202311463604.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-04
- Publication Date
- 2025-05-06
AI Technical Summary
The existing multi-scale collision detection methods are difficult to adapt to various complex stitching and knotting scenarios, making it difficult to take into account both detection efficiency and accuracy.
By obtaining suture model and instrument model and determining multiple segmentation levels and scales according to their pose, the segmentation levels and scales of collision detection are dynamically adjusted to meet the detection needs of different scenarios.
It realizes that the number of collision detection times is reduced and the detection efficiency is improved while ensuring detection accuracy, and the number of detection times is further reduced and the efficiency is improved by alternating the intersection levels.
Smart Images

Figure CN119942888A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of medical devices, and in particular relates to a suturing simulation method, a surgical simulator and a medium. Background Art
[0002] Suture knotting is an essential part of surgical simulation. Knotting is mainly divided into freehand knotting, instrument-assisted knotting, and a combination of the two. Since robotic surgery is mainly operated by hand-controlled robotic arms, and the operating space is small, freehand knotting is rare, and almost all knotting is instrument-assisted. Therefore, instrument-assisted knotting is usually used in virtual surgical knotting simulations.
[0003] When knotting with the aid of instruments, due to the variety and form of surgical tools, the complex structure, and the small diameter of the suture, it is easy to be misdetected and cause penetration. It is difficult to accurately cover its shape using traditional collision detection methods such as AABB bounding box, OBB bounding box, spherical bounding box, etc. When applying collision detection at multiple scales, whether it is an easy-to-detect knotting scene or a difficult-to-detect knotting scene, collision detection is usually performed in sequence at multiple fixed scales. If the number and size of multiple fixed scales are set more carefully, the efficiency of collision detection will be reduced in the easy-to-detect knotting scene, and if the setting is relatively rough, the accuracy of collision detection will be reduced in the difficult-to-detect knotting scene. In short, for the suture knotting simulation process, the existing multi-scale collision detection method is difficult to adapt to various complex knotting scenes. Summary of the invention
[0004] In order to solve the problem that the existing multi-scale collision detection method is difficult to adapt to various complex knotting scenarios in the suture and knotting simulation process, the present invention proposes the following technical solutions:
[0005] A first aspect of the present invention provides a suturing simulation method, comprising: acquiring a suture model and an instrument model, wherein the suture model is composed of a first unit, the instrument model is composed of a second unit, the suture model is set with a plurality of first segmentation levels according to the first unit, and the instrument model is set with a plurality of second segmentation levels according to the second unit; determining a first target level from the plurality of first segmentation levels and a second target level from the plurality of second segmentation levels according to the postures of the suture model and the instrument model, setting a first scale of the first target level and setting a second scale of the second target level, wherein the first target level and the second target level are different; based on the first scale and the second scale, The model and the instrument model perform collision detection at the current first target level and the second target level to obtain a collision detection result; if the collision detection result does not meet the preset condition, the first target level and the second target level are re-determined, and the next round of collision detection is performed to obtain a new collision detection result, until there is a target collision detection result that meets the preset condition, and the collision detection of the suture line model and the instrument model is stopped; in the process of two adjacent rounds of collision detection, the height relationship of the re-determined first target level and the second target level is different from the height relationship of the current first target level and the second target level; based on the target collision detection result and the posture, the suture state of the suture line model and the instrument model is determined, and based on the suture state, the suture line and the instrument are displayed.
[0006] Preferably, the first segmentation level includes at least one segmentation level of the suture model, and the second segmentation level includes at least one joint level of the instrument model; based on the first scale and the second scale, collision detection is performed on the suture model and the instrument model at the current first target level and the second target level, and the collision detection result obtained includes: if the current first target level is any segmentation level, and the current second target level is any joint level, then according to the first scale, a plurality of first bounding boxes of any segmentation level are constructed for the suture model, and according to the second scale, a plurality of second bounding boxes of any joint level are constructed for the instrument model, wherein any segmentation level is higher than or lower than any joint level; collision detection is performed on the first bounding box and the second bounding box to obtain a collision detection result.
[0007] Preferably, the first segmentation level also includes a first unit level, and the first unit level is higher than any segment level and any joint level; based on the collision detection result, the first target level and the second target level are re-determined, and the next round of collision detection is performed to obtain a new collision detection result, including: if the re-determined first target level is the first unit level, and the re-determined second target level is any joint level, then based on the collision detection result, the segments in the suture model that collide, and the joints in the instrument model that collide are determined; the first scale of the first unit level is set as the size information of the first unit, and according to the size information of the first unit, multiple third bounding boxes of the first unit level are constructed for the segments in which the collision occurs; collision detection is performed on the third bounding box and the second bounding box to which the joint in which the collision occurs belongs, to obtain a new collision detection result.
[0008] Preferably, the second segmentation level also includes a second unit level, and the first segmentation level also includes a third unit level, and the third unit level is higher than the first unit level and the second unit level; the re-determining the first target level and the second target level and performing the next round of collision detection includes: if the re-determined first target level is the third unit level, and the re-determined second target level is the second unit level, then the second scale of the second unit level is set to the size information of the second unit, and according to the size information of the second unit, a plurality of capsules of the second unit level are constructed for the joint where the collision occurs; collision detection is performed on the first unit and the capsule in the segment where the collision occurs to obtain a new collision detection result.
[0009] Preferably, the second segmentation level also includes a fourth unit level higher than the second unit level, and the fourth unit level is higher than the third unit level; based on the collision detection result, the first target level and the second target level are re-determined, and the next round of collision detection is performed to obtain a new collision detection result, including: if the re-determined first target level is the third unit level, and the re-determined second target level is the fourth unit level, then based on the collision detection result, it is determined that the capsule body colliding with the first unit is at the end of the instrument model; a plurality of sub-capsule bodies are constructed for the joints corresponding to the capsule body at the end; collision detection is performed on the first unit colliding with the capsule body at the end, and the plurality of sub-capsule bodies, to obtain a new collision detection result.
[0010] Preferably, based on the collision detection result, the first target level and the second target level are redetermined, and the next round of collision detection is performed to obtain a new collision detection result, including: based on the collision detection result, the first target level and the second target level are redetermined, wherein the redetermined first target level and the second target level are both the same as the current first target level, or are both currently the same as the second target level; based on the first target level and the second target level of the same level, the next round of collision detection is performed on the suture model and the instrument model to obtain a new collision detection result.
[0011] Preferably, the preset conditions include: when the collision detection result is a collision, the current first target level is the lowest segmentation level among the multiple first segmentation levels, and the current second target level is the lowest segmentation level among the second segmentation levels; and the suture model and the instrument model do not collide at any first target level and the second target level.
[0012] Preferably, determining the suturing state of the suture model and the instrument model based on the target collision detection result and the posture includes: if the target collision detection result is that no collision occurs, determining that the suturing state of the suture model and the instrument model is a non-collision state; if the target collision detection result is that a collision occurs, acquiring the first unit information and the second unit information of a preset historical frame number; based on the first unit information and the second unit information, detecting the inner and outer side relationship of the first unit relative to the second unit; if the first unit is located on the inner side of the second unit, determining that the suturing state of the suture model and the instrument model is a clamping state; if the first unit is located on the outer side of the second unit, determining that the suturing state of the suture model and the instrument model is a entangled state.
[0013] Preferably, the display of sutures and instruments based on the suturing state includes: if the suturing state is a non-collision state, then according to a preset first iteration method, position dynamics calculations are performed on the preset suture self-constraints to obtain first model parameters of the suture model; if the suturing state is a clamping state or a winding state, then according to a preset second iteration method, position dynamics calculations are performed on the preset suture self-constraints and the preset suture collision constraints to obtain second model parameters of the suture model; according to the preset first iteration method or the second iteration method, position dynamics calculations are performed on the instrument self-constraints to obtain third model parameters of the instrument model; and the sutures and instruments are displayed according to the first model parameters and the third model parameters, or the second model parameters and the third model parameters.
[0014] Preferably, the redetermining of the first target level and the second target level and performing the next round of collision detection includes: based on the collision detection result, determining the first collision part of the suture model and the second collision part of the instrument model; based on the local posture of the first collision part and the second collision part, increasing the lower segmentation level of the current first target level and the second target level by at least two levels, and keeping the higher segmentation level of the current first target level and the second target level at least unchanged, to obtain the redetermined first target level and the second target level; performing collision detection of the first collision part and the second collision part according to the next intersection level to obtain a new collision detection result.
[0015] Preferably, determining the first target level from the multiple first segmentation levels according to the postures of the suture model and the instrument model, and determining the second target level from the multiple second segmentation levels includes: determining a first inclination degree of the suture model, a second inclination degree of the instrument model, and a relative inclination degree between the suture model and the instrument model according to the postures of the suture model and the instrument model; and selecting a first target level from the multiple first segmentation levels and a second target level from the multiple second segmentation levels based on the first inclination degree, the second inclination degree, and the relative inclination degree.
[0016] Preferably, determining a first inclination degree of the suture model, a second inclination degree of the instrument model, and a relative inclination degree between the suture model and the instrument model according to the postures of the suture model and the instrument model includes: determining a curvature of the suture model and a bending shape of the instrument model according to the postures of the suture model and the instrument model; determining a first inclination degree of the suture model and at least one first axis according to the curvature; determining a second inclination degree of the instrument model and at least one second axis according to the bending shape; and determining the relative inclination degree of the suture model and the instrument model based on an angle between the first axis and the second axis.
[0017] Preferably, setting the first scale of the first target level and setting the second scale of the second target level include: setting the first scale of the first target level according to the change of the curvature or the preset number of the first units; setting the second scale of the second target level according to the change of the curved shape or the preset length of the second unit.
[0018] A third aspect of the present invention provides a surgical simulator, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, a suturing simulation method as in any embodiment of the present application is implemented.
[0019] A fourth aspect of the present invention provides a readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above suture simulation method when executed by a processor.
[0020] The beneficial effects of the present invention are as follows: by pre-setting multiple segmentation levels for sutures and instruments, and then combining the postures of the sutures and instruments, a suitable segmentation level is selected and the specific scale under the segmentation level can be flexibly set. At the same time, during multiple collision detections, the cross-segmentation levels are alternated in sequence, so that for each scale collision detection of the sutures and instruments, a suitable segmentation level and segmentation scale can be flexibly set, so that the number of collision detections can be minimized while ensuring the detection accuracy, thereby improving the detection efficiency. At the same time, the cross-levels are alternated in sequence, thereby further reducing the number of collision detections and further improving the detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a schematic diagram of an embodiment of the suturing simulation process of the present invention;
[0022] Figure 2 It is a structural schematic diagram of the suturing simulation process of the present invention;
[0023] Figure 3 is a schematic diagram of a first embodiment of the suturing simulation method of the present invention;
[0024] Figure 4 is a first projection schematic diagram of a suture model and an instrument model of the present invention;
[0025] Figure 5 is a second projection schematic diagram of the suture model and the instrument model of the present invention;
[0026] Figure 6 is a third projection schematic diagram of the suture model and the instrument model of the present invention;
[0027] Figure 7 is a schematic diagram of a second embodiment of the suturing simulation method of the present invention;
[0028] Figure 8 is a fourth projection schematic diagram of the suture model and the instrument model of the present invention;
[0029] Fig. 9 is a fifth projection schematic diagram of the suture model and the instrument model of the present invention;
[0030] Fig.10is a sixth projection schematic diagram of the suture model and the instrument model of the present invention;
[0031] Fig.11 This is the first structural schematic diagram of the present invention for establishing a capsule body for the device model;
[0032] Fig.12 It is a second structural schematic diagram of the present invention for establishing a capsule body for the device model;
[0033] Fig.13 It is a third structural schematic diagram of the present invention for establishing a capsule body for the device model;
[0034] Fig.14 It is a schematic diagram of the structure of the collision detection between the unit and the capsule body of the present invention;
[0035] Fig.15 It is a fourth structural schematic diagram of the present invention for establishing a capsule body for the device model;
[0036] Fig.16 is a schematic diagram of an embodiment of the cross-level of the present invention;
[0037] Fig.17 is a schematic diagram of a third embodiment of the suturing simulation method of the present invention;
[0038] Fig.18 is a seventh projection schematic diagram of the suture model and the instrument model of the present invention;
[0039] Fig.19 is an eighth projection schematic diagram of the suture model and the instrument model of the present invention;
[0040] Fig. 20 is a ninth projection schematic diagram of the suture model and the instrument model of the present invention;
[0041] Fig.21 It is the first structural schematic diagram of the bounding box division of the present invention;
[0042] Fig. 22 It is a second structural schematic diagram of the bounding box division of the present invention;
[0043] Fig.23 is a schematic diagram of a fourth embodiment of the suturing simulation method of the present invention;
[0044] Fig.24 It is a schematic diagram of the structure of the suture model and the instrument model of the present invention in a clamping state;
[0045] Fig.25 It is a schematic diagram of the structure of the suture model and the instrument model of the present invention in a entangled state; DETAILED DESCRIPTION
[0046] In order to facilitate the understanding of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings and specific embodiments. Preferred embodiments of the present invention are provided in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0047] It should be noted that, unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those understood by a person skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. For example, the term "plurality" includes two or more.
[0048] In the field of computer graphics, the common physical method for simulating object deformation in real time generally updates the acceleration through external forces first, and then integrates to obtain the velocity and position. However, PBD (Position Based Dynamic) directly corrects the position through constraint functions, and then updates the velocity through the position. The system equations in the PBD algorithm are constructed by a set of constraint function equations, which include multiple constraint function equations (referred to as constraint functions).
[0049] In PBD, the model of an object includes multiple particle points that make up the object, also called mass points. The parameters of the particle points include their position, velocity and mass. The parameters of the constraint function include the position of these particle points, and the velocity and mass of the particle points are calculated based on the position. The constraint function is used to describe the relationship between the particle points that make up the object.
[0050] The PBD algorithm mainly includes the initial stage and the real-time simulation stage. In the initial stage, the parameters of all the particle points that make up the object are initialized according to the preset parameters of the object, such as the initial position, initial posture, number of particle points, etc. Then it enters the real-time simulation stage, which executes the process of simulating the deformation of the object according to the effect of the environment (including possible operation instructions from the user) in a loop in frames, which can specifically include three parts: prediction, constraint correction and variable update.
[0051] In the prediction part of the current frame, the external environment force of the current frame is converted into displacement as much as possible, and the external force that cannot be directly converted into displacement (such as gravity) is retained. Based on the position of each particle point in the previous frame, the position of each particle point in the current frame is predicted by combining the displacement obtained by conversion and the external force that cannot be directly converted.
[0052] The above prediction part often only uses integrals (such as explicit Euler integrals) to directly predict the position of each particle point in the current frame, without considering the mechanical properties of the object and the interaction with the environment. Therefore, it cannot be directly used as the simulation result of the current frame, but the position of the particle point must be corrected using the constraint function. Constraint functions are used to limit the relationship between particle points. There are two main types of constraint functions: one is a temporary constraint function, which is generally generated temporarily when the object is detected to interact with external objects in the environment; the other is a conventional constraint function, which is determined by the mechanical properties of the object itself. According to the constraint function and the current position, the corrected position that satisfies the constraint function as much as possible is calculated. This process is called constraint projection and is the core process of PBD. Constraint correction is essentially an iterative optimization of the position of the particle point based on the constraint function equation group. The specific implementation is generally an iterative execution of the process of using the constraint functions in the constraint function equation group to perform constraint projection in turn until the set number of iterations is reached, so as to find the particle point position that satisfies all the constraint functions in the constraint function equation group as much as possible.
[0053] After the constraint correction is completed, the result obtained is the position of each particle point in the current frame, based on which the speed of each particle point in the current frame can be calculated, and then the corresponding variables are updated for display and calculation of the next frame. The Δt used in PBD is generally the default frame spacing, that is, the duration of two adjacent frames under normal circumstances.
[0054] In the process of PBD constraint correction, when the position of the particle point is iteratively optimized based on the constraint function equation group, the iterative method used can be Jacobi iteration method and Gauss-Seidel iteration method. The constraint function equation group includes "F1, F2, ..., F n "The particle point will solve the constraint function equations frame by frame as it moves, and determine the motion parameters of the particle point in real time. The Jacobi iteration method will calculate the constraint function of the i-th frame based on the calculation result of the constraint function of the i-1th frame, and so on. The Gauss-Seidel method is based on the j-1th constraint function F j-1 Calculate the j-th constraint function F j The solution is j∈n.
[0055] Since the Gauss-Seidel iteration method uses the solution of the previous constraint function to calculate the solution of the next constraint function each time, its iteration efficiency is higher than that of the Jacobi iteration method and its convergence speed is faster. Therefore, when performing stitching simulation, the Gauss-Seidel iteration method is often used to iteratively optimize the position of the particle point.
[0056] For easier understanding, see Figure 1 , the suturing simulation process of the surgical instrument (hereinafter referred to as the instrument) and the suture thread is explained below, as shown below.
[0057] 11. Instrument and suture interaction;
[0058] In this embodiment, for ease of understanding, the application scenario of the suturing simulation process is first described. The suturing simulation process is usually used for intraoperative suturing training of doctors, and includes at least a main console and a virtual response device. The doctor generates an operation instruction of the instrument by performing a suturing operation on the main console, and inputs it into the virtual response device; the virtual response device includes at least a processor and a display, and at least a suture line model and an instrument model are displayed on the display; wherein the processor is configured to: according to the input operation instruction, control the instrument to move in the direction of the fixed suture line, and perform the suturing operation after clamping the suture line; render the instrument and suture line to the display in real time as the posture changes, so that the doctor can observe the suturing status.
[0059] In this embodiment, the suture line is usually placed in a preset position in the virtual space (the space displayed on the monitor), or extends from the hollow channel of the instrument, and is not directly controlled by the main console; the main console can interact with the suture line by operating at least two instruments to perform suturing operations, and each operation during the interaction process will be implemented and rendered and displayed on the monitor.
[0060] Specifically, the interaction between the instrument and the suture, that is, the collision detection and response process between the instrument and the suture, includes approaching the suture and colliding with the suture, and starting the suture knotting operation. Figure 2 As shown, one of the instruments 21 clamps the suture 22 and operates the suture to be wound around another instrument 23 to form a suture knot, tighten the knot, etc.
[0061] 12. Collision between instruments and sutures;
[0062] In this embodiment, when the operating instruments clamp the suture to perform the suturing operation, one of the instruments clamps the suture and wraps it around the other instrument, and finally passes through the wrapped coil, and forms a knot after being tightened, completing the knotting operation of the suturing operation. Therefore, when the suture is knotted, the instrument and the suture will inevitably collide; collision detection between the instrument and the suture can determine whether the suture has started the knotting operation.
[0063] In addition, when there is no collision between the two, the model parameters are calculated based on the position dynamics, and only the self-motion constraints need to be applied to accurately output the position parameters; however, after the two collide, since the suture model uses an elastic rod, not a rigid body, the collision between the suture itself or the suture and the instrument will exert a force on the elastic rod, causing the suture to deform. It is impossible to output accurate position parameters based on the self-motion constraints alone, and model penetration will occur during subsequent rendering and display. Therefore, it is necessary to detect whether the instrument and the suture collide to add additional force constraints and calibrate the position parameters.
[0064] 13. Instrument clamping suture;
[0065] In this embodiment, the end tool of the instrument is a clamp, and the instrument can clamp the suture through the clamp. At this time, the suture is located inside the two clamps. When the two clamps apply force inward on the suture, the position of the suture will shift to the outside of the clamps and cause errors. Therefore, at this time, the suture needs to be constrained to move inwards.
[0066] 14. Instrument winding suture;
[0067] In this embodiment, when the clamp of one of the instruments clamps the suture and wraps it around the other instrument, the suture will be located outside the two clamps. When the two clamps apply force to the suture in an outward direction, the position of the suture will shift toward the middle of the clamps, causing an error. Therefore, at this time, a motion constraint toward the outside of the clamps needs to be applied to the suture.
[0068] In actual application, referring to the requirements of medical operation specifications, after the suture is wrapped around the instrument a certain number of times, one end of the suture can be pulled through the suture section by another instrument to form a coil.
[0069] 15. The suture is knotted;
[0070] In this embodiment, the suture knotting means that after forming a coil, one end of the suture is continuously pulled to form a loose surgical knot, wherein the suture is still only subjected to the additional force generated by the clamping or winding of the instrument.
[0071] 16. Tighten the suture knot;
[0072] In this embodiment, tightening means that after forming a loose surgical knot, the suture thread is continuously pulled to tighten the knot to fix the soft tissue. At this time, in addition to the additional force generated by the clamping or entanglement of the instrument, the suture thread itself will also be affected, so at this time, the suture thread needs to be constrained from moving outwards on the suture thread section.
[0073] Since knot formation and tensioning belong to the content of suture knotting, and the interaction between the end effector of the surgical instrument and the suture is a prerequisite for knotting, it determines whether an effective knot is formed and the quality of the knot. Therefore, this article mainly discusses this part.
[0074] 17. Rendering display of sutures and instruments.
[0075] In this embodiment, rendering display refers to displaying the calculated positions of sutures and instruments, and other information in real time. Here, it refers not only to the display of the calculation results of the model parameters after tensioning, but also includes the display of the calculation results of the model parameters in each step 11-16.
[0076] See also Figure 3 , the first embodiment of the suturing simulation method in the present invention is described below, as shown below.
[0077] 31. Obtain suture model and instrument model;
[0078] In this embodiment, the suture model is composed of first units, the instrument model is composed of second units, the suture model is set with multiple first segmentation levels according to the first units, and the instrument model is set with multiple second segmentation levels according to the second units.
[0079] Specifically, the suture model and the instrument model both include at least a skeleton model for controlling the movement of the suture and the instrument. Exemplarily, the suture model may be an elastic rod model, and the instrument model may be a rigid body model; that is, the first unit constituting the elastic rod model may include particle points and elastic rods, and the second unit constituting the rigid body model may include joints, rigid bodies between joints, and end effectors.
[0080] Specifically, taking the first unit as the minimum segmentation granularity of the suture model, the suture model can be divided into {first segmentation level, second segmentation level, ..., i-th segmentation level, first unit level, second unit level, ... j-th unit level} based on the granularity size, and each first segmentation level is set with a corresponding scale range. Taking the second unit as the minimum segmentation granularity of the instrument model, the instrument model can be divided into {joint mechanism level, rigid body and joint part, rigid body segmentation level, first unit level, second unit level, ... k-th unit level} based on the granularity size.
[0081] Exemplarily, the suture model can also directly set multiple first segmentation levels according to the number of first units, and the number of first units included is: {[1, N1), [N1, N2), [N2, N3), ...}; the instrument model can also be directly segmented according to the length of the second unit, and set multiple second segmentation levels, including the length of the second unit segmentation: {(0, L1], (L1, L2], (L2, L3], ...}.
[0082] 32. Select the segmentation level and segmentation scale;
[0083] In this embodiment, according to the posture of the suture model and the instrument model, a first target level is determined from the multiple first segmentation levels, and a second target level is determined from the multiple second segmentation levels, and a first scale of the first target level is set, and a second scale of the second target level is set, wherein the first target level and the second target level are different.
[0084] In this embodiment, during the suturing process, the positions of the suture and the instrument are constantly changing, and the difficulty of collision detection between the two is different in different positions. The segmentation level and segmentation scale are linked to the positions of the suture model and the instrument model, so that the appropriate segmentation level and segmentation scale are adaptively set based on the difficulty of collision detection.
[0085] Specifically, when the collision detection between sutures and instruments is difficult, a higher segmentation level and a lower segmentation scale can be set. Although the calculation amount of a single collision detection is high, the accuracy of this detection can be higher, and the segmentation level and segmentation scale with low calculation amount but insufficient accuracy can be skipped. Multiple levels of collision detection are performed in sequence, so that the detection accuracy is high and the number of final detections is reduced.
[0086] Specifically, the poses of the suture model and the instrument model may include their own independent poses and their relative poses. According to the two independent poses and the relative poses, the difficulty of collision detection between the suture model and the instrument model is determined. According to the difficulty of collision detection, a first segmentation level is selected from multiple first segmentation levels as the first target level, and a second segmentation level is selected from multiple second segmentation levels as the second target level. According to the two independent poses, a first scale of the first target level and a second scale of the second target level are further set.
[0087] In one embodiment, based on the independent postures of the suture model and the instrument model, the positions of the two relative to the spatial coordinate axis are determined, which can determine the difficulty of collision detection between the two on one aspect; based on the relative postures of the suture model and the instrument model, the axial relative positions of the two are determined, which can determine the difficulty of collision detection between the two on another aspect.
[0088] For example, Figure 4 As shown, it is the projection of the suture line model 41 and the instrument model 42 on the xy coordinate axis plane. If the suture line model 41 is closer to the parallel position of the Y axis, it can be determined that the difficulty in collision detection is lower, and the first target level selects a relatively low first segmentation level; if the instrument model 42 is farther away from the parallel position of the Y axis and the X axis, it can be determined that the difficulty in collision detection is higher, and the second target level selects a relatively high second segmentation level.
[0089] For example, Figure 5 As shown, interactive scenes 51 and 52 are projected on the plane xy of the suture model and the instrument model. If the axial relative positions of the two are further away from the parallel relationship, the first target level and the second target level select a relatively high segmentation level; if the axial relative positions of the two are closer to the parallel relationship, the first target level and the second target level select a relatively low segmentation level.
[0090] In one embodiment, after selecting the appropriate first target level and second target level, based on the independent postures of the suture model and the device model, the first scale and the second scale are further set within the scale range corresponding to the first target level and the second target level, respectively. Specifically, the first scale and the second scale within the scale range can be set based on the independent postures of the suture model and the device model, by determining the respective bending degrees of the two, and / or based on the positions of the two relative to the spatial coordinate axis.
[0091] like Figure 6 As shown, it is the projection of the suture model 61 and the instrument model 62 on the plane xy. If the curvature of the suture model 61 is greater, the first target level is set to a smaller first scale within the scale range; if the curvature of the instrument model 62 is smaller, the second target level is set to a larger second scale within the scale range.
[0092] 33. Collision detection at the current intersection level;
[0093] In this embodiment, based on the first scale and the second scale, collision detection is performed on the suture model and the instrument model at the current intersection level to obtain a collision detection result, wherein the current intersection level refers to the current first target level and the second target level.
[0094] In this embodiment, based on the first scale and the second scale, the suture model and the instrument model are segmented respectively to obtain a plurality of segmented parts; collision detection is performed on every two segmented parts of the suture model and the instrument model; and every two segmented parts that collide are recorded as collision detection results. The collision detection results also include that no collision occurs between every two segmented parts.
[0095] Furthermore, each time the collision detection at the current intersection level is performed, in order to reduce the amount of calculation, a coarse detection method can be used for collision detection. For example, a bounding box is constructed for each segmented part, and whether the bounding boxes of each two segmented parts collide is roughly indicated based on whether the bounding boxes of each two segmented parts collide. Among them, for the highest intersection level collision detection, a fine detection method can be used for collision detection, such as calculating the distance between each pair of first units and second units, and finally determining whether the suture model and the instrument model actually collide.
[0096] In this embodiment, each cross-level refers to a first target level and a second target level with different segmentation levels. For example, the first segmentation level includes segmentation levels 1-8, and the second segmentation level includes segmentation levels 1-9. When the first target level is the first segmentation level, if the second target level selects one of the segmentation levels 2-8, both of them can form a cross-level.
[0097] 34. Collision detection at the next intersection level;
[0098] In this embodiment, if the collision detection result does not meet the preset conditions, the first target level and the second target level are re-determined, and the next round of collision detection is performed to obtain a new collision detection result, until there is a target collision detection result that meets the preset conditions, and then the collision detection of the suture model and the instrument model is stopped; in the process of two adjacent rounds of collision detection, the high-low relationship of the re-determined first target level and the second target level is different from the high-low relationship of the current first target level and the second target level; wherein, the next cross-level refers to the re-determined first target level and the second target level.
[0099] In this embodiment, according to the aforementioned method of selecting the first target level and the second target level, and setting the first scale and the second scale, the segmentation level and the segmentation scale of the next intersection level are determined, and the same collision detection method is performed. Each collision detection result output will determine whether it meets the preset conditions to determine whether to exit the cyclic execution of collision detection at different intersection levels.
[0100] In this embodiment, at the next cross level and the current cross level, the relative levels of the first target level and the second target level alternate, which means that if the current cross level is that the first target level is higher than the second target level, then the next cross level is that the second target level is higher than the first target level.
[0101] In addition, cross-levels are used to perform multi-level collision detection of the suture model and the instrument model, and the segmentation levels of the two are alternated at the next cross-level. The purpose is to increase the segmentation level of the collision detection between the two in a ladder-like manner, thereby achieving collision detection with increasing segmentation levels and further reducing the number of collision detections.
[0102] 35. Output collision detection results;
[0103] In this embodiment, the collision detection result is that the suture model collides with the instrument model, or that the suture model does not collide with the instrument model.
[0104] 36.Show sutures and instruments.
[0105] Based on the target collision detection result and the position and posture, the suturing state of the suture model and the instrument model is determined, and based on the suturing state, the suture and the instrument are displayed. The suturing state represents the suturing process of the suture model and the instrument model, including at least a non-collision state, a clamping state, a winding state, a knotted state, a tightened state, etc.
[0106] In this embodiment, based on whether the suture model collides with the instrument model, it can be determined whether the instrument model exerts additional force on the suture model, thereby determining whether to add motion constraints to the suture to correct the position of the suture model after being subjected to the additional force.
[0107] In this embodiment, based on the posture of the suture model and the instrument model, the suture stage to which the two belong when the collision occurs is further determined, so as to determine the direction of applying additional force on the suture model, so as to determine the direction of the correction position. For example, when the instrument clamps the suture, the direction of the force applied by the instrument model is located on the outside of the suture model, so when correcting the position of the suture model, it is offset to the inside of the suture model; for example, when the instrument wraps the suture, the direction of the force applied by the instrument model is located on the inside of the suture model, so when correcting the position of the suture model, it is offset to the outside of the suture model.
[0108] In addition, based on the model parameters calculated under different suturing states, the suture lines and instruments are finally rendered on the display to display the suturing operation response of the suture lines and instruments under the operation instructions.
[0109] See also Figure 7 , the second embodiment of the suturing simulation method in the present invention is described below, as shown below.
[0110] 71. Obtain suture model and instrument model;
[0111] 72. Select the segmentation level and segmentation scale;
[0112] In this embodiment, the segmentation levels selected for the suture model and the instrument model include at least any one of the following: segment bounding box and joint bounding box, unit bounding box and joint bounding box, unit bounding box and capsule, unit and sub-capsule. The collision detection of these intersection levels is described below. It should be noted that there is no necessary order of detection for these intersection levels, which is only an implementation example.
[0113] 73. Collision detection between segmented bounding boxes and joint bounding boxes;
[0114] In this embodiment, the first segmentation level includes at least one segmentation level of the suture model, and the second segmentation level includes at least one joint level of the instrument model; if the current first target level is any segmentation level, and the current second target level is any joint level, then according to the first scale, multiple first bounding boxes of any segmentation level are constructed for the suture model, and according to the second scale, multiple second bounding boxes of any joint level are constructed for the instrument model, wherein any segmentation level is higher than or lower than any joint level; collision detection is performed on the first bounding box and the second bounding box to obtain a collision detection result.
[0115] In this embodiment, the segmentation level refers to the segmentation level of segmenting the suture model into multiple segments, and each segment includes multiple first units; the joint level refers to the segmentation level of segmenting the instrument model according to the component joint mechanisms. Different segmentation levels and joint levels correspond to different scale ranges. The higher the segmentation level and the higher the joint level, the smaller the scale range.
[0116] In this embodiment, the suture model is divided into multiple segments according to the first scale, and then a first bounding box is constructed for each segment, and the instrument model is divided into multiple joint parts according to the second scale, and a second bounding box is constructed for each joint part. Each first bounding box and each second bounding box are sequentially detected to see if they collide, and each pair of first bounding boxes and second bounding boxes that collide is recorded to obtain a collision detection result.
[0117] For example, Figure 8 As shown, it is the projection of the suture model 81 and the instrument model 82 on the xy-axis plane. The multiple segmentation levels of the suture model 81 include {first segmentation level, second segmentation level, ..., i-th segmentation level} from low to high. If the first scale is set according to the first segmentation level, the suture model 81 can be divided into segments of the size of segment 811, and a first bounding box 812 of a corresponding size is constructed so that the first bounding box 812 completely surrounds the segment 811. Similarly, if the first scale is set according to the first segmentation level or the i-th segmentation level, the suture model 81 can be divided into smaller segments 813 or 814, and a smaller first bounding box 815 or first bounding box 816 is constructed. Among them, if the i-th segmentation level is the smallest segmentation level, segment 814 is the smallest segment, but it is still composed of multiple first members.
[0118] As shown in the first bounding box constructed by the suture model 81, the multiple joint levels of the instrument model 82 include from low to high: {joint mechanism level, joint and rigid body level, ..., j-th rigid body segment level}. If the second scale is set corresponding to the joint mechanism level, the joint and rigid body level, or the j-th rigid body segment level, the instrument model can be divided into the sizes of the joint mechanism 821, the joint and rigid body 822, or the rigid body segment 823 from large to small; and the second bounding box 824, the second bounding box 825, or the second bounding box 826 from large to small are constructed.
[0119] The joint mechanism level refers to the level divided according to the entire joint mechanism, which includes a movable joint part and an immovable rigid body part, while the joint and rigid body level refers to the level that further divides the joint mechanism into joint parts and rigid body parts. The rigid body segment part can be divided into multiple segmentation levels according to the length.
[0120] In one embodiment, if Figure 8 As shown, if any selected segmentation level is the first segmentation level, and any selected joint level is the joint and rigid body level, multiple first bounding boxes are constructed for the suture model according to the size of the first bounding box 812, and multiple second bounding boxes are constructed for the instrument model according to the size of the second bounding box 825, and collision detection is performed on each constructed first bounding box and each second bounding box, and a collision detection result is obtained based on the collision between the first bounding box 817 and the second bounding box 817.
[0121] 74. Collision detection between unit bounding box and joint bounding box;
[0122] In this embodiment, the first segmentation level also includes a first unit level, and the first unit level is higher than any segment level and any joint level; if the re-determined first target level is the first unit level, and the re-determined second target level is any joint level, then based on the collision detection result, the segments in the suture model that collide, and the joints in the instrument model that collide are determined; the first scale of the first unit level is set as the size information of the first unit, and according to the size information of the first unit, multiple third bounding boxes of the first unit level are constructed for the segments that collide; collision detection is performed on the third bounding box and the second bounding box to which the joint that collided belongs, to obtain a new collision detection result.
[0123] In this embodiment, based on the collision detection results of each intersection level, the first bounding box and the second bounding box that collide are determined, and the collision detection of the next intersection level is performed based on the collision detection results of the first bounding box and the second bounding box that collide. Here, based on the collision detection results of the highest intersection level of the segment bounding box and the joint bounding box, the collision detection of the unit bounding box and the joint bounding box is performed.
[0124] In this embodiment, each segment previously segmented based on each segmentation level contains multiple first units, and here the suture model is segmented into a single first unit based on the first unit level. The first unit includes an elastic rod and a particle point, and the size information of the first unit includes the length and diameter of the elastic rod, and the diameter of the particle point is the diameter of the elastic rod. According to the diameter of the particle point, each first unit of the colliding segment is expanded outward by a preset distance along the normal plane of the spatial coordinates, and each normal plane is interconnected to obtain a third bounding box. Among them, the preset distance is less than or equal to half the length of the elastic rod.
[0125] For example, Fig. 9 As shown, in the segment 90 where the collision occurs, a third bounding box 93 is constructed for each particle point according to the size information of the particle point 91 and the elastic rod 92; based on the diameter of the particle point 91, the preset distance s is expanded outward along the normal direction of the -y axis, while ensuring that the preset distance s is ≤ half the length d / 2 of the elastic rod 92.
[0126] Furthermore, the size of the third bounding box can be set according to the axial distances between each two adjacent particle points, including the preset distance of each particle point extending outward, which is less than or equal to half of the maximum axial distance between each two adjacent particle points. Fig.10 As shown, if the third bounding box 101, the third bounding box 102, and the third bounding box 103 are constructed according to the condition that the preset distance is less than or equal to half the length of the elastic rod, when the maximum axial distance between the particle point 104 and the particle point 105 is equal to the length of the elastic rod, the third bounding box 101 and the third bounding box 102 will not collide; however, when the x-axial distance d1 and the y-axial distance d2 between the particle point 104 and the particle point 106 are both less than the length of the elastic rod, the third bounding box 101 and the third bounding box 103 will overlap. The preset distance is set to ≤d1 / 2 or d2 / 2, and the size shown in the third bounding box 104 is obtained, so that the third bounding boxes between each particle point will not overlap, avoiding repeated detection areas in collision detection.
[0127] 75. Collision detection between unit and capsule;
[0128] In this embodiment, the second segmentation level also includes a second unit level, and the first segmentation level also includes a third unit level, and the third unit level is higher than the first unit level and the second unit level; if the re-determined first target level is the third unit level, and the re-determined second target level is the second unit level, the second scale of the second unit level is set to the size information of the second unit, and according to the size information of the second unit, a plurality of capsules of the second unit level are constructed for the joint where the collision occurs; collision detection is performed on the first unit and the capsule in the segment where the collision occurs to obtain a new collision detection result.
[0129] In this embodiment, the second unit constituting the instrument model includes a joint mechanism and an end effector, and each plane in each joint bounding box (the second bounding box, including the bounding box of the end effector) is parallel to each spatial coordinate plane. Here, according to the axial direction of each joint of the instrument model, a capsule is constructed for each joint, which more approximately represents the joint to which it belongs, that is, the capsule can be in any direction other than the coordinate axis direction.
[0130] Specifically, when constructing the capsule body of each joint and the end effector, the capsule body is constructed along the axial direction according to the size information of each joint and the end effector, so that the capsule body just completely surrounds the entire joint and the entire end effector.
[0131] For example, Fig.11 As shown, the second unit constituting the instrument model includes an end effector 111, a joint mechanism 112, a joint mechanism 113, and a joint mechanism 114. According to the axial length and longitudinal length of the four, capsule bodies 115, 116, 117, and 118 of different sizes are constructed respectively.
[0132] In one embodiment, when constructing a capsule body for the second unit that collides, the axial center points at both ends of the end effector or joint are determined according to the posture of the end effector or joint, and the distance between the axial center points at both ends is used as the length of the capsule body. The direction of the capsule body is then determined according to the directions of the axial center points at both ends. Then, the diameter of the capsule body is determined according to the size of the end effector or joint, such as the maximum width or diameter. Based on the length, direction and radius of the capsule body, a cylindrical capsule body is constructed.
[0133] For example, Fig.12 As shown, according to the posture of one of the joints, the center point A and the center point B of the two ends of the joint on the main axis 121 are determined, and the distance between the center point A and the center point B is used as the length A'B' of the capsule. Then the direction of the capsule is determined according to the direction of the vector AB Then the size of the joint includes width h and thickness w, and the larger width h is taken as the radius h' of the capsule. and radius h', a cylindrical capsule 122 is constructed. Similarly, all capsules of the joints and / or end effectors that collide are obtained.
[0134] In one embodiment, when constructing a capsule body for the second unit that has collided, each joint and the end effector can also be used as a whole to construct the capsule body. According to the axial center points at both ends of the whole, the length and direction of the whole capsule body are determined; then the size change of the whole is detected in order from the end to the proximal end. When the size change exceeds a threshold, the capsule body is constructed in segments, and the capsule body is divided into multiple capsule bodies according to each segment.
[0135] For example, Fig.13 As shown, when the joint and the end effector are determined as a whole, the center points A and B at both ends on the axial direction 131 are used as the overall length A'B' of the capsule body, and the direction of the capsule body is determined. The maximum width h1 of the whole is taken as the diameter h1' of the capsule body; according to the overall length A'B', direction and maximum width h1, a capsule body is pre-constructed. Then the width change of the whole is detected from the end to the proximal end, wherein the width w1 and the thickness h1 are used as the starting size, and then when the width w2 and the thickness h2, and the width w3 and the thickness h3 are detected, the size change exceeds the threshold, and the width w1 is used as the diameter h1' of the first segment, the width w2 is used as the diameter h2' of the second segment, and the width w3 is used as the diameter h3' of the third segment; then the axial extension length m1 of the whole when the size (w1, h1) changes to the size (w2, h2) is used as the length m1' of the first segment, the axial extension length m2 when the size (w1, h1) changes to the size (w2, h2) is used as the length m2' of the second segment, and (A'B'-m1'-m2') is used as the length of the third segment. According to the size information of the three segments, a pre-constructed capsule body is segmented and constructed into multiple capsule bodies. At this time, the direction of the capsule body remains unchanged, but its radius, that is, the thickness of each segment of the body, will vary according to the actual diameter of the surgical instrument, wherein the terminal capsule body is also connected to the semicircular capsule ball.
[0136] In addition, if Fig.14 As shown, after the capsule body 141 is constructed, the distance d between the first unit 142 and the center line AB of the capsule body 141 is calculated. If the distance d is less than the radius r of the capsule body 141, it means that the capsule body 141 and the first unit 142 collide with each other, otherwise no collision occurs.
[0137] 76. Collision detection between unit and sub-capsule;
[0138] In this embodiment, the second segmentation level also includes a fourth unit level higher than the second unit level, and the fourth unit level is higher than the third unit level; based on the collision detection result, the first target level and the second target level are re-determined, and the next round of collision detection is performed to obtain a new collision detection result, including: if the re-determined first target level is the third unit level, and the re-determined second target level is the fourth unit level, then based on the collision detection result, it is determined that the capsule body colliding with the first unit is at the end of the instrument model; a plurality of sub-capsule bodies are constructed for the joints corresponding to the capsule body at the end; collision detection is performed on the first unit that collides with the capsule body at the end, and the plurality of sub-capsule bodies, to obtain a new collision detection result.
[0139] In this embodiment, when the capsule body that collides is at the end of the instrument model (i.e., the clamp part of the instrument model during suturing), a more detailed judgment is required. If the two parts of the clamp are separated and the suture is between the two parts of the clamp, the two parts of the clamp are generally put together as a capsule body for detection, and it is considered that the clamp and the suture have collided, but in fact, the two have not collided.
[0140] In view of the above situation, if Fig.15 As shown, the suture 151 is between the first part 152 and the second part 153 of the clamp. At this time, the clamp is divided into the first part 152 and the second part 153, and the sub-capsule body 154 and the sub-capsule body 155 are constructed respectively. Then, the particle points in the suture 151 that collide with the original capsule body of the clamp are used to perform collision detection on the sub-capsule body 154 and the sub-capsule body 155 respectively.
[0141] In this embodiment, if the capsule body that has collided with the first unit before includes the capsule body at the end of the instrument model, the collision detection of "unit and sub-capsule body" belongs to the highest cross-level collision detection, and whether the suture line and the instrument have collided is finally determined based on the collision detection of the unit and the sub-capsule body. If the capsule body that has collided with the first unit before does not include the capsule body at the end of the instrument model, the collision detection of "unit and capsule body" belongs to the highest cross-level collision detection.
[0142] In addition, based on the collision detection result, the first target level and the second target level are redetermined, and the next round of collision detection is performed to obtain a new collision detection result, including: based on the collision detection result, determining the first collision part of the suture model and the second collision part of the instrument model; based on the local posture of the first collision part and the second collision part, the lower segmentation level in the current first target level and the second target level is increased by at least two levels, and the higher segmentation level in the current first target level and the second target level is kept unchanged at least, to obtain a redetermined first target level and the second target level; performing collision detection of the first collision part and the second collision part according to the next intersection level to obtain a new collision detection result.
[0143] In a preferred embodiment, if Fig.16 As shown, the segmentation level of the suture model includes 5 segmentation levels and 2 unit levels from low to high, wherein unit level 1 can be the aforementioned first unit level, and unit level 2 can be the third unit level. The segmentation level of the instrument model includes 5 joint levels and 3 unit levels from low to high, wherein unit level 3 can be the aforementioned second unit level, unit level 5 can be the aforementioned fourth unit level, and unit level 4 can be further segmented according to the length of each second unit on the basis of unit level 3, and a capsule body is constructed for the segmentation result of each second unit.
[0144] The multiple cross-levels for collision detection of the suture model and the instrument model may include, in sequence: cross-level 161, cross-level 162, cross-level 163, and cross-level 164; the lower the cross-level, the rougher the collision detection, and vice versa, the finer it is. Therefore, after the collision detection of the lower cross-level 161 is completed, more segmentation levels can be skipped to perform the collision detection of the next cross-level 162, such as the first target level in the cross-level 162 skips 2 segmentation levels, and the second target level skips 4 segmentation levels to speed up the detection. After the collision detection of the higher cross-level 163 is completed, the first target level remains unchanged, and the second target level skips two segmentation levels to improve the detection accuracy. Preferably, the first target level and the second target level in the cross-level differ by one segmentation level.
[0145] 77. Output collision detection results;
[0146] 78.Show sutures and instruments.
[0147] In this embodiment, several cross-level collision detections are illustrated above. The present invention includes but is not limited to the aforementioned collision detections at the cross-detection levels, such as the segment level, the second unit level, and the fourth unit level. It is only necessary to follow the two principles of alternating the cross-level and the first target level and the second target level of the two cross-levels, which will not be repeated here. Finally, based on the collision detection of "unit and sub-capsule" or "unit and capsule", the collision detection result is output, and the model parameters of the suture model and the instrument model are corrected with different constraints under different collision types to correctly display the suture and the instrument.
[0148] In another embodiment, after each execution of the cross-level collision detection, a collision detection at the same level can also be performed, including redetermining the first target level and the second target level based on the collision detection result, wherein the redetermined first target level and the second target level are both the same as the current first target level, or are both currently the same as the second target level; based on the first target level and the second target level of the same level, performing the next round of collision detection on the suture model and the instrument model to obtain a new collision detection result.
[0149] In another embodiment, after each execution of the cross-level collision detection, the exit condition preset for the collision detection result includes: when the collision detection result is a collision, the current cross-level includes the lowest segmentation level among the multiple first segmentation levels and the lowest segmentation level among the second segmentation levels; and, the suture model and the instrument model do not collide at any cross-level.
[0150] See also Fig.17 , the third embodiment of the suturing simulation method in the present invention is described below, as shown below.
[0151] 171. Obtain a suture model and an instrument model;
[0152] 172. Tilt detection;
[0153] In this embodiment, according to the positions of the suture model and the instrument model, a first tilt degree of the suture model, a second tilt degree of the instrument model, and a relative tilt degree between the suture model and the instrument model are determined.
[0154] In this embodiment, the position includes the position and direction of the suture model and the instrument model under the three-dimensional spatial coordinates. The first degree of inclination refers to the degree of inclination of the suture model relative to the three-dimensional spatial coordinate axis, and the second degree of inclination refers to the degree of inclination of the instrument model relative to the three-dimensional spatial coordinate axis; the relative inclination of the suture model and the instrument model can be expressed as: the range of angles in which one party is relative to the other party.
[0155] Specifically, when determining the degree of inclination (including the first degree of inclination and the second degree of inclination) according to the posture, the main axes of the suture model and the instrument model can be determined first, and then the angles of the main axes relative to the positive directions of the three coordinate axes are calculated, and then the degree of inclination is determined according to the maximum angle.
[0156] Among them, when the included angle is within the first range {(0, 45°), (90°, 135°)}, the larger the angle, the greater the degree of inclination; when the included angle is within the second range {(45°, 90°)(135°, 180°)}, the larger the angle, the smaller the degree of inclination; when the included angle is 45° or 135°, the degree of inclination is the largest; when the included angle is 0°, 90° or 180°, the degree of inclination is the smallest. That is, the smaller the inclination degree is, the smaller the angle decreases from 45° to 0° and increases to 90°; the smaller the inclination degree is, the smaller the inclination degree is, the smaller the inclination degree is, the smaller the inclination degree is, the smaller the inclination degree is, the smaller the inclination degree is.
[0157] Specifically, when determining the relative inclination degree based on the position, the projection angles on the three coordinate planes can be calculated by calculating the main axis of the suture model and the instrument model; a line parallel to each two coordinate axes is constructed on the suture model or instrument model. If the projection angle is in the range of angles between the two coordinate axes, it is determined as the first relative inclination degree. If the projection angle is in the range of angles between one of the coordinate axes and the model, it is determined as the second relative inclination degree.
[0158] 173. Select the segmentation level;
[0159] In this embodiment, based on the first tilt degree, the second tilt degree and the relative tilt degree, a first target level is selected from the plurality of first segmentation levels, and a second target level is selected from the plurality of second segmentation levels.
[0160] In this embodiment, when the tilt degree is greater, when constructing a bounding box for the suture model and the instrument model, the model area ratio contained in the bounding box is smaller, the non-model area ratio is larger, and the accuracy is lower when performing collision detection. Therefore, the greater the first tilt degree, the greater the first target level selected, and the greater the second tilt degree, the greater the second target level selected.
[0161] Specifically, the mapping of the preset angle range to each first segmentation level, and the mapping of the preset angle range to each second segmentation level, determine the first segmentation level and the second segmentation level of the mapping according to the angle range to which the second inclination degree of the detected first inclination degree belongs, and select the first segmentation level and the second segmentation level of the mapping as the first target level and the second target level.
[0162] Furthermore, the first segmentation level includes multiple segmentation levels and multiple unit levels, and the second segmentation level includes multiple joint levels and multiple unit levels. When the suture model or the instrument model is parallel to any coordinate axis, the degree of inclination is minimal. The highest level of segmentation level can be selected as the first target level, or the highest level of joint level can be selected as the second target level, or the lowest level of unit level can be selected as the first target level or the second target level.
[0163] For example, Fig.18 As shown, it is the local projection of the suture model and the instrument model on the xy coordinate plane. The angles between the suture model 181, the suture model 182, and the suture model 183 and the x-axis are less than 45°, equal to 45°, and equal to 45°, respectively; it means that the inclination of the suture model 182 and the suture model 183 is greater than that of the suture model 181, and the shortest distance between the three and the instrument model 184 with the same inclination is d (the actual collision result is that no collision occurs); the segmentation level M1 of the suture model 181 and the suture model 182 is greater than the segmentation level M2 of the suture model 183.
[0164] Among them, when the inclination of the suture model 181 is small, after the bounding box 185 is constructed using the larger segmentation level M1, it will not collide with the instrument model 184, which is the same as the actual collision result; when the inclination of the suture model 182 is large, after the bounding box 186 is constructed using the larger segmentation level M1, it will collide with the instrument model 184, which is different from the actual collision result; and the inclination of the suture model 183 is the same as that of the suture model 182, and after the bounding box 187 is constructed using the smaller segmentation level M2, it will not collide with the instrument model 184. The relationship between the inclination of the suture model and the segmentation level is also the same. That is, the relationship between the inclination and the segmentation level is that the greater the inclination, the lower the selected segmentation level, and the higher the detection accuracy of the collision detection.
[0165] In one embodiment, if Fig.19As shown, it is the local projection of the suture model and the instrument model on the xy coordinate plane. The suture model 191 and the instrument model 192, the suture model 193 and the instrument model 194, the suture model 195 and the instrument model 196, and the suture model 197 and the instrument model 198 are all in a state of being parallel to each other, and the distance between them is d.
[0166] Among them, when the suture model 191 and the instrument model 192 are both parallel to the X-axis, the inclination of the two is the lowest. At this time, dividing the two by any length can make the bounding box collision detection results of the two closer to the actual collision detection results; therefore, the segment level with the highest segmentation level can be selected as the first target level, and the highest joint level can be selected as the second target level.
[0167] Among them, the angles of the instrument model 194, the instrument model 196, and the instrument model 198 relative to the x-axis are: a<b<c, indicating that the inclination of the three gradually increases. At this time, the maximum scales m1, m2, and m3 can be set for the three, so that the bounding box collision detection results of the two are closer to the actual collision detection results, and m1>m2>m3; it can be seen that as the inclination of the instrument model gradually increases, a higher segmentation level can be selected as the second target level. Similarly, as the inclination of the suture model 193, the suture model 195, and the suture model 196 gradually increases, the maximum scale that can be set for the three is: m1>m2>m3, and a higher segmentation level is selected as the first target level.
[0168] Furthermore, before determining the first target level according to the first inclination degree and determining the second target level according to the second inclination degree, a preliminary preset segmentation level can be determined based on the relative inclination degree; wherein, if the suture line model and the instrument model are at the aforementioned first relative inclination degree, the preliminary preset segmentation level is set to the highest segmentation level and joint level; if the suture line model and the instrument model are at the second relative inclination degree, the preliminary preset segmentation level is set to the lowest segmentation level and joint level.
[0169] For example, Fig. 20 As shown, a line parallel to the x-axis and the y-axis is determined at any surface position of the instrument model 201 or the instrument model 202, and an angle region 203, an angle region 204, or an angle region 205, an angle region 206 of the two parallel lines are determined; when the angle between the suture model and the instrument model 201 or the instrument model 202 is in any of the aforementioned four angle regions, the initial preset segmentation level of the suture model is set to the highest segmentation level. In this case, the initial preset segmentation level of the instrument model 201 or the instrument model 202 is set to the lowest segmentation level.
[0170] 174. Determine curvature and bending shape;
[0171] In this embodiment, determining the first inclination degree of the suture model, the second inclination degree of the instrument model, and the relative inclination degree between the suture model and the instrument model according to the postures of the suture model and the instrument model includes: determining the curvature of the suture model and the bending shape of the instrument model according to the postures of the suture model and the instrument model; determining the first inclination degree of the suture model and at least one first axis according to the curvature; determining the second inclination degree of the instrument model and at least one second axis according to the bending shape; and determining the relative inclination degree of the suture model and the instrument model based on the angle between the first axis and the second axis.
[0172] 175. Select the segmentation scale;
[0173] In this embodiment, the first scale of the first target level is set according to the change of the curvature or the preset number of the first units; the second scale of the second target level is set according to the change of the bending shape or the preset length of the second unit.
[0174] In this embodiment, the curvature refers to the bending of the shape of the suture model on the first unit. According to the order from the end to the proximal end of the suture model, the cumulative curvature change of the suture model on the adjacent first units, or the cumulative curvature change on the adjacent first units at a preset interval, is determined to obtain the curvature change; according to the magnitude of the cumulative curvature change, the first scale is determined from the size range of the first target level. The greater the cumulative curvature change, the smaller the determined first scale, and the smaller the cumulative curvature change, the larger the determined first scale.
[0175] In this embodiment, the bending shape refers to the bending angle of each joint of the instrument model and the opening and closing angle of the clamp at the end; the cumulative bending angle of each joint and clamp is counted, and the second scale is determined from the scale range of the second target level according to the size of the cumulative bending angle, wherein the cumulative bending angle only calculates the bending angle away from the main axis of the instrument model, and the larger the cumulative bending angle, the smaller the second scale, and the smaller the cumulative bending angle, the larger the second scale.
[0176] In one embodiment, each first segmentation level corresponds to a preset number of first units. After the first target level is selected, the corresponding preset number of first units can be directly set as the first scale; at the same time, each second segmentation level corresponds to a preset length of a second unit. After the second target level is selected, the preset length can also be set as the second scale.
[0177] In one embodiment, if Fig.21 As shown, the suture line model 211 is in a straight line shape, and the cumulative curvature change is substantially 0, that is, the cumulative curvature change is small. At this time, a larger second scale L1 can be selected to construct multiple bounding boxes 212, and there will be no collision with the bounding box 214 of the instrument model 213.
[0178] In one embodiment, if Fig. 22 As shown, the suture line model 221 is circular, and the cumulative curvature changes greatly. At this time, a smaller second scale L2 can be selected to construct multiple bounding boxes 222, which will not collide with the bounding box 224 of the instrument model 223.
[0179] 176. Perform collision detection at the intersection level;
[0180] 177. Output collision detection results;
[0181] 178.Show sutures and instruments.
[0182] See also Fig.23 , the fourth embodiment of the suturing simulation method in the present invention is described below, as shown below.
[0183] 231. Determine the collision detection result;
[0184] In this embodiment, if the target collision detection result is no collision, the suture state of the suture line model and the device model is determined to be a non-collision state. At this time, the suture line is not subjected to any force from the device model, and the model parameters only need to be calculated based on its own motion constraints.
[0185] 232. Determine the inside-outside relationship between the first unit and the second unit;
[0186] In this embodiment, there are many interactions between the end effector (clamp) and the suture, such as clamping, winding, movement, and miscontact. Among them, clamping occurs inside the clamp, winding occurs outside the clamp, and movement or misoperation may occur inside or outside the clamp. Therefore, it is necessary to locate the relationship between the particle points of the suture and the inside and outside of the clamp. This is to facilitate the correct collision response when the particle points of the suture enter between the inner and outer surfaces of the clamp to prevent the occurrence of mold penetration.
[0187] In this embodiment, if the target collision detection result is a collision, first unit information and second unit information of a preset number of historical frames are obtained; and based on the first unit information and the second unit information, the inner and outer side relationship of the first unit relative to the second unit is detected.
[0188] Specifically, the first unit of the suture model includes a particle point and an elastic rod, and the second unit of the instrument model includes a clamp, and the clamp includes inner surface triangular facets of two parts of the clamp and outer surface triangular facets on both sides of the two parts of the clamp. The inner surface triangular facets and / or the outer surface triangular facets are detected to see whether they collide with the particle point or the elastic rod, and the inner and outer side relationship of the first unit and the second unit is determined, so as to calculate the model parameters of the particle points of the suture model and perform accurate collision response.
[0189] 233. Determine the suture status;
[0190] In this embodiment, if the first unit is located on the inner side of the second unit, the suturing state of the suture model and the instrument model is determined to be a clamping state; if the first unit is located on the outer side of the second unit, the suturing state of the suture model and the instrument model is determined to be a entangled state.
[0191] For example, Fig.24 As shown, the suture 241 is located inside the clamp 242 of the device, and the clamp 242 is in a clamping state for the suture 241. Fig.25 As shown, the suture 251 is outside the clamp 252 of the instrument, and the clamp 252 operates on the suture 251 in a winding state.
[0192] 234. First iteration calculation;
[0193] In this embodiment, if the stitching state is a non-collision state, a position dynamics (PBD) calculation is performed on the preset stitching line self constraint according to a preset first iteration method to obtain the first model parameters of the stitching line model.
[0194] Specifically, at this time, since the particle points of the suture model only contain self-constraints and no other types of constraints are superimposed, it will not affect the position dynamics calculation of the particle points, making the model parameters inaccurate. Therefore, a faster first iteration method such as the Gauss-Seidel iteration method can be used to calculate the model parameters of each particle point of the suture model.
[0195] 235. Second iteration calculation;
[0196] In this embodiment, if the suture state is a clamping state or a winding state, a position dynamics calculation is performed on the preset suture line self constraint and the preset suture line collision constraint according to a preset second iteration method to obtain the second model parameters of the suture line model.
[0197] Specifically, at this time, since the particle point includes self-constraints and collision constraints under the force of the instrument model, if the first iteration method such as the Gauss-Seidel iteration method is used, the self-constraints and collision constraints will be superimposed to perform position dynamics calculations, resulting in incorrect superposition of the model parameters of the particle point, causing the suture model to flip when rendered. Therefore, the second iteration method such as the Jacobi iteration method can be used to calculate the model parameters of each particle point in a parallel weighted manner without superimposing the self-constraints and collision constraints, so that the parameters are more accurate.
[0198] In addition, if the current operation of the clamp is clamping, or other operations make the suture line on the inner surface of the clamp, then the particle points of the suture line need to be constrained to the inner surface of the clamp, and after adding collision constraints, the particle points are moved to the inside of the inner surface of the clamp. If the current operation of the clamp is winding, or other operations make the suture line on the outer surface of the clamp, then the particle points of the suture line need to be constrained to the outer surface of the clamp, and after adding collision constraints, the particle points are moved to both sides of the outer surface of the clamp.
[0199] In one embodiment, for particle points that collide, in order to avoid penetration caused by multiple superposition responses of self-constraints and collision constraints, the model parameters are calculated by Jacobi iteration. That is, the self-constraint △p1 of the suture and the collision constraint △p2 between the suture and the instrument are weighted and then responded, that is: △p=α1*△p1+α2*△p2; where α1, α2 are weighting coefficients, 0<α1, α2, and α1+α2=1.
[0200] In addition, for particle points, collision constraints under other forces can also be considered, such as adding the self-collision response △p3 of the suture line itself, that is: △p=α1*△p1+α2*△p2+α3*△p3, where α3 is also a weighting coefficient, and 0<α3, α1+α2+α3=1.
[0201] For example, different weighting coefficients can be set according to the degree of penetration. If the penetration depth of the collision between the suture and the instrument is deep, α2 can be set larger, such as 0.9. If the penetration depth of the suture self-collision is deep, α3 can be set larger, such as 0.9. Based on the above settings, the interactive penetration phenomenon between the suture model and the instrument model, and between the suture models themselves is avoided.
[0202] Finally, the motion parameters calculated according to the self-constraint and the motion parameters calculated according to the collision constraint are weighted to obtain the motion parameters of the particle point calculated finally as the first model parameters of the suture model.
[0203] In this embodiment, according to the preset first iteration method or the second iteration method, the position dynamics calculation is performed on the instrument's own constraints to obtain the third model parameters of the instrument model. Since the second unit of the instrument model is a rigid structure, it will not deform when the suture line collides, so there is no need to superimpose additional collision constraints. The third model parameters of the suture line model can be calculated by selecting the first iteration method or the second tracing method.
[0204] 236. Display sutures and instruments.
[0205] In this embodiment, sutures and instruments are displayed according to the first model parameters and the third model parameters, or the second model parameters and the third model parameters.
[0206] It should be noted that other sorting schemes that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should also be within the protection scope of the present invention and will not be described in detail here.
[0207] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the mobile terminal can be divided into different functional units or modules to complete all or part of the functions described above. The functional modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the modules in the above-mentioned mobile terminal can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0208] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0209] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0210] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0211] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0212] As used in the specification of this application and the appended claims, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if the described condition or event is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce the described condition or event is detected" or "in response to detecting the described condition or event" depending on the context.
[0213] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0214] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0215] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0216] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0217] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0218] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0219] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0220] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A suture simulation method, characterized in that: The method comprises: Acquire a suture model and an instrument model, wherein the suture model is composed of first units, the instrument model is composed of second units, the suture model is set with a plurality of first segmentation levels according to the first units, and the instrument model is set with a plurality of second segmentation levels according to the second units; Determining a first target level from the plurality of first segmentation levels and a second target level from the plurality of second segmentation levels according to the positions of the suture model and the instrument model, setting a first scale of the first target level and setting a second scale of the second target level, wherein the first target level and the second target level are different; Based on the first scale and the second scale, performing collision detection on the suture model and the instrument model at the current first target level and the second target level to obtain a collision detection result; If the collision detection result does not meet the preset condition, then based on the collision detection result, the first target level and the second target level are re-determined, and the next round of collision detection is performed to obtain a new collision detection result, until there is a target collision detection result that meets the preset condition, then the collision detection of the suture model and the instrument model is stopped; In two adjacent rounds of collision detection, the re-determined high-low relationship between the first target level and the second target level is different from the current high-low relationship between the first target level and the second target level; Based on the target collision detection result and the position and posture, the suturing state of the suture line model and the instrument model is determined, and based on the suturing state, the suture line and the instrument are displayed.
2. The method according to claim 1, characterized in that The first segmentation level includes at least one segmentation level of the suture model, and the second segmentation level includes at least one joint level of the instrument model; The performing collision detection on the suture model and the instrument model at the current first target level and the second target level based on the first scale and the second scale to obtain the collision detection result includes: If the current first target level is any segmentation level and the current second target level is any joint level, then according to the first scale, a plurality of first bounding boxes of the any segmentation level are constructed for the suture model, and according to the second scale, a plurality of second bounding boxes of the any joint level are constructed for the instrument model; A collision detection is performed on the first bounding box and the second bounding box to obtain a collision detection result.
3. The method according to claim 2, characterized in that The first segmentation level also includes a first unit level, the first unit level being higher than any one of the segmentation levels and any one of the joint levels; The re-determining the first target level and the second target level based on the collision detection result and performing the next round of collision detection includes: If the re-determined first target level is the first unit level, and the re-determined second target level is any one of the joint levels, then based on the collision detection result, determining the segments in the suture model where the collision occurs, and the joints in the instrument model where the collision occurs; Setting the first scale of the first unit level as the size information of the first unit, and constructing a plurality of third bounding boxes of the first unit level for the colliding segments according to the size information of the first unit; A collision detection is performed on the third bounding box and the second bounding box to which the colliding joint belongs to, to obtain a new collision detection result.
4. The method according to claim 3, characterized in that The second segmentation level further includes a second unit level, the first segmentation level further includes a third unit level, and the third unit level is higher than the first unit level and the second unit level; The re-determining the first target level and the second target level based on the collision detection result and performing the next round of collision detection includes: If the re-determined first target level is the third unit level and the re-determined second target level is the second unit level, setting the second scale of the second unit level as the size information of the second unit, and constructing a plurality of capsules of the second unit level for the colliding joint according to the size information of the second unit; A collision detection is performed on the first unit in the colliding segment and the capsule to obtain a new collision detection result.
5. The method according to claim 4, characterized in that The second segmentation level further includes a fourth unit level higher than the second unit level, and the fourth unit level is higher than the third unit level; The re-determining the first target level and the second target level based on the collision detection result and performing the next round of collision detection includes: If the re-determined first target level is the third unit level and the re-determined second target level is the fourth unit level, then based on the collision detection result, it is determined that the capsule body that collides with the first unit is at the end of the instrument model; Constructing a plurality of sub-capsules for the joints corresponding to the capsules at the end; A collision detection is performed on the first unit that collides with the capsule body at the end and the plurality of sub-capsules to obtain a new collision detection result.
6. The method according to any one of claims 1 to 5, characterized in that The re-determining the first target level and the second target level based on the collision detection result, and performing the next round of collision detection to obtain a new collision detection result includes: Based on the collision detection result, re-determine the first target level and the second target level, wherein the re-determined first target level and the second target level are both the same as the current first target level, or are both currently the same as the second target level; Based on the re-determined first target level and second target level, a next round of collision detection is performed on the suture model and the instrument model to obtain a new collision detection result.
7. The method according to any one of claims 1 to 5, characterized in that The preset conditions include: When the collision detection result is a collision, the current first target level is the lowest segmentation level among the plurality of first segmentation levels, and the current second target level is the lowest segmentation level among the second segmentation levels; and The suture model and the instrument model do not collide at any of the first target level and the second target level.
8. The method according to claim 1, characterized in that The determining the suturing state of the suture line model and the instrument model based on the target collision detection result and the position and posture includes: If the target collision detection result is that no collision occurs, determining that the suture state of the suture line model and the instrument model is a non-collision state; If the target collision detection result is a collision, obtaining first unit information and second unit information of a preset number of historical frames; Detecting an inside-outside relationship of the first unit relative to the second unit according to the first unit information and the second unit information; If the first unit is located inside the second unit, determining that the suturing state of the suture model and the instrument model is a clamping state; If the first unit is located outside the second unit, it is determined that the suturing state of the suture model and the instrument model is a tangled state.
9. The method according to claim 8, characterized in that Based on the suturing state, displaying the suture line and the instrument comprises: If the suture state is a non-collision state, performing position dynamics calculation on the preset suture line self constraint according to a preset first iteration method to obtain a first model parameter of the suture line model; If the suture state is a clamping state or a winding state, a position dynamics calculation is performed on a preset suture line self constraint and a preset suture line collision constraint according to a preset second iteration method to obtain a second model parameter of the suture line model; According to the preset first iteration method or the second iteration method, performing position dynamics calculation on the instrument's own constraints to obtain third model parameters of the instrument model; Sutures and instruments are displayed based on the first model parameters and the third model parameters, or the second model parameters and the third model parameters.
10. The method according to claim 1, characterized in that The re-determining the first target level and the second target level and performing the next round of collision detection includes: Based on the collision detection result, determining a first collision portion of the suture model and a second collision portion of the instrument model; Based on the local positions of the first collision part and the second collision part, the lower segmentation level of the current first target level and the second target level is increased by at least two levels, and the higher segmentation level of the current first target level and the second target level is kept at least unchanged, so as to obtain a re-determined first target level and the second target level; The collision detection of the first collision part and the second collision part is performed according to the re-determined first target level and the second target level to obtain a new collision detection result.
11. The method according to claim 1, characterized in that: Determining a first target level from the plurality of first segmentation levels and determining a second target level from the plurality of second segmentation levels according to the positions of the suture model and the instrument model comprises: Determining, according to the positions of the suture line model and the instrument model, a first tilt degree of the suture line model, a second tilt degree of the instrument model, and a relative tilt degree of the suture line model and the instrument model; Based on the first tilt degree, the second tilt degree and the relative tilt degree, a first target level is selected from the plurality of first segmentation levels, and a second target level is selected from the plurality of second segmentation levels.
12. The method according to claim 11, characterized in that The determining, according to the positions of the suture line model and the instrument model, a first tilt degree of the suture line model, a second tilt degree of the instrument model, and a relative tilt degree of the suture line model and the instrument model comprises: Determining the curvature of the suture line model and the bending shape of the instrument model according to the positions of the suture line model and the instrument model; Determining a first inclination degree and at least one first axis of the suture line model according to the curvature; Determining a second inclination degree and at least one second axis of the instrument model according to the bending shape; Based on the angle between the first axis and the second axis, the relative inclination degree of the suture model and the instrument model is determined.
13. The method according to claim 12, characterized in that The step of setting a first scale for the first target level and setting a second scale for the second target level comprises: Setting a first scale of the first target level according to a change in the curvature or a preset number of the first units; A second scale of the second target level is set according to a change in the bending shape or a preset length of the second unit.
14. A surgical simulator, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores computer program instructions, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the suture simulation method according to any one of claims 1 to 13.
15. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the suture simulation method according to claims 1-13 are implemented.