A method and system for visualizing isosurface graphs based on many-core processor clusters

By adopting a multi-node parallel execution method on a multi-core processor cluster, the problem of low efficiency in isosurface map generation in the existing technology is solved, and efficient isosurface map visualization is achieved, which is particularly suitable for large-scale data sets.

CN115935034BActive Publication Date: 2025-09-09SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211482691.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-24
Publication Date
2025-09-09
Estimated Expiration
2042-11-24

AI Technical Summary

Technical Problem

Existing isosurface generation methods cannot fully utilize the computing power of multi-core processors, resulting in low generation efficiency, especially low performance when processing large-scale data sets.

Method used

A multi-core, multi-node parallel execution method based on a many-core processor cluster is adopted. The point set data is read in parallel by each computing node, the position offset of the isovalue point is calculated along the three sides of the voxel XYZ, the coordinates of the isovalue point in the voxel are traversed in parallel, and triangular primitives are constructed to finally form a local isosurface, which is then merged into a global isosurface map.

Benefits of technology

It improves the efficiency of isosurface visualization, reduces redundant calculations, is suitable for processing ultra-large-scale data sets, and fully utilizes the computing power of multi-core processors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115935034B_ABST
    Figure CN115935034B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for visualizing an isosurface map based on a many-core processor cluster. The method includes: each computing node reads its own point set data in parallel; each computing node first calculates the position offset of an isovalue point in each layer of data slice along the direction of the three edges of the voxel X, Y, and Z in a multi-core parallel manner, then traverses the coordinates of the isovalue points on each edge of the calculated voxel in parallel, and finally traverses each voxel in parallel to connect three isovalue points to construct a triangular primitive and form a local isosurface; merges the local isosurfaces of each computing node, draws a global isosurface, and outputs an isosurface map. The present invention can utilize the multi-computing nodes of the many-core processor cluster and the multi-cores of each computing node to realize the parallel execution of isosurface map visualization, requires less auxiliary memory, reduces redundant calculations, can effectively improve the efficiency of isosurface map visualization, and is particularly suitable for isosurface map visualization processing of large-scale data sets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data visualization analysis, and in particular to a method and system for visualizing an isosurface graph based on a many-core processor cluster. Background Art

[0002] Contour drawing is the most commonly used geometric visualization method for two-dimensional scalar fields. Contour lines are formed by connecting points with the same value, such as contour lines on a map and isobars in a weather forecast. A two-dimensional scalar field can be viewed as a binary function, and contour lines are the set of points such that the function's value is a constant. Isosurfaces can be viewed as a generalization of contour lines in three-dimensional space: surfaces formed by connecting points with the same value. Isosurface technology is widely used in visualization, and many scalar field visualization problems can be summarized as the extraction and rendering of isosurfaces.

[0003] The Marching Cubes method, published in 1987, is the most widely used isosurface extraction method (WE Lorensen and HECline, “Marching cubes: A high resolution 3D surface construction algorithm,” ACM Comput. Graph., vol. 21, no. 4, pp. 163–169, 1987). The classic Marching Cubes method employs a divide-and-conquer approach, traversing the smallest unit voxel (cube) of a three-dimensional regular scalar field one by one, generating triangular facets within the cube that satisfy a given threshold. When processing each voxel, the values ​​of the voxel's eight vertices are compared with a given threshold to determine whether the cube contains an isosurface. If an isosurface exists, the intersection of the isosurface and the edge is calculated based on the scalar values ​​of the two endpoints of the relevant edge. Each edge intersection is connected according to a specific rule to form a series of isosurfaces. Based on the relationship between the eight vertices and the given threshold, there are 256 possible isosurfaces within a voxel.

[0004] The marching cubes method is widely used in scientific visualization. Classical methods have problems with extraction quality and efficiency. From the perspective of isosurface extraction, there are issues with topological connectivity and consistency, as well as the low quality of the generated triangular facets. In 2003, Nilson proposed a new method for calculating isosurfaces approximated by triangular meshes based on the original method (Nielson, Gregory M. "On marching cubes." IEEE Transactions on visualization and computer graphics 9.3 (2003): 283-297.). This method uses trilinear interpolation within the voxels to approximate the isosurface, preserving the connectivity and separation of vertices. In 2004, Schaefer et al. proposed the dual marching cubes method (Schaefer, Scott, and Joe Warren. "Dual marching cubes: Primal contouring of dual grids." 12th Pacific Conference on Computer Graphics and Applications, 2004. PG 2004. Proceedings.. IEEE, 2004.). They also proposed a method for calculating implicit function feature points, which ensures that the extracted mesh is crack-free and manifold, and can recover thin-wall features without subdividing the octree. In 2017, Grosso et al. optimized the method for generating correct topology and proposed a robust triangulation rule (Grosso, Roberto. "An asymptotic decider for robust and topologically correct triangulation of isosurfaces: Topologically correct isosurfaces." Proceedings of the Computer Graphics International Conference. 2017.).

