Cell contour rendering method, apparatus and system

CN120937047APending Publication Date: 2025-11-11SHENZHEN HUADA SANJIAN QIFA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380096255.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

In the bioinformatics technology, there are fewer fineness levels, poor low-precision rendering effect, abrupt fineness switching, large rendering resource files, high server storage pressure, large amount of requested data during rendering, and video memory usage Large, resulting in a decrease in rendering frame rate, a worse rendering effect, and has requirements for machine configuration, and poor adaptability.

Method used

Using multi-layer fineness rendering method, it is drawn by chunking using vertex index. All fineness data is compressed in the same instantiated array, with high compression rate, fast network requests to render files, and small memory and video memory during rendering. The rendering performance can be switched according to the settings and adapted to a variety of machine configurations.

Benefits of technology

It achieves a better user experience rendering effect, adapts to multiple machine configurations, takes up little memory and video memory during rendering, fast network requests, high compression rate when rendering files, and weak user perception of fineness switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120937047A_ABST
    Figure CN120937047A_ABST
Patent Text Reader

Abstract

A cell contour rendering method includes: acquiring sliced ​​cell data; dividing the sliced ​​cell data into blocks to generate block data; based on the sliced ​​cell data, performing subdivision and / or face reduction processing on the contour points of cells in the slice to generate multi-level fine vertex index data; writing the multi-level fine vertex index data into the corresponding block data to generate multi-level fine rendering data; and rendering the cell contour based on the rendering data.
Need to check novelty before this filing date? Find Prior Art

Description

Cell outline rendering method, device and system Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a cell outline rendering method, device and system. Background Art

[0002] In bioinformatics research, with the rapid development of microscopy and image processing technologies, the size of biological slides is increasing. During this research process, it is necessary to examine the shape and distribution of large numbers of cells extracted from a single slide or multiple consecutive slides. However, the graphics card configurations used by researchers vary widely, and current image rendering software often has specific requirements for the user's graphics card configuration, making it difficult to adapt to different graphics card configurations, resulting in poor user experience and rendering results.

[0003] Summary of the Invention

[0004] The present disclosure proposes a cell outline rendering method, device and system, which use multi-layer precision rendering, can switch rendering performances of different precisions according to user settings, and use vertex index drawing after block division. All precision data of the block are compressed in the same file, with a high compression rate, faster network request rendering file, and less computer running memory and GPU video memory occupied during rendering. Therefore, it can be adapted to a variety of machine configurations, with better rendering effects and better user experience.

[0005] A first aspect embodiment of the present disclosure provides a cell contour rendering method, which includes: obtaining sliced ​​cell data, dividing the sliced ​​cell data into blocks, and generating block data; based on the sliced ​​cell data, performing segmentation processing and / or surface reduction processing on the contour points of the cells in the slice to generate vertex index data with multiple levels of fineness; writing the vertex index data with multiple levels of fineness into the corresponding block data to generate data to be rendered with multiple levels of fineness; and rendering the cell contour according to the data to be rendered.

[0006] In some embodiments of the present disclosure, sliced ​​cell data is obtained, and the sliced ​​cell data is processed into blocks to generate block data, including: determining the upper and lower boundaries of the position of the cell in the slice to obtain a bounding box; dividing the bounding box according to the width and height of the bounding box and the expected threshold value of the number of cells in the block to obtain different blocks; reading the center point position of the cell in the slice, determining the block where the cell is located according to the center point position of the cell, and generating block data.

[0007] In some embodiments of the present disclosure, based on the sliced ​​cell data, the contour points of the cells in the slice are subjected to segmentation processing and / or face reduction processing to generate vertex index data of multiple layers of fineness, including: based on the sliced ​​cell data, the contour points of the cells in the slice are segmented to obtain vertex index data of a first layer of fineness; the contour points of the first layer of fineness are subjected to face reduction processing and segmentation processing to obtain vertex index data of a second layer of fineness, wherein the number of cell contour points of the second layer of fineness is less than the number of cell contour points of the first layer of fineness; the contour points of the second layer of fineness are subjected to face reduction processing and segmentation processing to obtain vertex index data of a third layer of fineness, wherein the number of cell contour points of the third layer of fineness is less than the number of cell contour points of the second layer of fineness.

[0008] In some embodiments of the present disclosure, the method further includes: generating data at a fourth level of fineness, wherein the number of cell contour points at the fourth level of fineness is smaller than the number of cell contour points at the third level of fineness.

[0009] In some embodiments of the present disclosure, the method further includes: splitting the cell when the number of contour points of the cell in the slice exceeds the number of contour points of the first level of fineness.

[0010] In some embodiments of the present disclosure, an earcut triangulation algorithm is used for triangulation processing.

[0011] In some embodiments of the present disclosure, an effective area-preserving algorithm is used to perform surface reduction processing.

[0012] In some embodiments of the present disclosure, generating data to be rendered at multiple levels of precision includes: compressing vertex indices at multiple levels of precision and their corresponding block data into an instanced array to obtain data to be rendered at multiple levels of precision.

[0013] In some embodiments of the present disclosure, rendering cell outlines according to the data to be rendered includes: determining a rendering fineness according to the size of the block to be rendered and a set density of contour vertices, and rendering cell outlines according to the rendering fineness for the data to be rendered.

[0014] In some embodiments of the present disclosure, determining the rendering fineness based on the size of the block to be rendered and the set contour point density includes: when the size of the block to be rendered remains unchanged, determining the rendering fineness based on the set contour point density, or when the set contour point density remains unchanged, determining the rendering accuracy based on the size of the block to be rendered.

[0015] In some embodiments of the present disclosure, rendering cell contours of the data to be rendered according to the rendering fineness includes: drawing cell contours of a first layer of fineness based on the data to be rendered with a first layer of fineness, or drawing cell contours of a second layer of fineness based on the data to be rendered with a second layer of fineness, or drawing cell contours of a third layer of fineness based on the data to be rendered with a third layer of fineness.

[0016] In some embodiments of the present disclosure, the method further includes: determining blocks within a visible range based on a viewing cone, and rendering cell outlines for the blocks within the visible range.

[0017] In some embodiments of the present disclosure, the method further includes: sorting the cells in the block according to their area, and rendering starting from the cell with the largest area.

[0018] A second aspect of the present disclosure provides a cell contour rendering device, which includes: a blocking module for acquiring sliced ​​cell data, performing block processing on the sliced ​​cell data, and generating block data; a processing module for performing segmentation processing and / or face reduction processing on the contour points of the cells in the slice based on the sliced ​​cell data, and generating vertex index data with multiple levels of fineness; a generation module for writing the vertex index data with multiple levels of fineness into the corresponding block data, and generating data to be rendered with multiple levels of fineness; a rendering module for determining the rendering fineness according to the size of the block to be rendered and the set contour point density, and rendering the cell contour of the data to be rendered according to the rendering fineness.

