Pseudo cell generation method and device, storage medium and processor
By putting rigid spheres into the staining map and recording the location of the center point, pseudo-cell images are generated, and the problem that square grids in the prior art cannot provide effective cell profiles is solved, thereby achieving higher resolution spatial distribution display of cell tissues.
Patent Information
- Application Number
- CN202311315256.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-11
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, staining maps use square mesh to fill designated areas, fail to provide effective cell profiles, and it is difficult to display the spatial distribution of cell tissue at the cell level or higher resolution.
By obtaining the staining map of the target object, determine the contour area and the total number of pseudo-cells to be generated, put rigid spheres into the target space, record the location of its center point, and divide the target area according to the desired area from these positions as the starting point to generate a pseudo-cell image.
The filling of the target area based on pseudo-cells is achieved, and it does not rely on grid filling, providing an effective cell profile and improving the display resolution of cell tissue spatial distribution.
Smart Images

Figure CN119811480A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of transcriptome sequencing, and in particular to a pseudocell generation method, device, storage medium and processor. Background Art
[0002] One of the goals of life science research is to solve the problem of cells and tissues and how the tissues affect functions. Sequencing technology can provide gene expression information in certain tissues under specific conditions. It can not only infer the functions of corresponding unknown genes and reveal the mechanism of action of specific regulatory genes, but also identify the types and heterogeneity of cells, providing a theoretical basis for disease diagnosis. Since cells, as the basic units of the body, work in coordination with the microenvironment in a specific spatial position to exert their unique biological functions, the spatial location information of cells is particularly important for studying and understanding the mechanisms of cell biology, tumor biology, developmental biology and other disciplines. Spatial transcriptome can combine microscopic imaging and sequencing technology to retain the spatial location information of samples to the greatest extent while obtaining gene expression data, so spatial transcriptome sequencing technology came into being.
[0003] Stereo-seq spatial transcriptome sequencing technology can use gene chips to retain sample location information on the chip, use two sequencings to confirm the spatial position and corresponding expression level of the mRNA sequence, and superimpose the read content back on the tissue image to generate a complete staining map on the tissue section, which is accurate to the cellular level or even higher resolution. However, the staining map uses a square grid to fill the specified area. The square grid represents the cell area and cannot provide effective cell contours. Summary of the invention
[0004] In view of this, the present invention provides a pseudo-cell generation method, device, storage medium and processor to solve the problem in the prior art that the staining image uses a square grid to fill the specified area, the square grid represents the cell area, and cannot provide an effective cell outline. The specific scheme is as follows:
[0005] A method for generating a pseudo cell, comprising:
[0006] Acquire a staining image of the target object, wherein the staining image is used to provide cell tissue distribution of the target object;
[0007] Acquiring a contour area of the staining image, and determining a total number of pseudocells that need to be generated based on the contour area;
[0008] Drawing a target area in the target space based on the contour area;
[0009] Throwing a preset number of rigid balls into the target space, and recording the positions of the center points of the preset number of rigid balls after the preset number of rigid balls stop moving;
[0010] The target area is divided according to the expected area with the center point as the starting point to obtain a pseudocell image.
[0011] The above method, optionally, determines the total number of pseudo cells that need to be generated based on the contour area, including:
[0012] Determine the desired area of the pseudocell in advance;
[0013] Calculate the area of the contour region;
[0014] The total number of pseudo cells to be generated is determined based on the area of the region and the desired area.
[0015] The above method, optionally, draws a target area in the target space based on the contour area, wherein the target space is a gravity-free, friction-free and inelastic space, and the target area has the same area as the contour area, including:
[0016] Based on the physical engine, the Space function is used to generate the target space;
[0017] A target region matching the region outline is drawn in the target space based on a boundry function.
[0018] The above method, optionally, throws a preset number of rigid balls into the target space, and after the preset number of rigid balls stop moving, records the center point positions of the preset number of rigid balls, wherein the area difference between the area of the rigid balls and the expected area satisfies a preset error range, and the preset number is associated with the total number, including:
[0019] Based on the updateball function, a preset number of rigid balls are put into the target space;
[0020] After the input is completed, the displacement of each rigid ball at the current moment relative to the center point at the previous moment is calculated, and each displacement is accumulated to obtain the displacement sum;
[0021] Comparing the displacement sum with the preset displacement threshold, and determining that the movement of the preset number of rigid balls stops when the displacement sum is less than the preset displacement threshold;
[0022] The positions of the center points of the preset number of rigid balls are recorded based on the position function.
[0023] The above method, optionally, divides the target area according to the expected area with the center point as the starting point to obtain the pseudocell image, including:
[0024] Based on the Vornol function, the target area is divided according to the expected area with the center point as the starting point to obtain pseudo cells;
[0025] The pseudo cells are saved based on the opencv function or the Imwrite function to obtain the pseudo cell image.
[0026] A pseudo cell generating device, comprising:
[0027] An acquisition module, used for acquiring a staining image of a target object, wherein the staining image is used for providing a cell tissue distribution of the target object;
[0028] An acquisition and determination module, used for acquiring a contour area of the staining image, and determining a total number of pseudocells that need to be generated based on the contour area;
[0029] A drawing module, used for drawing a target area based on the contour area in the target space;
[0030] A recording module, used for dropping a preset number of rigid balls into the target space, and recording the positions of the center points of the preset number of rigid balls after the preset number of rigid balls stop moving;
[0031] The division module is used to divide the target area according to the expected area with the center point as the starting point to obtain a pseudocell image.
[0032] In the above device, optionally, the acquisition and determination module includes:
[0033] A first determining unit, used to predetermine an expected area of the pseudocell;
[0034] A calculation unit, used for calculating the area of the contour area;
[0035] The second determining unit is used to determine the total number of pseudo cells that need to be generated based on the area of the region and the expected area.
[0036] In the above device, optionally, the division module includes:
[0037] A division unit, used for dividing the target area according to the expected area based on the Vornol function and taking the center point as a starting point to obtain individual pseudo cells;
[0038] The saving unit is used to save each pseudo cell based on an opencv function or an Imwrite function to obtain the pseudo cell image.
[0039] A storage medium comprises a stored program, wherein the program executes the pseudo cell generation method described above.
[0040] A processor is used to run a program, wherein the program executes the above-mentioned pseudo cell generation method when running.
[0041] Compared with the prior art, the present invention has the following advantages:
[0042] The present invention discloses a pseudocell generation method, device, storage medium and processor, including: obtaining a staining map of a target object, wherein the staining map is used to provide the cell tissue distribution of the target object; obtaining the contour area of the staining map, and determining the total number of pseudocells to be generated based on the contour area; drawing the target area based on the contour area in the target space; dropping a preset number of rigid balls into the target space, and recording the center point positions of the preset number of rigid balls after the movement of the preset number of rigid balls stops; dividing the target area according to the expected area with the center point position as the starting point to obtain a pseudocell image. In the above process, the target area is drawn based on the contour area in the target space, and the target area is filled based on pseudocells, and is no longer filled based on the grid, providing an effective cell contour. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A flow chart of a pseudo cell generation method disclosed in an embodiment of the present invention;
[0045] Figure 2 A schematic diagram of a contour area disclosed in an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of a target area division result disclosed in an embodiment of the present invention;
[0047] Figure 4 A schematic diagram of a pseudo cell image disclosed in an embodiment of the present invention;
[0048] Figure 5 A structural block diagram of a pseudo cell generation device disclosed in an embodiment of the present invention;
[0049] Figure 6 The present invention is a schematic diagram of a device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] The present invention discloses a pseudocell generation method, device, storage medium and processor. The current spatial transcription technology can spatially locate and detect single cells and molecular information. For example, Stereo-seq spatial transcriptome sequencing technology can capture RNA mRNA in single cell tissues through spatiotemporal chips. After two sequencings, the spatial position of the mRNA sequence and the corresponding gene expression level are determined respectively, so as to realize spatial positioning and detection of single cells and molecular information. It has been applied in many biological and medical fields and has become one of the mainstream methods of spatial transcription sequencing. It will bring detailed spatial information on the basis of traditional transcriptome sequencing, help researchers identify the location of transcription inside tissues, and be accurate to the cellular level or even higher resolution, which will promote researchers' understanding and interpretation of single cells and cell populations in the entire tissue.
[0052] Furthermore, the resolution needs to be provided based on the staining images for cell display, but the existing staining images use square grids to fill the specified area. The square grids represent the cell organization and cannot provide effective cell outlines.
[0053] In order to solve the above problems, the present invention provides a pseudo cell generation method, the execution process of the method is as follows: Figure 1 As shown, the steps include:
[0054] S101, obtaining a staining image of a target object, wherein the staining image is used to provide cell tissue distribution of the target object;
[0055] In an embodiment of the present invention, the target object may be a complete tissue section of any animal sample or plant sample, and the tissue section may contain multiple cell tissue structures. For example, the plant sample section may contain cells of tissue types such as epidermal tissue, phloem tissue, and parenchyma tissue. Specifically, the staining map of the target object may be obtained by using the Stereo-seq spatial transcriptome sequencing method, but it is not limited to the Stereo-seq spatial transcriptome sequencing method, and other methods are also applicable.
[0056] In the embodiment of the present invention, the acquisition process of the coloring diagram is exemplified, and the acquisition process is as follows:
[0057] The fixed tissue chip was taken out from methanol, the methanol on the back and around the chip was absorbed with dust-free paper, and then transferred to a culture dish with a sealing film. After the methanol evaporated and the chip surface became dry, staining was performed in sequence.
[0058] Prepare ssDNA and Fluorescent Brightener 28 (FB28) tissue fluorescent dye separately; first add ssDNA fluorescent dye (100 μL / chip) to cover the tissue on the chip, stain for 5 min at room temperature in the dark, slowly aspirate the liquid on the chip surface, and gently wash the chip once with 0.1×SSC (100 μL / chip; containing RNase Inhibitor, 5%); then add FB28 fluorescent dye (100 μL / chip; working concentration 0.01%) to cover the tissue on the chip, stain for 3 min at room temperature in the dark, slowly aspirate the liquid on the chip surface, and gently wash the chip once with 0.1×SSC (100 μL / chip; containing RNase Inhibitor, 5%) to keep the chip surface moist and prepare for microscope scanning.
[0059] Aspirate the liquid on the chip surface and carefully transfer it to a glass slide. Add 15 μL Image Reagent (containing RNase Inhibitor, 5%) to ensure that there is no obvious liquid bulge on the chip surface (do not immerse the tissue on the chip in Image Reagent for a long time, and control the photography time not to exceed 30 minutes). Slowly transfer the glass slide carrying the chip to the microscope scanning stage.
[0060] Preferably, create a new folder, name it with the chip number, and indicate the sample information, experimental date, etc. (only numbers, letters, and underscores are used in the folder name, and spaces, special characters, etc. are prohibited); open the fluorescence microscope control system and select epifluorescence; first select the FITC channel, create a new slice (name it with the chip number_fluorescence signal, for example: SS200000119TR_F5_SS), create a map with a 4x lens, scan manually with a 10x lens, quickly add model points (4-5 evenly distributed, focus based on the clarity of the track line), adjust the exposure (organize the autofluorescence measurement under the FITC channel) Then manually switch to the DAPI channel (keep the chip position and magnification unchanged), create a new slice again (named by chip number_fluorescence signal, for example: SS200000119TR_F5_FB), skip map creation (keep ssDNA map creation results), switch to manual scanning, clear all points, re-add model points (4-5 evenly distributed, focus based on tissue clarity), adjust exposure (within the tissue autofluorescence test threshold under the DAPI channel) to scan the entire chip and obtain the staining image.
[0061] S102, acquiring a contour area of the staining image, and determining a total number of pseudocells that need to be generated based on the contour area;
[0062] In the embodiment of the present invention, the contour area of the stained image is obtained by using the 3Dslicer tool or the opencv function in Python, findcontour, wherein the schematic diagram of the contour area is as follows: Figure 2 As shown, the contour area is used to characterize the boundary of the staining image. Further, the diameter or radius of the pseudocell is predetermined, wherein the diameter or radius can be determined based on experience or specific circumstances, and is not specifically limited in the embodiments of the present invention. After the diameter or radius is determined, the expected area of the pseudocell is calculated, and the cross-section of the pseudocell is equivalent to a circle. The expected area is calculated using a circular area calculation formula. After the contour area is determined, the area of the contour area is determined based on the area function, and the ratio of the area to the expected area is used as the total number of pseudocells to be generated.
[0063] S103, drawing a target area in the target space based on the contour area;
[0064] In the embodiment of the present invention, after the total number and the area of the region are determined, the target space is generated using the Space function based on the pymunk physics engine, wherein the target space is a gravity-free, friction-free and inelastic space. The specific generation process of the target space is as follows:
[0065] space = pymunk.Space() #create space to create space
[0066] Create a physical space under the pymunk library.
[0067] space.gravity=(0.0,0.0)#set gravitySet gravity
[0068] Set the physical space gravity, the gravity in the xy direction is 0.
[0069] Then, a target region matching the region outline is drawn in the target space based on the boundry function. The specific drawing process is as follows:
[0070] while j <len(tissue_boundary):
[0071] If the number of contour points in the space is less than the number of tissue boundary points, add another point
[0072] line=pymunk.Segment(static_body,tissue_boundary[k],tissue_boundary[j],0.0)
[0073] Add the segment object, a static body, its xy coordinates and mass.
[0074] k+=1
[0075] j+=1
[0076] line.elasticity=0
[0077] line.friction=0
[0078] space.add(line)
[0079] Add this point in the space.
[0080] S104, throwing a preset number of rigid balls into the target space, and recording the positions of the center points of the preset number of rigid balls after the preset number of rigid balls stop moving;
[0081] In the embodiment of the present invention, the updateball function is conducive to dropping a preset number of rigid balls into the target area, wherein the preset number can be set based on experience or specific circumstances, and is not specifically limited in the embodiment of the present invention. Preferably, in the embodiment of the present invention, the preset number is twice the total number. Further, the area difference between the area of the rigid ball and the expected area satisfies a preset error range, wherein the area of the rigid ball is the area of the cross-section of the rigid ball. The preset error range can be set based on experience or specific circumstances, and is not specifically limited in the embodiment of the present invention. Preferably, the area of the rigid ball is kept as close to the expected area as possible.
[0082] Among them, the specific processing process of the updateball function is as follows:
[0083] if len(balls)<=Num_ball:
[0084] update_balls(center_x,center_y,bin_size)
[0085] After the input is completed, since the rigid balls will shake in the target area, during the shaking process, the displacement of each rigid ball at the current moment relative to the center point at the previous moment is calculated, and each displacement is accumulated to obtain the displacement sum, and the displacement sum is compared with the preset displacement threshold, wherein the preset displacement threshold is set based on experience or specific circumstances, and is not specifically limited in the embodiments of the present invention. When the displacement sum is less than the preset displacement threshold, it is determined that the movement of the preset number of rigid balls has stopped.
[0086] Taking the preset threshold of 0.005 as an example, the specific statistical process is as follows:
[0087] pos_pre=np.asarray(pos_all_pre)
[0088] Convert coordinates to numpy data format
[0089] pos_post=np.asarray(pos_all_post)
[0090] residual = pos_pre - pos_post
[0091] Calculate position residuals
[0092] pos_all_pre = []
[0093] pos_all_post = []
[0094] if np.abs(residual.mean())<0.005:
[0095] Determine whether the residual is less than the threshold
[0096] Furthermore, the positions of the center points of the preset number of rigid balls are recorded based on the position function, wherein the specific processing process of the position function is as follows:
[0097] for k in range(len(balls)):
[0098] pos = balls[k].body.position
[0099] Extract the ball position
[0100] pos_temp = ((pos.x), (pos.y))
[0101] S105 , dividing the target area according to the expected area with the center point as the starting point to obtain a pseudocell image.
[0102] In the embodiment of the present invention, based on the Vornol function, the target area is divided according to the expected area with the center point as the starting point to obtain various pseudo cells, wherein the schematic diagram of the division is as follows: Figure 3 As shown, the pseudo cells are saved based on the opencv function or the Imwrite function to obtain the pseudo cell image, wherein the pseudo cell image is a binary image, and the schematic diagram of the pseudo cell image is as shown Figure 4 shown.
[0103] Furthermore, any other partitioning method, such as watershed, may be used for the partitioning process of the Vornol function, which is not specifically limited in the embodiment of the present invention.
[0104] The present invention discloses a pseudocell generation method, including: obtaining a staining map of a target object, wherein the staining map is used to provide the cell tissue distribution of the target object; obtaining the contour area of the staining map, and determining the total number of pseudocells to be generated based on the contour area; drawing the target area based on the contour area in the target space; dropping a preset number of rigid balls into the target space, and recording the center point positions of the preset number of rigid balls after the movement of the preset number of rigid balls stops; dividing the target area according to the expected area with the center point position as the starting point to obtain a pseudocell image. In the above process, the target area is drawn based on the contour area in the target space, and the target area is filled based on pseudocells, and is no longer filled based on the grid, providing an effective cell contour.
[0105] In the embodiment of the present invention, taking Arabidopsis seed data as an example, the steps of the Stereo-seq sequencing method include: embedding, slicing, patching, fixing, permeabilization, reverse transcription, tissue removal, cDNA release and magnetic bead recovery. In this embodiment, the target object is a cross-section sample slice of Arabidopsis stem. After the above steps, the Arabidopsis stem slice staining map can be obtained, and the staining map is circled using the 3Dslicer tool. The contour area is obtained, and the expected area of the pseudocell is given. The total number of pseudocells to be generated is obtained by dividing the area of the contour area by the expected area. Using the pymunk physics engine, a preset number of rigid spheres with a diameter of the pseudocell diameter are put into the specified area. After the rigid spheres move stably, the center position points of each rigid sphere are recorded. With the center point of the rigid sphere as the center point and the expected area area as the boundary, the vornol function is used to complete the planing, and the opencv or Imwrite function can be used to save this image, that is, the required pseudocell image is obtained.
[0106] Based on the above-mentioned pseudo cell generation method, an embodiment of the present invention further provides a pseudo cell generation device, the structural block diagram of which is as follows: Figure 5 As shown, including:
[0107] An acquisition module 201 , an acquisition and determination module 202 , a drawing module 203 , a recording module 204 and a division module 205 .
[0108] in,
[0109] The acquisition module 201 is used to acquire a staining image of a target object, wherein the staining image is used to provide a cell tissue distribution of the target object;
[0110] The acquisition and determination module 202 is used to acquire the contour area of the staining image, and determine the total number of pseudo cells that need to be generated based on the contour area;
[0111] The drawing module 203 is used to draw the target area based on the contour area in the target space;
[0112] The recording module 204 is used to drop a preset number of rigid balls into the target space, and record the positions of the center points of the preset number of rigid balls after the preset number of rigid balls stop moving;
[0113] The division module 205 is used to divide the target area according to the desired area with the center point as the starting point to obtain a pseudocell image.
[0114] The present invention discloses a pseudo-cell generation device, comprising: obtaining a staining map of a target object, wherein the staining map is used to provide the cell tissue distribution of the target object; obtaining the contour area of the staining map, and determining the total number of pseudo-cells that need to be generated based on the contour area; drawing the target area based on the contour area in the target space; dropping a preset number of rigid balls into the target space, and recording the center point positions of the preset number of rigid balls after the movement of the preset number of rigid balls stops; dividing the target area according to the expected area with the center point position as the starting point to obtain a pseudo-cell image. In the above process, the target area is drawn based on the contour area in the target space, and the target area is filled based on pseudo-cells, and is no longer filled based on the grid, providing an effective cell contour.
[0115] In the embodiment of the present invention, the acquisition and determination module 202 includes:
[0116] A first determining unit 206 , a calculating unit 207 , and a second determining unit 208 .
[0117] in,
[0118] The first determining unit 206 is used to predetermine the expected area of the pseudocell;
[0119] The calculation unit 207 is used to calculate the area of the contour area;
[0120] The second determining unit 208 is used to determine the total number of pseudo cells that need to be generated based on the area of the region and the expected area;
[0121] In the embodiment of the present invention, the division module 205 includes:
[0122] A dividing unit 209 and a saving unit 210 .
[0123] in,
[0124] The division unit 209 is used to divide the target area according to the expected area based on the Vornol function and taking the center point as the starting point to obtain various pseudo cells;
[0125] The saving unit 210 is used to save each pseudo cell based on an opencv function or an Imwrite function to obtain the pseudo cell image.
[0126] The generating device includes a processor and a memory. The acquisition module, acquisition and determination module, drawing module, recording module and division module are all stored in the memory as program units. The processor executes the program units stored in the memory to realize corresponding functions.
[0127] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the target area is filled based on pseudo cells by adjusting kernel parameters instead of grid-based filling, providing a valid cell outline.
[0128] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0129] An embodiment of the present invention provides a computer storage medium on which a program is stored. When the program is executed by a processor, the pseudo cell generation method is implemented.
[0130] An embodiment of the present invention provides a processor, which is used to run a program, wherein the pseudo cell generation method is executed when the program is run.
[0131] An embodiment of the present invention provides a device, the structural block diagram of which is as follows Figure 6 As shown, the device includes: a processor 301, a storage medium 302, and a program stored in the storage medium 302 and executable on the processor 302. When the processor 301 executes the program, the following steps are implemented:
[0132] Acquire a staining image of the target object, wherein the staining image is used to provide cell tissue distribution of the target object;
[0133] Acquiring a contour area of the staining image, and determining a total number of pseudocells that need to be generated based on the contour area;
[0134] Drawing a target area in the target space based on the contour area;
[0135] Throwing a preset number of rigid balls into the target space, and recording the positions of the center points of the preset number of rigid balls after the preset number of rigid balls stop moving;
[0136] The target area is divided according to the expected area with the center point as the starting point to obtain a pseudocell image.
[0137] 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 adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0138] 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, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0139] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating 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 computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0141] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0142] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0143] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0144] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0145] 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 adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0146] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for generating pseudocells, characterized in that: include: Acquire a staining image of the target object, wherein the staining image is used to provide cell tissue distribution of the target object; Acquiring a contour area of the staining image, and determining a total number of pseudocells that need to be generated based on the contour area; Drawing a target area in the target space based on the contour area; Throwing a preset number of rigid balls into the target space, and recording the positions of the center points of the preset number of rigid balls after the preset number of rigid balls stop moving; The target area is divided according to the expected area with the center point as the starting point to obtain a pseudocell image.
2. The method according to claim 1, characterized in that The total number of pseudo cells that need to be generated is determined based on the contour area, including: Determine the desired area of the pseudocell in advance; Calculate the area of the contour region; The total number of pseudo cells to be generated is determined based on the area of the region and the desired area.
3. The method according to claim 1, characterized in that: Drawing a target area in a target space based on the contour area, wherein the target space is a gravity-free, friction-free and inelastic space, and the target area has the same area as the contour area, including: Based on the physical engine, the Space function is used to generate the target space; A target region matching the region outline is drawn in the target space based on a boundry function.
4. The method according to claim 1, characterized in that: A preset number of rigid balls are thrown into the target space, and after the preset number of rigid balls stop moving, the positions of the center points of the preset number of rigid balls are recorded, wherein the area difference between the area of the rigid balls and the expected area satisfies a preset error range, and the preset number is associated with the total number, including: Based on the updateball function, a preset number of rigid balls are put into the target space; After the input is completed, the displacement of each rigid ball at the current moment relative to the center point at the previous moment is calculated, and each displacement is accumulated to obtain the displacement sum; Comparing the displacement sum with the preset displacement threshold, and determining that the movement of the preset number of rigid balls stops when the displacement sum is less than the preset displacement threshold; The positions of the center points of the preset number of rigid balls are recorded based on the position function.
5. The method according to claim 1, characterized in that The target area is divided according to the expected area with the center point as the starting point to obtain a pseudocell image, including: Based on the Vornol function, the target area is divided according to the expected area with the center point as the starting point to obtain pseudo cells; The pseudo cells are saved based on the opencv function or the Imwrite function to obtain the pseudo cell image.
6. A pseudo cell generating device, characterized in that: include: An acquisition module, used for acquiring a staining image of a target object, wherein the staining image is used for providing a cell tissue distribution of the target object; An acquisition and determination module, used for acquiring a contour area of the staining image, and determining a total number of pseudocells that need to be generated based on the contour area; A drawing module, used for drawing a target area based on the contour area in the target space; A recording module, used for dropping a preset number of rigid balls into the target space, and recording the positions of the center points of the preset number of rigid balls after the preset number of rigid balls stop moving; The division module is used to divide the target area according to the expected area with the center point as the starting point to obtain a pseudocell image.
7. The device according to claim 6, characterized in that The acquisition and determination module comprises: A first determining unit, used to predetermine an expected area of the pseudocell; A calculation unit, used for calculating the area of the contour area; The second determining unit is used to determine the total number of pseudo cells that need to be generated based on the area of the region and the expected area.
8. The device according to claim 6, characterized in that The division module comprises: A division unit, used for dividing the target area according to the expected area based on the Vornol function and taking the center point as a starting point to obtain individual pseudo cells; The saving unit is used to save each pseudo cell based on an opencv function or an Imwrite function to obtain the pseudo cell image.
9. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the pseudo cell generation method according to claims 1-5.
10. A processor, characterized in that: The processor is used to run a program, wherein the pseudo cell generation method according to claims 1 to 5 is executed when the program is run.