Medical image three-dimensional reconstruction isosurface grid accelerated extraction method based on voxel growth

文档序号:21341 发布日期:2021-09-21 浏览:15次 中文

阅读说明:本技术 一种基于体素增长的医学图像三维重建等值面网格加速提取方法 (Medical image three-dimensional reconstruction isosurface grid accelerated extraction method based on voxel growth ) 是由 王沫楠 王鑫 夏领兵 于 2021-06-23 设计创作,主要内容包括:本发明属于医学图像技术领域,提供一种医学图像三维重建等值面网格提取方法。本发明首先要改进原有MC算法的两个索引表,再创建一个新的增长索引表,然后用二维断层图像定位种子立方体(也称体素),再以种子体素进行增长重建。增长过程分为三个方面:第一方面为如何找到种子体素;第二方面为从种子体素开始向哪几个方向增长,确定有哪些增长方向后,调用对应数量线程,各个线程并行加速增长。第三方面为等值面与立方体的交点求解及交点组成三角形网格。其中整个重建过程拥有六个队列,存储种子体素信息及要增长方向的相邻立方体的信息,以及一个处理标记,记录当前种子体素被处理的情况。当队列中不再有新的体素信息放入时,即生成了指定阈值的等值面三角形网格。(The invention belongs to the technical field of medical images and provides a method for extracting a medical image three-dimensional reconstruction isosurface grid. The method firstly needs to improve two index tables of the original MC algorithm, then creates a new growth index table, then uses a two-dimensional tomographic image to position a seed cube (also called voxel), and then uses the seed voxel to perform growth reconstruction. The growth process is divided into three aspects: the first aspect is how to find seed voxels; the second aspect is that the growth direction is started from the seed voxel, after determining which growth directions are existed, the corresponding number of threads are called, and the growth of each thread is accelerated in parallel. And in the third aspect, solving the intersection points of the isosurface and the cube, and forming a triangular grid by the intersection points. The whole reconstruction process has six queues, the information of the seed voxels and the information of the adjacent cubes in the direction to be grown are stored, and a processing mark is used for recording the condition that the current seed voxels are processed. When no more new voxel information is put in the queue, an isosurface triangular mesh specifying the threshold is generated.)

1. A voxel growth-based medical image three-dimensional reconstruction isosurface grid accelerated extraction method is characterized by comprising the following steps:

A. reading medical image data, constructing cube data, and selecting seed voxels;

B. starting to increase by using seed voxels, solving intersection points after determining the intersection condition of the isosurface and each edge by looking up the index table 1, determining a triangle connection mode by looking up the index table 2 and putting triangles into a linked list;

C. looking up an index table 3 to determine which growth directions of the current seed voxels exist, calling a corresponding number of threads, judging whether the adjacent voxels to be grown need processing, if so, putting the adjacent voxels into queues in respective growth directions, and then respectively taking out data from the queues in respective growth directions in each thread to accelerate growth reconstruction;

D. the above B, C steps are repeated until the queue is empty.

2. The voxel growth-based medical image three-dimensional reconstruction isosurface grid accelerated extraction method according to claim 1, wherein in the step a, the selection method of the seed voxel is as follows: selecting the middle layer of the two-dimensional tomographic image, and taking the gray value (assumed as Hu) of the middle layer at the center position (rounded, set as O point) of the image of the middle layerO) Then, the gray value of the midpoint position (rounded) of the four sides of the layer image is obtained (Hu is assumed as shown in FIG. 1a1、Hua2、Hua3、Hua4) Sequentially mixing HuOAnd Hua1、HuOAnd Hua2、HuOAnd Hua3、HuOAnd Hua4Respectively comparing with a threshold value when HuOGreater than threshold and Hua1When the value is less than the threshold value, the cube where the O point is located can be judged as the seed voxel HuOAnd Hua2、HuOAnd Hua3、HuOAnd Hua4And similarly, sequentially executing the steps, stopping searching as long as one group of conditions are met, and if the conditions are not met, determining the secondary position, and taking the gray values of the positions (the average integers) of the midpoints of the points O and the vertical connecting lines of the edges of the image and the midpoints of the points O and the connecting lines of the four corners (the average integers are assumed to be Hu respectively in the case of fig. 2)b1、Hub2、Hub3、Hub4、Hub5、Hub6、Hub7、Hub8) Sequentially mixing Hub1、Hub2、Hub3、Hub4、Hub5、Hub6、Hub7、Hub8And comparing the gray values with a threshold, stopping searching as long as one gray value of the 8 points is greater than the threshold, namely determining the cube where the point is located as the seed voxel, otherwise, searching adjacent layers until the seed voxel is found.