[0019] An embodiment of the third aspect of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the embodiment of the first aspect of the present disclosure.

[0020] The fourth embodiment of the present disclosure provides a computer storage medium, wherein the computer storage medium stores computer-executable instructions; after the computer-executable instructions are executed by a processor, the method described in the first or second embodiment of the present disclosure can be implemented.

[0021] The fifth embodiment of the present disclosure provides a computer program product, including a computer program, which implements the method described in the first embodiment of the present disclosure when executed by a processor.

[0022] An embodiment of the sixth aspect of the present disclosure provides a chip, comprising one or more interface circuits and one or more processors; the interface circuit is used to receive signals from a memory of an electronic device and send signals to the processor, the signals including computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the method described in the embodiment of the first aspect of the present disclosure.

[0023] According to the cell contour rendering method disclosed in the present invention, sliced ​​cell data is obtained, the sliced ​​cell data is divided into blocks to generate block data; based on the sliced ​​cell data, the contour points of the cells in the slice are divided and / or faceted to generate vertex index data with multiple layers of precision; the vertex index data with multiple layers of precision are written into the corresponding block data to generate data to be rendered with multiple layers of precision; and cell contours are rendered according to the data to be rendered. The present invention uses multi-layer precision rendering, which can switch rendering performances of different precisions according to user settings, and uses vertex index drawing after block division. All precision data of the blocks are compressed into the same instantiated array, with a high compression rate, faster network request rendering file, and less computer running memory and GPU video memory occupied during rendering. Therefore, it can be adapted to a variety of machine configurations, with better rendering effects and better user experience.

[0024] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The above and / or additional aspects and advantages of the present disclosure will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0026] FIG1 is a schematic diagram of a flow chart of a cell outline rendering method according to an embodiment of the present disclosure;

[0027] FIG2 is a schematic diagram of a process of a cell outline rendering method according to an embodiment of the present disclosure;

[0028] FIG3 is a schematic diagram of a cell outline rendering method according to an embodiment of the present disclosure;

[0029] FIG4 is a schematic diagram of slice cell data according to an embodiment of the present disclosure;

[0030] FIG5 is a schematic diagram of generating a block file according to an embodiment of the present disclosure;

[0031] FIG6 is a schematic diagram of a cell contour offset coordinate according to an embodiment of the present disclosure;

[0032] FIG7 is a schematic diagram of a first-level fineness triangulation grid according to an embodiment of the present disclosure.

[0033] FIG8 is a schematic diagram of a second-level fineness triangulation grid according to an embodiment of the present disclosure.

[0034] FIG9 is a schematic diagram of a third-level fineness triangulation grid according to an embodiment of the present disclosure.

[0035] FIG10 is a schematic diagram of a data structure for writing a file according to an embodiment of the present disclosure.

[0036] FIG11 is a schematic diagram showing the effect of a cell outline rendering method according to an embodiment of the present disclosure;

[0037] FIG12 is a schematic diagram showing the effect of a cell outline rendering method according to an embodiment of the present disclosure;

[0038] FIG13 is a schematic diagram showing the effect of a cell outline rendering method according to an embodiment of the present disclosure;

[0039] FIG14 is a schematic diagram showing the effect of a cell outline rendering method according to an embodiment of the present disclosure;

[0040] FIG15 is a schematic diagram showing the effect of a cell outline rendering method according to an embodiment of the present disclosure;

[0041] FIG16 is a schematic diagram showing the effect of a cell outline rendering method according to an embodiment of the present disclosure;

[0042] FIG17 is a schematic diagram showing the effect of a cell outline rendering method according to an embodiment of the present disclosure;

[0043] FIG18 is a schematic block diagram of a cell outline rendering device according to an embodiment of the present disclosure;

[0044] FIG19 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0045] The following describes in detail embodiments of the present disclosure, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0046] In cell rendering technology, batch rendering divides cells into layers and blocks in three-dimensional space. The resulting block data is submitted to the GPU for rendering all at once, improving the overall efficiency of logic lines and rendering lines. LOD (Level of Detail) technology determines the allocation of rendering resources based on the position and importance of the object model's nodes in the display environment, reducing the number of faces and the level of detail of non-critical objects, thereby achieving highly efficient rendering operations.

[0047] Currently, the more advanced solutions include batching the block data and rendering it using vertex indices. Each block of fineness needs to generate corresponding rendering data separately. When rendering, the visibility of different blocks is directly switched according to the size of the block's projection on the screen to switch the fineness. However, for this solution, on the one hand, each block of fineness needs to generate corresponding rendering data separately, the file size is large, the server storage pressure is high, the server storage space will be filled up faster, and the large amount of data requested during rendering will lead to slow loading speeds. On the other hand, during the rendering stage, data of each fineness needs to be transferred to the GPU, resulting in a large amount of video memory usage. As the slice size increases and the number of cells increases, the video memory of the rendering machine will be filled up faster.

[0048] There is also a method that divides the block data into only two levels of precision to generate rendering data. The high-precision data is rendered using vertex index rendering, and the low-precision data is rendered using instanced rendering. The cell shape of the instanced rendering is a polygon obtained by rotating and stretching a fixed polygon. However, for this solution, on the one hand, there are few levels of precision, the rendering effect of low-precision cell outlines is poor, and the switching between the two levels of precision is abrupt. On the other hand, the coarsest level of precision still occupies a large amount of rendering resources, and the rendering frame rate decreases when the number of cells in the field of view is large.

[0049] As can be seen, the existing solutions have the following problems: First, there are few levels of precision, the rendering effect of low-precision cell outlines is poor, and the switching of precision is abrupt. Second, the rendering resource files are large, the server storage pressure is high, and the large amount of data requested during rendering leads to slow loading speeds. Finally, there are certain requirements for machine configuration, the machine video memory occupies a large amount, and because of the large rendering resources, the graphics card requirements are high. If the machine is not compatible, it will lead to a decrease in rendering frame rate and poor rendering effect.

[0050] To this end, the present disclosure proposes a cell outline rendering and collection method, device and system, which use multi-layer precision rendering. When the user scales the cell size, the user has a weak perception of switching precision, and vertex index drawing is used after blocking. All the precision data of the blocks are compressed in the same instantiated array, with a high compression rate. The network request rendering file is faster, and the computer running memory and GPU video memory occupied during rendering are small. The rendering performance can be switched according to user settings, and it is adaptable to a variety of machine configurations.