[0005] From the perspective of efficiency, the classical method needs to traverse all voxels, but there are a large number of voxels in the space that do not intersect with the isosurface. According to statistics, 30% to 70% of the computing time is spent on processing these non-intersecting voxels (Custodio, Lis, et al. "Practical considerations on marching cubes 33topologicalcorrectness." Computers & graphics 37.7 (2013): 840-850.). In order to avoid unnecessary repetition, researchers have proposed a series of acceleration methods. Chen et al. introduced a GPU-based technology (Chen, Junjie, Xiaogang Jin, and Zhigang Deng. "GPU-based polygonization and optimization for implicit surfaces." The Visual Computer 31.2 (2015): 119-130.), which reconstructs and smoothes the isosurface by repositioning vertices without changing the mesh topology. In 2022, Roberto Grosso and Daniel Zint proposed a parallel method based on dual marching cubes (Grosso, Roberto, and Daniel Zint. "A parallel dualmarching cubes approach to quad only surface reconstruction." The Visual Computer 38.4 (2022): 1301-1316.). This method uses a half-edge structure to store mesh data, which can process hundreds of millions of volume data meshes. At the same time, a parallel scheme for processing elements on the GPU is designed to improve computational efficiency.

[0006] Many-core processors are master-slave heterogeneous multi-core processors based on the Arm architecture. They contain multiple core groups, each consisting of a master core and a slave core array. Each slave core array contains multiple slave cores. Many-core processors offer high computing power but suffer from small on-chip caches and limited memory access speeds. The cost of moving data between main memory and on-chip cache is high. Therefore, it is necessary to reduce the storage of auxiliary information during the computation process and maximize the use of on-chip cache space to fully utilize the computing power of each core. Therefore, optimizing isosurface visualization methods based on the multi-core nature of many-core processors is expected to accelerate the execution of isoline (surface) algorithms on many-core processors. However, existing serial algorithms for isopoint calculation sequentially process each voxel to generate isopoints, then merge duplicate isopoints. This high degree of coupling makes parallel execution difficult and inefficient. Current parallel algorithms for isopoint calculation either require a large amount of auxiliary memory space for parallelization, such as FlyingEdge, or each thread independently processes each voxel, generating a large number of redundant isopoints and occupying limited memory space. In summary, the current isosurface generation method cannot fully utilize the computing power of many cores, has low performance, and cannot complete the isosurface visualization of large-scale data sets. Summary of the Invention

[0007] The technical problem to be solved by the present invention is as follows: In response to the above-mentioned problems of the prior art, a method and system for isosurface visualization based on a many-core processor cluster are provided. The present invention can utilize the multi-core and multi-node of the many-core processor cluster to realize the parallel execution of isosurface visualization, requires less auxiliary memory, reduces redundant calculations, and can effectively improve the efficiency of isosurface visualization. It is particularly suitable for isosurface visualization processing of large-scale data sets.

[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0009] A method for visualizing an isosurface map based on a many-core processor cluster, comprising:

[0010] S101, each computing node reads its own point set data in parallel;

[0011] S102: Each computing node divides the point set data into multiple layers of data slices along any one of the three X, Y, and Z edges. Based on the point set data and a preset isosurface threshold set, the computing node calculates the position offset of the equal-value point in each layer of data slice along the three X, Y, and Z edges of the voxel in a multi-core parallel manner.

[0012] S103, each computing node traverses and calculates the coordinates of the equivalent points on each edge of the voxel in a multi-core parallel manner based on the point set data and the preset isosurface threshold set;

[0013] S104: Each computing node traverses each voxel in a multi-core parallel manner based on the position offset of each layer of data slices and the coordinates of the isovalue points, sequentially connects three isovalue points to construct a triangle primitive, and finally forms a local isosurface;

[0014] S105 , merging the local isosurfaces of the computational nodes, drawing a global isosurface, and outputting an isosurface graph.

[0015] Optionally, before step S101, the following steps are further included:

[0016] S201, expanding the three-dimensional scalar field data required for visualization of the isosurface map axis by axis into point set data in a one-dimensional scalar form;

[0017] S202, store the point set data in the form of one-dimensional scalar in a single file in the parallel file system, and each computing node reads its own point set data in parallel in the parallel file system according to the data offset and data size corresponding to the computing node; or split the point set data in the form of one-dimensional scalar according to the data offset and data size corresponding to the computing node and store them in a storage location readable by each computing node for separate reading; and the data offset corresponding to the computing node of any node number is offset rank The calculation function expression is:

