Source skin distance search method and device and computer equipment
By constructing a voxel grid and beam emitter model, and performing interpolation calculations and step distance adjustments based on the symbolic distance field, the problems of insufficient source-skin distance search efficiency and accuracy were solved, thus improving the effectiveness of the neutron beam.
Patent Information
- Application Number
- CN202611674943.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-28
- Publication Date
- 2026-11-27
AI Technical Summary
In boron neutron capture therapy, existing technologies cannot simultaneously achieve both efficiency and accuracy in source-skin distance searching, resulting in significant attenuation and scattering of the neutron beam in the air, and insufficient effective neutron flux to the target area.
By constructing a voxel grid and a beamformer model, interpolation calculations are performed based on the symbolic distance field. The step distance is filtered, and the position of the beamformer model is adjusted to search for the minimum source-skin distance. The first-order Lipschitz feature of the symbolic distance field is used to ensure the accuracy of the search.
It improves the efficiency and accuracy of source-to-skin distance search, ensures the neutron fluence obtained in the target area, and reduces the attenuation and scattering of the neutron beam in the air.
Smart Images

Figure CN123167430A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical device technology, and in particular to a source-skin distance search method, apparatus and computer equipment. Background Technology
[0002] In boron neutron capture therapy (BNCT), a neutron beam, shaped by a beam emitter, is directed towards the target area of the organism. The neutrons entering the target area undergo nuclear reactions with boron, releasing α particles. 7 Li particles. These particles have a range comparable to the diameter of tumor cells, enabling precise elimination of tumor cells.
[0003] Source-to-skin distance (SSD) refers to the distance between the beam emitter and the surface of an obstacle along the beam direction. The obstacle includes the organism and objects surrounding it (such as the treatment bed or head immobilization device). Assuming no collision between the beam emitter and the obstacle, a smaller SSD results in less attenuation and scattering of the neutron beam in the air, leading to a higher effective neutron fluence in the target area. In actual treatment, it is necessary to quickly search for the optimal SSD within a specified beam direction or range. However, in some techniques, the search for SSD cannot simultaneously achieve both efficiency and accuracy; that is, a high search efficiency may not be optimal for the SSD, and vice versa. Summary of the Invention
[0004] This application provides a source-skin distance search method, a source-skin distance search device, a computer device, and a readable storage medium, which can improve the search efficiency and accuracy of source-skin distance.
[0005] To achieve the above objectives, the main technical solutions adopted in this application include: In a first aspect, embodiments of this application provide a source-skin distance search method, the method comprising: Based on image data of obstacles and the space around obstacles, a voxel mesh is constructed, and based on beamer parameters, a beamer model is constructed. Based on the voxels in the voxel mesh, an obstacle simulation surface and a symbolic distance field are determined, wherein the symbolic distance field uses the symbolic distance of the voxel vertex relative to the obstacle simulation surface as a known quantity; Sampling points are extracted from the beamform model, and interpolation calculations are performed in the symbolic distance field based on the coordinates of the sampling points to obtain the symbolic distance of the sampling points relative to the obstacle simulation surface; The step distance is filtered from the symbolic distance of the sampling points, and the position of the beam emitter model is adjusted according to the step distance to search for the minimum source-to-skin distance between the beam emitter model and the obstacle simulation surface. The step distance is the maximum penetration distance or minimum interval distance of the sampling point relative to the obstacle simulation surface.
[0006] Secondly, embodiments of this application provide a source-skin distance searching device, the device comprising: The mesh building module is used to build voxel meshes based on image data of obstacles and the space around the obstacles, and to build beamformer models based on beamformer parameters. A voxel processing module is used to determine an obstacle simulation surface and a symbolic distance field based on the voxels in the voxel mesh, wherein the symbolic distance field uses the symbolic distance of the voxel vertex relative to the obstacle simulation surface as a known quantity; The model sampling module is used to extract sampling points from the beam emitter model and perform interpolation calculations in the symbol distance field based on the coordinates of the sampling points to obtain the symbol distance of the sampling points relative to the obstacle simulation surface. The model position adjustment module is used to filter step distances from the symbolic distances of sampling points and adjust the position of the beam emitter model according to the step distances to search for the minimum source-to-skin distance between the beam emitter model and the obstacle simulation surface. The step distance is the maximum penetration distance or minimum interval distance of the sampling point relative to the obstacle simulation surface.
[0007] Thirdly, embodiments of this application provide a computer device, including: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the source-skin distance search method as described above.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer instructions that cause a computer to perform the source-skin distance search method as described in any of the preceding claims.
[0009] In some embodiments of this application, on the one hand, obstacle simulation surfaces and symbolic distance fields are determined based on voxels in a voxel mesh, where the symbolic distance field uses the symbolic distance of voxel vertices relative to the obstacle simulation surfaces as a known quantity. Thus, after extracting sampling points from the beamformer model, interpolation calculations can be performed in the symbolic distance field based on the sampling point coordinates to obtain the symbolic distance of the sampling points relative to the obstacle simulation surfaces. The interpolation calculation is fast, significantly improving the search efficiency for source-skin distance. On the other hand, the step distance is the maximum penetration distance or minimum gap distance of the sampling point relative to the obstacle simulation surfaces. This allows invalid step distances to be ignored, improving the search efficiency for source-skin distance. Simultaneously, based on the first-order Lipschitz feature of the symbolic distance field, using the maximum penetration distance or minimum gap distance of the sampling points as the step distance ensures that the search for the minimum source-skin distance will not exceed the optimal solution, thereby guaranteeing the accuracy of the minimum source-skin distance. In summary, the technical solutions of this application can improve the search efficiency and accuracy of source-skin distance. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0011] Figure 1 A schematic flowchart of the source-skin distance search method provided for some embodiments of this application; Figure 2 Two-dimensional schematic diagrams of voxel meshes and beamformer models provided for some embodiments of this application; Figure 3 A schematic diagram illustrating the search for the minimum source-skin distance based on the maximum penetration distance, provided for some embodiments of this application; Figure 4 A schematic diagram showing the relationship between symbol distance, maximum penetration distance, and source-to-skin distance for some embodiments of this application; Figure 5 A schematic diagram of the model coordinate system provided for some embodiments of this application; Figure 6 A schematic diagram of a voxel mesh provided for some embodiments of this application; Figure 7 To Figure 6 A schematic diagram of the voxel grid after expanding the spatial voxels; Figure 8 Comparison charts of coarse search and fine correction provided for some embodiments of this application; Figure 9Schematic diagram of a source-skin distance search device provided for some embodiments of this application; Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0013] Currently, when searching for the optimal source-to-skin distance (STO) within a specified beam direction or range, some techniques move the beam in small, fixed steps, achieving high accuracy but low efficiency. Other techniques move the beam in larger, fixed steps, achieving higher efficiency but prone to skipping the optimal STO or colliding with obstacles. Still other techniques introduce a large safety margin to prevent collisions. This safety margin, also known as buffer geometry, refers to a virtual geometric shell of a certain thickness added to the beam model. If this virtual geometric shell collides with an obstacle, the beam movement towards the obstacle is stopped. These techniques often result in excessively large and inaccurate STOs, reducing the neutron fluence in the target area. In addition, in at least some of the above-mentioned technologies, when searching for the optimal source-skin distance within a specified beam direction range, multiple candidate beam directions are usually divided within the beam direction range, and the search is performed sequentially in these multiple candidate beam directions. That is, after the search in one candidate beam direction is completed, the search is then performed in another candidate beam direction, which greatly reduces the search efficiency.
[0014] Therefore, this application provides a source-to-skin distance search method, which can improve the search efficiency and accuracy of source-to-skin distance. The source-to-skin distance search method can be applied to electronic devices. Electronic devices may include, but are not limited to, tablet computers, desktop computers, laptop computers, servers, etc. (See also...) Figure 1 This is a flowchart illustrating the source-skin distance search method provided in some embodiments of this application. Figure 1 In this study, the source-skin distance search method includes the following steps: Step S101: Based on the image data of the obstacle and the space around the obstacle, construct a voxel mesh, and based on the beamer parameters, construct a beamer model.
[0015] Specifically, based on image data of obstacles and the space around them, a three-dimensional model of the obstacles and the space around them can be constructed. Obstacles can include organisms and objects around them (such as treatment beds or head immobilization devices). The interior of the organism can include the target area.
[0016] Dividing the above 3D model into multiple voxels yields a voxel mesh. A voxel is the smallest discrete unit of a 3D model. The beamformer model constructed based on beamformer parameters can reside within the voxel mesh. Beamformer parameters may include, but are not limited to, the beamformer's external dimensions and exit position.
[0017] For ease of understanding, please refer to the following: Figure 2 This is a two-dimensional schematic diagram of a voxel mesh and beamformer model provided for some embodiments of this application. Figure 2 In the diagram, region 21 represents the obstacle model, and region 22 represents the surrounding space model of the obstacle. Each small square represents a voxel. Voxels can be divided into obstacle voxels and space voxels. If the center of a voxel is located within the obstacle model (e.g., ...), ... Figure 2 If a voxel is a, d, then the voxel is an obstacle voxel; if the center point of a voxel is located within the surrounding space model (e.g., voxels a and d), then the voxel is an obstacle voxel; Figure 2 If voxels b and c are found in a voxel matrix, then that voxel is a spatial voxel. Each voxel has a voxel mask. The voxel mask is used to characterize the voxel category. For example, if the voxel mask of voxels a and d is 1, it indicates that the voxels are obstacle voxels; if the voxel mask of voxels b and c is 0, it indicates that the voxels are spatial voxels.
[0018] The beam emitter model can be located in a voxel mesh. For example... Figure 2 In the model within region 23, the beamformer model can be represented. The beamformer model overlaps with a portion of the spatial voxels. It is understood that the beamformer model can also overlap with at least a portion of the obstacle voxels. When the beamformer model overlaps with obstacle voxels, it represents a collision between the beamformer model and the obstacle model.
[0019] Inside the obstacle model, there may be a target region A. The direction from the exit B of the beam emitter model to the target region A can be called the beam direction. The beam emitter model, along the beam direction, directs the shaped simulated neutron beam into the target region A.
[0020] Step S102: Based on the voxels in the voxel mesh, determine the obstacle simulation surface and the symbolic distance field. The symbolic distance field uses the symbolic distance of the voxel vertex relative to the obstacle simulation surface as a known quantity.
[0021] Obstacle simulation surfaces are used to simulate the surfaces of obstacles. Specifically, each voxel in the voxel mesh has 8 vertices. If some vertices of a voxel are located inside the obstacle model, and some vertices are located in the surrounding space model of the obstacle, then this voxel is called a cross-boundary voxel. Obstacle simulation surfaces traverse or conform to cross-boundary voxels. For example... Figure 2 In the model, vertices c1 and c2 of voxel c are located inside the obstacle model, while vertices c3 and c4 are located in the surrounding space model of the obstacle. Therefore, the simulated surface of the obstacle passes through voxel c.
[0022] Taking target area A as the starting point, extending in the opposite direction of the beam direction, if the extension line intersects with the obstacle simulation surface at point O, then the distance D1 between intersection point O and the exit B of the beam model is called the source-skin distance. In this application, the source-skin distance D1 can change dynamically as the position or attitude of the beam model changes; in other words, the source-skin distance D1 is an unknown quantity to be solved.
[0023] The symbolic distance field is used to describe the symbolic distance of each point in the voxel mesh relative to the obstacle simulation surface. For any point, the symbolic distance includes the sign and the minimum Euclidean distance between the point and the obstacle simulation surface. The sign is used to characterize the distance category. The distance categories include penetration distance and gap distance. For any point, if the point is located inside the obstacle model, the minimum Euclidean distance between the point and the obstacle simulation surface is the penetration distance, and the corresponding sign can be negative; conversely, if the point is located in the surrounding space model outside the obstacle model, the minimum Euclidean distance between the point and the obstacle simulation surface is the gap distance, and the corresponding sign can be positive. Based on the above description, the symbolic distance field can be expressed as in expression (1).
[0024] (1) in, This represents a position point in the voxel mesh. Represents a point on the simulated obstacle surface. This represents the minimum Euclidean distance between the location point and the simulated obstacle surface. The symbol represents the location point when it is inside the obstacle model. It is a negative sign. This represents the penetration distance of the location point relative to the obstacle simulation surface, when the location point is located in the surrounding space model outside the obstacle model. It is a positive sign. This indicates the distance between the location point and the simulated obstacle surface. The unit of distance can be millimeters, but other units such as micrometers are also acceptable; this application does not impose any restrictions on this.
[0025] In this embodiment, the symbolic distance field uses the symbolic distance of each voxel vertex as a known quantity. For any target location point other than the voxel vertexes, the symbolic distance of the target location point can be calculated by interpolation based on the symbolic distances of multiple voxel vertices surrounding the target location point. Interpolation calculation refers to determining the weight of each surrounding voxel vertex based on the distance between the target location point and each surrounding voxel vertex, and then performing a weighted fusion calculation of the symbolic distances of the surrounding voxel vertices to obtain the symbolic distance of the target location point. For example, suppose there are voxel vertices a, b, c, and d surrounding the target location point. The target location point is closest to voxel vertex a, farthest from voxel vertex d, and at moderate distances from voxel vertices b and c. Therefore, the weight of voxel vertex a can be maximized, the weight of voxel vertex d can be minimized, and the weights of voxel vertices b and c can be between the weights of voxel vertices a and d. The symbolic distance of the target location point can be obtained by performing a weighted fusion calculation of the symbolic distances of voxel vertices a, b, c, and d.
[0026] Specifically, the voxel mesh can have a mesh coordinate system. The mesh coordinate system has its origin at the bottom left corner of the voxel mesh, with the X-axis pointing to the right of the voxel mesh, the Z-axis pointing upwards, and the Y-axis perpendicular to the XZ plane. In the mesh coordinate system, each voxel vertex and the target location point in the voxel mesh can have their own corresponding coordinates. Based on the coordinates of the target location point, voxel vertices surrounding the target location point can be found, and then the signed distance of the target location point can be calculated through interpolation based on the signed distances of these voxel vertices.
[0027] It should be noted that since the signed distance refers to the minimum signed Euclidean distance between each point (including voxel vertices) in the voxel mesh and the obstacle simulation surface, the obstacle simulation surface is equivalent to a zero-value surface, that is, the signed distance of the obstacle simulation surface is 0.
[0028] Step S103: Extract sampling points from the beam emitter model, and perform interpolation calculation in the symbolic distance field based on the coordinates of the sampling points to obtain the symbolic distance of the sampling points relative to the obstacle simulation surface.
[0029] Specifically, multiple sampling points can be extracted from the surface of the beam emitter model. Based on the coordinates of the sampling points in the grid coordinate system, interpolation calculation is performed in the symbolic distance field to obtain the symbolic distance of the sampling points. The relevant principle can be found in the description of step S102, which will not be repeated here.
[0030] The signed distance of a sampling point is the signed minimum Euclidean distance between the sampling point and the obstacle simulation surface. The direction of the minimum Euclidean distance can be different from the beam direction. For example, assuming the beam direction is direction F1, the direction of the minimum Euclidean distance between sampling point D1 and the obstacle simulation surface is direction F2, and the direction of the minimum Euclidean distance between sampling point D2 and the obstacle simulation surface is direction F3.
[0031] Step S104: Filter the step distance from the symbolic distance of the sampling points, and adjust the position of the beam emitter model according to the step distance to search for the minimum source-skin distance between the beam emitter model and the obstacle simulation surface. The step distance is the maximum penetration distance or minimum interval distance of the sampling point relative to the obstacle simulation surface.
[0032] Specifically, in the event of a collision between the beam emitter model and the obstacle model, the maximum penetration distance can be selected from the symbolic distances of the sampling points and used as the step distance. Based on the maximum penetration distance, the beam emitter model is moved once in the opposite direction of the beam direction, moving from the first position to the second position. After reaching the second position, the coordinates of each sampling point on the beam emitter model will change. At this point, it can be determined whether the maximum penetration distance of the sampling points is 0. If so, it indicates that the beam emitter model has completely moved out of the obstacle model, and the second position can be taken as the final position of the beam emitter model. Based on the final position, the distance between the exit point and the target point of the beam emitter model can be calculated, and this distance can be used as the minimum source-to-skin distance in the beam direction. If the maximum penetration distance at the second position is greater than 0, the symbolic distances of each sampling point can be recalculated based on the new coordinates of the sampling points. A new maximum penetration distance is then selected from the recalculated symbolic distances, and the beam emitter model is moved once in the opposite direction of the beam direction, moving from the second position to the third position, according to the new maximum penetration distance. This process is repeated sequentially.
[0033] In the aforementioned movement, the maximum penetration distance can vary at different times, meaning the step distance is dynamically changing. For ease of understanding, please refer to the following references. Figure 3 This is a schematic diagram illustrating the search for the minimum source-skin distance based on the maximum penetration distance, provided for some embodiments of this application. Figure 3 In the diagram, the dashed lines represent obstacle models, and the solid lines represent beamformer models. Before the first movement, the beamformer model is located... Figure 3 In the first position shown in the upper left figure, the penetration distance d1 of the beamformer model's sampling point Q1 relative to the simulated obstacle surface is the maximum penetration distance. Assume the penetration distance d1 is 10 mm. After moving the beamformer model 10 mm in the opposite direction of the beam direction, the beamformer model can reach... Figure 3 The second position is shown in the upper right figure. At this second position, the penetration distance d2 of the beamformer model's sampling point Q2 relative to the simulated obstacle surface is the maximum penetration distance. Assume the penetration distance d2 is 3 mm. After moving the beamformer model 3 mm in the opposite direction of the beam direction, the beamformer model can reach... Figure 3The third position is shown in the lower right figure. At this third position, the penetration distance d3 of the beamformer model's sampling point Q2 relative to the simulated obstacle surface is the maximum penetration distance. Assuming the penetration distance d3 is 8 mm, the beamformer model can be moved 8 mm in the opposite direction of the beam direction, and so on.
[0034] Furthermore, combining the first-order Lipschitz feature (i.e., 1-Lipschitz) of the symbolic distance field shown in expression (2): (2) It is known that in the symbolic distance field, the difference in symbolic distance between any two points p and q is less than or equal to the Euclidean distance between those two points. Based on this characteristic, it can be understood that when the beamformer model's movement distance is less than the maximum penetration distance, it cannot be guaranteed that the sampling point corresponding to the maximum penetration distance will exit the obstacle model, i.e., it cannot be guaranteed that the beamformer model and the obstacle model will exit the collision state. For example, referring to... Figure 3 The top left figure illustrates this. When the maximum penetration distance is equal to the minimum Euclidean distance of sampling point Q1 relative to the obstacle simulation surface, a circle is drawn with sampling point Q1 as the center and the minimum Euclidean distance of sampling point Q1 relative to the obstacle simulation surface as the radius. This circle is tangent to the obstacle model. This demonstrates that when moving the beamformer model in any direction, the movement distance to move sampling point Q1 outside the obstacle model must not be less than the minimum Euclidean distance of sampling point Q1 relative to the obstacle simulation surface. In other words, if the movement distance of the beamformer model is less than the minimum Euclidean distance of sampling point Q1 relative to the obstacle simulation surface, it cannot be guaranteed that sampling point Q1 will be moved outside the obstacle model. Conversely, if the movement distance of the beamformer model is equal to the minimum Euclidean distance of sampling point Q1 relative to the obstacle simulation surface, sampling point Q1 may be moved outside the obstacle model. Based on this principle, using the maximum penetration distance of the sampling point as the step distance will not exceed the optimal solution of the minimum source-to-skin distance.
[0035] Based on the above description, when moving the beamformer model outward according to the maximum penetration distance, it is assumed that the source-to-skin distance between the beamformer model and the obstacle simulation surface is s, and at the source-to-skin distance s, the symbol distance of the target sampling point with the maximum penetration distance is f(s). Then, after moving the beamformer model a distance d in the opposite direction of the beam direction, the relationship shown in expression (3) can exist.
[0036] (3) in, The symbol distance of the target sampling point after moving the beamformer model a distance d.
[0037] Based on expression (3), the relationship shown in expression (4) can be obtained.
[0038] (4) in, The maximum penetration distance of the target sampling point when the source-to-skin distance is s; This is the optimal solution for the minimum source-skin distance.
[0039] Based on expression (4), it can be seen that starting from the source-skin distance s, the source-skin distance is directly updated to... It will not exceed the optimal solution of minimum source-skin distance.
[0040] Furthermore, starting from the source-to-skin distance s, the source-to-skin distance is iteratively updated according to expression (5) until the maximum penetration distance is 0, indicating that the beam emitter model has been completely removed from the obstacle model.
[0041] (5) in, To maintain a fixed small increment, ensuring that the source-skin distance is updated at least once in each iteration. You can choose according to your actual needs. The value of . In this embodiment, The value is 0.01 mm.
[0042] Based on the above description, and in conjunction with the references Figure 4 This is a schematic diagram illustrating the relationship between symbol distance, maximum penetration distance, and source-to-skin distance, provided for some embodiments of this application. Figure 4 It can be seen that when the source-to-skin distance is small, the maximum penetration distance of the beam emitter model within the obstacle model is large. As the beam emitter model is gradually moved out of the obstacle model according to a dynamically changing step distance, the source-to-skin distance gradually increases, and the maximum penetration distance of the beam emitter model within the obstacle model gradually decreases. When the maximum penetration distance becomes 0, it indicates that the beam emitter model has been completely moved out of the obstacle model. At this point, the distance between the beam emitter model and the obstacle model becomes the maximum gap distance, and this maximum gap distance gradually increases as the source-to-skin distance gradually increases.
[0043] In some embodiments, when the beamformer model and the obstacle model do not collide, the minimum gap distance can be selected from the symbolic distances of the sampling points and used as the step distance. The beamformer model is iteratively moved along the beam direction according to the step distance until the gap distance between the beamformer model and the obstacle model in the beam direction is less than a distance threshold, or the minimum gap distance between the beamformer model and the obstacle model is 0. The principle of iteratively moving the beamformer model along the beam direction is similar to iteratively moving the beamformer model in the opposite direction of the beam direction, and will not be elaborated here.
[0044] In summary, in some embodiments of this application, on the one hand, obstacle simulation surfaces and symbolic distance fields are determined based on voxels in the voxel mesh, with the symbolic distance of the voxel vertex relative to the obstacle simulation surface being a known quantity. Thus, after extracting sampling points from the beamformer model, interpolation calculations can be performed in the symbolic distance field based on the sampling point coordinates to obtain the symbolic distance of the sampling point relative to the obstacle simulation surface. The interpolation calculation is fast, significantly improving the search efficiency for source-to-skin distance. On the other hand, the step distance is the maximum penetration distance or minimum gap distance of the sampling point relative to the obstacle simulation surface. This allows invalid step distances to be ignored, improving the search efficiency for source-to-skin distance. Simultaneously, based on the first-order Lipschitz feature of the symbolic distance field, using the maximum penetration distance or minimum gap distance of the sampling point as the step distance ensures that the search for the minimum source-to-skin distance will not exceed the optimal solution, thereby guaranteeing the accuracy of the minimum source-to-skin distance. In summary, the technical solution of this application can improve the search efficiency and accuracy of source-to-skin distance.
[0045] Figure 1 The illustrated embodiment is suitable for searching for the minimum source-skin distance within a specified single beam direction. However, in practical applications, it is usually based on... Figure 1 The method shown searches multiple beam directions to obtain the local source-skin distance for each beam direction. The local source-skin distance refers to the minimum source-skin distance corresponding to each beam direction. For example, before neutron beam injection, according to... Figure 1 The method shown searches along beam directions F1, F2, and F3 respectively. The local source-to-skin distance (SPD) for beam direction F1 is 0.5 mm, for beam direction F2 it is 0.2 mm, and for beam direction F3 it is 0.05 mm. Among the local SPDs corresponding to multiple beam directions, the smallest local SPD can be used as the minimum SPD obtained from the search, and the beam direction corresponding to the minimum SPD can be used as the target beam direction. For example, the beam direction F3 can be used as the target beam direction, and 0.05 mm can be used as the minimum SPD.
[0046] Based on the target beam direction and minimum source-to-skin distance, the beam emitter's attitude can be fixed (i.e., the beam emitter remains stationary), while the attitude of obstacles (such as living organisms) can be adjusted. This allows changing the relative position between the beam emitter and the obstacle, bringing them within 0.05 millimeters, and enabling the beam emitter to inject a neutron beam along the target beam direction.
[0047] Based on the above description, the minimum source-to-skin distance between the search beamform model and the obstacle simulation surface in step S104 may include: By changing the orientation of the beam emitter model, the coordinates of sampling points in multiple beam directions are obtained; Based on the coordinates of sampling points in multiple beam directions, interpolation calculations are performed in the symbolic distance field, and the step distance for each beam direction is selected from the calculated symbolic distances. According to the step distance of each beam direction, the position of the beam emitter model is adjusted in the corresponding beam direction to search for the local source-skin distance of each beam direction. The minimum local source-skin distance is taken as the minimum source-skin distance, and the beam direction corresponding to the minimum local source-skin distance is taken as the actual beam direction of the beam emitter model.
[0048] Specifically, changing the orientation of the beam emitter model can alter the relative positional relationship between the beam emitter model and the obstacle model, thereby changing the beam direction. For example, refer to... Figure 2 When the beamformer model is positioned to the upper right of the obstacle model, the beam direction points to the lower left of the voxel mesh. If the beamformer model is adjusted to the upper left of the obstacle model, the beam direction points to the lower right of the voxel mesh. This allows for multiple different beam directions. It should be noted that, compared to fixing the beamformer's attitude and adjusting the obstacle's attitude during actual operation, fixing the beamformer model's attitude and adjusting the obstacle model's attitude during simulation both allow for beam direction adjustment, and the adjustment effect can be the same.
[0049] When the beamformer model's attitude changes, both the beam direction and the coordinates of the sampling points (i.e., the coordinates of the sampling points in the grid coordinate system) of the beamformer model will change; that is, each beam direction has its own corresponding sampling point coordinates. Based on the sampling point coordinates corresponding to each beam direction, by performing the above steps S103 and S104, the local source-to-skin distance for the corresponding beam direction can be obtained. Then, among the local source-to-skin distances for multiple beam directions, the minimum local source-to-skin distance can be selected as the minimum source-to-skin distance. The beam direction corresponding to the minimum local source-to-skin distance is the actual beam direction obtained through this selection.
[0050] In the above embodiments, by changing the orientation of the beam emitter model, the minimum source-to-skin distance can be searched in multiple beam directions, which can improve the search range and ensure that the minimum source-to-skin distance obtained is the globally optimal source-to-skin distance, thereby improving the accuracy of the minimum source-to-skin distance.
[0051] In some embodiments, interpolation calculations can be performed in parallel in the symbolic range field based on the coordinates of sampling points in at least two beam directions. Specifically, since the local source-to-skin distance searches for each beam direction are independent of each other, interpolation calculations for multiple beam directions can be performed simultaneously in the symbolic range field, thereby enabling parallel searches for local source-to-skin distances in multiple beam directions. This improves search efficiency.
[0052] In some embodiments, the above-described transformation of the beam emitter model's attitude includes: Obtain the frame angle range and step angle of the beam emitter model; The frame angle interval is discretized according to the step angle to obtain multiple discrete angles, and the attitude of the beam emitter model is changed according to the discrete angles.
[0053] Specifically, the beam emitter model has a model coordinate system. (See also...) Figure 5 This is a schematic diagram of the model coordinate system provided in some embodiments of this application. Figure 5 In this model coordinate system, the exit of the beam emitter model is used as the origin, the opposite direction of the beam direction is used as the Z-axis, the horizontal rightward direction is used as the X-axis, and the direction perpendicular to the XZ plane is used as the Y-axis. The rotation angle of the beam emitter model around the Y-axis is called the frame angle θ, the rotation angle around the Z-axis is called the roll angle φ, and the rotation angle around the X-axis is called the pitch angle ψ. When changing the attitude of the beam emitter model, the pitch angle ψ and roll angle φ can remain constant, while the frame angle θ can be changed. At the same time, the beam emitter model can move along the positive or negative direction of the Z-axis to adjust the source-to-skin distance.
[0054] In practical applications, the rack angle range and step angle can be pre-specified. Starting from the initial angle of the rack angle range, discrete processing is performed according to the step angle to obtain multiple discrete angles. For example, assuming the rack angle range is 0–30 degrees and the step angle is 5 degrees, then the discrete angles are 0 degrees, 5 degrees, 10 degrees, 15 degrees, and so on. Rotating the beamformer model around the Y-axis can adjust the beamformer model to various discrete angles, realizing the attitude transformation of the beamformer model.
[0055] In the above embodiments, the rack angle intervals are discretized according to the step angle, and the attitude of the beam emitter model is changed according to the discrete angle. This can convert the continuous rack angle intervals into a finite number of discrete angles, thereby reducing the amount of computation.
[0056] In some embodiments, the method of this application further includes: Obtain the angle difference between the discrete angle and the reference angle; Based on the angle difference, determine the transformation matrix between the voxel mesh's grid coordinate system and the beam emitter model's model coordinate system, and then transform the beam emitter model's attitude into the grid coordinate system according to the transformation matrix.
[0057] For details, please refer to the following: Figure 5 The reference angles are the initial frame angle, initial roll angle, and initial pitch angle in the model coordinate system. In this embodiment, the initial frame angle, initial roll angle, and initial pitch angle are all 0 degrees, and the transformation matrix R between the grid coordinate system and the model coordinate system is expressed as (6).
[0058] (6) in, ; ; ; During attitude transformation, the roll angle φ and pitch angle ψ can remain constant, while the frame angle θ is a discrete angle, such as 0 degrees, 5 degrees, 10 degrees, 15 degrees, and so on. Thus, each discrete angle corresponds to a transformation matrix R.
[0059] Furthermore, when the initial frame angle, initial roll angle, and initial pitch angle are all 0 degrees, the initial beam direction in the model coordinate system is: The initial direction of movement is After the beam emitter model completes its attitude transformation, the beam direction vector and the movement direction vector will change. At this time, the new beam direction vector and the new movement direction vector of the beam emitter model in the grid coordinate system can be determined based on expressions (7) and (8).
[0060] (7) (8) in, This represents the new beam direction vector of the beam emitter model in the grid coordinate system. This is the new direction vector for the beam emitter model in the grid coordinate system.
[0061] Similarly, after the beam emitter model completes its attitude transformation, the coordinates of each sampling point will change. At this time, the new sampling point coordinates of the beam emitter model in the grid coordinate system can be determined based on expressions (9) and (10).
[0062] (9) (10) in, The coordinates of the new sampling point in the grid coordinate system; The coordinates of the new sampling point in the model coordinate system; This represents the coordinates of the exit center of the beam emitter model in the grid coordinate system after attitude transformation. These are the coordinates of the target area in the grid coordinate system after attitude transformation. This is the new direction vector of movement in the grid coordinate system. s is the distance between the first intersection point and the target area when the extension line on the movement direction vector intersects with the obstacle simulation surface; s is the minimum source-skin distance to be searched.
[0063] Furthermore, The calculation formula is shown in expression (11).
[0064] (11) in, The coordinates of the first intersection point are shown in expression (12).
[0065] (12) in, Represents the simulated surface of an obstacle; This represents the vector starting from the target area and moving along the direction of movement. The ray; L represents a sufficiently long ray length in the direction of movement to ensure that the ray can pass through the simulated obstacle surface.
[0066] In short, after the beamformer model completes its attitude transformation, based on the above expressions (7) to (10), the new beam direction vector, new movement direction vector, new sampling point coordinates and other information in the grid coordinate system can be obtained, and then the minimum source-skin distance can be searched in the grid coordinate system.
[0067] In some embodiments, step S103, which involves interpolating the symbolic range field based on the coordinates of sampling points along multiple beam directions, includes: Obtain the target region location inside the obstacle object; Starting from the target area, extend in the opposite direction of each beam direction to obtain the extension line; If the extension line intersects with the obstacle simulation surface, the beam direction corresponding to the extension line will be taken as the effective beam direction. Interpolation calculations are performed in the symbolic distance field based on the coordinates of the sampling points in the effective beam direction.
[0068] Specifically, for any beam direction, if the extension line in the opposite direction of the beam direction does not intersect with the obstacle simulation surface, it means that the beam direction deviates from the coverage of the obstacle simulation surface, and the beam direction can be removed to reduce the amount of invalid calculations.
[0069] In some embodiments, interpolation calculations are performed in the symbolic distance field based on the coordinates of the sampling point to obtain the symbolic distance of the sampling point relative to the obstacle simulation surface, including: Based on the coordinates of the sampling point, determine the target voxel where the sampling point is located; The symbolic distances of the target voxel vertices are weighted and fused to obtain the symbolic distances of the sampling points relative to the obstacle simulation surface.
[0070] Specifically, based on the coordinates of the sampling point in the grid coordinate system, the target voxel where the sampling point is located can be determined. Based on the distance between the sampling point and each vertex in the target voxel, the weight of each vertex can be determined. The logic for determining the weight can be found in the relevant description of the interpolation calculation in step S103, which will not be repeated here. After obtaining the weight, the signed distance of each vertex in the target voxel can be weighted and fused based on expression (13) to obtain the signed distance of the sampling point relative to the obstacle simulation surface.
[0071] (13) in, ; is the sign distance of the sampling point relative to the obstacle simulation surface; (i,j,k) is the grid coordinate of the grid where the target voxel is located, that is, in the grid coordinate system, the grid where the target voxel is located is the i-th grid in the X-axis direction, the j-th grid in the Y-axis direction, and the k-th grid in the Z-axis direction; Let be the weights of each vertex in the target voxel. The signed distance between each vertex.
[0072] In the above embodiments, the distance between each vertex in the target voxel and the distance between the sampling points are relatively moderate. By performing weighted fusion calculation on the signed distance of the target voxel vertices, the signed distance of the sampling points can conform to the distance variation law and be more accurate.
[0073] In some embodiments, step S103, extracting sampling points from the beamformer model, includes: The total number of sampling points is determined based on the surface area of the beam emitter model and the voxel margin of a single voxel in the voxel mesh. The larger the voxel margin, the fewer the total number of sampling points. The surface of the beam emitter model is divided into multiple triangular facets, and the number of local sampling points for each triangular facet is determined based on the area ratio of each triangular facet on the surface of the beam emitter model. If the sum of the number of local sampling points in multiple triangular facets does not match the total number of sampling points, the number of local sampling points in at least some of the triangular facets is corrected according to the total number of sampling points, and sampling is performed in each triangular facet according to the corrected number of local sampling points.
[0074] Specifically, when the voxel margin is small, increasing the total number of sampling points can ensure sufficient sampling and avoid problems such as missed collisions caused by sparse sampling. When the voxel margin is large, reducing the total number of sampling points can reduce the amount of data processing.
[0075] Furthermore, for any triangular facet on the surface of the beam emitter model, if the area of the triangular facet on the surface of the beam emitter model is large, then the number of local sampling points within the triangular facet is large, thus ensuring sufficient sampling within the triangular facet. Conversely, if the area of the triangular facet on the surface of the beam emitter model is small, then the number of local sampling points within the triangular facet is small, thus reducing the amount of data processing.
[0076] Furthermore, when the sum of the number of local sampling points within multiple triangular facets is less than the total number of sampling points, the number of local sampling points within some triangular facets can be increased to ensure sufficient sampling. Conversely, when the sum of the number of local sampling points within multiple triangular facets is greater than the total number of sampling points, the number of local sampling points within some triangular facets can be decreased to reduce the amount of invalid data processing.
[0077] In some embodiments, the above sampling within each triangular facet based on the corrected number of local sampling points includes: Generate at least one set of random numbers; Perform square root operation on at least a portion of the random numbers in each set, and generate at least one set of barycentric coordinates based on the operation results; For any triangular facet, the coordinates of the vertices of the facet are weighted and fused with one set of centroid coordinates to obtain the coordinates of one sampling point within the facet.
[0078] Specifically, each set of random numbers can include any two random numbers. , Random numbers , Located in the range of 0 to 1. For random numbers. Performing the square root operation yields the following result: Based on random numbers , This can generate the centroid coordinates u, v, w of a triangular facet. For example, let... , w = 1 - uv. By using the centroid coordinates u, v, and w as weights, the coordinates of the three vertices of the triangular facet are weighted and fused to obtain the coordinates of the sampling point within the triangular facet.
[0079] In the above embodiments, by performing square root operations on at least a portion of the random numbers, it is possible to avoid excessive clustering of sampling points at the centroid of the triangular facet, thereby achieving a uniform distribution of sampling points within the triangular facet.
[0080] In some embodiments, the determination of the obstacle simulation surface in step S102 can easily lead to an interruption of the obstacle simulation surface. Simply put, in step S102, the determination of the obstacle simulation surface depends on boundary voxels, where a boundary voxel is a voxel whose vertices are partially located inside the obstacle model and partially located in the surrounding space model. Based on this logic, if an obstacle voxel is located at the edge of the voxel mesh, then there is no boundary voxel, leading to an interruption of the obstacle simulation surface. For ease of understanding, please refer to the relevant documentation. Figure 6 This is a schematic diagram of a voxel grid provided for some embodiments of this application. Figure 6 In this context, voxels marked with 1 are obstacle voxels, and voxels marked with 0 are space voxels. From... Figure 6 It can be seen that there are no boundary voxels in the left, right, and top regions of the voxel mesh, making it impossible to determine the obstacle simulation surface in these regions, thus causing interruptions in the obstacle simulation surface. Therefore, step S102, which determines the obstacle simulation surface and symbolic distance field based on voxels in the voxel mesh, can include: Expand the voxel mesh with spatial voxels to obtain an auxiliary voxel mesh. The expanded spatial voxels are attached to the surface of the voxel mesh. In the auxiliary voxel mesh, the obstacle simulation surface is determined based on the interface between the obstacle voxels and the spatial voxels.
[0081] For details, please refer to the following: Figure 7 In order to Figure 6 A schematic diagram of the voxel grid after expanding the spatial voxels. From... Figure 7 As can be seen, by expanding the spatial voxels outside the voxel mesh, some voxels can be used as boundary voxels in adjacent obstacle voxels and spatial voxels, thus obtaining a complete obstacle simulation surface.
[0082] Furthermore, the interpolation calculation in step S103 essentially involves a weighted fusion of the symbolic distances of multiple element vertices. The symbolic distance of the sampled points obtained in this way is an estimated distance, which may have an error compared to the true symbolic distance of the sampled points relative to the obstacle simulation surface. For example, the symbolic distance of sampled point A obtained through weighted fusion may be +2, but after calculating the true Euclidean distance between sampled point A and the obstacle simulation surface, the symbolic distance of sampled point A may be +2.2.
[0083] It is understandable that if the symbol distance of the sampling points is inaccurate, the final minimum source-skin distance obtained will also have corresponding errors. A larger minimum source-skin distance will affect the neutron fluence, while a smaller minimum source-skin distance may cause the beamformer model to collide with the simulated obstacle surface. Therefore, in some embodiments, the method of this application may further include: In the actual beam direction, when the source-to-skin distance between the beam emitter model and the obstacle simulation surface is the minimum source-to-skin distance, the set of sampling points with a symbolic distance less than the distance threshold is filtered. Calculate the minimum Euclidean distance between the sampling points in the sampling point set and the simulated obstacle surface, and correct the minimum source-skin distance based on the minimum Euclidean distance.
[0084] Specifically, as mentioned above, the actual beam direction is the beam direction corresponding to the minimum source-skin distance. The symbol distance of each sampling point can be obtained through interpolation calculation within the actual beam direction. Among these sampling points, those with a symbol distance less than the distance threshold can include the following two types of sampling points: 1) sampling points located outside the obstacle model and close to the obstacle simulation surface; 2) sampling points located inside the obstacle model and with a small penetration distance relative to the obstacle simulation surface.
[0085] The two types of sampling points mentioned above can form a sampling point set. Each sampling point in the sampling point set is relatively close to the obstacle simulation surface, and the minimum source-skin distance can be corrected based on the minimum Euclidean distance between these sampling points and the obstacle simulation surface. Specifically, it can be divided into the following three cases: 1) If the minimum Euclidean distance represents the minimum distance between the sampling point and the obstacle simulation surface (i.e., the sign of the signed distance is positive), and the minimum Euclidean distance is greater than a positive threshold, it indicates that when the source-to-skin distance between the beamform and the obstacle simulation surface is the minimum source-to-skin distance, the beamform and the obstacle simulation surface are still far apart. In other words, in the actual beam direction, the beamform can still move along the direction of the obstacle simulation surface. In this case, the minimum source-to-skin distance obtained from the search is too large. During the correction process, the minimum source-to-skin distance can be reduced, and the reduction in the minimum source-to-skin distance should be less than or equal to the aforementioned minimum Euclidean distance. In this way, while reducing the minimum source-to-skin distance, it ensures that the beamform and the obstacle simulation surface do not collide. 2) If the minimum Euclidean distance represents the minimum penetration distance of a sampling point relative to the obstacle simulation surface (i.e., the sign of the signed distance is negative), it indicates that the beamformer model and the obstacle model have already collided when the source-to-skin distance between the beamformer model and the obstacle simulation surface is at the minimum source-to-skin distance. During the correction process, the minimum source-to-skin distance can be increased, and the increase in the minimum source-to-skin distance should be greater than or equal to the minimum Euclidean distance. This ensures that the beamformer model can completely exit the obstacle model.
[0086] 3) If the minimum Euclidean distance represents the minimum interval distance between the sampling point and the simulated obstacle surface (i.e., the sign of the sign distance is positive), and the minimum Euclidean distance is less than or equal to the positive threshold, it means that the minimum source-skin distance obtained by the search has converged and there is no need to correct the minimum source-skin distance.
[0087] In some embodiments, when the voxel margin is large, the minimum source-skin distance obtained by interpolation calculation has a large error. Therefore, the search for the minimum source-skin distance may specifically include the following two steps: 1) Coarse search: The initial minimum source-skin distance is obtained through interpolation calculation. Compared with Euclidean distance calculation, interpolation calculation is faster and can improve the search efficiency of minimum source-skin distance.
[0088] 2) Fine-tuning: In the actual beam direction, a set of sampling points with symbol distances less than a distance threshold is selected. The minimum Euclidean distance between the sampling points in this set and the simulated obstacle surface is calculated. Based on this minimum Euclidean distance, the minimum source-to-skin distance obtained from the coarse search is corrected, thus improving the accuracy of the minimum source-to-skin distance. Furthermore, in the fine-tuning process, only a subset of sampling points are calculated to determine the minimum Euclidean distance to the simulated obstacle surface, minimizing the impact on search efficiency.
[0089] In other embodiments, when the voxel margin is small, the minimum source-skin distance obtained by interpolation calculation has high accuracy. In this case, only the coarse search step can be performed, without the need for fine correction.
[0090] See also Figure 8 The image shows a comparison of coarse search and fine correction for some embodiments of this application. Figure 8 In the diagram, the green line represents the minimum source-skin distance obtained from the coarse search, the blue dashed line represents the minimum source-skin distance obtained after fine correction, and the yellow area between the blue dashed line and the green line represents the approximate error and correction amount between the coarse search and fine correction.
[0091] In some embodiments, the distance threshold is obtained based on the following method: In the actual beam direction, the minimum symbol distance of the selected sampling points is used; The sum of the minimum symbol distance and the margin distance is used as the distance threshold. The margin distance is positively correlated with the voxel margin of a single voxel.
[0092] Specifically, the distance threshold τ is shown in expression (14).
[0093] (14) in, Represents the symbol distance of the j-th sampling point. Represents the minimum symbol distance between sampling points. Indicates margin distance.
[0094] Specifically, margin distance As shown in expression (15).
[0095] (15) in, , , This represents the voxel margins of a single voxel along the X, Y, and Z axes of the grid coordinate system. Represents the maximum margin of a single voxel, margin distance. It is twice the maximum voxel margin.
[0096] See also Figure 9 This is a schematic diagram of a source-skin distance search device provided in some embodiments of this application. The source-skin distance search device includes: Mesh building module 901 is used to build voxel meshes based on image data of obstacles and the space around the obstacles, and to build beamer models based on beamer parameters. The voxel processing module 902 is used to determine the obstacle simulation surface and the symbolic distance field based on the voxels in the voxel mesh. The symbolic distance field uses the symbolic distance of the voxel vertex relative to the obstacle simulation surface as a known quantity. The model sampling module 903 is used to extract sampling points from the beam emitter model and perform interpolation calculations in the symbolic distance field based on the coordinates of the sampling points to obtain the symbolic distance of the sampling points relative to the obstacle simulation surface. The model position adjustment module 904 is used to filter step distances from the symbolic distances of the sampling points and adjust the position of the beam emitter model according to the step distances to search for the minimum source-skin distance between the beam emitter model and the obstacle simulation surface. The step distance is the maximum penetration distance or minimum interval distance of the sampling point relative to the obstacle simulation surface.
[0097] In some embodiments, the model position adjustment module 904 is specifically used for: By changing the orientation of the beam emitter model, the coordinates of sampling points in multiple beam directions are obtained; Based on the coordinates of sampling points in multiple beam directions, interpolation calculations are performed in the symbolic distance field, and the step distance for each beam direction is selected from the calculated symbolic distances. According to the step distance of each beam direction, the position of the beam emitter model is adjusted in the corresponding beam direction to search for the local source-skin distance of each beam direction. The minimum local source-skin distance is taken as the minimum source-skin distance, and the beam direction corresponding to the minimum local source-skin distance is taken as the actual beam direction of the beam emitter model.
[0098] In some embodiments, the model position adjustment module 904 is further configured to: In the actual beam direction, when the source-to-skin distance between the beam emitter model and the obstacle simulation surface is the minimum source-to-skin distance, the set of sampling points with a symbolic distance less than the distance threshold is filtered. Calculate the minimum Euclidean distance between the sampling points in the sampling point set and the simulated obstacle surface, and correct the minimum source-skin distance based on the minimum Euclidean distance.
[0099] In some embodiments, before filtering the set of sampling points, the model position adjustment module 904 determines a distance threshold based on the following method: In the actual beam direction, the minimum symbol distance of the selected sampling points is used; The sum of the minimum symbol distance and the margin distance is used as the distance threshold. The margin distance is positively correlated with the voxel margin of a single voxel.
[0100] In some embodiments, the model position adjustment module 904 is specifically used for: If the minimum Euclidean distance represents the minimum distance between the sampling point and the simulated obstacle surface, and the minimum Euclidean distance is greater than a positive threshold, then the minimum source-skin distance is reduced, and the reduction in the minimum source-skin distance is less than or equal to the minimum Euclidean distance. If the minimum Euclidean distance represents the minimum penetration distance of the sampling point relative to the simulated obstacle surface, then the minimum source-to-skin distance is increased, and the increase in the minimum source-to-skin distance is greater than or equal to the minimum Euclidean distance.
[0101] In some embodiments, the model position adjustment module 904 is specifically used for: Obtain the frame angle range and step angle of the beam emitter model; The frame angle interval is discretized according to the step angle to obtain multiple discrete angles, and the attitude of the beam emitter model is changed according to the discrete angles.
[0102] In some embodiments, the model position adjustment module 904 is specifically used for: Obtain the angle difference between the discrete angle and the reference angle; Based on the angle difference, determine the transformation matrix between the voxel mesh's grid coordinate system and the beam emitter model's model coordinate system, and then transform the beam emitter model's attitude into the grid coordinate system according to the transformation matrix.
[0103] In some embodiments, the model sampling module 903 is specifically used for: Interpolation calculations are performed in parallel in the symbolic distance field based on the coordinates of sampling points in at least two beam directions.
[0104] In some embodiments, the model sampling module 903 is specifically used for: Obtain the target region location inside the obstacle object; Starting from the target area, extend in the opposite direction of each beam direction to obtain the extension line; If the extension line intersects with the obstacle simulation surface, the beam direction corresponding to the extension line will be taken as the effective beam direction. Interpolation calculations are performed in the symbolic distance field based on the coordinates of the sampling points in the effective beam direction.
[0105] In some embodiments, the model sampling module 903 is specifically used for: Based on the coordinates of the sampling point, determine the target voxel where the sampling point is located; The symbolic distances of the target voxel vertices are weighted and fused to obtain the symbolic distances of the sampling points relative to the obstacle simulation surface.
[0106] In some embodiments, the model sampling module 903 is specifically used for: The total number of sampling points is determined based on the surface area of the beam emitter model and the voxel margin of a single voxel in the voxel mesh. The larger the voxel margin, the fewer the total number of sampling points. The surface of the beam emitter model is divided into multiple triangular facets, and the number of local sampling points for each triangular facet is determined based on the area ratio of each triangular facet on the surface of the beam emitter model. If the sum of the number of local sampling points in multiple triangular facets does not match the total number of sampling points, the number of local sampling points in at least some of the triangular facets is corrected according to the total number of sampling points, and sampling is performed in each triangular facet according to the corrected number of local sampling points.
[0107] In some embodiments, the model sampling module 903 is specifically used for: Generate at least one set of random numbers; Perform square root operation on at least a portion of the random numbers in each set, and generate at least one set of barycentric coordinates based on the operation results; For any triangular facet, the coordinates of the vertices of the facet are weighted and fused with one set of centroid coordinates to obtain the coordinates of one sampling point within the facet.
[0108] In some embodiments, the voxels in the voxel mesh include obstacle voxels and spatial voxels; the voxel processing module 902 is specifically used for: Expand the voxel mesh with spatial voxels to obtain an auxiliary voxel mesh. The expanded spatial voxels are attached to the surface of the voxel mesh. In the auxiliary voxel mesh, the obstacle simulation surface is determined based on the interface between the obstacle voxels and the spatial voxels.
[0109] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0110] In this embodiment, the source-to-skin distance search device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0111] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application, such as... Figure 10 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 10 Take a processor 10 as an example.
[0112] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0113] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0114] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0115] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0116] This application provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method of any embodiment of this application.
[0117] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A source-skin distance search method, characterized in that, The method includes: Based on image data of obstacles and the space around obstacles, a voxel mesh is constructed, and based on beamer parameters, a beamer model is constructed. Based on the voxels in the voxel mesh, an obstacle simulation surface and a symbolic distance field are determined, wherein the symbolic distance field uses the symbolic distance of the voxel vertex relative to the obstacle simulation surface as a known quantity; Sampling points are extracted from the beamform model, and interpolation calculations are performed in the symbolic distance field based on the coordinates of the sampling points to obtain the symbolic distance of the sampling points relative to the obstacle simulation surface; The step distance is filtered from the symbolic distance of the sampling points, and the position of the beam emitter model is adjusted according to the step distance to search for the minimum source-to-skin distance between the beam emitter model and the obstacle simulation surface. The step distance is the maximum penetration distance or minimum interval distance of the sampling point relative to the obstacle simulation surface.
2. The method according to claim 1, characterized in that, The search for the minimum source-to-skin distance between the beamform model and the obstacle simulation surface includes: By changing the orientation of the beam emitter model, the coordinates of sampling points in multiple beam directions are obtained; Based on the coordinates of sampling points in multiple beam directions, interpolation calculations are performed in the symbol distance field, and the step distance for each beam direction is selected from the calculated symbol distances. According to the step distance of each beam direction, the position of the beam emitter model is adjusted in the corresponding beam direction to search for the local source-skin distance of each beam direction. The minimum local source-skin distance is taken as the minimum source-skin distance, and the beam direction corresponding to the minimum local source-skin distance is taken as the actual beam direction of the beam emitter model.
3. The method according to claim 2, characterized in that, The method further includes: In the actual beam direction, when the source-to-skin distance between the beam emitter model and the obstacle simulation surface is the minimum source-to-skin distance, the set of sampling points with a symbolic distance less than the distance threshold is filtered. Calculate the minimum Euclidean distance between the sampling points in the sampling point set and the simulated obstacle surface, and correct the minimum source-skin distance based on the minimum Euclidean distance.
4. The method according to claim 3, characterized in that, Before filtering the set of sampling points, the distance threshold is determined based on the following method: In the actual beam direction, the minimum symbol distance of the selected sampling points is determined. The sum of the minimum symbol distance and the margin distance is used as the distance threshold, and the margin distance is positively correlated with the voxel margin of a single voxel.
5. The method according to claim 3, characterized in that, The step of correcting the minimum source-skin distance based on the minimum Euclidean distance includes: If the minimum Euclidean distance represents the minimum interval distance between the sampling point and the obstacle simulation surface, and the minimum Euclidean distance is greater than a positive threshold, then the minimum source-skin distance is reduced, and the reduction in the minimum source-skin distance is less than or equal to the minimum Euclidean distance. If the minimum Euclidean distance represents the minimum penetration distance of the sampling point relative to the simulated obstacle surface, then the minimum source-to-skin distance is increased, and the increase in the minimum source-to-skin distance is greater than or equal to the minimum Euclidean distance.
6. The method according to claim 2, characterized in that, The transformation of the beamform model's attitude includes: Obtain the frame angle range and step angle of the beam emitter model; According to the step angle, the frame angle interval is discretized to obtain multiple discrete angles, and the attitude of the beam emitter model is changed according to the discrete angles.
7. The method according to claim 6, characterized in that, The method further includes: Obtain the angle difference between the discrete angle and the reference angle; Based on the angle difference, the transformation matrix between the voxel mesh's grid coordinate system and the beam emitter model's model coordinate system is determined, and the attitude transformation of the beam emitter model is transformed to the grid coordinate system according to the transformation matrix.
8. The method according to claim 2, characterized in that, The interpolation calculation in the symbol range field based on the coordinates of sampling points from multiple beam directions includes: Interpolation calculations are performed in parallel in the symbolic distance field based on the coordinates of sampling points in at least two beam directions.
9. The method according to claim 1 or 2, characterized in that, The step of interpolating the symbolic distance of the sampling point relative to the simulated obstacle surface based on the coordinates of the sampling point in the symbolic distance field to obtain the symbolic distance of the sampling point includes: Based on the coordinates of the sampling point, determine the target voxel where the sampling point is located; The symbolic distances of the target voxel vertices are weighted and fused to obtain the symbolic distances of the sampling points relative to the simulated obstacle surface.
10. The method according to claim 1 or 2, characterized in that, The step of extracting sampling points from the beamformer model includes: The total number of sampling points is determined based on the surface area of the beam emitter model and the voxel margin of a single voxel in the voxel mesh. The larger the voxel margin, the fewer the total number of sampling points. The surface of the beam emitter model is divided into multiple triangular facets, and the number of local sampling points for each triangular facet is determined based on the area ratio of each triangular facet on the surface of the beam emitter model. If the sum of the number of local sampling points in multiple triangular facets does not match the total number of sampling points, the number of local sampling points in at least some of the triangular facets is corrected according to the total number of sampling points, and sampling is performed in each triangular facet according to the corrected number of local sampling points.
11. The method according to claim 10, characterized in that, The sampling within each triangular facet based on the corrected number of local sampling points includes: Generate at least one set of random numbers; Perform square root operation on at least a portion of the random numbers in each set, and generate at least one set of barycentric coordinates based on the operation results; For any triangular facet, the coordinates of the vertices of the facet are weighted and fused with one set of centroid coordinates to obtain the coordinates of one sampling point within the facet.
12. The method according to claim 1 or 2, characterized in that, The voxels in the voxel grid include obstacle voxels and spatial voxels; the determination of the obstacle simulation surface and symbolic distance field based on the voxels in the voxel grid includes: The spatial voxels are expanded to form an auxiliary voxel grid, and the expanded spatial voxels are attached to the surface of the voxel grid. In the auxiliary voxel mesh, the obstacle simulation surface is determined based on the interface between the obstacle voxel and the spatial voxel.
13. The method according to claim 12, characterized in that, The interpolation calculation based on the coordinates of sampling points from multiple beam directions in the symbol range field includes: Obtain the target region location inside the obstacle object element; Starting from the target area, an extension line is obtained by extending in the opposite direction of each beam direction; If the extension line intersects with the simulated obstacle surface, the beam direction corresponding to the extension line is taken as the effective beam direction. Interpolation calculations are performed in the symbolic distance field based on the coordinates of the sampling points in the effective beam direction.
14. A source-to-skin distance search device, characterized in that, The device includes: The mesh building module is used to build voxel meshes based on image data of obstacles and the space around the obstacles, and to build beamformer models based on beamformer parameters. A voxel processing module is used to determine an obstacle simulation surface and a symbolic distance field based on the voxels in the voxel mesh, wherein the symbolic distance field uses the symbolic distance of the voxel vertex relative to the obstacle simulation surface as a known quantity; The model sampling module is used to extract sampling points from the beam emitter model and perform interpolation calculations in the symbol distance field based on the coordinates of the sampling points to obtain the symbol distance of the sampling points relative to the obstacle simulation surface. The model position adjustment module is used to filter step distances from the symbolic distances of sampling points and adjust the position of the beam emitter model according to the step distances to search for the minimum source-to-skin distance between the beam emitter model and the obstacle simulation surface. The step distance is the maximum penetration distance or minimum interval distance of the sampling point relative to the obstacle simulation surface.
15. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the source-skin distance search method according to any one of claims 1 to 13 by executing the computer instructions.