[0051] The cell outline rendering solution provided in this application is described in detail below with reference to the accompanying drawings.

[0052] Figure 1 shows a schematic flow chart of a cell outline rendering method according to an embodiment of the present disclosure. As shown in Figure 1 , the method may include the following steps.

[0053] S101, obtaining slice cell data, dividing the slice cell data into blocks, and generating block data.

[0054] In the embodiments of the present disclosure, slice cell data refers to relevant data of all cells in a slice, including at least the cell center point, x, y coordinates, cell area, and cell contour point offset. Other data may also be included depending on the specific implementation method, which is not limited by the present disclosure.

[0055] In the embodiments of the present disclosure, slices are segmented to generate blocks based on preset block information, including block size and block grid information, such as a 4x4 shape. The block in which the cell is located is determined based on the position of the cell center point in the slice, and the cell data is then written into the corresponding block to obtain the block data. The specific block segmentation method and block information used are not limited by the present disclosure.

[0056] In the present disclosure, sliced ​​cell data is processed in blocks, and the obtained block data is submitted to the GPU for rendering at one time. By reducing the number of times the CPU sends rendering commands to the GPU and reducing the number of times the GPU switches rendering states, the overall efficiency of logic lines and rendering lines is improved.

[0057] S102 : Based on the sliced ​​cell data, perform segmentation processing and / or surface reduction processing on the contour points of the cells in the slice to generate vertex index data with multiple levels of precision.

[0058] It should be explained that different levels of fineness have different numbers of contour points. A high level of fineness means a large number of contour points and more cell details are rendered. A low level of fineness means a small number of contour points and fewer cell details are rendered.

[0059] In the embodiment of the present disclosure, the offset coordinates of the cell contour point relative to the cell center point can be obtained based on the cell center point, x, y coordinates, and cell contour point offset in the sliced ​​cell data.

[0060] In an embodiment of the present disclosure, a subdivision process and / or a surface reduction process is performed on the contour points of cells in a slice to obtain vertex index data of multiple levels of refinement, including at least two or more levels of refinement.

[0061] Furthermore, embodiments of the present disclosure are based on the WebGL drawing protocol. The object's base mesh is a triangular face. Triangulation is performed based on the offset coordinates of the contour points to obtain vertex indices after triangulation. This can be achieved using the Earcut triangulation algorithm. Cell contour points are subjected to face reduction processing to remove some cell contour points, leaving a smaller number of cell contour fixed points. This can be achieved using the Visvalingam-Whyatt algorithm.

[0062] For example, assuming there are 16 valid contour points, triangulating the contour points of the cells in the slice can yield 14 triangles, each requiring three vertex indices, for a total of 42 vertex indices. By performing face reduction on the 16 vertices, removing 8 of them, and triangulating the remaining 8 vertices, 18 vertex indices can be obtained. Thus, vertex index data at two levels of precision has been obtained. Continuing triangulation and / or face reduction can generate vertex index data at even higher levels of precision. This can be implemented based on actual circumstances and is not limited by this disclosure.

[0063] S103 , writing vertex index data of multiple levels of precision into corresponding block data to generate data to be rendered of multiple levels of precision.

[0064] In an embodiment of the present disclosure, according to step S101, the block corresponding to each cell can be found, the blocks can be numbered, and when executing step S102, each cell data is bundled with the corresponding block number. After execution, the vertex index data of multiple layers of fineness can be written into the corresponding block data. Other marking methods can also be used, which are not limited by the present disclosure.

[0065] In an embodiment of the present disclosure, the data to be rendered includes the position of the cell center point, the offset coordinates of the contour points, the vertex index data of multiple levels of precision, and the like.

[0066] In an embodiment of the present disclosure, each cell uses instanced rendering. Before rendering, the cell center point position, contour point offset coordinates, multi-level vertex index data, etc. are compressed into an instanced array and stored in the video memory as data to be rendered.

[0067] This paper compresses the vertex index data of multiple layers of precision into an instanced array and stores it in the video memory. It has a high compression rate, is faster when requesting network rendering files, and occupies less computer running memory and GPU video memory when rendering.

[0068] S104: Render cell outlines according to the data to be rendered.

[0069] In some embodiments of the present disclosure, frustum culling is performed before rendering, blocks within the field of view are calculated based on the frustum, and only blocks within the visible area are submitted to the GPU for rendering.

[0070] In some embodiments of the present disclosure, rendering a cell outline according to the data to be rendered includes: drawing a cell outline image according to the generated vertex index data of multiple levels of fineness, and multiple levels of fineness images can be generated for one cell outline.

[0071] In some embodiments of the present disclosure, cells are sorted according to their area, with cells with larger areas placed in front, and rendering starts from the cells with the largest areas. When there are too many cells in the field of view, the large cells in the front are rendered, so that less details are lost and the rendering frame rate can be improved.

[0072] In some embodiments of the present disclosure, rendering cell outlines according to the data to be rendered includes: determining a rendering fineness according to the size of the block to be rendered and a set density of contour vertices, and rendering cell outlines according to the rendering fineness for the data to be rendered.

[0073] Specifically, when users view the rendered image, zooming in or out of the cell image will change the size of the blocks in the field of view, and the density of the outline points will also change accordingly. Therefore, when rendering, you can control the switching of the rendering resolution level based on the size of the blocks in the field of view and the outline point density set by the user.

[0074] In summary, according to the cell contour rendering method provided by the embodiment of the present disclosure, sliced ​​cell data is obtained, the sliced ​​cell data is processed into blocks to generate block data; based on the sliced ​​cell data, the contour points of the cells in the slice are subjected to segmentation processing and / or face reduction processing to generate vertex index data with multiple layers of precision; the vertex index data with multiple layers of precision are written into the corresponding block data to generate data to be rendered with multiple layers of precision; and the cell contour is rendered according to the data to be rendered. The present disclosure has multi-layer precision rendering, and the user has a weak perception of switching precision when scaling the cell size, and vertex index drawing is used after block segmentation. All precision data of the blocks are compressed in the same instantiated array, with a high compression rate, faster network request rendering file, and less computer running memory and GPU video memory occupied during rendering. The rendering performance can be switched according to user settings, and it is adaptable to a variety of machine configurations.

[0075] FIG2 shows a schematic flow diagram of a cell outline rendering method according to an embodiment of the present disclosure. Based on the embodiment shown in FIG1 , as shown in FIG2 , the method may include the following steps. For ease of understanding, FIG3 shows a schematic diagram of a cell outline rendering method according to an embodiment of the present disclosure.

