Search

CN-122023730-A - Brain tetrahedron grid generation method, system, terminal and medium based on thickness field algorithm and spined tetrahedron removal

CN122023730ACN 122023730 ACN122023730 ACN 122023730ACN-122023730-A

Abstract

The invention discloses a brain tetrahedron grid generation method, a system, a terminal and a medium based on a thickness field algorithm and spined tetrahedron removal, wherein the method comprises the steps of obtaining three-dimensional label data containing five layers of physical models in the brain, and extracting slice pictures and mask binary label images corresponding to different substances; the method comprises the steps of calculating a thickness field, generating tetrahedral size information of each substance, obtaining a plurality of tetrahedrons after subdivision, updating a current label of the tetrahedrons for each tetrahedron to obtain a tetrahedron label, performing stability verification, outputting tetrahedron labels of all the tetrahedrons, and binding the tetrahedron labels with the geometric information of the tetrahedrons based on the final labels of all the tetrahedrons to obtain a brain tetrahedron grid. According to the method, through a material separation, multiaxial and refined thickness field calculation and spike tetrahedron removal strategy algorithm, the core pain point in the prior art is solved, and the self-adaption, high-quality and high-stability generation of the brain tetrahedron grid is realized.

Inventors

  • HAN BICHENG
  • A DISI
  • XU LINFENG
  • XING LE

Assignees

  • 浙江强脑科技有限公司

Dates

Publication Date
20260512
Application Date
20260416

