Search

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

CN122023729ACN 122023729 ACN122023729 ACN 122023729ACN-122023729-A

Abstract

The invention discloses a brain tetrahedron grid generation method, a system, a terminal and a medium based on a thickness field algorithm, wherein the method comprises the steps of obtaining three-dimensional label data containing five layers of physical models in the brain, and extracting mask binary label images; calculating a thickness field to generate tetrahedron size information of each substance and obtain a plurality of tetrahedrons after subdivision, calculating probability values of each substance of each tetrahedron belonging to a five-layer physical model, circularly traversing all tetrahedrons, screening out a plurality of target tetrahedrons to obtain tetrahedron labels of each target tetrahedron, counting different numbers of labels between each target tetrahedron and the corresponding field tetrahedron, checking the tetrahedron labels of each target tetrahedron, and obtaining a tetrahedron grid after the verification passes. The method can remove redundant units generated by the boundary grids, ensure the smoothness of boundary surfaces, enable the physical field attribute transition of the boundary grids to be smooth, and improve the reliability of solving results.

Inventors

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

Assignees

  • 浙江强脑科技有限公司

Dates

Publication Date
20260512
Application Date
20260416

Claims (10)

  1. 1. A method for generating a brain tetrahedral mesh based on a thickness field algorithm, 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; 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 labels, and binding the tetrahedron label with the geometric information of the tetrahedron based on the final label of all the tetrahedrons after the verification is passed to obtain a tetrahedron grid, wherein the tetrahedron grid is used for simulation calculation by a finite element solver.
  2. 2. The method for generating a tetrahedral brain mesh based on a thickness field algorithm according to claim 1, wherein the generating tetrahedral size information of each substance based on the thickness field calculation based on the slice picture and the mask binary label image of the 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 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 generating method based on the thickness field algorithm according to claim 1, wherein the step of circularly traversing all tetrahedrons and screening out a plurality of target tetrahedrons comprises: Acquiring self labels of all tetrahedrons and current labels of all tetrahedrons in the field, and comparing the self labels of all tetrahedrons with the current labels of all the corresponding field tetrahedrons; Screening tetrahedrons with more than one field tetrahedron and different current label from the current label; If the self label of the selected tetrahedron is different from the label corresponding to the substance with the calculated maximum probability value, taking the selected tetrahedron as the target tetrahedron; and counting the different numbers of the self label of each target tetrahedron and the current label of the corresponding field tetrahedron aiming at each target tetrahedron to obtain a first number value.
  5. 5. The brain tetrahedral mesh generation method based on the thickness field algorithm according to claim 4, wherein obtaining the tetrahedral label of each target tetrahedron based on the maximum probability value corresponding to each target tetrahedron comprises: acquiring probability values of each substance belonging to the five-layer physical model calculated for each target tetrahedron, and determining the maximum probability value corresponding to each target tetrahedron; And modifying the label of each target tetrahedron into a label corresponding to the substance with the maximum probability value, thereby obtaining the tetrahedron label of each target tetrahedron.
  6. 6. The method for generating a brain tetrahedral mesh based on a thickness field algorithm according to claim 5, wherein counting different numbers of tags between each target tetrahedron and the domain tetrahedron, and verifying the tetrahedron tag of each target tetrahedron based on the different numbers of tags, comprises: Counting different numbers of labels between the tetrahedral labels of the target tetrahedron and the current labels of the corresponding field tetrahedron aiming at each target tetrahedron to obtain a second number value; If the second quantity value is larger than the first quantity value, withdrawing the tetrahedral label of the target tetrahedron as a self label; and if the second quantity value is smaller than or equal to the first quantity value, reserving the tetrahedral label of the target tetrahedron.
  7. 7. The method for generating a brain tetrahedral mesh based on a thickness field algorithm according to claim 5, wherein the counting of different numbers of tags between each target tetrahedron and the domain tetrahedron, and the verifying of the tetrahedron tag of each target tetrahedron based on the different numbers of tags, further comprises: acquiring a third number of tetrahedral labels retaining the target tetrahedron and a fourth number of tetrahedral labels of the target tetrahedron to withdraw as self labels; if the third number is equal to the fourth number and the number of loops exceeds the preset value, the loop traversing step is exited.
  8. 8. A thickness field algorithm based brain tetrahedral mesh generation system, wherein the system is adapted to implement the steps of the thickness field algorithm based brain tetrahedral mesh generation method 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 tetrahedron screening module is used for calculating probability values of each tetrahedron belonging to each substance in the five-layer physical model aiming at the plurality of tetrahedrons after the subdivision, circularly traversing all the tetrahedrons, and screening out a plurality of target tetrahedrons; The tag modification module is used for obtaining a tetrahedral tag of each target tetrahedron based on the maximum probability value corresponding to each target tetrahedron, wherein the tetrahedral tag is used for reflecting a substance corresponding to the target tetrahedron; The tetrahedron grid generation module is used for counting different numbers of labels between each target tetrahedron and the corresponding field tetrahedron, verifying the tetrahedron label of each target tetrahedron based on the different numbers of labels, and binding the tetrahedron label with the geometric information of the tetrahedron based on the final label of all the tetrahedrons after verification is passed to obtain a tetrahedron grid, wherein the tetrahedron grid is used for simulation calculation by the finite element solver.
  9. 9. A terminal comprising a memory, a processor and a thickness field algorithm based brain tetrahedral mesh generation program stored in the memory and executable on the processor, the processor implementing the steps of the thickness field algorithm based brain tetrahedral mesh generation method according to any one of claims 1 to 7 when executing the thickness field algorithm based brain tetrahedral mesh generation program.
  10. 10. A computer-readable storage medium, wherein the computer-readable storage medium has stored thereon a thickness field algorithm-based brain tetrahedral mesh generation program, the thickness field algorithm-based brain tetrahedral mesh generation program implementing the steps of the thickness field algorithm-based brain tetrahedral mesh generation method of 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 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. 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. 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 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, 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; 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 labels, and binding the tetrahedron label with the geometric information of the tetrahedron based on the final label of all the tetrahedrons after the verification is passed to obtain a tetrahedron grid, wherein the tetrahedron grid is used for simulation calculation by a finite element solver. In one implementation, the thickness field calculation is performed based on the slice picture and the mask binary label image of different substances, generating tetrahedral size information of each substance, including: 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