[0076] In the present disclosure, in order to facilitate understanding of the scheme, an implementation method, process and effect of the present method are also described in detail. Taking the acquisition of macaque brain data as an example, the implementation method of each step will be described in detail. It should be understood that this example is not a limitation of the method.

[0077] Based on the embodiment shown in FIG1 , steps S201 - S203 are further disclosures of obtaining slice cell data in step S101 , processing the slice cell data into blocks, and generating block data.

[0078] In one embodiment of the present disclosure, slice cell data is obtained from a gef file, as shown in FIG4 . The gef file contains all cell center points, x and y coordinates, cell area, and cell outline point offsets of a slice.

[0079] The sliced ​​cell data is processed into blocks using the method of steps S201-S203:

[0080] S201, determining the upper and lower boundaries of the cell location in the slice, and obtaining a bounding box.

[0081] S202 : Segment the bounding box according to the width and height of the bounding box and the expected threshold value of the number of cells in the block to obtain different blocks.

[0082] In the implementation of the present disclosure, cells are segmented according to dimension, with each dimension segmented only from the middle, so that the segmented blocks form a spatial octree, which facilitates frustum culling. After segmentation, the number of columns and rows in the blocks will be a power of 2.

[0083] In this disclosed implementation, the blocks are divided into approximately square dimensions based on the width and height of the bounding box. For three-dimensional images, the blocks are divided into approximately cube dimensions. For a two-dimensional image, the initial bounding box dimensions are x, and y represents the width and height. If the ratio of x to y is greater than the square root of 2, the x dimension is divided from the center. This cycle continues until the block dimensions x / y are less than the square root of 2, and the y / x ratio is also less than the square root of 2.

[0084] In the embodiment of the present disclosure, a desired threshold value of the number of cells in a block can be set. It should be understood that since the degree of cell aggregation is random, this threshold value is only an approximate value.

[0085] For example, let's assume the desired number of cells in a block is less than 5,000. The total number of cells in a slice is 1 million. After several splits, the number of rows and columns becomes 4*4, and the block size is close to a square. At this point, the number of cells in each block is approximately 16,000, which is greater than 5,000. Therefore, further splitting is required. Because the block size is close to a square, both the x and y dimensions need to be split again. The number of rows and columns in the block becomes 8*8, and the number of cells in each block is approximately 4,000, which is less than 5,000. At this point, splitting is complete.

[0086] S203, reading the center point position of the cell in the slice, determining the block where the cell is located according to the center point position of the cell, and generating block data.

[0087] In one embodiment of the present disclosure, the produced blocks are saved as files. First, the block file ID is generated as shown in Figure 5. Secondly, the block where the cell is located is determined based on the position of the cell center point. Finally, the cell data is written into the corresponding block file.

[0088] Based on the embodiment of FIG. 1 , steps S204 - S206 are further disclosures of step S203 , which performs segmentation and / or face reduction processing on the contour points of cells in the slice based on the sliced ​​cell data to generate vertex index data with multiple levels of precision.

[0089] In the implementation of this disclosure, multiple levels of LOD (Level of Detail) are generated based on LOD technology. It should be noted that the basic concept of LOD is that the less an object contributes to the rendered image, the simpler the representation. When an object is scaled down, the final rendered size on the screen becomes smaller, and the difference between the refined and simple representations becomes smaller. Using a simpler representation of the object will not make much difference to the user, while reducing the rendering pressure on the GPU.

[0090] In an embodiment of the present disclosure, four levels of fineness are generated, including triangular faces with different numbers of contour points from the first to the third layers, and a fourth layer of square points with areas, wherein steps S204-S206 are a method for generating the first to the third levels of fineness.

[0091] In some embodiments of the present disclosure, the method further includes: splitting the cell when the number of contour points of the cell in the slice exceeds the number of contour points of the first level of fineness.

[0092] For example, using three triangular surface accuracy levels of 16, 8, and 4 contour points, when the number of contour points of a cell in a slice exceeds 16, the cell needs to be split into two cells.

[0093] It should be noted that the vertex index data of each LOD level can also be packaged into a texture, and the vertex shader can parse the texture data to obtain the corresponding data based on the cell ID. This can reduce the usage of vertex attributes and enable the rendering of cells with 32 or more cell outline points without splitting the large cell into multiple cells for rendering.

[0094] S204, based on the sliced ​​cell data, the contour points of the cells in the slice are segmented to obtain the vertex index data of the first level of fineness

[0095] In some embodiments of the present disclosure, an earcut triangulation algorithm is used for triangulation processing.

[0096] In the embodiment of the present disclosure, the data of each cell is read, and the offset coordinates of the contour point relative to the cell center are obtained based on the cell center point, x, y coordinates, cell contour point offset, etc. The cell contour points are stored in a clockwise or counterclockwise direction.

[0097] In one embodiment of the present disclosure, assuming that there are 16 valid contour points, the triangulated network composed of 16 points can be split into 14 triangles, each triangle requires three vertex indexes, and a total of 42 vertex indexes. The coordinates of the 16 points are subjected to the earcut triangulation algorithm to obtain the vertex index after triangulation. Taking the cell contour shown in Figure 6 as an example, the contour vertex offset coordinates are [[18,-15],[13,-19],[8,-18],[4,-11],[5,-6],[-2,-3],[-11,-10],[-27,-4],[-28,10],[-23,11],[-14,2],[-4,1],12[9,21],13[18,20],[19,14],[15,6]]. After earcut triangulation, the vertex indices of the first level of refinement are [1, 0, 15, 15, 14, 13, 13, 12, 11, 10, 9, 8, 8, 7, 6, 4, 3, 2, 2, 1, 15, 15, 13, 11, 10, 8, 6, 4, 2, 15, 11, 10, 6, 5, 4, 15, 11, 6, 5, 5, 15, 11]. The mesh after triangulation is shown in Figure 7.

[0098] S205 , performing surface reduction and segmentation processing on the contour points of the first level of fineness to obtain vertex index data of the second level of fineness.

[0099] In some embodiments of the present disclosure, an effective area-preserving algorithm is used to perform surface reduction processing.

[0100] The number of cell contour points at the second level of fineness is smaller than that at the first level of fineness.

[0101] In one embodiment of the present disclosure, it is assumed that there are 16 valid contour points, and the first level of refinement is 16 contour points without surface reduction. The Visvalingam-Whyatt algorithm is used to reduce the surface of the 16 contour points to remove 8 vertices. The remaining 8 vertices correspond to the original cell contour points with subscripts 0, 2, 5, 7, 8, 11, 12, and 13. The offset coordinates relative to the cell center point are: [[18,-15], [8,-18], [-2,-3], [-27,-4], [-28,10], [-4,1], [9,21], [18,20]]. Triangulation is then performed to obtain the cell contour vertex indexes of the second level of refinement [2, 0, 13, 13, 12, 11, 11, 8, 7, 5, 2, 13, 11, 7, 5, 5, 13, 11]. The mesh after triangulation is shown in Figure 8