Claims (10)

  1. 1. A brain tetrahedral mesh generation method based on a thickness field algorithm and spined tetrahedral removal, the method comprising: Three-dimensional label data containing five layers of physical models in the brain are obtained, slice pictures and mask binary label images corresponding to different substances are extracted based on the three-dimensional label data, wherein each layer in the five layers of physical models corresponds to five substances respectively, and the five layers comprise scalp, skull, cerebrospinal fluid, gray matter and white matter areas; Performing thickness field calculation based on the slice picture and mask binary label images of different substances, generating tetrahedral size information of each substance, and inputting the generated tetrahedral size information of each substance into a tetrahedral subdivision algorithm to obtain a plurality of tetrahedrons after subdivision; Determining the number of different labels existing in the tetrahedron in the field of tetrahedron corresponding to each tetrahedron, and updating the current label of the tetrahedron based on the number of the different labels to obtain a tetrahedron label, wherein the tetrahedron label reflects a substance corresponding to the tetrahedron; And after the stability verification is passed, outputting tetrahedral labels of all tetrahedrons to finish the removal of the spined tetrahedrons, binding the tetrahedron labels with the geometric information of the tetrahedrons based on the final labels of all the tetrahedrons to obtain brain tetrahedron grids, wherein the brain tetrahedron grids are used for being input into a finite element solver for simulation calculation.
  2. 2. The method for generating a brain tetrahedral mesh based on a thickness field algorithm and spined tetrahedral removal according to claim 1, wherein the generating tetrahedral size information of each substance by performing thickness field calculation based on the slice picture and mask binary label images of different substances includes: Extracting a skeleton image in the slice picture by adopting a skeleton extraction algorithm aiming at the mask binary label image of each substance; Processing the skeleton image by using an L2 distance transformation algorithm to obtain a center axis pipe diameter image of the slice image, acquiring the shortest distance from each pixel to the corresponding tissue edge, and determining and updating the thickness value of each pixel based on the shortest distance; For each voxel, respectively acquiring thickness values in three axial directions X, Y, Z, taking the minimum value in the three thickness values as the final thickness value of the voxel, and obtaining a thickness field; After the thickness field is subjected to primary scaling and outlier cutoff treatment, adopting a weighted average kernel with the size of 5, respectively carrying out convolution operation in three axial directions of X, Y, Z, and carrying out smoothing treatment on the thickness value with abrupt edge change in the thickness field; And scaling and outlier cutting-off are carried out again on the smoothed thickness field, so that tetrahedral size information of each substance is obtained.
  3. 3. The brain tetrahedral mesh generating method based on the thickness field algorithm and the spined tetrahedral removal according to claim 2, wherein determining updating the thickness value of each pixel based on the shortest distance comprises: constructing a circular range by taking each pixel as a circle center and the shortest distance as a radius, and setting the thickness value of all pixels in the circular range to be 0 at initial time; Traversing each pixel in the circular range, and if the thickness value of a certain pixel is smaller than that of the circle center pixel, updating the thickness value of the pixel to be the thickness value of the circle center pixel.
  4. 4. The brain tetrahedral mesh generation method based on thickness field algorithm and spined tetrahedral removal according to claim 1, wherein determining, for each tetrahedron, a number of different labels existing with the tetrahedron in the domain tetrahedron corresponding to the tetrahedron, and updating a current label of the tetrahedron based on the number of different labels, comprises: Determining the number of different labels existing in the field tetrahedron corresponding to the tetrahedron according to each tetrahedron, and caching the current label of each tetrahedron into a first cache space; If the number of labels which are different from the tetrahedrons in the neighborhood tetrahedrons corresponding to a certain tetrahedron is 4, counting the first label with highest occurrence frequency in the 4 neighborhood tetrahedrons, and updating the current label of the tetrahedron into the first label; If the number of labels which are different from the tetrahedrons in the neighborhood tetrahedrons corresponding to a certain tetrahedron is 3, counting the second labels which have highest occurrence frequency and have the repetition number larger than 1 in the 3 neighborhood tetrahedrons, and updating the current label of the tetrahedron into the second label; if the number of labels which are different from the tetrahedrons in the neighborhood tetrahedrons corresponding to a certain tetrahedron is 2.2, extracting the labels of the two neighborhood tetrahedrons, and updating the current label of the tetrahedron based on the labels of the two neighborhood tetrahedrons.
  5. 5. The brain tetrahedral mesh generation method based on thickness field algorithm and spined tetrahedral removal of claim 4, wherein updating the current label of the tetrahedron based on the labels of the two neighborhood tetrahedrons comprises: if the labels of the two neighborhood tetrahedrons are the same, calculating two vertexes shared by the two neighborhood tetrahedrons, and detecting whether the two vertexes are singular nodes or not; if the two vertexes are singular nodes, updating the current label of the tetrahedron into labels of two neighborhood tetrahedrons.
  6. 6. The brain tetrahedral mesh generation method based on thickness field algorithm and spined tetrahedral removal according to claim 4, wherein performing stability check on the tetrahedral labels of each tetrahedron, and outputting the tetrahedral labels of all tetrahedrons after the stability check is passed, comprises: based on the tetrahedral label of each tetrahedron, acquiring the tetrahedron of which the label is updated in the current cycle, and caching the tetrahedron of which the label is updated and the corresponding tetrahedron label into a second cache space; If the first cache space is consistent with the second cache space, judging that the stability check is passed, and in the subsequent cycle, not updating the label again for the updated tetrahedron; And outputting tetrahedral labels of all tetrahedrons when the cycle times reach a preset value.
  7. 7. The method for generating a brain tetrahedral mesh based on a thickness field algorithm and spined tetrahedral removal according to claim 1, wherein the tetrahedral size information of each generated substance is input into a tetrahedral subdivision algorithm, and after obtaining a plurality of tetrahedrons after subdivision, the method further comprises: calculating probability values of each substance belonging to the five-layer physical model of each tetrahedron aiming at a plurality of tetrahedrons after subdivision, circularly traversing all tetrahedrons, and screening out a plurality of target tetrahedrons; Obtaining a tetrahedral label of each target tetrahedron based on the maximum probability value corresponding to each target tetrahedron, wherein the tetrahedral label is used for reflecting a substance corresponding to the target tetrahedron; Counting different numbers of labels between each target tetrahedron and the corresponding field tetrahedron, checking the tetrahedron label of each target tetrahedron based on the different numbers of the labels, and obtaining a preliminary tetrahedron grid based on each target tetrahedron and the corresponding tetrahedron label after the verification is passed.
  8. 8. A brain tetrahedral mesh generation system based on a thickness field algorithm and a spined tetrahedral removal, the system being for implementing the steps of the brain tetrahedral mesh generation method based on a thickness field algorithm and a spined tetrahedral removal of any one of claims 1 to 7, the system comprising: The label and image extraction module is used for acquiring three-dimensional label data containing five layers of physical models in the brain, extracting slice pictures and mask binary label images corresponding to different substances based on the three-dimensional label data, wherein each layer in the five layers of physical models respectively corresponds to five substances, and the five layers of physical models comprise scalp, skull, cerebrospinal fluid, gray matter and white matter areas; The thickness field calculation module is used for carrying out thickness field calculation based on the slice picture and mask binary label images of different substances, generating tetrahedron size information of each substance, inputting the generated tetrahedron size information of each substance into a tetrahedron subdivision algorithm, and obtaining a plurality of tetrahedrons after subdivision; The label updating module is used for determining the quantity of different labels existing in the tetrahedron in the field of tetrahedron corresponding to each tetrahedron, and updating the current label of the tetrahedron based on the quantity of the different labels to obtain a tetrahedron label, wherein the tetrahedron label reflects a substance corresponding to the tetrahedron; the brain tetrahedron grid generation module is used for carrying out stability verification on the tetrahedron labels of each tetrahedron, outputting the tetrahedron labels of all tetrahedrons after the stability verification is passed, completing removal of the spiked tetrahedrons, binding the tetrahedron labels with the geometric information of the tetrahedrons based on the final labels of all the tetrahedrons to obtain a brain tetrahedron grid, and inputting the brain tetrahedron grid to the finite element solver for simulation calculation.
  9. 9. A terminal comprising a memory, a processor and a brain tetrahedral mesh generating program based on a thickness field algorithm and a spined tetrahedral removal stored in the memory and executable on the processor, the processor implementing the steps of the brain tetrahedral mesh generating method based on a thickness field algorithm and a spined tetrahedral removal according to any one of claims 1 to 7 when executing the brain tetrahedral mesh generating program based on a thickness field algorithm and a spined tetrahedral removal.
  10. 10. A computer-readable storage medium, wherein a thickness field algorithm and spiked tetrahedral removal based brain tetrahedral mesh generation program is stored on the computer-readable storage medium, and the thickness field algorithm and spiked tetrahedral removal based brain tetrahedral mesh generation program implements the steps of the thickness field algorithm and spiked tetrahedral removal based brain tetrahedral mesh generation method according to any one of claims 1 to 7 on the computer-readable storage medium.

