Segmentation correction method and device, computer equipment, storage medium and program product
By using the tissue segmentation contour and three-dimensional recombinant contour under the tissue profile in medical image processing, the target segmentation mask is generated, and the problem of poor correction effect of segmentation results in the prior art is solved, and the segmented image is improved Accuracy and accuracy.
Patent Information
- Application Number
- CN202310768180.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2024-12-31
AI Technical Summary
The existing automatic segmentation method is poor in medical imaging processing, and the tissue segmentation results need to be further corrected, but the correction effect is not good.
By obtaining the tissue segmentation profile and the three-dimensional recombination profile under the tissue profile, the initial segmentation mask is corrected to generate the target segmentation mask, thereby improving the accuracy of the target segmentation image. The specific steps include correcting the initial segmentation mask according to the three-dimensional recombination profile under the tissue profile, obtaining the target segmentation mask, and further improving the accuracy of the segmentation results through the transformation matrix and smoothing processing.
The accuracy and accuracy of the tissue segmentation image are improved, the degree of fit with the actual distribution is enhanced, and the effect of segmentation correction is improved.
Smart Images

Figure CN119228816A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical image processing, and in particular to a segmentation correction method, apparatus, computer equipment, storage medium and program product. Background Art
[0002] In recent years, with the rapid development of medical imaging technology, a large number of surgical planning software have emerged. This surgical planning software can perform tissue segmentation based on the patient's body data captured by medical imaging devices such as magnetic resonance imaging (MRI), X-ray computed tomography (CT), and positron emission tomography (PET), so that doctors can design appropriate surgical plans for patients based on the tissue segmentation results.
[0003] However, the complexity of volume data makes the existing automatic segmentation methods less universal, and further correction is required after obtaining the tissue segmentation results. However, the effect of correcting the tissue segmentation results in related technologies is poor. Summary of the invention
[0004] Based on this, it is necessary to provide a segmentation correction method, apparatus, computer device, computer-readable storage medium and computer program product to address the above technical problems.
[0005] In a first aspect, the present application provides a segmentation correction method, comprising:
[0006] Obtaining a tissue segmentation contour of an initial segmentation image of the tissue to be segmented under a tissue section;
[0007] Correcting the initial segmentation mask of the tissue to be segmented according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section to obtain a target segmentation mask; wherein the three-dimensional reconstruction contour is formed by three-dimensional reconstruction of the volume data of the tissue to be segmented;
[0008] A target segmentation mask is used to obtain a target segmentation image of the tissue to be segmented.
[0009] In one embodiment, correcting an initial segmentation mask of the tissue to be segmented according to the tissue segmentation contour under the tissue section and the three-dimensional reconstruction contour to obtain a target segmentation mask includes:
[0010] The tissue segmentation contour under the tissue section is corrected according to the three-dimensional reconstructed contour under the tissue section, and a single-layer segmentation mask corresponding to the tissue section is generated;
[0011] The initial segmentation mask is corrected according to the single-layer segmentation mask corresponding to the tissue section to obtain the target segmentation mask.
[0012] In one embodiment, the single-layer segmentation mask corresponding to the tissue section includes the mask value of each spatial point in the corrected tissue segmentation contour; and correcting the initial segmentation mask according to the single-layer segmentation mask corresponding to the tissue section to obtain the target segmentation mask includes:
[0013] Obtaining a transformation matrix between a section coordinate system of a single-layer segmentation mask corresponding to a tissue section and a slice coordinate system of an initial segmentation mask;
[0014] The initial segmentation mask is modified according to the mask value of each spatial point in the single-layer segmentation mask corresponding to the transformation matrix and the tissue section to obtain an intermediate segmentation mask;
[0015] Determine the target segmentation mask based on the intermediate segmentation mask.
[0016] In one embodiment, the initial segmentation mask is corrected according to the mask value of each spatial point in the single-layer segmentation mask corresponding to the transformation matrix and the tissue section to obtain the intermediate segmentation mask, including:
[0017] Resample each spatial point in the single-layer segmentation mask corresponding to the tissue section according to the transformation matrix to obtain the spatial point position of each spatial point in the single-layer segmentation mask corresponding to the tissue section in the slice coordinate system;
[0018] The mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section is used to replace the mask value of the corresponding spatial point position in the initial segmentation mask to obtain the intermediate segmentation mask.
[0019] In one embodiment, the initial segmentation mask is corrected according to the mask value of each spatial point in the single-layer segmentation mask corresponding to the transformation matrix and the tissue section to obtain the intermediate segmentation mask, including:
[0020] Resample each spatial point in the initial segmentation mask according to the transformation matrix to obtain the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system;
[0021] A reference segmentation mask is formed according to the mask value of each spatial point in the initial segmentation mask and the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system;
[0022] The mask value of each spatial point position in the single-layer segmentation mask corresponding to the tissue section is used to replace the mask value of the corresponding spatial point position in the reference segmentation mask to form a replaced reference segmentation mask;
[0023] The replaced reference segmentation mask is inversely resampled according to the transformation matrix to obtain an intermediate segmentation mask.
[0024] In one embodiment, determining a target segmentation mask according to an intermediate segmentation mask includes:
[0025] Determine a mask to be smoothed in the intermediate segmentation mask; wherein the mask to be smoothed is a single-layer segmentation mask of a replaced mask value in the intermediate segmentation mask;
[0026] The intermediate segmentation mask is smoothed according to the coordinates of the spatial points in the mask to be smoothed to obtain the target segmentation mask.
[0027] In a second aspect, the present application further provides a segmentation correction device, comprising:
[0028] A contour acquisition module, used for acquiring the tissue segmentation contour of the initial segmentation image of the tissue to be segmented under the tissue section;
[0029] A mask correction module is used to correct the initial segmentation mask of the tissue to be segmented according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section to obtain a target segmentation mask; wherein the three-dimensional reconstruction contour is formed by three-dimensional reconstruction of the volume data of the tissue to be segmented;
[0030] The tissue segmentation module is used to obtain a target segmentation image of the tissue to be segmented using a target segmentation mask.
[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when the computer program is executed by a processor.
[0033] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor.
[0034] The segmentation correction method, device, computer equipment, storage medium and computer program product obtain the tissue segmentation contour of the initial segmentation image of the tissue to be segmented under the tissue section, and correct the initial segmentation mask of the tissue to be segmented according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section to obtain the target segmentation mask, and then use the target segmentation mask to obtain the target segmentation image of the tissue to be segmented. Among them, the three-dimensional reconstruction contour is formed according to the three-dimensional reconstruction of the volume data of the tissue to be segmented. In the above method, the three-dimensional reconstruction contour under the tissue section can truly reflect the actual distribution of the tissue to be segmented. Based on the three-dimensional reconstruction contour under the tissue section, the initial segmentation mask of the tissue to be segmented is corrected, and a target segmentation mask with a higher degree of fit with the actual distribution is obtained, thereby improving the accuracy of the obtained target segmentation image. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is an internal structure diagram of a computer device in one embodiment;
[0036] Figure 2 A schematic diagram of a flow chart of a segmentation correction method in one embodiment;
[0037] Figure 3 (a) to (b) are schematic diagrams of initial segmented images in one embodiment;
[0038] Figure 4 (a) to (b) are schematic diagrams of an initial segmentation image and a single-layer segmentation mask in one embodiment;
[0039] Figure 5 A schematic diagram of a process for obtaining a target segmentation mask in one embodiment;
[0040] Figure 6 (a) to (b) are schematic diagrams of a three-dimensional reconstruction contour and a tissue segmentation contour in one embodiment;
[0041] Figure 7 is a schematic diagram of a process of obtaining a target segmentation mask in another embodiment;
[0042] Figure 8 is a schematic diagram of a process of obtaining an intermediate segmentation mask in one embodiment;
[0043] Fig. 9 is a schematic diagram of a process of obtaining an intermediate segmentation mask in another embodiment;
[0044] Fig.10 is a schematic diagram of a process of obtaining a target segmentation mask according to an intermediate segmentation mask in one embodiment;
[0045] Fig.11 (a) to (b) are schematic diagrams of an initial segmentation image and an intermediate segmentation mask in one embodiment;
[0046] Fig.12 FIG. 4 is a structural block diagram of a segmentation correction device in an embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] The segmentation correction method provided in the embodiment of the present application can be applied to Figure 1The computer device shown in the figure can be a terminal. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a segmentation correction method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0049] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0050] In one embodiment, Figure 2 As shown, a segmentation correction method is provided, which is applied to Figure 1 The computer device in the example is used to illustrate, including the following steps:
[0051] S210 , obtaining a tissue segmentation contour of an initial segmentation image of the tissue to be segmented under a tissue cross section.
[0052] The initial segmentation image of the tissue to be segmented is a three-dimensional image obtained by segmenting the three-dimensional model of the tissue to be segmented using an existing automatic segmentation algorithm / software to distinguish and characterize each tissue region. The three-dimensional model of the tissue to be segmented is obtained by three-dimensional reconstruction based on the volume data scanned by a medical imaging device. The tissue section is the cross section of the three-dimensional model of the tissue to be segmented. The tissue segmentation contour is used to characterize the contour lines of different tissues under the tissue section.
[0053] Optionally, the computer device may directly import the initial segmentation image of the tissue to be segmented, or use an existing automatic segmentation algorithm / software to perform tissue segmentation on the three-dimensional model of the tissue to be segmented to obtain the initial segmentation image of the tissue to be segmented.
[0054] Optionally, after obtaining the initial segmented image of the tissue to be segmented, the computer device may respond to the user's section interception operation to obtain a cross-sectional view of the initial segmented image of the tissue to be segmented under the tissue section, and then extract the tissue segmentation contour in the cross-sectional view. The user may perform at least one section interception operation on the initial segmented image, and the tissue section of each section interception operation is different. The computer device may correspondingly obtain the tissue segmentation contour under at least one tissue section. Figure 3 As shown, (a) and (b) represent initial segmentation images under different viewing angles. The computer device can display the initial segmentation image of the tissue to be segmented through a display unit. Different tissues in the initial segmentation image can be represented by different colors or icons. The user can adjust the section position by controlling the operating lever in the display interface to obtain a cross-sectional view under at least one tissue section.
[0055] S220 , correcting the initial segmentation mask of the tissue to be segmented according to the tissue segmentation contour under the tissue section and the three-dimensional reconstructed contour to obtain a target segmentation mask.
[0056] The three-dimensional reconstruction contour is formed by three-dimensional reconstruction of the volume data of the tissue to be segmented. The three-dimensional reconstruction contour is formed synchronously with the three-dimensional model of the tissue to be segmented. The initial segmentation image corresponds to different three-dimensional reconstruction contours under different tissue sections. The initial segmentation mask and the initial segmentation image of the tissue to be segmented are the segmentation results under different representation forms of the tissue to be segmented, the initial segmentation image is the segmentation result in the form of a three-dimensional image, and the initial segmentation mask is the segmentation result in the form of mask data. The initial segmentation image and the initial segmentation mask of the tissue to be segmented are generated synchronously after the three-dimensional model of the tissue to be segmented is segmented using an existing automatic segmentation algorithm / software.
[0057] It should be noted that the initial segmentation mask includes multiple single-layer segmentation masks, each of which corresponds to a slice layer in the initial segmentation image. The single-layer segmentation mask is composed of mask values of tissue regions on the corresponding slice layer. Figure 4 As shown, (a) is a slice layer S in the initial segmentation image, and the slice layer S includes tissue segmentation contours s1 and s2. (b) is a single-layer segmentation mask S' corresponding to the slice layer S. The mask value mask corresponding to the tissue segmentation contour s1 in the slice layer S and each spatial point in s1 is 1, and the mask value mask corresponding to the tissue segmentation contour s2 in the slice layer S and each spatial point in s2 is 2.
[0058] Optionally, the computer device can obtain the tissue segmentation contour and the three-dimensional reconstruction contour of the initial segmentation image under the tissue section, and correct the tissue segmentation contour according to the three-dimensional reconstruction contour under the tissue section, so as to correct the mask value in the initial segmentation mask according to the corrected tissue segmentation contour, and obtain the corrected initial segmentation mask as the target segmentation mask.
[0059] Optionally, before acquiring the three-dimensional reconstruction contour of the initial segmented image under the tissue section, the computer device may adjust the three-dimensional reconstruction contour based on the user's human-computer interaction operation to form an adjusted three-dimensional reconstruction contour. The process of adjusting the three-dimensional reconstruction contour may be based on user experience. For example, the computer device displays the cross-sectional view of the initial segmented image under the tissue section through a display unit, and the user may use a mouse to adjust the three-dimensional reconstruction contour displayed in the cross-sectional view, such as cropping or adding contour lines.
[0060] S230 , using the target segmentation mask to obtain a target segmentation image of the tissue to be segmented.
[0061] Optionally, after obtaining the target segmentation mask, the computer device uses the target segmentation mask to perform tissue segmentation on the three-dimensional model of the tissue to be segmented, and obtains a target segmentation image of the tissue to be segmented.
[0062] In this embodiment, the computer device obtains the tissue segmentation contour of the initial segmentation image of the tissue to be segmented under the tissue section, and corrects the initial segmentation mask of the tissue to be segmented according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section to obtain a target segmentation mask, and then uses the target segmentation mask to obtain a target segmentation image of the tissue to be segmented. Among them, the three-dimensional reconstruction contour is formed according to the three-dimensional reconstruction of the volume data of the tissue to be segmented. In the above method, the three-dimensional reconstruction contour under the tissue section can truly reflect the actual distribution of the tissue to be segmented. Based on the three-dimensional reconstruction contour under the tissue section, the initial segmentation mask of the tissue to be segmented is corrected, and a target segmentation mask with a higher degree of fit with the actual distribution is obtained, thereby improving the accuracy of the obtained target segmentation image.
[0063] The initial segmented image includes both the tissue segmentation contour and the three-dimensional reconstruction contour in a cross-sectional view under a tissue section. Based on this, in one embodiment, Figure 5 As shown, the above S220, correcting the initial segmentation mask of the tissue to be segmented according to the tissue segmentation contour under the tissue section and the three-dimensional reconstructed contour to obtain the target segmentation mask, includes:
[0064] S510 , correcting the tissue segmentation contour under the tissue section according to the three-dimensional reconstructed contour under the tissue section, and generating a single-layer segmentation mask corresponding to the tissue section.
[0065] Optionally, the computer device extracts the 3D reconstruction contour and the tissue segmentation contour in the cross-sectional image corresponding to the tissue section selected by the user, and adjusts the corresponding tissue segmentation contour based on the 3D reconstruction contour so that the adjusted tissue segmentation contour matches the 3D reconstruction contour (such as the contours overlap), and then generates a single-layer segmentation mask corresponding to the tissue section based on the adjusted tissue segmentation contour. Figure 6In the cross-sectional view shown, the dotted line in (a) represents the three-dimensional reconstruction contour, and the solid line represents the tissue segmentation contour. The computer device can adjust the position of the tissue segmentation contour to coincide with the three-dimensional reconstruction contour to form the adjusted tissue segmentation contour in (b).
[0066] Optionally, after the computer device obtains the adjusted tissue segmentation contour under the tissue section, it uses a preset mask value to characterize the corresponding tissue segmentation contour and the spatial points within the tissue segmentation contour, and the mask values corresponding to tissue regions representing different tissues are different.
[0067] S520 , correcting the initial segmentation mask according to the single-layer segmentation mask corresponding to the tissue section to obtain a target segmentation mask.
[0068] Optionally, the computer device may use the single-layer segmentation mask corresponding to the tissue section to correct the initial segmentation mask of the tissue to be segmented to obtain a target segmentation mask. The initial segmentation mask includes multiple single-layer segmentation masks corresponding to different slice layers. When the slice layer for constructing the initial segmentation mask is parallel to the tissue section, the computer device may directly use the single-layer segmentation mask corresponding to the tissue section to replace the initial segmentation mask of the corresponding slice layer in the initial segmentation mask, thereby obtaining a corrected initial segmentation mask as the target segmentation mask.
[0069] In the case where the slice layer for constructing the initial segmentation mask is not parallel to the tissue section, a transformation matrix between the two needs to be determined to correct the initial segmentation mask based on the transformation matrix. Figure 7 As shown, the above S520, correcting the initial segmentation mask according to the single-layer segmentation mask corresponding to the tissue section to obtain the target segmentation mask, includes:
[0070] S710 , obtaining a conversion matrix between a section coordinate system of a single-layer segmentation mask corresponding to a tissue section and a slice coordinate system of an initial segmentation mask.
[0071] The section coordinate system is the coordinate system used by the tissue section created to obtain the tissue segmentation contour, and the slice coordinate system is the coordinate system used by the slice layer used to construct the initial segmentation mask.
[0072] Optionally, the computer device may pre-acquire a conversion matrix between a section coordinate system of a single-layer segmentation mask corresponding to the tissue section and a slice coordinate system of an initial segmentation mask.
[0073] S720 , correcting the initial segmentation mask according to the conversion matrix and the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section to obtain an intermediate segmentation mask.
[0074] The single-layer segmentation mask corresponding to the tissue section includes the mask value of each spatial point in the corrected tissue segmentation contour.
[0075] Optionally, the computer device can convert the single-layer segmentation mask corresponding to the tissue section from the section coordinate system to the slice coordinate system according to the transformation matrix, so as to replace the mask value of the corresponding spatial point in the initial segmentation mask with the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section, and obtain an intermediate segmentation mask.
[0076] Optionally, the computer device can also convert the single-layer segmentation masks of each slice layer in the initial segmentation mask from the slice coordinate system to the section coordinate system according to the transformation matrix, so as to replace the mask value of the corresponding spatial point in the converted initial segmentation mask with the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section, and then convert the converted initial segmentation mask from the section coordinate system to the slice coordinate system according to the transformation matrix to obtain the intermediate segmentation mask.
[0077] S730 : Determine a target segmentation mask according to the intermediate segmentation mask.
[0078] Optionally, the computer device may directly determine the intermediate segmentation mask as the target segmentation mask, and may perform smoothing processing on the intermediate segmentation mask to obtain the target segmentation mask.
[0079] In this embodiment, the computer device obtains the conversion matrix between the section coordinate system corresponding to the single-layer segmentation mask corresponding to the tissue section and the slice coordinate system of the initial segmentation mask, and corrects the initial segmentation mask according to the conversion matrix and the mask value of each spatial point in the single-layer segmentation mask to obtain an intermediate segmentation mask, and then determines the target segmentation mask according to the intermediate segmentation mask. In the above method, the single-layer segmentation mask corresponding to the tissue section and the initial segmentation mask can be converted to the same coordinate system based on the conversion matrix between the section coordinate system and the slice coordinate system, so as to unify the coordinate system and improve the accuracy of the target segmentation mask.
[0080] To unify the coordinate system, the single-layer segmentation mask corresponding to the tissue section can be transformed from the section coordinate system to the slice coordinate system according to the transformation matrix. Based on this, in one embodiment, Figure 8 As shown, the above S720, correcting the initial segmentation mask according to the mask value of each spatial point in the single-layer segmentation mask corresponding to the transformation matrix and the tissue section to obtain the intermediate segmentation mask, includes:
[0081] S810 , resample each spatial point in the single-layer segmentation mask corresponding to the tissue section according to the conversion matrix to obtain the spatial point position of each spatial point in the single-layer segmentation mask corresponding to the tissue section in the slice coordinate system.
[0082] Optionally, the computer device may resample each spatial point (i, j, k) in the single-layer segmentation mask corresponding to the tissue section according to the transformation matrix Mc to obtain the spatial point position (i', j', k') of each spatial point (i, j, k) in the single-layer segmentation mask corresponding to the tissue section in the slice coordinate system.
[0083] The resampling process satisfies the following formula:
[0084]
[0085] S820, using the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section to replace the mask value of the corresponding spatial point position in the initial segmentation mask, to obtain an intermediate segmentation mask.
[0086] Optionally, after obtaining the spatial point position (i', j', k') of each spatial point (i, j, k) in the single-layer segmentation mask corresponding to the tissue section in the slice coordinate system, the computer device uses the mask value X of each spatial point (i, j, k) in the single-layer segmentation mask corresponding to the tissue section to replace the mask value Y of the corresponding spatial point position (i', j', k') in the initial segmentation mask to obtain an intermediate segmentation mask.
[0087] In order to unify the coordinate system, the initial segmentation mask can also be converted from the slice coordinate system to the section coordinate system. Based on this, in one embodiment, Fig. 9 As shown, the above S720, correcting the initial segmentation mask according to the mask value of each spatial point in the single-layer segmentation mask corresponding to the transformation matrix and the tissue section to obtain the intermediate segmentation mask, includes:
[0088] S910 , resample each spatial point in the initial segmentation mask according to the conversion matrix to obtain the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system.
[0089] Optionally, the computer device may resample each spatial point (x, y, z) in the initial segmentation mask according to the transformation matrix Mc to obtain the spatial point position (x', y', z') of each spatial point (x, y, z) in the initial segmentation mask in the profile coordinate system. The specific sampling process can be referred to in S810 above, which will not be described in detail here.
[0090] S920 , forming a reference segmentation mask according to the mask value of each spatial point in the initial segmentation mask and the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system.
[0091] Optionally, the computer device combines the mask value M of each spatial point (x, y, z) in the initial segmentation mask with the spatial point position (x', y', z') of each spatial point (x, y, z) in the initial segmentation mask in the profile coordinate system to form a reference segmentation mask, that is, each spatial point position (x', y', z') in the reference segmentation mask corresponds to the mask value M.
[0092] S930 , using the mask value of each spatial point position in the single-layer segmentation mask corresponding to the tissue section to replace the mask value of the corresponding spatial point position in the reference segmentation mask, to form a replaced reference segmentation mask.
[0093] Optionally, the computer device replaces the mask value M of the corresponding spatial point position (x', y', z') in the reference segmentation mask with the mask value N of each spatial point position (x', y', z') in the single-layer segmentation mask corresponding to the tissue section to form a replaced reference segmentation mask, that is, each spatial point position (x', y', z') in the replaced reference segmentation mask corresponds to the mask value N.
[0094] S940 , reversely resample the replaced reference segmentation mask according to the conversion matrix to obtain an intermediate segmentation mask.
[0095] Optionally, after obtaining the replaced reference segmentation mask, the computer device can use a transformation matrix to reversely resample the replaced reference segmentation mask to obtain an intermediate segmentation mask with the same coordinates as the initial segmentation mask, and then obtain a target segmentation mask with the same coordinate system as the initial segmentation mask based on the intermediate segmentation mask.
[0096] Each spatial point in the initial segmentation mask corresponds to a mask value, and each spatial point can be represented in three dimensions based on the spatial point coordinates, so that a three-dimensional initial segmentation mask and an intermediate segmentation mask can be formed. The correction process of the initial segmentation mask is implemented based on a single-layer segmentation mask, and the intermediate segmentation mask obtained may be locally uneven. Based on this, in one embodiment, Fig.10 As shown, the above S730, determining the target segmentation mask according to the intermediate segmentation mask, includes:
[0097] S1010 , determining a mask to be smoothed in the middle segmentation mask.
[0098] The mask to be smoothed is a single-layer segmentation mask whose mask value is replaced in the intermediate segmentation mask.
[0099] Optionally, after obtaining the intermediate segmentation mask, the computer device obtains a single-layer segmentation mask of the replaced mask value in the intermediate segmentation mask as the mask to be smoothed. Fig.11As shown in FIG. 1 , (a) represents the initial segmentation image of the segmented part of the tissue, and (b) represents the intermediate segmentation mask corresponding to the three-dimensional form of the tissue. The single-layer segmentation mask representing the replaced mask value in the box is the mask to be smoothed. Fig.11 It can be seen that there is a large difference between the mask to be smoothed and the adjacent single-layer segmentation mask, resulting in the middle segmentation mask being uneven as a whole due to the concave portion of the mask to be smoothed.
[0100] S1020 , smoothing the intermediate segmentation mask according to the coordinates of the spatial points in the mask to be smoothed to obtain a target segmentation mask.
[0101] Optionally, after determining the mask to be smoothed in the intermediate segmentation mask, the computer device may use a smoothing algorithm to smooth the intermediate segmentation mask locally or as a whole based on the coordinates of the spatial points in the mask to be smoothed to obtain a target segmentation mask.
[0102] Optionally, the computer device may use a difference smoothing algorithm to correct the coordinates of the spatial points in any single-layer segmentation mask in the mask to be smoothed and other single-layer segmentation masks between the mask not to be smoothed. For example, the intermediate segmentation mask includes single-layer segmentation masks 1 to 5 stacked in sequence, wherein single-layer segmentation masks 2 to 4 are masks to be smoothed, and the computer device may perform a difference calculation of the spatial point coordinates between the single-layer segmentation mask 1 and the single-layer segmentation mask 3, and use the difference segmentation mask 1-2 obtained by the difference to correct the single-layer segmentation mask 3 between the single-layer segmentation masks 1 and 2, such as directly using the difference segmentation mask 1-2 to replace the single-layer segmentation mask 3.
[0103] In this embodiment, the computer device determines the single-layer segmentation mask of the replaced mask value in the intermediate segmentation mask as the mask to be smoothed, so as to smooth the intermediate segmentation mask according to the spatial point coordinates in the mask to be smoothed to obtain the target segmentation mask. The above method eliminates the possible non-smoothing in the intermediate segmentation mask, improves the smoothness of the target segmentation mask, and obtains a smooth target segmentation image.
[0104] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0105] Based on the same inventive concept, the embodiment of the present application also provides a segmentation correction device for implementing the segmentation correction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more segmentation correction device embodiments provided below can refer to the limitations of the segmentation correction method above, and will not be repeated here.
[0106] In one embodiment, Fig.12 As shown, a segmentation correction device is provided, comprising: a contour acquisition module 1201, a mask correction module 1202 and a tissue segmentation module 1203, wherein:
[0107] The contour acquisition module 1201 is used to acquire the tissue segmentation contour of the initial segmentation image of the tissue to be segmented under the tissue section;
[0108] The mask correction module 1202 is used to correct the initial segmentation mask of the tissue to be segmented according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section to obtain a target segmentation mask; wherein the three-dimensional reconstruction contour is formed by three-dimensional reconstruction of the volume data of the tissue to be segmented;
[0109] The tissue segmentation module 1203 is used to obtain a target segmentation image of the tissue to be segmented using a target segmentation mask.
[0110] In one embodiment, the mask correction module 1202 includes:
[0111] The mask submodule corrects the tissue segmentation contour under the tissue section according to the three-dimensional reconstructed contour under the tissue section, and generates a single-layer segmentation mask corresponding to the tissue section;
[0112] The correction submodule is used to correct the initial segmentation mask according to the single-layer segmentation mask corresponding to the tissue section to obtain the target segmentation mask.
[0113] In one embodiment, the single-layer segmentation mask corresponding to the tissue section includes the mask value of each spatial point in the corrected tissue segmentation contour; the correction submodule includes:
[0114] A matrix unit, used to obtain a conversion matrix between a section coordinate system of a single-layer segmentation mask corresponding to a tissue section and a slice coordinate system of an initial segmentation mask;
[0115] An intermediate unit, used for correcting the initial segmentation mask according to the mask value of each spatial point in the single-layer segmentation mask corresponding to the transformation matrix and the tissue section, to obtain an intermediate segmentation mask;
[0116] The target unit is used to determine the target segmentation mask according to the intermediate segmentation mask.
[0117] In one embodiment, the intermediate unit comprises:
[0118] A first resampling subunit is used to resample each spatial point in the single-layer segmentation mask corresponding to the tissue section according to the conversion matrix to obtain the spatial point position of each spatial point in the single-layer segmentation mask corresponding to the tissue section in the slice coordinate system;
[0119] The first replacement subunit is used to replace the mask value of the corresponding spatial point position in the initial segmentation mask with the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section, so as to obtain an intermediate segmentation mask.
[0120] In one embodiment, the intermediate unit comprises:
[0121] A second resampling subunit is used to resample each spatial point in the initial segmentation mask according to the transformation matrix to obtain the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system;
[0122] A reference subunit, used to form a reference segmentation mask according to the mask value of each spatial point in the initial segmentation mask and the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system;
[0123] The second replacement subunit replaces the mask value of each spatial point position in the reference segmentation mask with the mask value of each spatial point position in the single-layer segmentation mask corresponding to the tissue section, thereby forming a replaced reference segmentation mask;
[0124] The reverse resampling subunit is used to reversely resample the replaced reference segmentation mask according to the transformation matrix to obtain an intermediate segmentation mask.
[0125] In one embodiment, the target unit includes:
[0126] The sub-unit to be smoothed is used to determine the mask to be smoothed in the intermediate segmentation mask; wherein the mask to be smoothed is a single-layer segmentation mask of the replaced mask value in the intermediate segmentation mask;
[0127] The processing subunit is used to smooth the intermediate segmentation mask according to the coordinates of the spatial points in the mask to be smoothed to obtain the target segmentation mask.
[0128] Each module in the above segmentation correction device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0129] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0130] The tissue segmentation contour of the initial segmentation image of the tissue to be segmented under the tissue section is obtained; the initial segmentation mask of the tissue to be segmented is corrected according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section to obtain a target segmentation mask; wherein the three-dimensional reconstruction contour is formed by three-dimensional reconstruction of the volume data of the tissue to be segmented; and the target segmentation image of the tissue to be segmented is obtained using the target segmentation mask.
[0131] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0132] The tissue segmentation contour under the tissue section is corrected according to the three-dimensional reconstructed contour under the tissue section, and a single-layer segmentation mask corresponding to the tissue section is generated; the initial segmentation mask is corrected according to the single-layer segmentation mask corresponding to the tissue section to obtain a target segmentation mask.
[0133] In one embodiment, the single-layer segmentation mask corresponding to the tissue section includes the mask value of each spatial point in the corrected tissue segmentation contour; when the processor executes the computer program, the following steps are also implemented:
[0134] Obtain a transformation matrix between the section coordinate system of the single-layer segmentation mask corresponding to the tissue section and the slice coordinate system of the initial segmentation mask; correct the initial segmentation mask according to the transformation matrix and the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section to obtain an intermediate segmentation mask; determine the target segmentation mask according to the intermediate segmentation mask.
[0135] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0136] According to the transformation matrix, each spatial point in the single-layer segmentation mask corresponding to the tissue section is resampled to obtain the spatial point position of each spatial point in the single-layer segmentation mask corresponding to the tissue section in the slice coordinate system; the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section is used to replace the mask value of the corresponding spatial point position in the initial segmentation mask to obtain the intermediate segmentation mask.
[0137] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0138] According to the transformation matrix, each spatial point in the initial segmentation mask is resampled to obtain the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system; a reference segmentation mask is formed according to the mask value of each spatial point in the initial segmentation mask and the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system; the mask value of each spatial point position in the single-layer segmentation mask corresponding to the tissue section is used to replace the mask value of the corresponding spatial point position in the reference segmentation mask to form a replaced reference segmentation mask; the replaced reference segmentation mask is reversely resampled according to the transformation matrix to obtain an intermediate segmentation mask.
[0139] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0140] A mask to be smoothed is determined in the intermediate segmentation mask; wherein the mask to be smoothed is a single-layer segmentation mask of a replaced mask value in the intermediate segmentation mask; and the intermediate segmentation mask is smoothed according to the spatial point coordinates in the mask to be smoothed to obtain a target segmentation mask.
[0141] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0142] The tissue segmentation contour of the initial segmentation image of the tissue to be segmented under the tissue section is obtained; the initial segmentation mask of the tissue to be segmented is corrected according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section to obtain a target segmentation mask; wherein the three-dimensional reconstruction contour is formed by three-dimensional reconstruction of the volume data of the tissue to be segmented; and the target segmentation image of the tissue to be segmented is obtained using the target segmentation mask.
[0143] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0144] The tissue segmentation contour under the tissue section is corrected according to the three-dimensional reconstructed contour under the tissue section, and a single-layer segmentation mask corresponding to the tissue section is generated; the initial segmentation mask is corrected according to the single-layer segmentation mask corresponding to the tissue section to obtain a target segmentation mask.
[0145] In one embodiment, the single-layer segmentation mask corresponding to the tissue section includes the mask value of each spatial point in the modified tissue segmentation contour; when the computer program is executed by the processor, the following steps are also implemented:
[0146] Obtain a transformation matrix between the section coordinate system of the single-layer segmentation mask corresponding to the tissue section and the slice coordinate system of the initial segmentation mask; correct the initial segmentation mask according to the transformation matrix and the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section to obtain an intermediate segmentation mask; determine the target segmentation mask according to the intermediate segmentation mask.
[0147] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0148] According to the transformation matrix, each spatial point in the single-layer segmentation mask corresponding to the tissue section is resampled to obtain the spatial point position of each spatial point in the single-layer segmentation mask corresponding to the tissue section in the slice coordinate system; the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section is used to replace the mask value of the corresponding spatial point position in the initial segmentation mask to obtain the intermediate segmentation mask.
[0149] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0150] According to the transformation matrix, each spatial point in the initial segmentation mask is resampled to obtain the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system; a reference segmentation mask is formed according to the mask value of each spatial point in the initial segmentation mask and the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system; the mask value of each spatial point position in the single-layer segmentation mask corresponding to the tissue section is used to replace the mask value of the corresponding spatial point position in the reference segmentation mask to form a replaced reference segmentation mask; the replaced reference segmentation mask is reversely resampled according to the transformation matrix to obtain an intermediate segmentation mask.
[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0152] A mask to be smoothed is determined in the intermediate segmentation mask; wherein the mask to be smoothed is a single-layer segmentation mask of a replaced mask value in the intermediate segmentation mask; and the intermediate segmentation mask is smoothed according to the spatial point coordinates in the mask to be smoothed to obtain a target segmentation mask.
[0153] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0154] The tissue segmentation contour of the initial segmentation image of the tissue to be segmented under the tissue section is obtained; the initial segmentation mask of the tissue to be segmented is corrected according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section to obtain a target segmentation mask; wherein the three-dimensional reconstruction contour is formed by three-dimensional reconstruction of the volume data of the tissue to be segmented; and the target segmentation image of the tissue to be segmented is obtained using the target segmentation mask.
[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0156] The tissue segmentation contour under the tissue section is corrected according to the three-dimensional reconstructed contour under the tissue section, and a single-layer segmentation mask corresponding to the tissue section is generated; the initial segmentation mask is corrected according to the single-layer segmentation mask corresponding to the tissue section to obtain a target segmentation mask.
[0157] In one embodiment, the single-layer segmentation mask corresponding to the tissue section includes the mask value of each spatial point in the modified tissue segmentation contour; when the computer program is executed by the processor, the following steps are also implemented:
[0158] Obtain a transformation matrix between the section coordinate system of the single-layer segmentation mask corresponding to the tissue section and the slice coordinate system of the initial segmentation mask; correct the initial segmentation mask according to the transformation matrix and the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section to obtain an intermediate segmentation mask; determine the target segmentation mask according to the intermediate segmentation mask.
[0159] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0160] According to the transformation matrix, each spatial point in the single-layer segmentation mask corresponding to the tissue section is resampled to obtain the spatial point position of each spatial point in the single-layer segmentation mask corresponding to the tissue section in the slice coordinate system; the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section is used to replace the mask value of the corresponding spatial point position in the initial segmentation mask to obtain the intermediate segmentation mask.
[0161] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0162] According to the transformation matrix, each spatial point in the initial segmentation mask is resampled to obtain the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system; a reference segmentation mask is formed according to the mask value of each spatial point in the initial segmentation mask and the spatial point position of each spatial point in the initial segmentation mask in the profile coordinate system; the mask value of each spatial point position in the single-layer segmentation mask corresponding to the tissue section is used to replace the mask value of the corresponding spatial point position in the reference segmentation mask to form a replaced reference segmentation mask; the replaced reference segmentation mask is reversely resampled according to the transformation matrix to obtain an intermediate segmentation mask.
[0163] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0164] A mask to be smoothed is determined in the intermediate segmentation mask; wherein the mask to be smoothed is a single-layer segmentation mask of a replaced mask value in the intermediate segmentation mask; and the intermediate segmentation mask is smoothed according to the spatial point coordinates in the mask to be smoothed to obtain a target segmentation mask.
[0165] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0166] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0167] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A segmentation correction method, characterized in that: The method comprises: Obtaining a tissue segmentation contour of an initial segmentation image of the tissue to be segmented under a tissue section; The initial segmentation mask of the tissue to be segmented is corrected according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section to obtain a target segmentation mask; wherein the three-dimensional reconstruction contour is formed by three-dimensional reconstruction of the volume data of the tissue to be segmented; The target segmentation mask is used to acquire a target segmentation image of the tissue to be segmented.
2. The method according to claim 1, characterized in that The step of correcting the initial segmentation mask of the tissue to be segmented according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section to obtain a target segmentation mask includes: Correcting the tissue segmentation contour under the tissue section according to the three-dimensional reconstructed contour under the tissue section, and generating a single-layer segmentation mask corresponding to the tissue section; The initial segmentation mask is corrected according to the single-layer segmentation mask corresponding to the tissue section to obtain the target segmentation mask.
3. The method according to claim 2, characterized in that The single-layer segmentation mask corresponding to the tissue section includes the mask value of each spatial point in the corrected tissue segmentation contour; and correcting the initial segmentation mask according to the single-layer segmentation mask corresponding to the tissue section to obtain the target segmentation mask includes: Acquire a conversion matrix between a section coordinate system of the single-layer segmentation mask corresponding to the tissue section and a slice coordinate system of the initial segmentation mask; Correcting the initial segmentation mask according to the conversion matrix and the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section to obtain an intermediate segmentation mask; The target segmentation mask is determined according to the intermediate segmentation mask.
4. The method according to claim 3, characterized in that The step of correcting the initial segmentation mask according to the conversion matrix and the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section to obtain an intermediate segmentation mask includes: Resampling each spatial point in the single-layer segmentation mask corresponding to the tissue section according to the transformation matrix to obtain the spatial point position of each spatial point in the single-layer segmentation mask corresponding to the tissue section in the slice coordinate system; The mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section is used to replace the mask value of the corresponding spatial point position in the initial segmentation mask to obtain the intermediate segmentation mask.
5. The method according to claim 3, characterized in that: The step of correcting the initial segmentation mask according to the conversion matrix and the mask value of each spatial point in the single-layer segmentation mask corresponding to the tissue section to obtain an intermediate segmentation mask includes: Resampling each spatial point in the initial segmentation mask according to the transformation matrix to obtain a spatial point position of each spatial point in the initial segmentation mask in the section coordinate system; forming a reference segmentation mask according to the mask value of each spatial point in the initial segmentation mask and the spatial point position of each spatial point in the initial segmentation mask in the section coordinate system; Using the mask value of each spatial point position in the single-layer segmentation mask corresponding to the tissue section to replace the mask value of the corresponding spatial point position in the reference segmentation mask, to form a replaced reference segmentation mask; The replaced reference segmentation mask is reversely resampled according to the transformation matrix to obtain the intermediate segmentation mask.
6. The method according to claim 3, characterized in that The determining the target segmentation mask according to the intermediate segmentation mask comprises: Determining a mask to be smoothed in the intermediate segmentation mask; wherein the mask to be smoothed is a single-layer segmentation mask of a replaced mask value in the intermediate segmentation mask; The intermediate segmentation mask is smoothed according to the coordinates of the spatial points in the mask to be smoothed to obtain the target segmentation mask.
7. A segmentation correction device, characterized in that: The device comprises: A contour acquisition module, used for acquiring the tissue segmentation contour of the initial segmentation image of the tissue to be segmented under the tissue section; A mask correction module, used for correcting the initial segmentation mask of the tissue to be segmented according to the tissue segmentation contour and the three-dimensional reconstruction contour under the tissue section, to obtain a target segmentation mask; wherein the three-dimensional reconstruction contour is formed by three-dimensional reconstruction of the volume data of the tissue to be segmented; The tissue segmentation module is used to obtain a target segmentation image of the tissue to be segmented using the target segmentation mask.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Surgical puncture path intelligent automatic planning method and system and medical system
CN112155729A
Target surface reconstruction method and device based on three-dimensional image, equipment and medium
CN113129418A
