Method and system for reconstructing tetrahedral mesh model from layered scanning data
The tetrahedral mesh model is reconstructed through hierarchical scanning data, which solves the accuracy problem of complex structural boundary and internal structure simulation in multi-material multi-component systems, achieves efficient mesh construction and calculation, and is suitable for many scientific and engineering field.
Patent Information
- Application Number
- CN202311303354.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-09
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2043-10-09
AI Technical Summary
When establishing a tetrahedral mesh model of a multi-material multi-component system using existing technology, it is difficult to accurately capture the boundary characteristics and internal structure of complex structures, resulting in inaccurate simulations and complex calculations. In addition, traditional meshing methods are ineffective when dealing with complex structures. Mesh distortion and holes are prone to occur.
The method of reconstructing the tetrahedral mesh model using layered scanning data is used to preprocess the two-dimensional tomography image data, determine the gray threshold and intersection points, initialize the initial tetrahedral mesh, and perform tetrahedral segmentation based on the edges. Update topological relationships to ensure high restoration of boundary features and computational efficiency of the model.
It achieves more accurate three-dimensional mesh model construction, improves calculation efficiency and boundary authenticity, can better reflect actual structural characteristics, and is suitable for simulation and analysis in fields such as materials science and medicine.
Smart Images

Figure CN117333615B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer graphics, and in particular to a method and system for reconstructing a tetrahedral mesh model from layered scanning data. Background Art
[0002] In the field of materials science and engineering, modeling and simulation of the material microstructure of multi-material and multi-component systems is one of the key points of future development. These complex materials include porous media, fiber composites, biomaterials, etc. These materials are usually composed of multiple different materials and have irregular shapes and pore structures. Understanding and modeling the internal structure of these complex materials is crucial for optimizing material performance and designing new materials.
[0003] For the simulation of multi-material and multi-component systems, the previous practice was to simplify the complex structure into a simple isotropic model and use computer-aided design (CAD) software to establish regular and idealized models. CAD software provides basic modeling tools to describe the appearance and geometric properties of common structural components. Once these idealized models are established, corresponding parametric design and engineering analysis can be performed. However, this method has certain limitations. Simplifying multi-material and multi-component systems into ideal models may ignore the complex physical and chemical interactions in the real world and lose the key characteristics of the real system. In particular, when it is necessary to consider complex interface effects or nonlinear behaviors between materials, it may lead to inaccurate simulation or even misunderstanding of system behavior. At the same time, the establishment and parameterization of simplified models require a lot of experiments and verification work, which is a very time-consuming and expensive task.
[0004] In order to overcome the limitations of idealized geometric shapes, the technology of three-dimensional meshing based on surface boundaries has been continuously developed in recent years. Usually, sensors are used in the industrial field to obtain point cloud data, and then useful information is extracted from these discrete points for surface reconstruction. The mature three-dimensional surface reconstruction algorithm MarchingCubes algorithm and its improved algorithm in the field of medical image processing have been widely used. Then, mature meshing methods such as Delaunay triangulation and wavefront method are used to automatically generate high-quality three-dimensional meshes. Using the surface drawing method to extract the boundaries of the structure and create a three-dimensional surface model can more accurately capture the complexity and irregularity of the structure. However, this method also has some limitations and defects. It performs well in the case of relatively simple structures, but when the structure becomes complex, some problems will appear. Complex structures may cause defects in the generated surface. The internal faces usually have tortuous and slender boundaries, which increases the complexity of the simulation. The meshing of complex structures becomes very time-consuming, and it is also easy to cause mesh distortion and the appearance of voids, making it difficult to obtain high-quality meshes that meet the requirements.
[0005] In order to solve these problems, some innovative methods have emerged in recent years. The basic idea is to use the high-resolution data obtained by tomography technology to directly perform volume rendering to generate a three-dimensional model, without relying on traditional surface reconstruction methods. The internal structure of the object can be directly presented through the volume rendering method without worrying about the incompleteness or tortuosity of the boundary surface. It is not limited by complex structures and can handle various complex situations including porous media, fine structures, and non-uniform material distribution. Unlike the surface-based meshing method, the volume rendering method is directly based on the real structure and does not require adaptive division. The subsequent mesh optimization is also based on the established three-dimensional mesh model, which simplifies the process and reduces the computational burden. In the future, we can expect to see this method widely used in multiple fields, bringing more accurate and comprehensive three-dimensional modeling tools to the fields of science and engineering.
[0006] Most of the current volume rendering methods are based on structured grids. The basic unit is generally a structured hexahedral grid. The structured grid is usually uniform, and its regularity allows computers to process more efficiently, so it has high computational efficiency. However, structured grids also have certain disadvantages. For example, structured grids handle regular boundary geometry problems very well, but there are limitations in dealing with complex and irregular geometries, because the characteristics of regular hexahedrons cannot effectively simulate boundaries unless more mesh refinement is introduced, which increases computational complexity.
[0007] Patent document CN103942836A discloses a method for tetrahedralizing a three-dimensional mesh model, comprising the following steps: (1) preprocessing the initial position of the model; (2) constructing a body-centered cubic structure; (3) calculating the tangent points of the tetrahedral edges with opposite node symbols and two end node symbols; (4) moving the tangent points; (5) re-tetrahedralizing the boundaries. The three-dimensional model tetrahedralization method disclosed in the present invention is based on the body-centered cubic mesh tetrahedralization algorithm, adds the preprocessing of the principal component analysis of the three-dimensional model, improves the movement mode of the model boundary tangent points to the movement of the model feature points, and uses the density energy error function to optimize the node positions for the final tetrahedral mesh. After the principal component analysis is applied to the three-dimensional model, the quality of the initial tetrahedral unit is improved; the improvement of the movement of the tangent points to the model feature points ensures the local characteristics of the model after tetrahedralization; the density energy error function optimizes the quality of the final tetrahedral mesh.
[0008] The present invention aims to solve the problems associated with establishing tetrahedral mesh models for multi-material and multi-component systems. First, the goal of the present invention is to obtain a tetrahedral mesh model that is as accurate as possible, including accurate structural boundaries, to restore the characteristics of the actual structure to the greatest extent possible. This is crucial for research in fields such as materials science, engineering, and medicine, because accurate structural boundaries are the basis for simulation, design, and analysis. The present invention aims to generate a three-dimensional mesh model that is closer to the real situation. This means that our model can not only capture surface features, but also accurately reflect the internal structure, thereby providing more comprehensive data.
[0009] After establishing a complete three-dimensional tetrahedron model, it is necessary to conduct connectivity analysis and master the geometric characteristics of the modeling area, so as to better understand and optimize complex structures, guide design decisions, conduct simulations and analyses, and solve various practical problems. First, it is necessary to understand the connectivity of different materials in the area and the volume ratio of different materials; calculate the volume, surface area, and boundary information of each connected area; for the presence of pores in the area, it is necessary to evaluate the porosity and porosity of the material; analyze the curvature and shape characteristics of the structure; if used for defect detection, it is necessary to analyze the geometric defects in the area, such as cracks, holes, unevenness, etc.; if the performance of the contact surface of different materials is more important, it is necessary to analyze the shape, area and other geometric characteristics of the contact area.
[0010] The present invention provides an innovative algorithm to address the above problems. Using a series of two-dimensional tomographic image data of multiple materials and multiple components, we preprocess the image data through noise reduction technology, determine the grayscale threshold of the image, and calculate the value of the isosurface, which is the key to defining the contact boundary of different materials; then preset a tetrahedron initial grid with a certain accuracy to complete the basis for building a three-dimensional model; through the intersection of each edge and the interface, the surface position can be accurately determined, and the tetrahedron is divided based on the edge where the intersection is located, and the adjacency relationship between the tetrahedrons is updated at the same time to ensure that the subsequent topological relationship is not confused; at this time, the three-dimensional model is established, and different geometric features are calculated according to different needs.
[0011] The algorithm of the present invention uses tetrahedron as the basic unit. Compared with hexahedron unit, it can restore the boundary features to a higher degree under the same calculation accuracy. Compared with meshing based on boundary surface, by presetting the initial tetrahedron unit, it successfully solves the huge computational complexity problem brought by traditional Delaunay and other meshing technologies when generating multi-layer boundaries. This innovation not only improves the calculation efficiency, but also guarantees the authenticity of the boundary to the greatest extent.
[0012] Tetrahedrons are divided based on edges, and each division only affects the topological relationship of a small number of tetrahedrons, ensuring that the calculation time will not be too long during the calculation process. Timeliness is critical for many applications, especially in fields that require rapid decision-making and analysis, such as engineering design, medical diagnosis, and scientific research.
[0013] This algorithm can not only construct 3D volume elements, but also 3D surface models at the same time, providing greater flexibility for a wide range of applications. The algorithm is designed with stability and reliability in mind, especially the edge-based strategy for tetrahedral partitioning. This ensures that the topological relationship is updated very accurately and conveniently, providing a solid foundation for future scientific computing such as finite element simulation.
[0014] In the future, we expect to continue to improve and extend this algorithm to meet evolving engineering and scientific needs. Summary of the invention
[0015] In view of the defects in the prior art, the object of the present invention is to provide a method and system for reconstructing a tetrahedral mesh model from layered scanning data.
[0016] A method for reconstructing a tetrahedral mesh model from layered scanning data provided by the present invention comprises:
[0017] Preprocessing step: Scan the sample to be tested by using layered scanning technology to obtain a series of two-dimensional layered scanning images of the sample; preprocess the two-dimensional layered scanning image data to determine the grayscale threshold of the interface between different materials and determine the intersection point;
[0018] Determine steps: initialize the tetrahedron initial mesh with preset accuracy, establish the adjacency topology relationship, and preset the material type;
[0019] Specifically, compare the gray value corresponding to each edge vertex with the interface threshold. If the interface threshold is not between the gray values of the two vertices, there is no intersection between the edge and the interface, and no subsequent processing is required. If the interface threshold is between the gray values of the two vertices, that is, there is an intersection between the edge and the interface, the position of the intersection is calculated by the interpolation function.
[0020] Steps for building the model: split the tetrahedron involved into multiple tetrahedrons according to the edges where the intersections are located, and update the topological relationship. Update the material type of the edges, faces, and bodies involved in the splitting according to the vertex material type, and finally build a three-dimensional tetrahedron mesh model;
[0021] Analysis and calculation steps: Perform connectivity analysis on the generated network model, including: analyzing the geometric characteristics of the test area; calculating the volume ratio, specific surface area, boundary information, etc. of each connected area.
[0022] Preferably, the pretreatment step comprises:
[0023] The two-dimensional layered scanning images are a set of continuous two-dimensional layered scanning images with known intervals between layers and the same scanning method;
[0024] The pre-processing step is performed on the basis of retaining the contact interface characteristics of different materials, including but not limited to noise reduction processing;
[0025] The grayscale threshold of the interface between different materials needs to be determined based on a set of two-dimensional layered scanning images to determine a unique grayscale threshold between different materials.
[0026] Preferably, the determining step comprises:
[0027] The whole area of the initialized preset tetrahedron grid is a cuboid, the length, width and height of which are respectively determined by the length and width of the two-dimensional image and the number of a group of two-dimensional scanned images measured in the preprocessing step; the preset tetrahedrons are arranged according to a certain rule, and adjacent tetrahedrons have common edges and common faces, but no distorted points; specifically, a point is on the preset tetrahedron, but is not one of the four vertices of the tetrahedron;
[0028] The interpolation function is a linear interpolation function established according to the gray values of two vertices, or an interpolation function established according to the spatial distribution of gray values of more nearby vertices.
[0029] Preferably, the model building step includes:
[0030] The method for dividing tetrahedrons is to traverse all edges and divide all tetrahedrons with common edges according to the intersection points of the edges and the interface;
[0031] Each vertex, each edge, each triangular face, and each tetrahedron in the three-dimensional tetrahedral mesh model has a corresponding material type or component type, and the setting of the material type is determined by the comparison between the grayscale value of the vertex and the interface threshold.
[0032] A system for reconstructing a tetrahedral mesh model from layered scanning data, comprising:
[0033] Preprocessing module: Scan the sample to be tested by using layered scanning technology to obtain a series of two-dimensional layered scanning images of the sample; preprocess the two-dimensional layered scanning image data to determine the grayscale threshold of the interface between different materials;
[0034] Determination module: initialize the initial tetrahedron mesh with preset accuracy, establish the adjacency topology relationship, preset the material type, and determine the intersection point;
[0035] Specifically, compare the gray value corresponding to each edge vertex with the interface threshold. If the interface threshold is not between the gray values of the two vertices, there is no intersection between the edge and the interface, and no subsequent processing is required. If the interface threshold is between the gray values of the two vertices, that is, there is an intersection between the edge and the interface, the position of the intersection is calculated by the interpolation function.
[0036] Model building module: split the tetrahedron involved into multiple tetrahedrons according to the edges where the intersection points are located, and update the topological relationship. The edges, faces, and bodies involved in the splitting update their material types according to the vertex material types, and finally build a three-dimensional tetrahedron mesh model;
[0037] Analysis and calculation module: Perform connectivity analysis on the generated network model, including: analyzing the geometric characteristics of the test area; calculating the volume ratio, specific surface area, boundary information, etc. of each connected area.
[0038] Preferably, the preprocessing module comprises:
[0039] The two-dimensional layered scanning images are a set of continuous two-dimensional layered scanning images with known intervals between layers and the same scanning method;
[0040] The pre-processing module is performed on the basis of retaining the contact interface characteristics of different materials, including but not limited to noise reduction processing;
[0041] The grayscale threshold of the interface between different materials needs to be determined based on a set of two-dimensional layered scanning images to determine a unique grayscale threshold between different materials.
[0042] Preferably, the determining module includes:
[0043] The whole area of the initialized preset tetrahedron grid is a cuboid, the length, width and height of which are respectively determined by the length and width of the two-dimensional image and the number of a group of two-dimensional scanned images measured in the preprocessing module; the preset tetrahedrons are arranged according to a certain rule, and adjacent tetrahedrons have common edges and common faces, but no distorted points; specifically, a point is on the preset tetrahedron, but is not one of the four vertices of the tetrahedron;
[0044] The interpolation function is a linear interpolation function established according to the gray values of two vertices, or an interpolation function established according to the spatial distribution of gray values of more nearby vertices.
[0045] Preferably, the model building module includes:
[0046] The method for dividing tetrahedrons is to traverse all edges and divide all tetrahedrons with common edges according to the intersection points of the edges and the interface;
[0047] Each vertex, each edge, each triangular face, and each tetrahedron in the three-dimensional tetrahedral mesh model has a corresponding material type or component type, and the setting of the material type is determined by the comparison between the grayscale value of the vertex and the interface threshold.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. The algorithm of the present invention is based on layered scanning images, and two-dimensional surfaces and three-dimensional volume elements are constructed simultaneously, which solves the problem that some surface rendering algorithms such as Marching Cubes cannot generate volume elements. Under the same efficiency, this invention can generate surface and volume meshes at the same time, which can be used not only for surface morphology research, but also for finite element stress analysis and other fields;
[0050] 2. The basic unit of the algorithm grid of the present invention is a tetrahedron, and the shape of the tetrahedron can be changed at will, which solves the problem of inaccurate boundary restoration of the regular hexahedron structured grid. Under the same accuracy, the tetrahedron grid unit has the highest degree of boundary restoration, which is closer to the actual situation of the structure and ensures the accuracy of the interface;
[0051] 3. The present invention presets an initial tetrahedron for the modeling area and performs segmentation based on the initial tetrahedron, thereby solving the problem that mainstream meshing methods such as Delaunay generate meshes in order layer by layer, which takes too long to calculate when facing complex structures and is prone to defects. The present invention generates meshes in a short time and with high accuracy;
[0052] 4. The present invention has a high degree of consistency with the real structure, ensuring the accuracy of the interface, and can provide more accurate tools for fields such as material performance prediction and simulation of material improvement plans, making scientific calculations such as finite element simulation and emulation more convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0054] Figure 1 Flowchart of the algorithm for generating tetrahedral mesh;
[0055] Figure 2 is a schematic diagram of a two-dimensional tomographic image of a wood-plastic composite material obtained after image preprocessing;
[0056] Figure 3 Schematic diagram of the relationship between the established initial grid and the two-dimensional layered scanning image;
[0057] Figure 4 A schematic diagram showing the numbering of the various positions of the cube in the example;
[0058] Figure 5A schematic diagram showing the rules for dividing the moving cube into six identical tetrahedrons by the Marching Tetrahedral algorithm;
[0059] Figure 6 A schematic diagram of a tetrahedron being divided into two tetrahedrons based on the edges;
[0060] Figure 7 The figure is a schematic diagram of an example of a three-dimensional tetrahedron model of a wood-plastic composite material generated according to the present invention. DETAILED DESCRIPTION
[0061] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0062] The present invention proposes an algorithm for generating a high-precision tetrahedral mesh model based on multi-material and multi-component tomographic data. The initial data is a series of tomographic two-dimensional images of the materials to be simulated. The main goal is to generate a high-precision three-dimensional tetrahedral mesh model, especially the accuracy in the boundary area, and the calculation of geometric features, including but not limited to the connectivity and volume ratio of different materials.
[0063] In order to achieve the above object, the present invention adopts the following technical scheme: a method for reconstructing a tetrahedral mesh model from layered scanning data, the algorithm flow chart is as shown in the attached Figure 1 As shown, the following steps are included:
[0064] 1. Image preprocessing, calculation of grayscale threshold of isosurface
[0065] In the actual scanning process, the image data will be affected by many factors, such as radiation noise and electronic noise. These noise sources will introduce uncertainty and interference into the image, which will not only have no improvement on the accuracy, but also increase the amount of irrelevant calculations, which will have a negative impact on the quality of subsequent model reconstruction. Therefore, we first need to use methods such as bilateral filtering to reduce the noise of the image data. For the structural characteristics of the material, the boundary features need to be retained after noise reduction, while removing as many small noise points as possible.
[0066] For a set of two-dimensional serial tomography images, the corresponding grayscale threshold is obtained according to the grayscale value distribution of each image. The mode of this set of threshold data is taken as the value of the isosurface. This method of determining the value of the isosurface is simple and practical, and can avoid the problem of poor three-dimensional model generation due to manual selection of the isosurface value.
[0067] If only two materials in the substance have a contact boundary between them, then the grayscale distribution histogram in the tomographic image data is Figure 1 The grayscale threshold of the image is determined using the maximum between-class variance method (OTSU).
[0068] For an image such as the attached Figure 2 , the probability P of all pixels with gray value i appearing i for:
[0069] P i =N i / N (1)
[0070] Among them, N i Represents the number of pixels with gray value i, i∈[0,L-1], L is the gray level of the image, and N represents the total number of pixels in the image.
[0071] Assume that the pixel points are divided into area A according to the threshold T t and B area A b , A t Includes pixels with grayscale values in the range [0, T], A b Includes pixels with grayscale values in the range [T+1, L-1].
[0072] Follow the steps below to determine the grayscale threshold of an image:
[0073] (1) Calculate the ratio k of pixels in the target area respectively t The ratio k of pixels in the background area b ,in
[0074] (2) Calculate the target grayscale mean μ t , background gray mean μ b and the overall grayscale mean μ;
[0075] (3) Calculate the inter-class variance δ 2 :δ 2 =k t (μ t -μ) 2 +k b (μ b -μ) 2
[0076] (4) Calculate the grayscale threshold Th:
[0077] For a set of two-dimensional serial tomography images, the interface grayscale threshold of each image is obtained, and the mode of this set of threshold data is taken as the interface grayscale threshold of the two materials as a whole. This method of determining the value of the isosurface is simple and practical, and can avoid the problem of poor three-dimensional model generation due to manual selection of the isosurface value. The overall grayscale threshold calculated is 110.
[0078] 2. Tetrahedron Initial Mesh Generation
[0079] First, define the entire structural area to be modeled. The entire area of the 3D model should be a cube. Figure 3 As shown, select one of the vertices as the coordinate origin, and the positive directions of the three coordinate axes are the three edges where the vertex is located. Set the actual length represented by the unit length. Starting from the origin, traverse the X axis first, then the Y axis, and the Z axis.
[0080] For a single cube, the naming rules are as follows Figure 4 , N0, N1, N2, N3, N4, N5, N6, N7 represent the vertices of a single cube, E0, E1, E2, E3, E4, E5, E6, E7, E8, E9, E 10 、E 11 Represents the edges of a single cube, and 0, 1, 2, 3, 4, and 5 represent the faces of a single cube. The relationship between vertices, edges, and faces is shown in the figure. Since we directly generate a tetrahedron, we need to divide a single cube into 6 tetrahedrons according to the rules. The division rules are as follows: Figure 5 The specific tetrahedron and the corresponding vertices are shown in Table 1.
[0081] Table 1
[0082]
[0083]
[0084] Now that the generation rules of the initial tetrahedron have been determined, we also need to update the basic adjacency relationship. The establishment of the basic adjacency relationship must be as simple as possible, retaining only the necessary adjacency relationships, because we will need to continue to subdivide the tetrahedron in the future, and the adjacency relationship will be continuously updated. For each vertex, we need to know which edge and face the point is on. For each edge, it is necessary to know the two endpoints of the edge, which face the edge is on, and which tetrahedrons the edge is on. For each face (triangle), it is necessary to know the three vertices and three edges of the triangle. For each tetrahedron, it is necessary to know the four vertices, six edges, and four faces of the tetrahedron. At the same time, when storing data, it is necessary to pay attention to the consistency of the order of information storage to avoid topological confusion.
[0085] 3. Determine the intersection point by the edge that intersects with the isosurface
[0086] According to the position coordinates of each vertex and the tomography data, the grayscale value of the corresponding position of each vertex can be obtained and stored. Different materials have different penetration capabilities for X-rays, and the corresponding image grayscale value ranges are different. The material type of the corresponding position of the vertex can be determined according to the vertex grayscale value. The material type of the edge where the vertex is located is preset according to the vertex material type, and the material type of the surface and body is further preset. First, set the material type. If there are two material types a and b, a is a tetrahedral material type whose grayscale values of each vertex are less than or equal to the isosurface threshold, and b is a tetrahedral material type whose grayscale values of each vertex are greater than or equal to the isosurface threshold. Traverse each edge. If the grayscale values of the two vertices of the edge are on the same side of the threshold, it proves that the tetrahedron does not need to be subsequently divided, and the corresponding material type can be directly set. If the grayscale values of the two vertices of the edge are on both sides of the threshold, it means that the isosurface intersects with the edge. At this time, tetrahedral division is required, and the tetrahedron will be divided into two small tetrahedrons, with material types a and b respectively. Next, the tetrahedron is divided: First, the intersection point must be determined. The tomography data is limited by the image itself and cannot obtain accurate data, so the location of the intersection point is determined by linear interpolation. If the calculation is simple, the quarter / quintile point can also be used as the location of the intersection point to avoid infinite decimal coordinate values, which will not have much impact on the calculation accuracy. If the two endpoints of the edge are P1 (x1, y1, z1) and P2 (x2, y2, z2), then the intersection point P (x, y, z) is calculated as follows:
[0087]
[0088] Among them, g1 and g2 represent the grayscale values of the two endpoints; isovalue represents the value of the isosurface.
[0089] 4. Divide the tetrahedron based on the edge
[0090] If Np is the intersection of the isosurface and the edge, such as Figure 6As shown, the edge Na, Nb is divided into two parts, and the two new edges are recorded and the original edge is deleted. Traverse all the adjacent faces of the edge, and each adjacent face will be divided into two parts. As shown in the figure, the face F1 is divided into two parts by the edge Nd, Np. All the newly generated faces are recorded and the original face is deleted. In this process, new edges are recorded and the adjacency relationship between the edges and points involved is updated. The material type of the edge and face is determined according to the gray value corresponding to the Na, Nb point. Traverse all tetrahedrons where the edge is located, and the adjacent tetrahedrons need to be split. As shown in the figure, the original tetrahedron is divided into two parts. At this time, a new face NcNpNd is generated and recorded. The material type of the face and tetrahedron is determined by whether the edge NaNp or NpNd exists on the tetrahedron or the face. When splitting the face, pay attention to updating the adjacency relationship between the face and the vertex, and the face and the edge. When splitting the tetrahedron, pay attention to updating the topological relationship between the tetrahedron and the vertex, edge, and face. At this point, the entire three-dimensional tetrahedral mesh model has been basically created, as shown in the attached Figure 7 As shown. The material type corresponding to each vertex, edge, face, and tetrahedron has been determined, and the remaining unestablished adjacency relationships are then filled in. For example, the adjacency relationship between tetrahedrons has not been determined. We can find the adjacency relationship between tetrahedrons based on the adjacency relationship between faces and tetrahedrons, because different tetrahedrons with the same faces must be adjacent. The entire three-dimensional model was established in 11.552 seconds, and the number of generated tetrahedrons was 4.28 million, the number of triangular faces was 8.61 million, the number of edges was 5.1 million, and the number of vertices was 760,000.
[0091] 5. Connectivity Analysis
[0092] Connectivity analysis can provide in-depth understanding of the connection methods and relationships between different parts of the model, and understand the distribution of different material types or materials and pores in the internal area of the material.
[0093] The main methods for connectivity analysis of materials are breadth-first search (BFS) and depth-first search (DFS). DFS depth-first search will be recursive and will take up more stack memory space. If the space of a connected domain is large, stack overflow errors will easily occur. Therefore, BFS breadth-first search is selected for connectivity analysis. BFS will create a new queue to store the tetrahedron index to be processed. Each time a tetrahedron index is taken from the head of the queue, all the adjacent tetrahedrons of the tetrahedron that have not been visited and have the same material type will be added to the end of the queue. It is known that there are no elements in the queue, which means that all tetrahedrons in the connected area have been visited. The visited tetrahedrons are recorded as all the elements of the current connected area. And so on, different connected areas can be established. There are 487 connected areas calculated, and the total volume of the entire three-dimensional model is 337824.
[0094] Next, calculate the volume and surface area of the connected region. The volume is calculated as the sum of the volumes of each tetrahedron in the connected region. The surface area is the sum of the areas of each triangle on the boundary. Calculate the porosity of each material as the percentage of the total volume of pores of this material type to the overall volume. Evaluate the porosity and porosity of the material.
[0095] The present invention also provides a system for reconstructing a tetrahedral mesh model from layered scanning data. The system for reconstructing a tetrahedral mesh model from layered scanning data can be implemented by executing the process steps of the method for reconstructing a tetrahedral mesh model from layered scanning data. That is, those skilled in the art can understand the method for reconstructing a tetrahedral mesh model from layered scanning data as a preferred implementation of the system for reconstructing a tetrahedral mesh model from layered scanning data.
[0096] A system for reconstructing a tetrahedron mesh model from layered scanning data comprises: a preprocessing module: scanning a sample to be tested by using a layered scanning technology to obtain a series of two-dimensional layered scanning images of the sample; preprocessing the two-dimensional layered scanning image data to determine the grayscale threshold of interfaces of different materials; a determination module: initializing a tetrahedron initial mesh of preset accuracy, establishing an adjacent topological relationship, and presetting a material type; specifically, comparing the grayscale value corresponding to each edge vertex with the interface threshold, if the interface threshold is not between the two vertex grayscale values, the edge and the interface have no intersection and no subsequent processing is required; if the interface threshold is between the two vertex grayscale values, that is, the edge and the interface have an intersection, then the intersection position is calculated by an interpolation function; a model building module: dividing the tetrahedron involved into multiple tetrahedrons according to the edge where the intersection is located, and updating the topological relationship, updating the material type of the edge, face, and body involved in the division according to the vertex material type, and finally establishing a three-dimensional tetrahedron mesh model; an analysis and calculation module: performing connectivity analysis on the generated network model, including: analyzing the geometric characteristics of the test area; calculating the volume ratio, specific surface area, boundary information, etc. of each connected area.
[0097] Specifically, the preprocessing module includes: the two-dimensional layered scanning image is a set of continuous two-dimensional layered scanning images with known layer spacing distances and the same scanning method; the preprocessing module is performed on the basis of retaining the contact interface characteristics of different materials, including but not limited to noise reduction processing; the grayscale threshold of the interface between different materials needs to determine the unique grayscale threshold between different materials based on a set of two-dimensional layered scanning images.
[0098] Specifically, the determination module includes: the overall area of the initialized preset tetrahedron grid is a cuboid, the length, width and height of the cuboid are respectively determined by the length and width of the two-dimensional image and the number of a group of two-dimensional scanned images measured in the preprocessing module; the preset tetrahedrons are arranged according to a certain rule, and adjacent tetrahedrons have common edges and common faces, but there are no distorted points; specifically, a point is on the preset tetrahedron, but is not one of the four vertices of the tetrahedron; the interpolation function is a linear interpolation function established according to the grayscale values of two vertices, or an interpolation function established according to the spatial distribution of grayscale values of more nearby vertices.
[0099] Specifically, the model building module includes: the method of splitting tetrahedrons is to traverse all edges and split all tetrahedrons with common edges according to the intersection of the edges and the interface; each vertex, each edge, each triangular face, and each tetrahedron in the three-dimensional tetrahedral mesh model has a corresponding material type or component type, and the setting of the material type is determined by the comparison between the grayscale value of the vertex and the interface threshold.
[0100] Specifically, the analysis and calculation module includes: a calculation module: calculating the connectivity of different materials in the calculation area and the volume ratio of different materials; calculating the volume, surface area, and boundary information of each connected area; evaluating the porosity and porosity of the material; analyzing the curvature and shape characteristics of the structure; analyzing the shape, area and other geometric characteristics of the contact area.
[0101] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0102] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A method for reconstructing a tetrahedral mesh model from layered scanning data, characterized in that: include: Preprocessing step: Scan the sample to be tested by using layered scanning technology to obtain a series of two-dimensional layered scanning images of the sample; Preprocess the two-dimensional layered scanning image data to determine the grayscale threshold of the interface between different materials; Use the maximum inter-class variance method to determine the grayscale threshold of the image; Determination steps: initializing a regular tetrahedron mesh of preset accuracy, establishing an adjacent topological relationship, presetting a material type, and determining intersection points, wherein the regular tetrahedron is generated by dividing a single cube into six tetrahedrons according to a regular pattern; Specifically, compare the gray value corresponding to each edge vertex with the interface threshold. If the interface threshold is not between the gray values of the two vertices, there is no intersection between the edge and the interface, and no subsequent processing is required. If the interface threshold is between the gray values of the two vertices, that is, there is an intersection between the edge and the interface, the position of the intersection is calculated by the interpolation function. Steps to build the model: split the tetrahedron involved into two parts according to the edge where the intersection is located, and update the topological relationship, split the edges, faces, and bodies involved, update the material type of each element according to the vertex material type, and finally build a three-dimensional tetrahedron mesh model that can distinguish different materials; The tetrahedron segmentation method includes: dividing the edge where the intersection point is located into two new edges according to the position of the intersection point, traversing all adjacent faces of the two new edges divided by the edge where the intersection point is located, each adjacent face will be divided into two parts, generating two new faces, and recording a generated new edge, while updating the adjacency relationship between the involved edges and points, determining the material type of the edge and the face according to the gray value corresponding to the point, traversing all tetrahedrons where the generated new edge is located, dividing the adjacent tetrahedrons, generating two new tetrahedrons, and generating a new face, and then filling the remaining unestablished adjacency relationship; Analysis and calculation steps: Perform connectivity analysis on the generated network model, including: analyzing the geometric characteristics of the test area; calculating the volume ratio, specific surface area, and boundary information of each connected area.
2. The method for reconstructing a tetrahedral mesh model from layered scanning data according to claim 1, characterized in that: The pre-processing step comprises: The two-dimensional layered scanning images are a set of continuous two-dimensional layered scanning images with known intervals between layers and the same scanning method; The preprocessing step is performed on the basis of retaining the contact interface characteristics of different materials, including but not limited to image noise reduction processing; The grayscale threshold of the interface between different materials needs to determine the unique grayscale threshold common to different materials based on all two-dimensional layered scanning images.
3. The method for reconstructing a tetrahedral mesh model from layered scanning data according to claim 1, characterized in that: The determining step comprises: The whole area of the initialized preset tetrahedron grid is a cuboid, the length, width and height of which are respectively determined by the length and width of the two-dimensional image and the number of a group of two-dimensional scanned images measured in the preprocessing step; the preset tetrahedrons are arranged according to a certain rule, and adjacent tetrahedrons have common edges and common faces, and there are no distorted points; specifically, a point is on the preset tetrahedron, but is not one of the four vertices of the tetrahedron; The interpolation function is a linear interpolation function established according to the gray values of two vertices, or an interpolation function established according to the spatial distribution of gray values of more nearby vertices.
4. The method for reconstructing a tetrahedral mesh model from layered scanning data according to claim 1, characterized in that: The model building step comprises: The method for dividing tetrahedrons is to traverse all edges and divide all tetrahedrons with common edges according to the intersection points of the edges and the interface; Each vertex, each edge, each triangular face, and each tetrahedron in the three-dimensional tetrahedral mesh model has a corresponding material type or component type, and the setting of the material type is determined by the comparison between the grayscale value of the vertex and the interface threshold.
5. A system for reconstructing a tetrahedral mesh model from layered scanning data, characterized in that: include: Preprocessing module: Scan the sample to be tested by using layered scanning technology to obtain a series of two-dimensional layered scanning images of the sample; Preprocess the two-dimensional layered scanning image data to determine the grayscale threshold of the interface between different materials; Use the maximum inter-class variance method to determine the grayscale threshold of the image; Determination module: initialize the regular tetrahedral mesh of preset accuracy, establish the adjacency topology relationship, preset the material type, and determine the intersection point; Specifically, compare the gray value corresponding to each edge vertex with the interface threshold. If the interface threshold is not between the gray values of the two vertices, there is no intersection between the edge and the interface, and no subsequent processing is required. If the interface threshold is between the gray values of the two vertices, that is, there is an intersection between the edge and the interface, the position of the intersection is calculated by the interpolation function. Model building module: split the tetrahedron involved into two parts according to the edge where the intersection point is located, store the newly generated point, edge, face, and body information; update the topological relationship, split the edges, faces, and bodies involved, update the material type of each element according to the vertex material type, and finally build a three-dimensional tetrahedron mesh model that can distinguish different materials; The tetrahedron segmentation method includes: dividing the edge where the intersection point is located into two new edges according to the position of the intersection point, traversing all adjacent faces of the edge, each adjacent face will be divided into two parts, generating two new faces, and recording the generated new edge, while updating the adjacent relationship between the edge and the point involved, determining the material type of the edge and the face according to the gray value corresponding to the point, traversing all tetrahedrons where the edge is located, dividing the adjacent tetrahedrons, generating two new tetrahedrons, and generating a new face, and then filling the remaining unestablished adjacent relationship; Analysis and calculation module: Perform connectivity analysis on the generated network model, including: analyzing the geometric characteristics of the test area; calculating the volume ratio, specific surface area, and boundary information of each connected area.
6. The system for reconstructing a tetrahedral mesh model from layered scanning data according to claim 5, characterized in that: The preprocessing module comprises: The two-dimensional layered scanning images are a set of continuous two-dimensional layered scanning images with known intervals between layers and the same scanning method; The preprocessing module is performed on the basis of retaining the contact interface characteristics of different materials, including but not limited to image noise reduction processing; The grayscale threshold of the interface between different materials needs to be determined based on all two-dimensional layered scanning images to determine the unique grayscale threshold common to different materials.
7. The system for reconstructing a tetrahedral mesh model from layered scanning data according to claim 5, characterized in that: The determination module comprises: The whole area of the initialized preset tetrahedron grid is a cuboid, the length, width and height of which are respectively determined by the length and width of the two-dimensional image and the number of a group of two-dimensional scanned images measured in the preprocessing module; the preset tetrahedrons are arranged according to a certain rule, and adjacent tetrahedrons have common edges and common faces, but no distorted points; specifically, a point is on the preset tetrahedron, but is not one of the four vertices of the tetrahedron; The interpolation function is a linear interpolation function established according to the gray values of two vertices, or an interpolation function established according to the spatial distribution of gray values of more nearby vertices.
8. The system for reconstructing a tetrahedral mesh model from layered scanning data according to claim 5, characterized in that: The model building module includes: The method for dividing tetrahedrons is to traverse all edges and divide all tetrahedrons with common edges according to the intersection points of the edges and the interface; Each vertex, each edge, each triangular face, and each tetrahedron in the three-dimensional tetrahedral mesh model has a corresponding material type or component type, and the setting of the material type is determined by the comparison between the grayscale value of the vertex and the interface threshold.