[0102] It should be noted that the use of the effective area retention algorithm for face reduction processing produces smaller area changes and can better retain the characteristics of the collective face.

[0103] S206 , performing surface reduction and segmentation processing on the cell contour points of the second level of fineness to obtain vertex index data of the third level of fineness.

[0104] Among them, the number of cell contour points at the third level of fineness is smaller than that at the second level of fineness.

[0105] In one embodiment of the present disclosure, assuming that there are 16 valid contour points, there are 8 contour points at the second level of fineness after one face reduction process. The remaining 8 vertices are further reduced using the effective area retention algorithm, leaving 4 vertices. The remaining 4 vertices correspond to the original cell contour point subscripts [0, 7, 11, 13], and the offset coordinates relative to the cell center point are [[18, -15], [-27, -4], [-4, 1], [18, 20]]. Triangulation is then performed to obtain the cell contour vertex index [0, 13, 11, 11, 7, 0] at the third level of fineness. The mesh after triangulation is shown in Figure 9.

[0106] In some embodiments of the present disclosure, the method further includes: generating data at a fourth level of fineness, wherein the number of cell contour points at the fourth level of fineness is smaller than the number of cell contour points at the third level of fineness.

[0107] In one embodiment of the present disclosure, it is assumed that there are 16 valid contour points, and four levels of fineness are three triangular surface accuracy levels of 16, 8, and 4 contour points, and square points with areas.

[0108] S207 , writing the vertex index data of multiple levels of precision into the corresponding block data to generate data to be rendered at multiple levels of precision.

[0109] In one embodiment of the present disclosure, after obtaining multi-layer LOD vertex index data through face reduction and triangulation, the data is written into the corresponding block file. The data structure of the file writing is shown in FIG10 .

[0110] In some embodiments of the present disclosure, generating data to be rendered at multiple levels of precision includes: compressing vertex indices at multiple levels of precision and their corresponding block data into an instanced array to obtain data to be rendered at multiple levels of precision.

[0111] Specifically, taking the WebGL (Web Graphics Library) 3D drawing protocol as an example, before rendering, the cell center point position, cell outline vertex offset coordinates, and multi-layer LOD vertex index data are compressed into an instantiated array and stored in the video memory as the data to be rendered. The data to be rendered is stored in the form of a binary file.

[0112] It should be noted that the present invention compresses the data used for rendering to reduce the server file storage pressure and network transmission pressure, and uses the cell center point plus float16 storage offset method to store rendering data. The more contour points a cell needs to draw, the more obvious the lightweight effect.

[0113] In the embodiments of the present disclosure, vertex indexes can use data that takes up fewer bits. For example, for a cell outline with 16 vertices, each vertex index takes up only 4 bits at minimum. However, if vertex indexes are used for drawing after the blocks are batched, each vertex index needs to take up 16 bits. All the fineness data of the blocks are compressed into the same file, with a high compression rate. The network request to render the file is faster. When rendering, the computer's running memory and GPU video memory are relatively small.

[0114] S208: Render cell outlines according to the data to be rendered.

[0115] In some embodiments of the present disclosure, the method further includes: determining blocks within a visible range based on a viewing cone, and rendering cell outlines for the blocks within the visible range.

[0116] Specifically, before rendering, it is determined whether the bounding boxes of the pre-blocked viewing frustum have an intersection, the blocks within the visible range are calculated, and the blocks within the visible area are submitted to the GPU for rendering.

[0117] In the embodiment of the present disclosure, the rendering fineness is determined according to the size of the block to be rendered and / or the set contour vertex density, and the cell contours are rendered according to the rendering fineness for the data to be rendered.

[0118] In some embodiments of the present disclosure, rendering cell contours according to the data to be rendered includes: determining the rendering fineness according to the size of the block to be rendered and the set contour vertex density, and rendering the cell contours according to the rendering fineness for the data to be rendered. In some embodiments of the present disclosure, the rendering fineness is determined according to the size of the block to be rendered. When the block to be rendered is enlarged, the number of cells in the visible range will decrease, the cell density will decrease, and the vertex density will decrease. It is possible to switch to a coarser fineness for cell contour rendering, such as switching from the first level of fineness to the second level of fineness for cell contour rendering. When the block to be rendered is reduced, the number of cells in the visible range will increase, the cell density will increase, and the vertex density will increase. It is possible to switch to a finer fineness for cell contour rendering, such as switching from the second level of fineness to the first level of fineness for cell contour rendering.

[0119] In some embodiments of the present disclosure, the rendering fineness is determined according to the set contour vertex density. When the set contour vertex density is small, the cell contour can be rendered according to a coarser fineness, for example, the cell contour is rendered according to the fourth level of fineness. Conversely, when the set contour vertex density is large, the cell contour can be rendered according to a finer fineness, for example, the cell contour is rendered according to the first level of fineness.

[0120] Furthermore, determining the rendering fineness based on the size of the block to be rendered and the set contour vertex density also includes: when the size of the block to be rendered remains unchanged, determining the rendering fineness based on the set contour vertex density, or when the set contour vertex density remains unchanged, determining the rendering accuracy based on the size of the block to be rendered.

[0121] It should be understood that, from the first level to the fourth level of fineness, the number of vertices of the cell outline decreases, the cell details represented by the rendering decreases, and the rendering effect becomes rougher.

[0122] Specifically, when the user-set outline vertex density remains unchanged, if the user zooms in on the slice, the size of the block to be rendered will increase, the number of vertices will decrease, and the vertex density in the field of view will decrease. When it is less than the set outline vertex density, a finer rendering level will be switched to display more outline vertices. Conversely, if the user zooms out on the slice, the size of the block to be rendered will decrease, the number of vertices will increase, and the vertex density in the field of view will increase. When it is greater than the set outline vertex density, a coarser rendering level will be switched to display fewer outline vertices.

[0123] In an embodiment of the present disclosure, the contour vertex density is calculated based on the size of the current block to be rendered, and the rendering fineness is determined based on the relationship between the currently calculated vertex density and the newly set contour vertex density. If the currently calculated vertex density is greater than the newly set contour vertex density, switching to a finer rendering fineness is performed; if the currently calculated vertex density is less than the newly set contour vertex density, switching to a coarser rendering fineness is performed.

