Section display method and device of organization model, computer equipment and storage medium
By determining the target beveled section in a mixed reality device and obtaining the relative position relationship, the profile of the organization model is displayed in real time, which solves the problems of complex operation and difficulty in intuitive understanding of the internal structure in the prior art, and achieves a simple and intuitive section display effect.
Patent Information
- Application Number
- CN202311084081.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art is complicated when displaying the cross-section of a 3D model, and needs to fill the cross-section and contour lines after cutting the model, making it difficult for users to intuitively understand the internal structure of the object.
By determining the target beveled surface of the tissue model in a mixed reality device, the relative positional relationship between each element and the target beveled surface is obtained, and the profile of the tissue model is displayed in real time based on these relationships, the steps of filling the section and contour lines are avoided. .
The operation process is simplified, and users can clearly and intuitively observe the internal structure of the organization model, obtain the profile effect in real time without additional filling steps.
Smart Images

Figure CN119516066A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical technology, and in particular to a method, device, computer equipment and storage medium for displaying a cross-section of a tissue model. Background Art
[0002] In three-dimensional (3D) model display applications, it is often necessary to display a cross-section of a 3D model of an object by cutting the model, so that users can have a clear and intuitive understanding of the internal structure of the object.
[0003] In the related art, a 3D model is displayed in a two-dimensional space by a computer display device, and the model is cut by drawing an image. After the cutting is completed, the section and contour lines need to be filled in for section display. Therefore, the current section display method has the problem of complex operation. Summary of the invention
[0004] Based on this, it is necessary to provide a cross-section display method, device, computer equipment and storage medium of an organizational model that can simplify the operation in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a cross-sectional display method of a tissue model, the method being applied to a mixed reality device, the method comprising:
[0006] Determine the target bevel of the tissue model;
[0007] Acquiring the relative position relationship between each graphic element in the tissue model and the target oblique section;
[0008] The cross section of the tissue model is displayed according to the relative position relationship between each of the graphic elements and the target oblique section.
[0009] In one embodiment, the step of obtaining the relative positional relationship between each graphic element in the tissue model and the target oblique section includes:
[0010] Determine, according to the normals of the primitives and the target oblique section, a first length of a line segment between the primitives and the origin of the world coordinate system along the normal direction of the target oblique section;
[0011] Determine, according to the center position of the target oblique section and the normal of the target oblique section, a second length of a line segment between the center position of the target oblique section and the origin of the world coordinate system along the normal direction of the target oblique section;
[0012] The relative positional relationship between each of the graphic elements and the target bevel surface is determined according to the first length and the second length corresponding to each of the graphic elements.
[0013] In one embodiment, determining the relative positional relationship between each of the graphic elements and the target bevel surface according to the first length and the second length corresponding to each of the graphic elements includes:
[0014] Determine the difference between the first length and the second length corresponding to each of the graphic elements;
[0015] The relative positional relationship between each of the graphic elements and the target bevel surface is determined according to the difference between the first length and the second length corresponding to each of the graphic elements.
[0016] In one embodiment, determining the target oblique section of the tissue model includes:
[0017] When the target part of the target user is within the preset range of the initial bevel cut surface, obtaining the distance between the target part and each preset position point of the initial bevel cut surface;
[0018] Determining a target position point from the preset position points according to the distance between the target part and the preset position points;
[0019] According to the adjustment instruction corresponding to the target position point, the initial bevel is adjusted to obtain the target bevel; the adjustment instruction is a command triggered for the target position point when the target part is located within a preset range of the initial bevel.
[0020] In one embodiment, the target position point includes a boundary point position of the initial beveled surface, and adjusting the initial beveled surface according to the adjustment instruction corresponding to the target position point to obtain the target beveled surface includes:
[0021] According to the adjustment instruction corresponding to the boundary point position of the initial beveled surface, the initial beveled surface is rotated to obtain the target beveled surface.
[0022] In one embodiment, the target position point includes the center position of the initial chamfered surface, and adjusting the initial chamfered surface according to the adjustment instruction corresponding to the target position point to obtain the target chamfered surface includes:
[0023] According to the adjustment instruction corresponding to the center position of the initial beveled surface, the initial beveled surface is moved to obtain the target beveled surface.
[0024] In one embodiment, the method further comprises:
[0025] When the target part of the target user is within the preset range of the initial beveled surface, displaying an operation ball at each of the preset position points;
[0026] When the target position point is determined, the operation ball corresponding to the target position point is rendered.
[0027] In a second aspect, the present application further provides a cross-section display device for a tissue model, the device comprising:
[0028] A determination module, used for determining a target oblique section of the tissue model;
[0029] An acquisition module, used for acquiring the relative position relationship between each graphic element in the tissue model and the target oblique section;
[0030] The display module is used to display the cross section of the tissue model according to the relative position relationship between each of the graphic elements and the target oblique section.
[0031] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:
[0032] Determine the target bevel of the tissue model;
[0033] Acquiring the relative position relationship between each graphic element in the tissue model and the target oblique section;
[0034] The cross section of the tissue model is displayed according to the relative position relationship between each of the graphic elements and the target oblique section.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0036] Determine the target bevel of the tissue model;
[0037] Acquiring the relative position relationship between each graphic element in the tissue model and the target oblique section;
[0038] The cross section of the tissue model is displayed according to the relative position relationship between each of the graphic elements and the target oblique section.
[0039] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, which implements the following steps when executed by a processor:
[0040] Determine the target bevel of the tissue model;
[0041] Acquiring the relative position relationship between each graphic element in the tissue model and the target oblique section;
[0042] The cross section of the tissue model is displayed according to the relative position relationship between each of the graphic elements and the target oblique section.
[0043] The above-mentioned cross-section display method, device, computer equipment and storage medium of the tissue model determine the target bevel of the tissue model, obtain the relative position relationship between each graphic element in the tissue model and the target bevel, and display the cross-section of the tissue model according to the relative position relationship between each graphic element and the target bevel. In the embodiment of the present application, after determining the target bevel of the tissue model, according to the relative position relationship between each graphic element and the target bevel, the target bevel is used as the cutting surface of the tissue model, and some graphic elements of the cut tissue model are rendered to display the cross-section of the tissue model, so as to obtain the cross-section effect in real time and intuitively. The present application does not need to fill in the cross-section and contour lines after cutting the model, so that the user can observe the cross-section of the tissue model and understand the internal structure of the tissue model, providing the user with a clear and intuitive field of view. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A diagram of an application environment of a cross-section display method of an organizational model in one embodiment;
[0045] Figure 2 A schematic flow chart of a method for displaying a cross-section of an organizational model in one embodiment;
[0046] Figure 3 A schematic diagram of a flow chart of a relative position relationship determination method in one embodiment;
[0047] Figure 4 A schematic diagram of a first length and a second length in one embodiment;
[0048] Figure 5 A schematic flow chart of a relative position relationship determination method in another embodiment;
[0049] Figure 6 A schematic diagram of a flow chart of a method for determining a target oblique surface in one embodiment;
[0050] Figure 7 is a schematic diagram of an initial chamfered surface in one embodiment;
[0051] Figure 8 It is a schematic diagram of the flow of a method for rendering an operation ball at a target position point in one embodiment;
[0052] Fig. 9 A schematic flow chart of a cross-section display method of an organization model in another embodiment;
[0053] Fig.10 A structural block diagram of a cross-section display device of an organizational model in one embodiment;
[0054] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] Mixed reality is a visualization environment created by merging the real and virtual worlds, in which physical and digital objects coexist and interact in real time. In the display application of 3D models, it is often necessary to display the 3D model of an object in cross-section, so that users can have a clear and intuitive understanding of the internal structure of the object. In the related art, a 3D model is displayed in a two-dimensional space by a computer display device, and the model is cut by drawing an image. After the cutting is completed, the sections and contours need to be filled in for cross-section display. Therefore, the current cross-section display method has the problem of complex operation. Therefore, the present application proposes a cross-section display method, device, computer equipment and storage medium for organizing models to solve the above technical problems.
[0057] The cross-sectional display method of the tissue model provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the application environment includes a mixed reality device 10, which includes a processor 101 and a display 102. The processor 101 is used to build a development platform for a three-dimensional model, and the environment required by the mixed reality device 10 is configured on the development platform. When the user wears the mixed reality device 10, the real environment is seen through the display 102, and the three-dimensional model is displayed in the three-dimensional space through the display 102. Optionally, the development platform of the three-dimensional model is the Unity3D engine development platform, the mixed reality device 10 can be a Hololens holographic glasses, and the environment required by the Hololens holographic glasses is the MRTK toolkit.
[0058] In one embodiment, Figure 2 As shown, a cross-sectional display method of an organizational model is provided, and the method is applied to Figure 1 The mixed reality device in the example is used to illustrate the process, including the following steps:
[0059] S201, determining a target oblique section of a tissue model.
[0060] The tissue model is a three-dimensional model of the tissue, and the tissue can be any part of the human body, such as the head, liver, kidney, etc. The target oblique section is a three-dimensional cutting plate with a very small thickness, which is close to a plane.
[0061] In this embodiment, the files corresponding to each tissue are parsed to obtain the primitive position, primitive color, and normal information, and the tissue model is rendered. A bevel script is mounted on the tissue model (the bevel script is a script that determines the material of the initial bevel and implements functions related to the initial bevel), an initial bevel is created in the bevel script, and the size and position of the initial bevel are adjusted to obtain a target bevel. The created initial bevel can also be directly used as the target bevel.
[0062] The transparency of the target oblique surface may be less than a preset transparency.
[0063] In one possible implementation, a shader is mounted on the target bevel surface. The shader is a program that can be executed by an image processing unit. The color and transparency of the target bevel surface are controlled in the shader so that the drawn target bevel surface appears transparent, so that the structure of the section can be clearly observed, and the user can have a clear and intuitive understanding of the internal structure of the tissue model.
[0064] S202, obtaining the relative position relationship between each graphic element in the tissue model and the target bevel surface.
[0065] The graphic element in the organizational model refers to the smallest unit that constitutes the organizational model.
[0066] The target bevel can divide the space. When the target bevel runs through the tissue model, part of the graphic elements of the tissue model are located on one side of the target bevel, and the other part of the graphic elements are located on the other side of the target bevel. Optionally, when the target bevel is placed horizontally or nearly horizontally, the relative position relationship can be that the graphic element is located above the target bevel, or the graphic element is located below the target bevel; when the target bevel is placed vertically or nearly vertically, the relative position relationship can be that the graphic element is located on the left side of the target bevel, or the graphic element is located on the right side of the target bevel.
[0067] In this embodiment, the target bevel surface also includes multiple graphics elements. The distance between each graphics element in the tissue model and each graphics element in the target bevel surface can be determined based on the first coordinate information of each graphics element in the tissue model and the second coordinate information of each graphics element in the target bevel surface, and the relative position relationship between each graphics element in the tissue model and the target bevel surface can be determined based on the distance.
[0068] In a possible implementation, the first length of the line segment between each graphic element in the tissue model and the origin of the world coordinate system along the normal direction of the target bevel surface can be determined based on the normals of each graphic element in the tissue model and the target bevel surface; the second length of the line segment between the center position of the target bevel surface and the origin of the world coordinate system along the normal direction of the target bevel surface can be determined based on the center position of the target bevel surface and the normal of the target bevel surface; and the relative position relationship between each graphic element in the tissue model and the target bevel surface can be determined based on the difference between the first length and the second length.
[0069] S203, displaying the cross section of the tissue model according to the relative position relationship between each graphic element and the target oblique section.
[0070] In this embodiment, in order to map the difference value to the interval between 0 and 1 and simplify the amount of data, the difference value can be multiplied by a preset transparency (less than 1 and greater than 0), the product results of the difference value and the preset transparency corresponding to each relative position relationship can be determined, each product result can be compared with a preset transparency test value, the graphic element corresponding to the product result not less than the preset transparency test value can be determined, and the graphic element corresponding to the product result not less than the preset transparency test value can be rendered to display the cross section of the tissue model; or the graphic element corresponding to the product result less than the preset transparency test value can be determined, and the graphic element corresponding to the product result less than the preset transparency test value can be rendered to display the cross section of the tissue model. For example, the multiplied product result is passed to the clip function for transparency testing. When the product result is a negative value, the clip function will discard the graphic element corresponding to the product result and retain the graphic element corresponding to the non-negative product result, that is, the graphic element corresponding to the non-negative product result is the target graphic element.
[0071] Optionally, the preset transparency is between 0 and 1, and the smaller the preset transparency is, the higher the transparency is. The preset transparency test value can be a specific value or a range of values. For example, the preset transparency test value is 0 or (0, 0.5). Since the preset transparencies are all positive numbers, if the difference corresponding to each relative position relationship is a positive value, the product result after multiplication is a positive value, and if the difference corresponding to each relative position relationship is a negative value, the product result after multiplication is a negative value.
[0072] In a possible implementation, the target primitive can also be determined directly according to the difference corresponding to the relative position relationship between each primitive and the target oblique section, the target primitive includes different tissues, materials and shaders are imported into the tissue model, different colors and materials are set for different tissues in the shader, and the target primitive is rendered in real time to display the cross section of the tissue model. For example, the blood vessels in the target primitive are rendered using material 1 and color 1, and the gallbladder in the target primitive is rendered using material 2 and color 2 to display the cross section of the tissue model.
[0073] In the above-mentioned method for displaying the cross section of the tissue model, the target bevel of the tissue model is determined, the relative position relationship between each graphic element in the tissue model and the target bevel is obtained, and the cross section of the tissue model is displayed according to the relative position relationship between each graphic element and the target bevel. In the embodiment of the present application, after determining the target bevel of the tissue model, according to the relative position relationship between each graphic element and the target bevel, the target bevel is used as the cutting surface of the tissue model, and some graphic elements of the cut tissue model are rendered to display the cross section of the tissue model, so as to obtain the cross section effect in real time and intuitively. The present application does not need to fill in the cross section and contour lines after cutting the model, so that the user can observe the cross section of the tissue model and understand the internal structure of the tissue model, providing the user with a clear and intuitive field of view.
[0074] Figure 3 FIG. 1 is a flow chart of a method for determining a relative position relationship in an embodiment. Figure 3 As shown, the embodiment of the present application relates to a possible implementation method of how to obtain the relative position relationship between each primitive in the tissue model and the target oblique section, including the following steps:
[0075] S301, determining, according to normals of each graphic element and the target oblique section, a first length of a line segment between each graphic element and the origin of the world coordinate system along the normal direction of the target oblique section.
[0076] S302, determining a second length of a line segment between the center position of the target oblique section and the origin of the world coordinate system along the normal direction of the target oblique section according to the center position of the target oblique section and the normal of the target oblique section.
[0077] The world coordinate system is the absolute coordinate system of the operating system of the mixed reality device.
[0078] In this embodiment, if Figure 4 As shown, the line segment mp between each graphic element m and the origin p of the world coordinate system can be determined according to the coordinate position of each graphic element m in the world coordinate system and the origin position p of the world coordinate system, and the line segment pq between the center position of the target bevel surface and the origin position p of the world coordinate system can be determined according to the center position q of the target bevel surface and the origin position p of the world coordinate system. The line segment mp between each graphic element and the origin of the world coordinate system is mapped to the normal direction of the target bevel surface to obtain a first length d1; the line segment pq between the center position of the target bevel surface and the origin of the world coordinate system is mapped to the normal direction of the target bevel surface to obtain a second length d2.
[0079] In a possible implementation, a shader can be imported into the tissue model, and a target bevel surface position calculation script can be mounted at the same time to obtain the center position of the target bevel surface in the world coordinate system, the normal of the target bevel surface and the position of each primitive in the world coordinate system in real time in the shader.
[0080] The position calculation script multiplies the position and direction (the direction from the origin of the world coordinate system to the primitive) of each primitive in the world coordinate system by the normal of the target bevel, and determines the first length of the line segment between each primitive and the origin of the world coordinate system along the normal direction of the target bevel. Similarly, the position and direction (the direction from the origin of the world coordinate system to the center of the target bevel) of the target bevel in the world coordinate system (i.e., the vector) are also multiplied by the normal of the target bevel to obtain the second length of the line segment between the center of the target bevel and the origin of the world coordinate system along the normal direction of the target bevel.
[0081] S303: Determine the relative position relationship between each graphic element and the target bevel surface according to the first length and the second length corresponding to each graphic element.
[0082] In this embodiment, the relative position relationship between each primitive and the target bevel surface is determined according to the difference between the first length and the second length corresponding to each primitive. The relative position relationship between each primitive and the target bevel surface can also be determined according to the ratio of the first length to the second length.
[0083] In the embodiment of the present application, the first length of the line segment between each graphic element and the origin of the world coordinate system along the normal direction of the target bevel is determined based on the normal of each graphic element and the target bevel. The second length of the line segment between the center position of the target bevel and the origin of the world coordinate system along the normal direction of the target bevel is determined based on the center position of the target bevel and the normal of the target bevel. The relative position relationship between each graphic element and the target bevel is determined based on the first length and the second length corresponding to each graphic element. In this embodiment, based on the mixed reality device displaying the organizational model in three-dimensional space, the relative position relationship between each graphic element and the target bevel is determined based on each graphic element, the target bevel, the origin of the world coordinate system, etc. in the organizational model. This is different from the computer device displaying a three-dimensional image in two-dimensional space, so that the determined relative position relationship is more intuitive and convenient for users to watch.
[0084] Figure 5 FIG. 1 is a flow chart of a relative position relationship determination method in another embodiment. Figure 5 As shown, the embodiment of the present application relates to a possible implementation method of how to determine the relative position relationship between each primitive and the target bevel surface according to the first length and the second length corresponding to each primitive, including the following steps:
[0085] S501, determining the difference between the first length and the second length corresponding to each graphic element.
[0086] In this embodiment, the difference between the first length and the second length corresponding to each primitive is determined, which may be the difference obtained by subtracting the second length from the first length, or the difference obtained by subtracting the first length from the second length.
[0087] S502: Determine the relative position relationship between each graphic element and the target bevel surface according to the difference between the first length and the second length corresponding to each graphic element.
[0088] In this embodiment, taking the relative position relationship that each graphic element is located above or below the target bevel surface as an example, if the difference between the first length and the second length is the difference obtained by subtracting the second length from the first length, and the difference is a positive value, then the graphic element corresponding to the difference is located above the target bevel surface; if the difference between the first length and the second length is the difference obtained by subtracting the second length from the first length, and the difference is a negative value, then the graphic element corresponding to the difference is located below the target bevel surface.
[0089] Similarly, it is also possible to determine whether each graphic element is located on the left side or the right side of the target chamfered surface based on the difference between the first length and the second length.
[0090] In the embodiment of the present application, by determining the difference between the first length and the second length corresponding to each primitive, the relative position relationship between each primitive and the target bevel is determined according to the difference between the first length and the second length corresponding to each primitive. In the present embodiment, the relative position relationship between each primitive and the target bevel is determined according to the difference between the first length and the second length. The operation method is simple, the efficiency of the relative position relationship determination is improved, and the foundation is laid for the subsequent display of the cross section of the tissue model based on the relative position relationship.
[0091] Figure 6 FIG. 1 is a flow chart of a method for determining a target oblique surface in an embodiment. Figure 6 As shown, the embodiment of the present application relates to a possible implementation method of how to determine the target oblique section of a tissue model, including the following steps:
[0092] S601 , when a target part of a target user is within a preset range of an initial oblique cutting surface, obtaining distances between the target part and each preset position point of the initial oblique cutting surface.
[0093] Among them, Figure 7 As shown, the preset position may include the center position of the four frames of the initial bevel surface, other positions of the four frames of the initial bevel surface, and the center position of the initial bevel surface, etc. The center positions of the four frames of the initial bevel surface are a1, a2, a3, and a4, respectively, and the center position of the initial bevel surface is a5.
[0094] In this embodiment, when the target part of the target user is within the preset range of the initial bevel, the distance between the target part and each preset position point of the initial bevel is calculated according to the coordinate position of the target part and the coordinate position of each preset position point.
[0095] S602: Determine a target position point from the preset position points according to the distance between the target part and the preset position points.
[0096] In this embodiment, the minimum distance between the target part and each preset position point is determined, and the preset position point corresponding to the minimum distance is used as the target position point. For example, the MRTK script is mounted on the initial bevel surface. MRTK is a mixed reality toolkit provided by Hololens, which can be used with the Unity3D engine development platform to develop various augmented reality scene applications. The MRTK script can provide a boundary behavior control script (BoundingControl) and a near-distance grab behavior script (NearInteractionGrabable).
[0097] The BoundingControl script can make the initial chamfer surface display a box around it when the target part is close. The boundary behavior control script includes the Rotation Handles Configuration and Translation Handles Configuration properties, which can constrain the initial chamfer surface to the center of the four borders and the center of the initial chamfer surface when the target part is close, that is, which preset position point is closest to the target part among the preset positions, and the preset position point with the closest distance is used as the target position point. The target position point is rendered to distinguish it from other preset positions, and a pinchable ball is displayed, which is the operation handle.
[0098] S603, adjusting the initial bevel surface according to the adjustment instruction corresponding to the target position point to obtain the target bevel surface; the adjustment instruction is an instruction triggered for the target position point when the target part is located in the preset range of the initial bevel surface.
[0099] Optionally, the adjustment instruction may be an up and down movement instruction, a rotation instruction, etc.
[0100] In this embodiment, the initial chamfer is adjusted according to the adjustment instruction corresponding to the target position point. If the target position point is the center position of the initial chamfer, the target position point is used to move the initial chamfer in a direction perpendicular to the initial chamfer. If the target position is the center position of any of the four borders of the initial chamfer, the target position point is used to rotate the initial chamfer in any direction. Figure 7As shown in the figure, the NearInteractionGrabable script mounted on the initial bevel can make the initial bevel on which it is mounted respond to the near-distance pinch operation, add a moving operation handle at the center of the initial bevel, add a rotating operation handle to the four borders of the initial bevel, and use the index finger and thumb to pinch the initial bevel to get the target bevel. The pinch operation is the same as operating a real 3D object, giving the user a pinching feeling of a real 3D space object.
[0101] In the embodiment of the present application, when the target part of the target user is within the preset range of the initial beveled section, the distance between the target part and each preset position point of the initial beveled section is obtained, and the target position point is determined from each preset position point according to the distance between the target part and each preset position point, and the initial beveled section is adjusted according to the adjustment instruction corresponding to the target position point to obtain the target beveled section. In this embodiment, the target user grabs the initial beveled section, and the target position point is determined according to the distance between the target part and each preset position point during the grabbing process, and the target position point is operated to realize the rotation and movement of the initial beveled section to obtain the target beveled section, and the tissue model is cut along any direction and position using the target beveled section, and the section after cutting is rendered by image, so as to obtain the section effect in real time.
[0102] In one embodiment, the target position point includes the center position of the frame of the initial chamfered surface or the center position of the initial chamfered surface. According to the adjustment instruction corresponding to the target position point, the initial chamfered surface is adjusted to obtain the target chamfered surface, including the following two methods:
[0103] The first method is to rotate the initial chamfered surface according to the adjustment instruction corresponding to the center position of the frame of the initial chamfered surface to obtain the target chamfered surface.
[0104] In this embodiment, combined with the above Figure 7 To illustrate, if the center position of the border of the initial beveled surface is a1, and the first line connecting two adjacent preset position points of the target position point is z1, according to the rotation instruction corresponding to the center position a1 of the border of the initial beveled surface, the initial beveled surface is rotated with the first line z1 as the rotation axis to obtain the target beveled surface.
[0105] The second method is to move the initial bevel surface according to the adjustment instruction corresponding to the center position of the initial bevel surface to obtain the target bevel surface.
[0106] In this embodiment, combined with the above Figure 7 To illustrate, if the center position of the initial beveled surface is a5, according to the translation instruction corresponding to the center position of the initial beveled surface, the initial beveled surface is translated along the normal direction of the initial beveled surface to obtain the target beveled surface.
[0107] The above two methods may also be combined to adjust the initial bevel surface to obtain the target bevel surface.
[0108] In an embodiment of the present application, the initial beveled section is rotated according to an adjustment instruction corresponding to the center position of the frame of the initial beveled section to obtain a target beveled section, or the initial beveled section is translated along the normal direction of the initial beveled section according to a translation instruction corresponding to the center position of the initial beveled section to obtain a target beveled section. The method for determining the target beveled section is simple, which improves the efficiency of determining the target beveled section, thereby improving the efficiency of cross-sectional display of the tissue model.
[0109] Figure 8 FIG. 1 is a flow chart of a method for rendering an operation ball at a target position point in an embodiment. Figure 8 As shown, the following steps are included:
[0110] S801, when the target part of the target user is within the preset range of the initial beveled surface, displaying an operation ball at each preset position point.
[0111] In this embodiment, when the target part of the target user is within the preset range of the initial beveled surface, four operation balls are displayed at the center positions of the four frames of the initial beveled surface, and one operation ball is displayed at the center position of the initial beveled surface. When the target part of the target user is not within the preset range of the initial beveled surface, the operation ball is hidden.
[0112] S802: When the target position point is determined, the operation ball corresponding to the target position point is rendered.
[0113] In this embodiment, when the target position point is determined, the operation ball corresponding to the target position point is rendered in color to distinguish it from the operation balls of other preset position points and highlight the target position point.
[0114] In a possible implementation, the operation ball corresponding to the target position point may be rendered in color, and the operation ball at the preset position point may be hidden to highlight the target position point.
[0115] In the embodiment of the present application, when the target part of the target user is within the preset range of the initial bevel, the operation ball is displayed at each preset position point, and when the target position point is determined, the operation ball corresponding to the target position point is rendered. In this embodiment, rendering the operation ball corresponding to the target position point can be displayed more intuitively, making it convenient for the user to operate the target position point.
[0116] In one embodiment, a method for displaying a cross section of a tissue model is provided. Fig. 9As shown, the method includes the following steps: mounting a bevel script on the parsed tissue model, importing materials and shaders to the tissue model, creating an initial bevel using the bevel script, importing materials and shaders to the initial bevel, mounting a boundary behavior control script and a close-range grab behavior script on the initial bevel, and when the target user grabs the initial bevel, operating the initial bevel using the boundary behavior control script and the close-range grab behavior script to obtain a target bevel, obtaining the center position of the target bevel in the world coordinate system, the normal of the target bevel, and the position of each primitive in the world coordinate system in the shader, determining the first length of the line segment between each primitive and the origin of the world coordinate system along the normal direction of the target bevel, and the second length of the line segment between the center position of the target bevel and the origin of the world coordinate system along the normal direction of the target bevel. Determine the difference between the first length and the second length, multiply the difference by a preset transparency to obtain a product result, determine the target primitive according to each product result and a preset transparency test value, and render the target primitive to display the section of the tissue model.
[0117] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0118] Based on the same inventive concept, the embodiment of the present application also provides a cross-section display device for a tissue model for implementing the cross-section display method of the tissue model involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations of the cross-section display device embodiments of one or more tissue models provided below can refer to the limitations of the cross-section display method of the tissue model above, and will not be repeated here.
[0119] In one embodiment, Fig.10 As shown, a cross-section display device of a tissue model is provided, comprising: a determination module 11, an acquisition module 12 and a display module 13, wherein:
[0120] A determination module 11, used to determine a target oblique section of the tissue model;
[0121] An acquisition module 12 is used to acquire the relative position relationship between each graphic element in the tissue model and the target oblique section;
[0122] The display module 13 is used to display the cross section of the tissue model according to the relative position relationship between each graphic element and the target oblique section.
[0123] In one embodiment, the acquisition module includes:
[0124] A first determining unit, configured to determine, according to normals of each primitive and the target oblique section, a first length of a line segment between each primitive and the origin of the world coordinate system along a normal direction of the target oblique section;
[0125] A second determining unit is used to determine a second length of a line segment between the center position of the target oblique section and the origin of the world coordinate system along the normal direction of the target oblique section according to the center position of the target oblique section and the normal of the target oblique section;
[0126] The third determining unit is used to determine the relative position relationship between each graphic element and the target bevel surface according to the first length and the second length corresponding to each graphic element.
[0127] In one embodiment, the third determination unit is further used to determine the difference between the first length and the second length corresponding to each primitive; and determine the relative position relationship between each primitive and the target bevel surface according to the difference between the first length and the second length corresponding to each primitive.
[0128] In one embodiment, the determining module includes:
[0129] An acquisition unit, configured to acquire the distance between the target part and each preset position point of the initial bevel section when the target part of the target user is within the preset range of the initial bevel section;
[0130] A fourth determining unit, configured to determine a target position point from the preset position points according to the distance between the target part and the preset position points;
[0131] The adjustment unit is used to adjust the initial bevel surface according to the adjustment instruction corresponding to the target position point to obtain the target bevel surface; the adjustment instruction is an instruction triggered for the target position point when the target part is located in the preset range of the initial bevel surface.
[0132] In one embodiment, the adjustment unit is further configured to rotate the initial chamfered surface according to the adjustment instruction corresponding to the center position of the frame of the initial chamfered surface to obtain the target chamfered surface.
[0133] In one embodiment, the adjustment unit is further configured to move the initial beveled surface according to the adjustment instruction corresponding to the center position of the initial beveled surface to obtain a target beveled surface.
[0134] In one embodiment, the determining module further includes:
[0135] A display unit, used to display an operation ball at each preset position point when the target part of the target user is within the preset range of the initial bevel surface;
[0136] The rendering unit is used to render the operation ball corresponding to the target position point when the target position point is determined.
[0137] Each module in the cross-section display device of the tissue model can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0138] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a cross-sectional display method of an organizational model is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the computer device housing, or an external keyboard, touch pad or mouse, etc.
[0139] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0140] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0141] Determine the target bevel of the tissue model;
[0142] Obtaining the relative position relationship between each graphic element in the tissue model and the target oblique section;
[0143] Display the cross section of the tissue model based on the relative position relationship between each element and the target bevel surface.
[0144] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0145] According to the normals of each primitive and the target oblique section, determine the first length of the line segment between each primitive and the origin of the world coordinate system along the normal direction of the target oblique section;
[0146] Determine, according to the center position of the target oblique section and the normal line of the target oblique section, a second length of a line segment between the center position of the target oblique section and the origin of the world coordinate system along the normal line direction of the target oblique section;
[0147] The relative position relationship between each graphic element and the target bevel surface is determined according to the first length and the second length corresponding to each graphic element.
[0148] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0149] Determine the difference between the first length and the second length corresponding to each primitive;
[0150] The relative position relationship between each graphic element and the target bevel surface is determined according to the difference between the first length and the second length corresponding to each graphic element.
[0151] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0152] When the target part of the target user is within the preset range of the initial oblique section, obtaining the distance between the target part and each preset position point of the initial oblique section;
[0153] Determine the target position point from the preset position points according to the distance between the target part and the preset position points;
[0154] According to the adjustment instruction corresponding to the target position point, the initial bevel is adjusted to obtain the target bevel; the adjustment instruction is a command triggered for the target position point when the target part is located within the preset range of the initial bevel.
[0155] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0156] According to the adjustment instruction corresponding to the center position of the frame of the initial beveled surface, the initial beveled surface is rotated to obtain the target beveled surface.
[0157] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0158] According to the adjustment instruction corresponding to the center position of the initial beveled surface, the initial beveled surface is moved to obtain the target beveled surface.
[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0160] When the target part of the target user is within the preset range of the initial beveled surface, the operation ball is displayed at each preset position point;
[0161] When the target position point is determined, the operation ball corresponding to the target position point is rendered.
[0162] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0163] Determine the target bevel of the tissue model;
[0164] Obtaining the relative position relationship between each graphic element in the tissue model and the target oblique section;
[0165] Display the cross section of the tissue model based on the relative position relationship between each element and the target bevel surface.
[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0167] According to the normals of each primitive and the target oblique section, determine the first length of the line segment between each primitive and the origin of the world coordinate system along the normal direction of the target oblique section;
[0168] Determine, according to the center position of the target oblique section and the normal line of the target oblique section, a second length of a line segment between the center position of the target oblique section and the origin of the world coordinate system along the normal line direction of the target oblique section;
[0169] The relative position relationship between each graphic element and the target bevel surface is determined according to the first length and the second length corresponding to each graphic element.
[0170] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0171] Determine the difference between the first length and the second length corresponding to each primitive;
[0172] The relative position relationship between each graphic element and the target bevel surface is determined according to the difference between the first length and the second length corresponding to each graphic element.
[0173] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0174] When the target part of the target user is within the preset range of the initial oblique section, obtaining the distance between the target part and each preset position point of the initial oblique section;
[0175] Determine the target position point from the preset position points according to the distance between the target part and the preset position points;
[0176] According to the adjustment instruction corresponding to the target position point, the initial bevel is adjusted to obtain the target bevel; the adjustment instruction is a command triggered for the target position point when the target part is located within the preset range of the initial bevel.
[0177] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0178] According to the adjustment instruction corresponding to the center position of the frame of the initial beveled surface, the initial beveled surface is rotated to obtain the target beveled surface.
[0179] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0180] According to the adjustment instruction corresponding to the center position of the initial beveled surface, the initial beveled surface is moved to obtain the target beveled surface.
[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0182] When the target part of the target user is within the preset range of the initial beveled surface, the operation ball is displayed at each preset position point;
[0183] When the target position point is determined, the operation ball corresponding to the target position point is rendered.
[0184] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0185] Determine the target bevel of the tissue model;
[0186] Obtaining the relative position relationship between each graphic element in the tissue model and the target oblique section;
[0187] Display the cross section of the tissue model based on the relative position relationship between each element and the target bevel surface.
[0188] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0189] According to the normals of each primitive and the target oblique section, determine the first length of the line segment between each primitive and the origin of the world coordinate system along the normal direction of the target oblique section;
[0190] Determine, according to the center position of the target oblique section and the normal line of the target oblique section, a second length of a line segment between the center position of the target oblique section and the origin of the world coordinate system along the normal line direction of the target oblique section;
[0191] The relative position relationship between each graphic element and the target bevel surface is determined according to the first length and the second length corresponding to each graphic element.
[0192] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0193] Determine the difference between the first length and the second length corresponding to each primitive;
[0194] The relative position relationship between each graphic element and the target bevel surface is determined according to the difference between the first length and the second length corresponding to each graphic element.
[0195] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0196] When the target part of the target user is within the preset range of the initial oblique section, obtaining the distance between the target part and each preset position point of the initial oblique section;
[0197] Determine the target position point from the preset position points according to the distance between the target part and the preset position points;
[0198] According to the adjustment instruction corresponding to the target position point, the initial bevel is adjusted to obtain the target bevel; the adjustment instruction is a command triggered for the target position point when the target part is located within the preset range of the initial bevel.
[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0200] According to the adjustment instruction corresponding to the center position of the frame of the initial beveled surface, the initial beveled surface is rotated to obtain the target beveled surface.
[0201] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0202] According to the adjustment instruction corresponding to the center position of the initial beveled surface, the initial beveled surface is moved to obtain the target beveled surface.
[0203] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0204] When the target part of the target user is within the preset range of the initial beveled surface, the operation ball is displayed at each preset position point;
[0205] When the target position point is determined, the operation ball corresponding to the target position point is rendered. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0206] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0207] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0208] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for displaying a cross section of a tissue model, characterized in that: The method is applied to a mixed reality device, and the method comprises: Determine the target bevel of the tissue model; Acquiring the relative position relationship between each graphic element in the tissue model and the target oblique section; The cross section of the tissue model is displayed according to the relative position relationship between each of the graphic elements and the target oblique section.
2. The method according to claim 1, characterized in that The obtaining of the relative positional relationship between each graphic element in the tissue model and the target oblique section includes: Determine, according to the normals of the primitives and the target oblique section, a first length of a line segment between the primitives and the origin of the world coordinate system along the normal direction of the target oblique section; Determine, according to the center position of the target oblique section and the normal of the target oblique section, a second length of a line segment between the center position of the target oblique section and the origin of the world coordinate system along the normal direction of the target oblique section; The relative positional relationship between each of the graphic elements and the target bevel surface is determined according to the first length and the second length corresponding to each of the graphic elements.
3. The method according to claim 2, characterized in that The determining the relative positional relationship between each of the graphic elements and the target bevel surface according to the first length and the second length corresponding to each of the graphic elements comprises: Determine the difference between the first length and the second length corresponding to each of the graphic elements; The relative positional relationship between each of the graphic elements and the target bevel surface is determined according to the difference between the first length and the second length corresponding to each of the graphic elements.
4. The method according to claim 1, characterized in that: Determining the target oblique section of the tissue model includes: When the target part of the target user is within the preset range of the initial bevel cut surface, obtaining the distance between the target part and each preset position point of the initial bevel cut surface; Determining a target position point from the preset position points according to the distance between the target part and the preset position points; According to the adjustment instruction corresponding to the target position point, the initial bevel is adjusted to obtain the target bevel; the adjustment instruction is a command triggered for the target position point when the target part is located within a preset range of the initial bevel.
5. The method according to claim 4, characterized in that The target position point includes the center position of the frame of the initial chamfered surface, and the initial chamfered surface is adjusted according to the adjustment instruction corresponding to the target position point to obtain the target chamfered surface, including: According to the adjustment instruction corresponding to the center position of the frame of the initial chamfered surface, the initial chamfered surface is rotated to obtain the target chamfered surface.
6. The method according to claim 4, characterized in that The target position point includes the center position of the initial beveled surface, and the initial beveled surface is adjusted according to the adjustment instruction corresponding to the target position point to obtain the target beveled surface, including: According to the adjustment instruction corresponding to the center position of the initial beveled surface, the initial beveled surface is moved to obtain the target beveled surface.
7. The method according to claim 4, characterized in that The method further comprises: When the target part of the target user is within the preset range of the initial beveled surface, displaying an operation ball at each of the preset position points; When the target position point is determined, the operation ball corresponding to the target position point is rendered.
8. A cross-sectional display device for a tissue model, characterized in that: The device comprises: A determination module, used for determining a target oblique section of the tissue model; An acquisition module, used for acquiring the relative position relationship between each graphic element in the tissue model and the target oblique section; The display module is used to display the cross section of the tissue model according to the relative position relationship between each of the graphic elements and the target oblique section.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.