3. The method for accelerating extraction of a medical image three-dimensional reconstruction isosurface grid based on voxel growing according to claim 1, wherein in the step B, the seed voxel is the seed cube data obtained in the step a, the intersection condition of the isosurface and each edge of the cube is determined through an index table 1, after which edges are intersected, the information of intersection coordinates, gradients and the like is obtained, the connection mode of triangles formed by intersection points of each edge is determined through an index table 2, and finally the triangle information is stored in a linked list, the index table 1 and the index table 2 are corresponding index tables in an improved MC algorithm, the improved MC algorithm is characterized in that 4 topology configurations are newly added on the basis of one deletion of 15 basic topology structures of the original MC algorithm, and the original three types (for example, in fig. 3, the configurations 10, 12 and 13 are three types among the original existing ambiguous configurations) have antisymmetric configurations corresponding to the ambiguous configurations, because the antisymmetry and rotation transformation of the three configurations are the same, the corresponding data in the index table is changed and uniquely determined, and the ambiguity is prevented.

4. The method for accelerated extraction of the isosurface grid for three-dimensional reconstruction of medical images based on voxel growth according to claim 1, wherein in the step C, the index table 3 adds an increase index table to the original classical MC algorithm for improving the MC algorithm, and adds 4 topology configurations correspondingly, wherein the method for accelerated growth comprises: determining which direction the seed voxel is to grow to through an index table 3, then calling a corresponding number of threads, in each thread, judging whether the adjacent voxels in the direction to be grown need processing, if so, putting the adjacent voxels into queues in the respective growth directions, respectively taking out data from the queues in the respective growth directions to accelerate growth reconstruction, wherein the whole reconstruction process comprises six global queues, the six queues correspond to the six directions of a cube, after judging which directions need to be grown, judging whether the adjacent voxels in the growth directions mark processed, if so, putting the adjacent voxels in the corresponding direction into the queues in the corresponding direction, and putting the step of putting into the queues into a key segment to prevent the collision of a plurality of threads, and waiting for calling in a rotating lock mode for further improving the efficiency.

5. The method for accelerating extraction of the iso-surface grid for three-dimensional reconstruction of medical images based on voxel growing as claimed in claim 1, wherein in the step D, the operations of the step B, C, D in claim 1 are repeated until the whole queue is empty.

Technical Field

The invention belongs to the field of medical images, and particularly relates to a method for extracting a medical image three-dimensional reconstruction isosurface grid.

Background

With the development of medical imaging technology, medical imaging has become an important means for doctors to judge diseases. The medical two-dimensional tomographic image is used for reconstructing and displaying the three-dimensional image of the human tissue, so that the diagnosis rate of the doctor on the state of an illness is greatly improved, and the cost of a hospital on a film is reduced. The process of extracting a three-dimensional model from a medical two-dimensional tomographic image, which is generally represented by a mesh, is called three-dimensional reconstruction of the medical image, and this process is also called iso-surface mesh extraction. At present, the most mature medical image grid generation technology is the MC algorithm and the derivative algorithm thereof, and the MC algorithm and the derivative algorithm thereof are widely applied due to simple principle and easy realization.

The MC algorithm generates a mesh by traversing all cubes, with most of the time wasted on computation of empty voxels (cubes that do not intersect the isosurface), and the isosurfaces are generated individually in individual cubes, without considering the connections between individual cubes, and the generated isosurfaces have some ambiguity. Aiming at the problems, the invention provides a new algorithm, which solves the ambiguity problem of the MC algorithm and greatly accelerates the reconstruction speed.

Disclosure of Invention

The invention aims to provide a grid extraction method for three-dimensional reconstruction, which increases the isosurface grid through the connection among isosurfaces in each cube, eliminates ambiguity, greatly accelerates the reconstruction speed and forms a continuous isosurface grid.

The technical scheme adopted by the invention comprises the following steps:

A. reading medical image data, constructing cube data, and selecting seed voxels;

B. starting to increase by using seed voxels, solving intersection points after determining the intersection condition of the isosurface and each edge by looking up the index table 1, determining a triangle connection mode by looking up the index table 2 and putting triangles into a linked list;

C. and (3) determining the growth directions of the current seed voxels by looking up the index table 3, calling a corresponding number of threads, judging whether the adjacent voxels in the growth direction need to be processed, and if so, putting the adjacent voxels into queues in respective growth directions. Then in each thread, respectively taking out data from the queues in the respective growth directions to accelerate growth and reconstruction;