[0124] For example, suppose that the slice has an average of 5,000 cells per block. The bounding box of a block projected onto the screen is 80px wide and 100px high. The cell density is 5000 / (80*100) = 0.625 (cells / px). 2 ), if the first level of fineness is used, each cell requires 42 vertices to render, so the vertex density is 0.625*42=26.25 ( / px 2 The vertex density of the second level of refinement is 0.625*18=11.25 (vertices / px). 2 The third layer is 0.625*6=3.75 (pieces / px). 2). At this time, the user sets the vertex density to 20 ( / px). 2 ), the second level of detail is used. If the user keeps the vertex density setting unchanged and zooms out, the vertex density on the screen increases. When it exceeds the user-set threshold, it switches to the coarser third level of detail. Conversely, if the user zooms in on the slice, the vertex density in the field of view decreases. When it decreases to a point where the vertex density rendered using the second level of detail is also less than the user-set threshold, it switches to the first level of detail.

[0125] In some embodiments of the present disclosure, the method further includes: sorting the cells in the block according to their area, and rendering starting from the cell with the largest area.

[0126] In an embodiment of the present disclosure, slice cell data is read to obtain cell area, and cells in the block are sorted according to the cell area.

[0127] In an embodiment of the present disclosure, when the user shrinks the slice to a very small size and LOD rendering has already adopted the coarsest points for rendering, since there are too many cells in the field of view, rendering can start from the cells with the largest area, resulting in less loss of details and improved rendering frame rate.

[0128] For example, if there are 5,000 cells, the first cell is the largest. If you set the number of cell instances to be drawn to 1, only the first cell will be rendered. If you set it to 500, only the 500 largest cells will be rendered.

[0129] In some embodiments of the present disclosure, the method further includes: determining the cells within the range to be rendered according to the set range to be rendered, sorting the cells within the range to be rendered according to their area, and rendering starting from the cells with the largest area. In some embodiments of the present disclosure, rendering the cell outlines of the data to be rendered according to the rendering fineness includes: drawing the cell outlines of the first layer of fineness based on the data to be rendered of the first layer of fineness, or drawing the cell outlines of the second layer of fineness based on the data to be rendered of the second layer of fineness, or drawing the cell outlines of the third layer of fineness based on the data to be rendered of the third layer of fineness, or drawing the cell outlines of the fourth layer of fineness based on the data to be rendered of the fourth layer of fineness.

[0130] In one embodiment of the present disclosure, taking the three triangular surface accuracy levels of 16, 8, and 4 contour points from the first to the third layer as an example, when drawing each block and drawing the cell contour of the first layer of fineness, it is necessary to draw 14 triangular surfaces and 42 vertices, and control the starting LOD vertex index of the drawing vertex to be 0. In the vertex shader code, the vertex offset is controlled by the built-in variable gl_VertexID to offset the final vertex position to the correct position. For example, the vertex indexes of the first triangle are 1, 0, and 15. These data are stored in the first layer LOD vertex index data of the instantiated array and are obtained through displacement operations. The cell center point is (5403, 8393), and the outline vertex offset is [[18, -15], [13, -19], [8, -18], [4, -11], [5, -6], [-2, -3], [-11, -10], [-27, -4], [-28, 10], [-23, 11], [-14, 2], [-4, 1], [9, 21], [18, 20], [19, 14], [15, 6]]. When drawing the first vertex of the first triangle, gl_VertexID is 0. The LOD first layer vertex index value is 1 through 0, and the outline vertex offset [13, -19] is obtained through 1. The final position of the first vertex is (5403 + 13, 8393 - 19).

[0131] Similarly, when drawing the second-level cell outline, six triangles and 18 vertices are required, and the starting LOD vertex index for vertex drawing is 42. When drawing the first vertex, gl_VertexID is 0, and gl_VertexID + 42 = 42. By querying the LOD vertex index subscript 42, we get the second-level vertex index 0. The cell outline offset subscript 0 is [18, -15], and the final position of the first vertex is (5403 + 18, 8393 - 15). And so on, each instance draws six triangles. When drawing the third-level cell outline, two triangles and six vertices are required, and the starting LOD vertex index for vertex drawing is 60. When drawing the first vertex, gl_VertexID is 0, gl_VertexID+60=60; by querying the LOD vertex index subscript 60, the second-level fineness vertex index 0 is obtained, and the cell outline offset subscript 0 is [18,-15]. The final position of the first vertex is (5403+18,8393-15), and so on. Two triangles are drawn for each instance.

[0132] Finally, when drawing the fourth layer of detail, we use gl.POINTS to draw the cells, and set gl_PointSize to reflect the cell area. This uses only one vertex to draw the cell, further reducing the amount of GPU computation required.

[0133] In the embodiments of the present disclosure, when the user's machine configuration is sufficiently high, or the number of cells currently being viewed in the slice is small, the rendering effect level can be increased, and when zooming in to view the field of view, the reduction of surfaces can be delayed or even eliminated to achieve better rendering effects. When the user's machine configuration is low, if there is a lag when rendering large slices, the rendering level can be lowered to render fewer details at the same time but without losing important cell distribution information, thereby improving the rendering frame rate. All cell details are then rendered when focusing on a single location in the slice.

[0134] The following is a demonstration of the effects of an embodiment of the present disclosure based on Figures 11-17, wherein the total number of cells in the slice is 57317, Chrome 104.0.5112.102 (official version) (64-bit), integrated graphics card: Intel (R) UHD Graphics 630, display resolution 1928×1080, full screen state.

[0135] Set the rendering resolution to the first LOD level of detail, as shown in Figure 11. When moving the slice, the frame rate drops to 50 frames, indicating frame drops. Switching the rendering resolution to the second LOD level of detail allows the browser to run at full framerate with good rendering quality, as shown in Figure 12.

[0136] Duplicate the slice 25 times and set the appropriate rendering accuracy to simulate the situation of millions of cells. When zooming out, the frame rate is 51, which is relatively smooth, and the cell distribution is relatively clear, as shown in Figure 13. Zooming in on the slice, the slice details begin to become clear, as shown in Figure 14, which shows the rendering performance of some slices. When focusing on a slice, the slice details are even clearer, and the frame rate reaches 57, as shown in Figure 15, which shows the rendering performance of focusing on a single slice. Continue to focus on the inside of the slice, the cell outline details begin to appear, and the cell outline is switched to 8 vertices, as shown in Figure 16. Continue focusing, and the cell outline is drawn using 16 vertices, as shown in Figure 17.

[0137] It can be seen from this that the cell outline rendering method disclosed in the present invention can achieve switching of the fineness according to user settings, which can achieve better rendering effects.