Description

Brain tetrahedron grid generation method, system, terminal and medium based on thickness field algorithm and spined tetrahedron removal Technical Field The invention relates to the technical field of medical image processing, in particular to a brain tetrahedron grid generation method, a system, a terminal and a medium based on a thickness field algorithm and spined tetrahedron removal. Background In brain finite element simulation stimulus simulation, the subdivision and quality of grids directly influence the precision and stability of subsequent finite element solutions, especially on the shape of ravines between grey brain matter and white brain matter with complex topological structures and on the fine thin surfaces of cerebrospinal fluid between skull and grey brain matter, the complexity and fineness of the topological structures bring considerable challenges to the subsequent finite element solutions, and directly influence the accuracy of the subsequent solution results. This problem is caused by the fact that the grid cell size is too large to accurately capture the geometric features and physical field gradients of the boundary surface, and the resulting discrete errors. It is therefore necessary for a grid generation and optimization algorithm that can be adapted to the boundary surface. The method adopted in the past for the problem is mainly based on global uniform refinement and indiscriminate local smoothing, and has the defects that physical field gradient characteristics are not associated, so that excessive refinement is generated for an internal area with gentle physical field gradient, redundant precision is caused, global errors cannot be reduced, in a boundary strong gradient area, the total number of degrees of freedom of solving is increased due to excessive grid unit quantity, error convergence of solving is low, and the method can cause problems of overheads cost of stiffness matrix storage, overlarge time cost of solving and the like. In addition, the tetrahedral mesh generated by the adaptive mesh can generate a spiked tetrahedron at the boundary surface layer, such as a topological pseudo structure generated at the gray surface layer, caused by the wrong label division of the physical field. Anatomically, the interface of the gray matter surface layer with the cerebrospinal fluid is a continuously smooth matter exchange boundary, the misclassified spiked tetrahedrons at the gray matter surface layer are not physiologically meaningful, and there is an order difference of physical field properties (such as density, conductivity) around the neighborhood of such spiked tetrahedrons from itself, resulting in local discontinuities in the physical field of properties, and in the subsequent finite element solutions, in the singularities of the stiffness matrix and in the appearance of false peaks of the local numerical solutions. Therefore, the prior art has drawbacks. Disclosure of Invention Aiming at the defects in the prior art, the invention provides a brain tetrahedron grid generation method, a system, a terminal and a medium based on a thickness field algorithm and spined tetrahedron removal, and the technical scheme adopted by the invention is as follows: in a first aspect, the present invention provides a brain tetrahedral mesh generation method based on a thickness field algorithm and spined tetrahedral removal, the method comprising: Three-dimensional label data containing five layers of physical models in the brain are obtained, slice pictures and mask binary label images corresponding to different substances are extracted based on the three-dimensional label data, wherein each layer in the five layers of physical models corresponds to five substances respectively, and the five layers comprise scalp, skull, cerebrospinal fluid, gray matter and white matter areas; Performing thickness field calculation based on the slice picture and mask binary label images of different substances, generating tetrahedral size information of each substance, and inputting the generated tetrahedral size information of each substance into a tetrahedral subdivision algorithm to obtain a plurality of tetrahedrons after subdivision; Determining the number of different labels existing in the tetrahedron in the field of tetrahedron corresponding to each tetrahedron, and updating the current label of the tetrahedron based on the number of the different labels to obtain a tetrahedron label, wherein the tetrahedron label reflects a substance corresponding to the tetrahedron; And after the stability verification is passed, outputting tetrahedral labels of all tetrahedrons to finish the removal of the spined tetrahedrons, binding the tetrahedron labels with the geometric information of the tetrahedrons based on the final labels of all the tetrahedrons to obtain brain tetrahedron grids, wherein the brain tetrahedron grids are used for being input into a finite element solver for simulation calculation. In o