D. the above B, C steps are repeated until the queue is empty.

In step a, after medical image data is read, a seed voxel is selected, and the selection method comprises: selecting the middle layer of the two-dimensional tomographic imageThe center position of the layer image (rounded, set as O point) is used to obtain its gray scale value (Hu is assumed)O) Then, the gray value of the midpoint position (rounded) of the four sides of the layer image is obtained (Hu is assumed as shown in FIG. 1a1、Hua2、Hua3、Hua4). Sequentially mixing HuOAnd Hua1、HuOAnd Hua2、HuOAnd Hua3、HuOAnd Hua4Respectively comparing with a threshold value when HuOGreater than threshold and Hua1When the value is less than the threshold value, the cube where the O point is positioned is a seed voxel HuOAnd Hua2、HuOAnd Hua3、HuOAnd Hua4And similarly, sequentially executing the steps, stopping searching as long as one group meets the condition, and if the condition is not met, determining the position twice, namely, taking the gray values of the middle points of the vertical connecting lines of the point O and each side of the image and the middle points of the connecting lines of the point O and the four corners (the positions are rounded evenly) (in the assumption of Hu in the figure 2)b1、Hub2、Hub3、Hub4、Hub5、Hub6、Hub7、Hub8) Sequentially mixing Hub1、Hub2、Hub3、Hub4、Hub5、Hub6、Hub7、Hub8And comparing the gray values with a threshold value, stopping searching as long as one gray value of the 8 points is greater than the threshold value, and determining that the cube where the point is located is a seed voxel. Otherwise, the adjacent layer is searched until the seed voxel is found. The cube is then marked in the marked array for determining whether it has been processed (the entire scheme has a global array for recording the processing status of all cubes, 0 indicates that the current cube has not been processed, 1 indicates that the information of the current cube has been placed in the grow queue, and 2 indicates that the current cube has been processed), followed by operation B, C, D.

In the step B, the seed voxel is the seed cube data obtained in the step A, the intersection condition of the isosurface and each edge of the cube is determined through the index table 1, after which edges are intersected, the information of intersection point coordinates, gradient and the like is obtained, the connection mode of forming a triangle by each edge intersection point is determined through the index table 2, and finally the triangle information is stored and put into a linked list. The index table 1 and the index table 2 are corresponding index tables in the improved MC algorithm.

The improved MC algorithm is characterized in that 4 topological configurations are newly added on the basis of deleting one of 15 basic topological structures of the original MC algorithm, and the antisymmetric configurations corresponding to the ambiguous configurations existing in the original three types (such as the configurations 10, 12 and 13 in the figure 3 are three configurations in the original ambiguous configurations) are removed, so that the corresponding data in an index table are changed, the connotation of the topological configurations is enriched, and the problem that holes are easily generated when adjacent cubes are connected is solved. The index table 1 is an edge index table improved on the basis of an edge index table in the original MC algorithm, and comprises 256 index entries, and the intersection condition of an isosurface and each edge of a cube can be determined through the index table 1. The index table 2 is an improved triangular patch index table based on a triangular patch index table in the original MC algorithm, and comprises 256 index items, the connection mode of triangles formed by intersection points of edges is determined through the index table 2, and finally, triangle information is stored and put into a linked list.

In the step C, the index table 3 adds a growth index table to the original classical MC algorithm for improving the MC algorithm, and adds 4 topology configurations correspondingly. The direction to which the seed voxel is to grow can be determined through the index table 3, then a corresponding number of thread functions are called, in each thread, whether the adjacent voxel in the direction to be grown needs to be processed is judged, if so, the adjacent voxel in the direction to be grown is put into the queue in each growth direction, and data are respectively taken out from the queue in each growth direction to accelerate growth reconstruction. The method comprises the steps of (the whole reconstruction process comprises six global queues, wherein the six global queues respectively store the coordinate of a current seed cube and the coordinate, gray level and other information of an adjacent cube corresponding to a direction to be increased, the six queues correspond to the six directions of the cube, after judging which directions are the directions to be increased, whether adjacent voxels in the increasing direction are marked to be processed is judged, if the adjacent voxels need to be processed, the adjacent voxels corresponding to the direction to be increased are placed in the queues in the corresponding directions, the step of placing the voxels in the queues is placed in a key section to prevent a plurality of threads from colliding, and the threads wait to be called in a rotating lock mode to further improve the efficiency).

In the step D, after each thread grows, repeating the step B, C, regarding the cube data newly placed in the direction as a new seed voxel, continuing to grow and reconstruct until each queue is empty, and stopping growth to ensure that all connected grids can grow out.