[0138] In summary, according to the cell contour method provided by the embodiment of the present disclosure, sliced ​​cell data is obtained, the sliced ​​cell data is processed into blocks to generate block data; based on the sliced ​​cell data, the contour vertices of the cells in the slice are subjected to segmentation processing and / or face reduction processing to generate contour vertex index data with multiple layers of precision; the contour vertex index data with multiple layers of precision are written into the corresponding block data to generate data to be rendered with multiple layers of precision; and the cell contour is rendered according to the data to be rendered. The present disclosure uses multi-layer precision rendering, which can switch rendering performances of different precisions according to user settings. When the user scales the cell size, the user has a weak perception of switching precision. In addition, vertex index drawing is used after block division, and all precision data of the blocks are compressed in the same file, with a high compression rate. The network request for rendering the file is faster, and the computer running memory and GPU video memory occupied during rendering are small. It can be adapted to a variety of machine configurations, with better rendering effects and better user experience.

[0139] To implement the various functions of the methods provided in the embodiments of the present application, the network devices and terminal devices may include hardware structures and software modules, and implement the aforementioned functions in the form of hardware structures, software modules, or hardware structures and software modules. Certain of the aforementioned functions may be implemented in the form of hardware structures, software modules, or hardware structures and software modules.

[0140] Corresponding to the cell contour rendering methods provided in the above-mentioned embodiments, the present disclosure also provides a cell contour rendering device. Since the cell contour rendering device provided in the embodiment of the present disclosure corresponds to the cell contour rendering methods provided in the above-mentioned embodiments, the implementation method of the cell contour rendering method is also applicable to the cell contour rendering device provided in this embodiment and will not be described in detail in this embodiment.

[0141] Figure 18 is a structural schematic diagram of a cell contour rendering device 300 provided by an embodiment of the present disclosure. As shown in Figure 18, the device 300 may include: a blocking module 310, used to obtain sliced ​​cell data, block the sliced ​​cell data, and generate block data; a processing module 320, used to perform segmentation processing and / or surface reduction processing on the contour points of the cells in the slice based on the sliced ​​cell data, and generate vertex index data with multiple layers of fineness; a generation module 330, used to write the vertex index data with multiple layers of fineness into the corresponding block data, and generate data to be rendered with multiple layers of fineness; a rendering module 340, used to render cell contours according to the data to be rendered.

[0142] In some embodiments, the blocking module 310 is specifically used to: determine the upper and lower boundaries of the cell location in the slice to obtain a bounding box; divide the bounding box according to the width and height of the bounding box and the expected threshold value of the number of cells in the block to obtain different blocks; read the center point position of the cell in the slice, determine the block where the cell is located according to the center point position of the cell, and generate blocking data.

[0143] In some embodiments, the processing module 320 is specifically used to: based on the sliced ​​cell data, perform a subdivision process on the contour points of the cells in the slice to obtain vertex index data of a first level of fineness; perform a surface reduction process and a subdivision process on the contour points of the first level of fineness to obtain vertex index data of a second level of fineness, wherein the number of cell contour points of the second level of fineness is less than the number of cell contour points of the first level of fineness; perform a surface reduction process and a subdivision process on the cell contour points of the second level of fineness to obtain vertex index data of a third level of fineness, wherein the number of cell contour points of the third level of fineness is less than the number of cell contour points of the second level of fineness.

[0144] In some embodiments, the processing module 320 is specifically configured to generate data at a fourth level of fineness, wherein the number of cell contour points at the fourth level of fineness is smaller than the number of cell contour points at the third level of fineness.

[0145] In some embodiments, the processing module 320 is further configured to: split the cell when the number of contour points of the cell in the slice exceeds the number of contour points of the first level of fineness.

[0146] In some embodiments, the triangulation process is performed using an earcut triangulation algorithm.

[0147] In some embodiments, an effective area preservation algorithm is used to perform surface reduction processing.

[0148] In some embodiments, the generation module 330 is specifically configured to compress vertex indices of multiple levels of precision and their corresponding block data into an instantiation array to obtain data to be rendered at multiple levels of precision.

[0149] In some embodiments, the rendering module 340 is specifically configured to determine a rendering fineness according to the size of the block to be rendered and the set contour vertex density, and render the cell contours of the data to be rendered according to the rendering fineness.

[0150] In some embodiments, determining the rendering fineness based on the size of the block to be rendered and the set contour vertex density includes: when the size of the block to be rendered remains unchanged, determining the rendering fineness based on the set contour point density, or when the set contour point density remains unchanged, determining the rendering accuracy based on the size of the block to be rendered.

[0151] In some embodiments, the rendering module 340 is further used to: draw cell contours of a first layer of fineness based on the data to be rendered of the first layer of fineness, or draw cell contours of a second layer of fineness based on the data to be rendered of the second layer of fineness, or draw cell contours of a third layer of fineness based on the data to be rendered of the third layer of fineness.

[0152] In some embodiments, the rendering module 340 is further configured to: determine blocks within the visible range based on the viewing cone, and perform cell outline rendering on the blocks within the visible range.

[0153] In some embodiments, the rendering module 340 is further configured to sort the cells in the block according to their area, and start rendering from the cell with the largest area.

[0154] In summary, according to the cell contour rendering device provided by the embodiment of the present disclosure, by acquiring sliced ​​cell data, the sliced ​​cell data is divided into blocks to generate block data; based on the sliced ​​cell data, the contour points of the cells in the slice are divided and / or faceted to generate vertex index data with multiple layers of precision; the vertex index data with multiple layers of precision are written into the corresponding block data to generate data to be rendered with multiple layers of precision; cell contours are rendered according to the data to be rendered, and rendering performances of different precisions can be switched according to user settings, and vertex index drawing is used after block division, and all precision data of the blocks are compressed into the same instantiated array, with a high compression rate, faster network request rendering file, and less computer running memory and GPU video memory occupied during rendering, so it can be adapted to a variety of machine configurations, with better rendering effects and better user experience.

[0155] In the embodiments provided above, the methods and devices provided in the embodiments of the present application are introduced. In order to implement the various functions of the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the aforementioned functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. One of the aforementioned functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.

[0156] FIG19 is a block diagram of an electronic device 400 for implementing the above-described cell outline rendering or data processing method, according to an exemplary embodiment. For example, the electronic device 400 may be a mobile phone, a computer, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0157] [Corrected 12.06.2023 according to Rule 91] Referring to Figure 19, the electronic device 400 may include one or more of the following components: a processing component 402, a memory 404, a power component 405, a multimedia component 406, an audio component 410, an input / output (I / O) interface 412, a sensor component 414, and a communication component 416.