[0018] offset rank =rank*u*v*((w+n-1) / n-1)

[0019] In the above formula, u, v, and w are the three-dimensional coordinate dimensions of the point set data, and n is the number of computing nodes. For any computing node with a node number of rank, when rank is equal to n-1, the corresponding data size is size rank The calculation function expression is:

[0020] size rank =u*v*w-(n-1)*u*v*((w+n-1) / n-1);

[0021] When rank is not equal to n-1, the corresponding data size is size rank The calculation function expression is:

[0022] size rank =u*v*(w+n-1) / n.

[0023] Optionally, the multi-core parallel approach refers to allocating data shards according to the number of processing cores c of the computing node, so that each processing core processes (w+1) / c layers of data shards in parallel, where w represents the dimension of the point set data along the division direction.

[0024] Optionally, calculating the position offset of the equal-value point in each layer of data shards in a multi-core parallel manner in step S102 includes:

[0025] S401, initializing the cursor to point to the head of a preset isosurface threshold set;

[0026] S402, obtaining the current threshold pointed to by the cursor in the isosurface threshold set;

[0027] S403, based on the values ​​of each voxel vertex in the point set data and the current threshold, traverse each voxel along the three directions of the voxel X, Y, and Z edges in a multi-core parallel manner and determine whether there are equal-value points. If there are equal-value points on any edge, the number of equal-value points is accumulated and saved in an equal-value point array;

[0028] S404: Calculate the position offset of the equal-value point in each layer of data slices based on the equal-value point array according to the following formula:

[0029] SlicesOffset k =SlicesOffset[k]+SlicesOffset k-1 ;

[0030] In the above formula, SlicesOffset k Indicates the position offset of the k-th layer data slice, SlicesOffset[k] indicates the number of equal points on the k-th layer data slice, SlicesOffset k-1 Indicates the position offset of the k-1th layer data slice, k>0 and SlicesOffset0=0;

[0031] S405, determining whether the cursor currently points to the last threshold value of the isosurface threshold value set, if yes, then ending; otherwise, adding 1 to the cursor and jumping to step S402.

[0032] Optionally, determining whether there is an equal-value point in step S403 includes: for the current threshold v and the values ​​v1 and v2 of two vertices on an edge in the voxel that satisfy the condition v1>v2, if v1≥v>v2 or v1>v≥v2 holds, determining that there is an equal-value point on the edge.

[0033] Optionally, calculating the coordinates of the equivalent points on each edge in the voxel in step S103 means: performing interpolation calculation based on the coordinate values ​​of two vertices on the edge in the voxel where each equivalent point is located and a corresponding threshold to obtain the coordinates of the equivalent points.

[0034] Optionally, in step S104, traversing each voxel in parallel and constructing a triangle primitive according to the coordinates and position offsets of the equal-value points includes:

[0035] S501, initializing the cursor to point to the head of a preset isosurface threshold set;

[0036] S502, obtaining the current threshold pointed to by the cursor in the isosurface threshold set;

[0037] S503, traversing the voxels in the point set data in parallel using a multi-core parallel approach: first, comparing all eight vertices of the voxel based on the value of each vertex and the current threshold. If the vertex value is greater than or equal to the current threshold, the comparison result is 1; otherwise, the comparison result is 0. The comparison results of the eight vertices are used to generate the voxel index value Index; then, based on the voxel index value Index, a table is looked up to determine the corresponding voxel triangulation situation. The position offset of the equal-valued point is used to represent the equal-valued point. The position sequence number of the equal-valued point on each side of the voxel is sequentially searched, and the three equal-valued points are connected to form a triangle primitive and saved.

[0038] S504, forming a local isosurface by splicing the triangle primitives of each processor core through the designated processor main core;

[0039] S505, determining whether the cursor currently points to the last threshold value of the isosurface threshold value set, if yes, then ending; otherwise, adding 1 to the cursor and jumping to step S502.

[0040] Optionally, when searching for the position numbers of equal-value points on each side of the voxel in sequence in step S503, four cursors p0 to p3 are used to point to a group of four parallel sides of the voxel. If there is no equal-value point on the edge pointed to by a cursor, move to the next equal-value point position in XYZ order, so that a maximum of 20 comparison operations are required to sequentially find all equal-value points in a voxel.

[0041] In addition, the present invention also provides an isosurface visualization system based on a many-core processor cluster, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the isosurface visualization method based on the many-core processor cluster.

[0042] In addition, the present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be programmed or configured by a microprocessor to execute the isosurface visualization method based on a many-core processor cluster.