The invention has the beneficial effects that: besides the accelerated reconstruction by establishing a searching mode of the seed voxel, the method also expands and improves the basic topological structure and combines the mode of accelerated growth of the isosurface voxel to extract the isosurface grid of the three-dimensional reconstruction of the medical image, thereby greatly reducing the calculation of empty voxels and the accelerated traversal of the isosurface voxel, not only avoiding the ambiguity problem during grid connection, but also obviously accelerating the reconstruction speed.

Drawings

FIG. 1 is a schematic diagram of a stage for finding seed voxels.

FIG. 2 is a two-level schematic of finding seed voxels.

Fig. 3 is a diagram of 18 kinds of topological structures after the improved MC algorithm is expanded.

Fig. 4 is a flow chart of the improved MC algorithm.

Fig. 5 is a schematic diagram of a voxel hypothesis configuration and its corresponding growth direction.

Detailed Description

In order to make the features of the present invention more clear, the present invention is further explained below with reference to the attached drawings and examples.

The invention relates to a medical image three-dimensional reconstruction isosurface grid accelerated extraction method based on voxel growth, which takes a patient mandible part as an example, as shown in figure 4, and takes an image after preprocessing and segmentation as read-in data of three-dimensional reconstruction, and an improved MC algorithm is adopted for the three-dimensional reconstruction.

Firstly, an index table 1, an index table 2 and an index table 3 of the corresponding new topology structure are created. The index table 1 is an edge index table improved on the basis of an edge index table in the original MC algorithm, and comprises 256 index items, and the intersection condition of an isosurface and each edge of a cube can be determined through the index table 1; the index table 2 is an improved triangular patch index table based on a triangular patch index table in the original MC algorithm, and comprises 256 index items, and the triangular connection mode formed by intersection points of all edges is determined through the index table 2; the index table 3 is an index table for iso-surface voxel growth, which is newly added on the basis of the original MC algorithm.

The main reconstruction process can be divided into searching for the seed voxel, performing accelerated growth after determining the seed voxel, and extracting the isosurface in the growth process. The specific reconstruction process is as follows:

a. reading the processed medical image data of the patient mandible part, constructing a cube, positioning the seed cube according to the two-position tomogram, and selecting seed voxels;

b. comparing the gray value of each vertex of the seed cube with a given isosurface threshold value, calculating an index value, and calculating the gradient of the vertex by using gray difference;

c. and searching the improved index table 1 by the index value to obtain the intersecting edge of the current cube having an intersection point with the isosurface. Calculating coordinates of an equivalent point and a normal vector through interpolation according to two vertexes of the intersected edge and the normal vector of the intersected edge;

d. looking up an improved index table 2 according to the index value, determining a triangle connection mode and putting the triangle into a linked list for storage;

e. the improved index table 3 is looked up according to the index value, and it can be determined which direction the growth direction of the current seed voxel is according to the array value (named growth value) obtained from the index table 3. And calling a corresponding number of thread functions according to the growth value, judging whether the adjacent voxels in the direction to be grown need to be processed in each thread, and if so, putting the adjacent voxels into queues in respective growth directions. Respectively taking out data from queues in respective growth directions to accelerate growth and reconstruction;

f. when a certain thread is called to process growth in one direction, judging whether the adjacent voxels in the direction to be grown need processing or not according to whether the mark of the adjacent cube in the direction to be grown of the seeded cube in the mark array is 0 (the whole scheme has a global array and is used for recording the processing states of all cubes, 0 represents that the current cube is not processed, 1 represents that the information of the current cube is already put into a growth queue, and 2 represents that the current cube is processed), if so, putting into the queue, and the process of putting into the queue adopts a thread synchronous and rotating lock mode to ensure orderly and smooth operation among all threads;

g. and taking out the cube data in the direction to be grown, and performing the operations of the steps b, c, d, e and f in the thread to grow until the queue is empty and the isosurface grid is extracted, so that the grid model of the lower jaw part is presented in front of eyes.

The follow-up grid model can be visually displayed, and the reconstructed lower jaw model can be clearly, three-dimensionally and visually displayed in front of eyes of a doctor to help the doctor to analyze the state of an illness.

It should be understood that the above embodiments are merely examples for illustrating the idea of the present invention, and are not intended to limit the embodiments and the reconstruction locations. The person skilled in the art may implement the invention in many variants and do not therefore limit the scope of protection of the invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种点群数据特定目标数据提取的自动建模方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!