[0158] The processing component 402 generally controls the overall operation of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 402 may include one or more processors 520 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 402 may include one or more modules to facilitate interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.

[0159] The memory 404 is configured to store various types of data to support operations on the electronic device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0160] The power supply assembly 405 provides power to the various components of the electronic device 400. The power supply assembly 405 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 400.

[0161] The multimedia component 406 includes a screen that provides an output interface between the electronic device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0162] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.

[0163] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.

[0164] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the electronic device 400, the relative positioning of components, such as the display and keypad of the electronic device 400. The sensor assembly 414 can also detect changes in the position of the electronic device 400 or a component of the electronic device 400, the presence or absence of user contact with the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and temperature changes of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0165] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (New Radio) or a combination thereof. In an exemplary embodiment, the communication component 415 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0166] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described methods.

[0167] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by the processor 520 of the electronic device 400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0168] The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the cell outline rendering or data processing method described in the above embodiments of the present disclosure.

[0169] An embodiment of the present disclosure further provides a computer program product, including a computer program, which is used by a processor to execute the cell contour rendering or data processing method described in the above embodiments of the present disclosure.

[0170] An embodiment of the present disclosure also proposes a chip, which includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals from the memory of the electronic device and send signals to the processor, the signals including computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the cell contour rendering or data processing method described in the above embodiments of the present disclosure.

[0171] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.

[0172] Throughout this specification, references to terms such as "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" indicate that a specific feature, structure, material, or characteristic described in conjunction with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative uses of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0173] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.

[0174] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processing module, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection having one or more wires (control method), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing it in a suitable manner if necessary, and then storing it in a computer memory.

[0175] It should be understood that various parts of the embodiments of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0176] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0177] Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing module, each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in either hardware or software functional modules. If the integrated modules are implemented as software functional modules and sold or used as standalone products, they may also be stored in a computer-readable storage medium. The aforementioned storage medium may be a read-only memory, a magnetic disk, or an optical disk, etc.

[0178] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A cell outline rendering method, It is characterized in that The method comprises: Acquire slice cell data, process the slice cell data in blocks, and generate block data; Based on the sliced ​​cell data, performing a segmentation process and / or a surface reduction process on the contour points of the cells in the slice to generate vertex index data with multiple levels of precision; Writing the vertex index data of the multiple levels of precision into the corresponding block data to generate data to be rendered of the multiple levels of precision; Cell outline rendering is performed according to the data to be rendered.

2. The method according to claim 1, It is characterized in that The obtaining of slice cell data, processing the slice cell data in blocks, and generating block data comprises: Determine the upper boundary and the lower boundary of the position of the cell in the slice to obtain a bounding box; According to the width and height of the bounding box and the expected threshold of the number of cells in the block, the bounding box is divided to obtain different blocks; The center point position of the cell in the slice is read, and the block where the cell is located is determined according to the center point position of the cell, and the block data is generated.

3. The method according to claim 1, It is characterized in that The step of performing segmentation and / or face reduction processing on the contour points of the cells in the slice based on the slice cell data to generate vertex index data with multiple levels of precision includes: Based on the sliced ​​cell data, the contour points of the cells in the slices are segmented to obtain vertex index data of the first level of precision; Performing surface reduction and segmentation processing on the contour points of the first level of fineness to obtain vertex index data of a second level of fineness, wherein the number of cell contour points of the second level of fineness is less than the number of cell contour points of the first level of fineness; Performing surface reduction and segmentation processing on the cell contour points of the second level of fineness to obtain vertex index data of a third level of fineness, wherein the number of cell contour points of the third level of fineness is less than the number of cell contour points of the second level of fineness, 4. The method according to claim 3, It is characterized in that The method further comprises: Data of a fourth level of fineness is generated, wherein the number of cell contour points of the fourth level of fineness is less than the number of cell contour points of the third level of fineness.

5. The method according to claim 3, It is characterized in that The method further comprises: When the number of contour points of a cell in the slice exceeds the number of contour points of the first level of fineness, the cell is split.

6. The method according to claim 3, It is characterized in that The earcut triangulation algorithm is used for triangulation.

7. The method according to claim 3, It is characterized in that The effective area-retaining algorithm is used to reduce the surface area.

8. The method according to claim 1, It is characterized in that The generating of the to-be-rendered data with multiple levels of precision comprises: The vertex indices of the multiple levels of precision and their corresponding block data are compressed into an instantiated array to obtain the data to be rendered of the multiple levels of precision.

9. The method according to claim 1, It is characterized in that The rendering of cell outlines according to the data to be rendered comprises: The rendering fineness is determined according to the size of the block to be rendered and the set contour vertex density, and the cell contour is rendered according to the rendering fineness for the data to be rendered.

10. The method according to claim 9, It is characterized in that Determining the rendering fineness according to the size of the block to be rendered and the set contour vertex density includes: When the size of the block to be rendered remains unchanged, the rendering fineness is determined according to the set contour vertex density. Or when the set contour vertex density remains unchanged, the rendering accuracy is determined according to the size of the block to be rendered.

11. The method according to claim 3, It is characterized in that The rendering of the cell outline of the data to be rendered according to the rendering fineness comprises: Based on the data to be rendered at the first level of precision, draw the cell outline at the first level of precision. Or based on the data to be rendered at the second level of precision, draw the cell outline at the second level of precision, Or, based on the data to be rendered at the third level of detail, a cell outline at the third level of detail is drawn.

12. The method according to any one of claims 1 to 11, It is characterized in that The method further comprises: Based on the viewing cone, blocks within the visible range are determined, and cell outlines are rendered for the blocks within the visible range.

13. The method according to any one of claims 1 to 11, It is characterized in that The method further comprises: The cells in the block are sorted according to their area, and rendering starts from the cell with the largest area.

14. A cell outline rendering device, It is characterized in that The device comprises: A block module, used for acquiring slice cell data, processing the slice cell data in blocks, and generating block data; A processing module, used for performing segmentation processing and / or surface reduction processing on the contour points of cells in the slice based on the slice cell data, and generating vertex index data with multiple levels of precision; A generating module, used for writing the vertex index data of multiple levels of precision into corresponding block data to generate data to be rendered of multiple levels of precision; The rendering module is used to render the cell outline according to the data to be rendered.

15. An electronic device, It is characterized in that include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 13.

16. A non-transitory computer-readable storage medium storing computer instructions, It is characterized in that The computer instructions are used to cause the computer to execute the method according to any one of claims 1-13.

17. A computer program product, It is characterized in that It comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 13.

18. A chip, It is characterized in that It comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, the signal includes a computer instruction stored in the memory, and when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 13.