[0043] Compared with the prior art, the present invention mainly has the following advantages:

[0044] 1. The present invention adopts a data parallel approach, where each computing node reads its own point set data in parallel without having to read the point set data of other computing nodes. This ensures that the memory in a single computing node is sufficient to store the data to be processed by the node, thereby supporting the visualization of isosurface maps of ultra-large-scale data sets.

[0045] 2. In a single computing node, the data is first traversed to determine the position sequence of the equivalent points in each layer in the output, and the three edges are processed according to the X, Y, and Z directions in the voxel. This solves the problem of parallel computing being impossible due to shared edges between adjacent voxels and reduces redundant computing. Therefore, a multi-core parallel approach can be used to traverse each layer of data slices and generate equivalent points.

[0046] 3. The present invention completes the determination of the position offsets and coordinates of equivalent points before constructing triangle primitives. This allows for parallel execution of triangle primitive construction, improving efficiency. Furthermore, as an optional optimization, the present invention can further use four cursors to track the positions of equivalent points. With a maximum of 20 comparison operations, the positional numbers of all equivalent points in a voxel can be found, further improving triangle primitive construction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 Schematic diagram of the basic flow of the method of embodiment 1 of the present invention.

[0048] Figure 2 Schematic diagram of the data segmentation method and voxels in Example 1 of the present invention.

[0049] Figure 3 Schematic diagram of the process of calculating the position offset in the first embodiment of the present invention.

[0050] Figure 4 The figure is a schematic diagram of the process of constructing a triangle primitive in the first embodiment of the present invention.

[0051] Figure 5 Schematic diagram of voxel index values ​​in embodiment 1 of the present invention.

[0052] Figure 6 Schematic diagram of the structure of two adjacent voxels in the first embodiment of the present invention. DETAILED DESCRIPTION

[0053] Example 1:

[0054] like Figure 1 As shown, the isosurface visualization method based on the many-core processor cluster in this embodiment includes:

[0055] S101, each computing node reads its own point set data in parallel;

[0056] S102: Each computing node divides the point set data into multiple layers of data slices along any one of the three X, Y, and Z edges. Based on the point set data and a preset isosurface threshold set, the computing node calculates the position offset of the equal-value point in each layer of data slice along the three X, Y, and Z edges of the voxel in a multi-core parallel manner.

[0057] S103, each computing node traverses and calculates the coordinates of the equivalent points on each edge of the voxel in a multi-core parallel manner based on the point set data and the preset isosurface threshold set;

[0058] S104: Each computing node traverses each voxel in a multi-core parallel manner based on the position offset of each layer of data slices and the coordinates of the isovalue points, sequentially connects three isovalue points to construct a triangle primitive, and finally forms a local isosurface;

[0059] S105 , merging the local isosurfaces of the computational nodes, drawing a global isosurface, and outputting an isosurface graph.

[0060] In this embodiment, before step S101, the following steps are further included:

[0061] S201, expanding the three-dimensional scalar field data required for isosurface visualization (including but not limited to the output results of computer three-dimensional simulation) axis by axis into one-dimensional scalar point set data; the point set data mainly includes the coordinates and values ​​of each vertex of the voxel (such as contour values, elevation values, etc.), and can be stored in the required general scientific big data file format, such as NetCDF, HDF5 format, etc., according to actual needs.

[0062] S202, the point set data in the form of one-dimensional scalar is stored in a single file in the parallel file system, and each computing node reads its own point set data in parallel in the parallel file system according to the data offset and data size corresponding to the computing node; and the data offset corresponding to the computing node of any node number is offset rank The calculation function expression is:

[0063] offset rank =rank*u*v*((w+n-1) / n-1)

[0064] In the above formula, u, v, and w are the three-dimensional coordinate dimensions of the point set data, and n is the number of computing nodes. For any computing node with a node number of rank, when rank is equal to n-1, the corresponding data size is size rank The calculation function expression is:

[0065] size rank =u*v*w-(n-1)*u*v*((w+n-1) / n-1);

[0066] When rank is not equal to n-1, the corresponding data size is size rank The calculation function expression is:

[0067] size rank =u*v*(w+n-1) / n.

[0068] For a given isovalue threshold, each edge in a voxel has at most one isovalue point (the intersection of the isosurface and the voxel edge). In a serial execution algorithm, only one voxel is processed at a time, so the generated isovalue points can be stored sequentially and connected in sequence to form triangle primitives. In a parallel environment, data is split into different processes for independent calculations. To integrate the results of each process, the position offset of the first isovalue point in each data slice in the global array storing the results must be determined in advance to ensure that the generated results are ordered and that the correct isovalue points can be connected in subsequent steps to form triangle primitives.

[0069] In this embodiment, the multi-core parallel approach means allocating data slices according to the number of processing cores c of the computing node, so that each processing core processes (w+1) / c layers of data slices in parallel, where w represents the dimension of the point set data along the partitioning direction. The method of this embodiment can take advantage of the multi-core advantage of the many-core processor and calculate the position offset of the equivalent point in a multi-core parallel manner. Figure 2 As shown, the data is divided along the Z-axis (which can be switched to the X-axis or Y-axis, and the Z-axis is used as an example in this embodiment) of the coordinate axis of the input three-dimensional data set, and measures are taken to solve the problem of repeated processing of common edges between adjacent voxels (which will cause repeated counting), so that parallel computing can be achieved. On the one hand, this method can decouple the dependencies between the six adjacent voxels, avoid processing the same edge multiple times (up to 4 times), and ensure the correct counting of the number of equal-value points in each layer. On the other hand, the voxels in each layer can be further processed in parallel (if the processor has this feature), that is, each voxel is processed in a more fine-grained parallel manner within each core.

[0070] like Figure 3 As shown, in step S102 of this embodiment, calculating the position offset of the equal value point in each layer of data slice in a multi-core parallel manner includes:

[0071] S401, initializing the cursor to point to the head of a preset isosurface threshold set;

[0072] S402, obtaining the current threshold pointed to by the cursor in the isosurface threshold set;

[0073] S403, according to the value of each vertex of the voxel in the point set data and the current threshold, traverse each voxel along the three directions of the voxel XYZ edges in a multi-core parallel manner and determine whether there are equal-value points. If there are equal-value points on a certain edge, the number of equal-value points is accumulated and saved in the equal-value point array (referred to as SlicesOffset in this embodiment); in this embodiment, the determination of whether there are equal-value points in step S403 includes: for the current threshold v and the values ​​v1 and v2 of the two vertices on an edge in the voxel that meet the condition v1>v2, if v1≥v>v2 or v1>v≥v2 is established, it is determined that there are equal-value points on the edge.

[0074] S404: Calculate the position offset of the equal-value point in each layer of data slices based on the equal-value point array according to the following formula:

[0075] SlicesOffset k =SlicesOffset[k]+SlicesOffset k-1 ;

[0076] In the above formula, SlicesOffset k Indicates the position offset of the k-th layer data slice, SlicesOffset[k] indicates the number of equal points on the k-th layer data slice, SlicesOffset k-1 Indicates the position offset of the k-1th layer data slice, k>0 and SlicesOffset0=0;

[0077] In step S405, it is determined whether the cursor is currently pointing to the last threshold in the isosurface threshold set. If so, the process ends; otherwise, the cursor is incremented by 1 and the process jumps to step S402. Through the above method, the position offset of the first isovalue point on each layer of data shard (also the position offset of the data shard at that layer) and the total number of isovalue points can be calculated.

[0078] According to the equal-value point array SlicesOffset, the equal-value points generated by each process are guaranteed to be stored in the correct position in the global equal-value point array, and there are no longer any parallelization restrictions. Following the data segmentation and parallelization method of the previous step, each core independently traverses the sliced ​​data of each layer and calculates the coordinates of the equal-value points on the XYZ edge of each voxel, ensuring that each edge is processed only once and at most one equal-value point is generated, thereby reducing redundant calculations and speeding up processing. In this embodiment, calculating the coordinates of the equal-value points on each edge of the voxel in step S103 means: interpolating the coordinate values ​​of the two vertices on the edge of the voxel where each equal-value point is located and the corresponding threshold (linear interpolation or other interpolation methods can be used) to calculate the coordinates of the equal-value points. Finally, the position offset of the equal-value points on each slice is obtained according to the equal-value point array SlicesOffset, and the coordinate values ​​of each equal-value point on the slice are accurately saved in the equal-value point array Points in sequence for later use.

[0079] like Figure 4 As shown, in step S104 of this embodiment, traversing each voxel in parallel and constructing a triangle primitive according to the coordinates and position offsets of the equal-value points includes:

[0080] S501, initializing the cursor to point to the head of a preset isosurface threshold set;

[0081] S502, obtaining the current threshold pointed to by the cursor in the isosurface threshold set;

[0082] S503, traversing the voxels in the point set data in parallel using a multi-core parallel approach: first, comparing all eight vertices of the voxel based on the value of each vertex and the current threshold. If the vertex value is greater than or equal to the current threshold, the comparison result is 1; otherwise, the comparison result is 0. The comparison results of the eight vertices are used to generate the voxel index value Index; then, based on the voxel index value Index, a table is looked up to determine the corresponding voxel triangulation situation (one of the 256 types mentioned in the background technology). The position offset of the equal-value point is used to represent the equal-value point. The position sequence number of the equal-value point on each side of the voxel is sequentially searched, and the three equal-value points are connected to form a triangle primitive and saved.

[0083] S504, forming a local isosurface by splicing the triangle primitives of each processor core through the designated processor main core;

[0084] S505, determining whether the cursor currently points to the last threshold value of the isosurface threshold value set, if yes, then ending; otherwise, adding 1 to the cursor and jumping to step S502.

[0085] In order to reduce memory space, the position offset of the equal-valued points is used to represent the equal-valued points, and the three points are connected in sequence to form a triangle primitive. In order to quickly find the position sequence of each equal-valued point, the triangle primitive construction algorithm needs to be executed in parallel with the equal-valued point generation method along the same coordinate direction. Therefore, taking the data segmentation along the Z axis as an example, each core processes the voxels on each slice in parallel, compares and judges the 8 vertices (1 if greater than or equal, otherwise 0), and generates the voxel index value Index indicating 256 triangulation situations. The voxel index value Index is as follows: Figure 5 The following table shows the comparison results (values ​​of 1 or 0) for the eight vertices v7 through v0 in the figure. In the figure, e0 through e11 represent the 12 edges of the voxel. Based on the voxel's index, a table (predefined to record 256 triangulation rules) is looked up to determine which edges within the voxel have equivalent points (for details, see W.E. Lorensen and H.E. Cline, "Marching cubes: A high resolution 3D surface construction algorithm," ACM Comput. Graph., vol. 21, no. 4, pp. 163–169, 1987). Interpolation is then performed to determine the coordinates of the intersection point on the current edge. Based on these coordinates, the point's position is then searched in the array of equivalent points, Points, to obtain its position index.

[0086] In this embodiment, when searching for the position numbers of equal-value points on each side of the voxel in sequence in step S503, it includes using four cursors p0 to p3 to point to a group of four parallel sides of the voxel. If there is no equal-value point on the side pointed by a certain cursor, it moves to the next equal-value point position in XYZ order, so that a maximum of 20 comparison operations are required to find all equal-value points in a voxel in sequence. For example, in this embodiment, the four cursors (denoted as p0 to p3) point to the equal-value point positions on the sides e0, e2, e4, and e6 respectively. If there are no equal-value points on these sides, the corresponding cursors move to the next equal-value point position in XYZ order. Taking p0 as an example, p0 moves in the order of e0-e3-e8, that is, if there is no equal-value point on e0 of the voxel, it points to e3. If e3 does not exist, it moves to e8, and so on, and the cursor values ​​are moved and updated in sequence. Figure 6As shown in the figure, assuming cursor p0 points to edge e0, finding equal-valued points on edges e0, e3, e8, e1, and e9 requires at most six comparison operations (in the order e0, e3, e8, ex, e1, and e9). The other three cursors pointing to edges e2, e4, and e6 operate in the same way, so at most 20 comparison operations are required to sequentially find all equal-valued points within a voxel. The comparison operations are also performed in the order of the X, Y, and Z axes, with adjacent voxels corresponding to ex-e1-e9 (when sequentially searching for equal-valued points on edges e1 and e9, you cannot skip ex and go directly to e1-e9). Finally, according to the triangulation rules (see W.E. Lorensen and H.E. C. Line, “Marching cubes: A high resolution 3D surface construction algorithm,” ACM Comput. Graph., vol. 21, no. 4, pp. 163–169, 1987), the position numbers of the isovalue points found using the cursor are recorded in sequence to obtain an array of triangle primitives, which is the isovalue surface calculation result of the current node. Ultimately, the local isovalue surface of each calculation node can be formed.

[0087] After all compute nodes have completed their local isosurface calculations, the main core of compute node 0 (the main core, or other cores of designated compute nodes) collects the local isosurfaces of other nodes, concatenates the triangle primitive arrays, merges the isosurfaces, obtains the complete isosurface result, plots the isosurface, and outputs the isosurface image. The isosurface is drawn based on the calculation results and output locally as an image.

[0088] In summary, the isosurface visualization method based on a multi-core processor cluster in this embodiment includes each computing node reading its own point set data in parallel; each computing node first calculates the position offset of the equivalent point in each layer of data slice along the three directions of the voxel XYZ edges in a multi-core parallel manner, then traverses the coordinates of the equivalent points on each edge of the voxel in parallel, and finally traverses each voxel in parallel to connect the three equivalent points to construct a triangular primitive and form a local isosurface; the local isosurfaces of each computing node are merged, a global isosurface is drawn, and an isosurface map is output. Compared with traditional methods, the method of this embodiment uses a data parallel approach to divide a large-scale data set into multiple small data sets and distribute them to cluster nodes, which can support isosurface visualization of ultra-large-scale data sets. Based on the characteristics of the strong computing power of the multi-core processor but limited on-chip cache space, multi-core parallel calculation of equivalent points and simplified storage of auxiliary information are used to fully utilize the performance of the multi-core processor and improve the efficiency of isosurface generation. This embodiment is based on the multi-core characteristics of the many-core processor cluster. The present invention can utilize the multi-core and multi-node of the many-core processor cluster to realize the parallel execution of the isosurface visualization. It requires less auxiliary memory, reduces redundant calculations, and can effectively improve the efficiency of the isosurface visualization. It is suitable for the isosurface visualization processing of large-scale data sets.

[0089] In addition, this embodiment also provides an isosurface visualization system based on a many-core processor cluster, comprising an interconnected microprocessor and memory, wherein the microprocessor is programmed or configured to execute the aforementioned isosurface visualization method based on a many-core processor cluster. Furthermore, this embodiment also provides a computer-readable storage medium storing a computer program for being programmed or configured by the microprocessor to execute the aforementioned isosurface visualization method based on a many-core processor cluster.

[0090] Example 2:

[0091] This embodiment is basically the same as the first embodiment, with the main difference being that in step S202, the point set data in the form of a one-dimensional scalar is split according to the data offset and data size corresponding to the computing node and stored in a storage location readable by each computing node for separate reading. In this way, the point set data can be directly distributed to a storage location readable by each computing node (for example, in this embodiment, the local disk of the computing node), and the data offset and data size corresponding to the computing node are exactly the same as in the first embodiment. Undoubtedly, by pre-splitting the point set data into individual files and storing them in a parallel file system or the local disk of the computing node, the process on each computing node independently reads data from the file, and the division of the point set data within the cluster can also be achieved. The isosurface visualization method based on the multi-core processor cluster of this embodiment can also utilize the multi-core and multi-node of the multi-core processor cluster to achieve parallel execution of isosurface visualization, requiring less auxiliary memory, reducing redundant calculations, and effectively improving the efficiency of isosurface visualization. It is particularly suitable for isosurface visualization processing of large-scale data sets.

[0092] In addition, this embodiment also provides an isosurface visualization system based on a many-core processor cluster, comprising an interconnected microprocessor and memory, wherein the microprocessor is programmed or configured to execute the aforementioned isosurface visualization method based on a many-core processor cluster. Furthermore, this embodiment also provides a computer-readable storage medium storing a computer program for being programmed or configured by the microprocessor to execute the aforementioned isosurface visualization method based on a many-core processor cluster.

[0093] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0094] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for visualizing an isosurface map based on a many-core processor cluster, characterized in that: include: S101, each computing node reads its own point set data in parallel; S102: Each computing node divides the point set data into multiple layers of data slices along any one of the three X, Y, and Z edges. Based on the point set data and a preset isosurface threshold set, the computing node calculates the position offset of the equal-value point in each layer of data slice along the three X, Y, and Z edges of the voxel in a multi-core parallel manner. S103, each computing node traverses and calculates the coordinates of the equivalent points on each edge of the voxel in a multi-core parallel manner based on the point set data and the preset isosurface threshold set; S104: Each computing node traverses each voxel in a multi-core parallel manner based on the position offset of each layer of data slices and the coordinates of the isovalue points, sequentially connects three isovalue points to construct a triangle primitive, and finally forms a local isosurface; S105, merging the local isosurfaces of each computing node, drawing a global isosurface, and outputting an isosurface map; In step S104, traversing each voxel in parallel and constructing a triangle primitive according to the coordinates and position offsets of the equal-value points includes: S501, initializing the cursor to point to the head of a preset isosurface threshold set; S502, obtaining the current threshold pointed to by the cursor in the isosurface threshold set; S503, traversing the voxels in the point set data in parallel using a multi-core parallel approach: first, comparing all eight vertices of the voxel based on the value of each vertex and the current threshold. If the vertex value is greater than or equal to the current threshold, the comparison result is 1; otherwise, the comparison result is 0. The comparison results of the eight vertices are used to generate the voxel index value Index; then, based on the voxel index value Index, a table is looked up to determine the corresponding voxel triangulation situation. The position offset of the equal-valued point is used to represent the equal-valued point. The position sequence number of the equal-valued point on each side of the voxel is sequentially searched, and the three equal-valued points are connected to form a triangle primitive and saved. S504, forming a local isosurface by splicing the triangle primitives of each processor core through the designated processor main core; S505: Determine whether the cursor currently points to the last threshold value of the isosurface threshold set. If yes, end the process; otherwise, increment the cursor by 1 and jump to step S502. When searching for the position numbers of equal-value points on each side of the voxel in sequence in step S503, four cursors p0~p3 are used to point to a group of four parallel sides of the voxel. If there is no equal-value point on the edge pointed by a cursor, it moves to the next equal-value point position in XYZ order, so that a maximum of 20 comparison operations are required to sequentially find all equal-value points in a voxel.

2. The isosurface visualization method based on a many-core processor cluster according to claim 1, characterized in that: Before step S101, the following steps are also included: S201, expanding the three-dimensional scalar field data required for visualization of the isosurface map axis by axis into point set data in a one-dimensional scalar form; S202, store the point set data in the form of one-dimensional scalar in a single file in the parallel file system, and each computing node reads its own point set data in parallel in the parallel file system according to the data offset and data size corresponding to the computing node; or split the point set data in the form of one-dimensional scalar according to the data offset and data size corresponding to the computing node and store them in a storage location readable by each computing node for separate reading; and the data offset corresponding to the computing node of any node number is offset rank The calculation function expression is: offset rank = rank * u * v * ((w+n-1) / n -1) In the above formula, u, v, and w are the three-dimensional coordinate dimensions of the point set data, and n is the number of computing nodes. For any computing node with a node number of rank, when rank is equal to n-1, the corresponding data size is size rank The calculation function expression is: size rank = u * v * w - (n - 1) * u * v * ((w+n-1) / n - 1); When rank is not equal to n-1, the corresponding data size is size rank The calculation function expression is: size rank = u * v * (w+n-1) / n。 3. The isosurface visualization method based on a many-core processor cluster according to claim 1, characterized in that: The multi-core parallel approach refers to allocating data slices according to the number of processing cores c of the computing node, so that each processing core processes (w+1) / c layers of data slices in parallel, where w represents the dimension of the point set data along the partitioning direction.

4. The isosurface visualization method based on a many-core processor cluster according to claim 1, characterized in that: In step S102, the position offset of the equal value point in each layer of data slice is calculated in a multi-core parallel manner, which includes: S401, initializing the cursor to point to the head of a preset isosurface threshold set; S402, obtaining the current threshold pointed to by the cursor in the isosurface threshold set; S403, based on the values ​​of each voxel vertex in the point set data and the current threshold, traverse each voxel along the three directions of the voxel X, Y, and Z edges in a multi-core parallel manner and determine whether there are equal-value points. If there are equal-value points on any edge, the number of equal-value points is accumulated and saved in an equal-value point array; S404: Calculate the position offset of the equal-value point in each layer of data slices based on the equal-value point array according to the following formula: SlicesOffset k = SlicesOffset[k] + SlicesOffset k-1 ; In the above formula, SlicesOffset k Indicates the position offset of the k-th layer data slice, SlicesOffset[k] indicates the number of equal points on the k-th layer data slice, SlicesOffset k-1 Indicates the position offset of the k-1th layer data slice, k > 0 and SlicesOffset0 = 0; S405, determining whether the cursor currently points to the last threshold value of the isosurface threshold value set, if yes, then ending; otherwise, adding 1 to the cursor and jumping to step S402.

5. The isosurface visualization method based on a many-core processor cluster according to claim 3, characterized in that: In step S403, determining whether there is an equivalued point includes: for the current threshold v and the values ​​v1 and v2 of two vertices on an edge in the voxel that satisfy the condition v1 > v2, if v1 ≥ v > v2 or v1 > v ≥ v2 holds, then determining that there is an equivalued point on the edge.

6. The isosurface visualization method based on a many-core processor cluster according to claim 1, characterized in that: Calculating the coordinates of the equivalent points on each edge of the voxel in step S103 means performing interpolation calculation based on the coordinate values ​​of the two vertices on the edge of the voxel where each equivalent point is located and the corresponding threshold value to obtain the coordinates of the equivalent points.

7. An isosurface visualization system based on a multi-core processor cluster, comprising interconnected microprocessors and memories, characterized in that: The microprocessor is programmed or configured to execute the isosurface visualization method based on a many-core processor cluster as recited in any one of claims 1 to 6.

8. A computer-readable storage medium storing a computer program, wherein: The computer program is used to be programmed or configured by a microprocessor to execute the isosurface visualization method based on a many-core processor cluster as recited in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Isosurface generation method based on geotools

    CN115272594A

  • Methods of generating three-dimensional digital models of objects by wrapping point cloud data points

    US6377865B1