Digestive tract tumor recognition method and system and medium

By employing an adaptive Z-axis scanning strategy and extracting glandular structure features, the image distortion problem caused by oblique cutting in the identification of gastrointestinal tumors was solved, achieving efficient and accurate tumor identification and improving scanning efficiency and data quality.

CN121998926AInactive Publication Date: 2026-05-08SICHUAN CANCER HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN CANCER HOSPITAL
Filing Date
2026-01-20
Publication Date
2026-05-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing digital pathology scanning technology, when processing digestive tract tissues, suffers from distortions in the cross-sectional shape of glandular ducts due to deviations in the tissue embedding process and the physical cutting angle of the slicer. This affects the assessment of tumor glandular atypia. Furthermore, traditional scanning methods cannot detect local tissue tilt, leading to the loss of key texture information and an increase in redundant data, thus reducing scanning efficiency and storage space utilization.

Method used

By acquiring low-magnification pre-scan images of gastrointestinal pathology slides, identifying tissue regions, extracting glandular structural features and performing ellipse fitting, calculating the section tilt, generating an adaptive Z-axis scanning strategy, adjusting the sampling step size and number of sampling layers, performing high-magnification scanning, generating full slide image data containing depth information, extracting tumor morphological features, and identifying gastrointestinal tumor regions.

Benefits of technology

It effectively avoids local defocusing and morphological distortion caused by oblique tissue cutting, improves image clarity and inter-slice registration accuracy, optimizes scanning accuracy and efficiency, and enhances the accuracy and robustness of automatic identification of gastrointestinal tumors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998926A_ABST
    Figure CN121998926A_ABST
Patent Text Reader

Abstract

The invention discloses a digestive tract tumor recognition method and system and a medium, and relates to the technical field of medical image processing.According to the method, the step length and the layer number of Z-axis sampling are dynamically optimized according to the calculated tangent plane inclination angle, and on the premise that it is guaranteed that a complete glandular tube three-dimensional structure is collected, the number of layers of Z-axis sampling is increased; the problems of local defocus and form distortion caused by tissue beveling are effectively avoided, and the definition of the image and the interlayer registration precision are remarkably improved. In addition, a virtual vertical section reconstruction strategy is introduced, geometric deformation can be corrected in a three-dimensional voxel space, an observation view meeting a standard anatomical view angle is provided, and therefore interference of film production artifacts on diagnosis is eliminated. And through distinguishing the mucous membrane layer and the non-mucous membrane layer and applying a differentiated scanning strategy, while the data quality of a key region is improved, the scanning time and data redundancy of a non-diagnosis region are greatly reduced, dual optimization of scanning precision and efficiency is realized, and the accuracy and robustness of automatic recognition of digestive tract tumors are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image processing technology, and specifically relates to a method, system and medium for identifying digestive tract tumors. Background Technology

[0002] Early diagnosis and grading of gastrointestinal tumors heavily rely on the microscopic structural analysis of histopathological sections. The arrangement, morphological regularity, and nuclear polarity of glandular ducts are core criteria for pathologists to determine benignity or malignancy. Existing digital pathology workflows primarily focus on color reproduction and planar clarity to accurately reproduce the visual appearance of tissue sections under a microscope, providing a digital data foundation for subsequent pathological analysis. However, when processing gastrointestinal tissues, current digital slide scanning technology often fails to guarantee perfectly perpendicular sections to the mucosal surface due to limitations in tissue embedding techniques and deviations in the physical cutting angle of the microtome. This non-perpendicular oblique cutting causes the originally circular cross-section of glandular ducts to appear elliptical or other stretched shapes in the image, thus interfering with the assessment of tumor glandular atypia. Furthermore, traditional all-slide scanners typically employ a single focal plane or a Z-axis stacking scanning strategy with a fixed number of preset layers. This scanning method cannot detect the spatial tilt of local tissues, which can easily lead to the deep cellular structures in the oblique section becoming out of focus due to exceeding the depth of field, resulting in the loss of crucial texture information. It can also generate a large amount of invalid blank data or redundant layers, reducing scanning efficiency and storage space utilization, and limiting the ability to accurately identify tumors in the three-dimensional microenvironment. Summary of the Invention

[0003] In view of the deficiencies in the prior art, the present invention provides a method, system and medium for identifying gastrointestinal tumors to solve the above-mentioned technical problems.

[0004] A method for identifying gastrointestinal tumors includes the following steps:

[0005] Acquire low-magnification pre-scan images of gastrointestinal pathology slides and identify tissue regions in the low-magnification pre-scan images;

[0006] Extract glandular duct structural features within the tissue region, perform ellipse fitting on candidate glandular duct units, and calculate the morphological parameters of the glandular duct cross-section.

[0007] A cut inclination estimation model is constructed, and the cut inclination angle of the physical slice relative to the vertical axis of the mucosa is calculated based on the morphological parameters;

[0008] An adaptive Z-axis scanning strategy is generated based on the tilt angle of the cross section. The strategy includes adjusting the Z-axis sampling step size and the number of sampling layers.

[0009] A high-magnification scan is performed according to the adaptive Z-axis scanning strategy to generate full-slide image data containing depth information;

[0010] Based on the whole slide image data, tumor morphological features are extracted to identify gastrointestinal tumor regions.

[0011] Preferably, the extraction of glandular duct structural features further includes the following steps:

[0012] The low-magnification pre-scanned image is separated into hematoxylin channel and eosin channel based on color deconvolution;

[0013] In hematoxylin channel images, closed regions formed by the arrangement of cell nuclei are detected and defined as candidate glandular units;

[0014] The candidate glandular duct units are fitted with a least squares ellipse to obtain the length of the minor axis and the length of the major axis of the fitted ellipse.

[0015] The morphological parameters include the ratio of the minor axis length of the fitted ellipse to the major axis length of the fitted ellipse.

[0016] Preferably, the construction of the cross-sectional inclination estimation model specifically includes the following steps:

[0017] Assume the cross-section of the glandular duct under an ideal vertical section is circular, with a ratio of its minor axis length to its major axis length of 1;

[0018] Calculate the tilt angle of the cut surface. When the tilt angle of the cut surface is greater than a preset first tilt angle threshold, the region is determined to be a slanted cut region.

[0019] The inclination angle of the cut surface Calculated based on the following formula:

[0020]

[0021] in, To fit the length of the minor axis of the ellipse, To fit the length of the major axis of the ellipse.

[0022] Preferably, the calculation of the inclination angle of the physical slice relative to the vertical axis of the mucosa further includes the following steps:

[0023] Within a local area of ​​a preset size, calculate the consistency of the arrangement direction of all candidate glandular units;

[0024] If the angle between the major axis of more than a preset proportion of candidate glandular units in the local area is less than a preset angle threshold, and the variance of the morphological parameters is less than a preset variance threshold, then it is determined to be a systematic embedding tilt.

[0025] For local areas identified as systematically embedded tilt, the adaptive Z-axis scanning strategy is applied using a uniform section tilt angle.

[0026] Preferably, the generation of the adaptive Z-axis scanning strategy specifically includes the following steps:

[0027] Set the basic Z-axis sampling step size and the basic number of sampling layers;

[0028] As the inclination angle of the cut increases, the step size of the Z-axis is reduced and the number of basic sampling layers is increased. The product of the adjusted sampling step size and the number of sampling layers is greater than or equal to the product of the average diameter of the glandular duct and the tangent of the inclination angle of the cut.

[0029] When the tilt angle of the cut surface is greater than the second tilt angle threshold, the distribution density of the autofocus points in the current field of view is increased, and the focus points are non-uniformly arranged along the tilt gradient direction according to the tilt direction of the gland's long axis.

[0030] Preferably, the high-magnification scan further includes the following steps:

[0031] Acquire multiple frames of the same field of view at different Z-axis heights;

[0032] The interlayer registration offset is calculated based on the tilt angle of the cross section, and spatial correction is performed on multiple frames of images;

[0033] The wavelet transform fusion algorithm is used to extract high-frequency clear textures from each image layer and synthesize an extended depth-of-field image to eliminate local defocus blur caused by oblique cutting.

[0034] Preferably, the following three-dimensional voxel reconstruction steps are also included:

[0035] For regions where the tilt angle of the cut exceeds the correction threshold, three-dimensional voxel reconstruction is performed based on the acquired image data containing depth information;

[0036] In three-dimensional voxel space, digital slices are re-sliced ​​along the direction perpendicular to the muscularis mucosae to generate virtual vertical cross-sectional images;

[0037] An association index is established between the original oblique-section image and the virtual vertical-section image in the generated full-slide image to facilitate view switching during slide reading.

[0038] Preferably, the identification of tissue regions in the low-magnification pre-scan image further includes the following steps:

[0039] Based on texture feature regions, the tissue region is divided into mucosal layer region and non-mucosal layer region;

[0040] The aforementioned glandular structure feature extraction and adaptive Z-axis scanning strategy are performed only in the mucosal layer region;

[0041] For non-mucosal regions, the default single-layer planar scanning strategy is maintained.

[0042] A gastrointestinal tumor identification system includes the following:

[0043] A double-magnification optical imaging unit is used to perform low-magnification pre-scanning and high-magnification fine scanning, and output digital image signals;

[0044] The Z-axis precision drive actuator is used to carry the pathological slides and perform longitudinal displacement of the step length and longitudinal displacement of the layer according to the received motion control signals.

[0045] The microscopic morphology analysis unit, connected to the optical imaging unit, is used to identify glandular structures in low-magnification pre-scan images, fit the cross-sectional morphology of glandular ducts, and calculate the tilt angle of pathological slices.

[0046] An adaptive scanning control unit, connected to the micromorphology analysis unit and the Z-axis precision drive execution unit, is used to generate a Z-axis motion control signal containing step size and layer number instructions based on the tilt angle of the cross section.

[0047] An image processing and recognition unit, connected to the optical imaging unit, is used to generate whole-slide image data and identify tumor regions.

[0048] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for identifying gastrointestinal tumors.

[0049] The beneficial effects of this invention are as follows: By dynamically optimizing the Z-axis sampling step size and number of layers based on the calculated section tilt angle, the complete three-dimensional structure of the glandular ducts is acquired, effectively avoiding local defocusing and morphological distortion caused by oblique tissue sections, significantly improving image clarity and inter-slice registration accuracy. Furthermore, a virtual vertical section reconstruction strategy is introduced, which can correct geometric deformations in three-dimensional voxel space, providing an observation view conforming to standard anatomical perspectives, thereby eliminating the interference of slide artifacts on diagnosis. Moreover, by distinguishing between the mucosal and non-mucosal layers and applying differentiated scanning strategies, the data quality of key areas is improved while significantly reducing scanning time and data redundancy in non-diagnostic areas, achieving dual optimization of scanning accuracy and efficiency, and significantly improving the accuracy and robustness of automatic identification of gastrointestinal tumors. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 A flowchart illustrating the steps of a method for identifying gastrointestinal tumors provided by this invention;

[0052] Figure 2 This is a schematic diagram of the structure of a digestive tract tumor identification system provided by the present invention. Detailed Implementation

[0053] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0054] The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Of course, these are merely examples and are not intended to limit the present invention.

[0055] The embodiments of the invention will now be described in detail with reference to the accompanying drawings.

[0056] like Figure 1 As shown, a method for identifying gastrointestinal tumors includes the following steps:

[0057] Acquire low-magnification pre-scan images of gastrointestinal pathology slides and identify tissue regions in the low-magnification pre-scan images;

[0058] Extract glandular duct structural features within the tissue region, perform ellipse fitting on candidate glandular duct units, and calculate the morphological parameters of the glandular duct cross-section.

[0059] A cut inclination estimation model is constructed, and the cut inclination angle of the physical slice relative to the vertical axis of the mucosa is calculated based on the morphological parameters;

[0060] An adaptive Z-axis scanning strategy is generated based on the tilt angle of the cross section. The strategy includes adjusting the Z-axis sampling step size and the number of sampling layers.

[0061] A high-magnification scan is performed according to the adaptive Z-axis scanning strategy to generate full-slide image data containing depth information;

[0062] Based on the whole slide image data, tumor morphological features are extracted to identify gastrointestinal tumor regions.

[0063] This implementation method constructs a cross-sectional tilt estimation model based on the principle of oblique projection of a cylinder in the digestive tract glands. The core principle is that the digestive tract glands in an ideal state are cylindrical structures perpendicular to the mucosa and muscle layer. When there is a deviation between the physical slicing plane and the vertical axis of the ideal tissue anatomy, the resulting angle is the tilt angle of the cross-section. According to the rules of solid geometry projection, the cross-section of a cylinder is projected as an ellipse on the oblique slicing plane, and the cosine of the tilt angle is equal to the ratio of the minor axis to the major axis of the ellipse. Based on the above principle, the system first uses color deconvolution to separate image channels in the mucosal layer region of the low-magnification pre-scan image, performs least squares ellipse fitting on the candidate gland units, and calculates the physical tilt of the local region using the inverse cosine function. For regions where the detected tilt angle is greater than 30 degrees and less than 60 degrees, the system executes an adaptive Z-axis scanning strategy: reducing the Z-axis sampling step size from the default 1.5 micrometers to 0.8 micrometers and dynamically increasing the number of sampling layers to ensure that the focal plane covers the entire depth of the tilted gland; then, the wavelet transform algorithm is used to fuse the high-frequency textures of multiple images to generate an extended depth-of-field image. This strategy can effectively eliminate local defocusing blur caused by slice tilting, ensuring the clarity of glandular duct edges and cell nucleus texture.

[0064] The system extracts and identifies tumor morphological features from the previously generated high-quality whole-slide image data. The specific computer execution logic for this step includes: firstly, quantifying structural atypia by analyzing connected components in the image to identify glandular fusion, back-to-back shared-wall structures, and cribriform structures; secondly, quantifying nuclear atypia by calculating the nucleus-cytoplasm ratio and analyzing the perpendicularity of the nuclear long axis to the tangent of the basement membrane. When the quantified indicators show disordered nuclear polarity and the overall atypia score exceeds a preset threshold, the system marks the region as a tumor area.

[0065] More specifically, the extraction of glandular duct structural features further includes the following steps:

[0066] The low-magnification pre-scanned image is separated into hematoxylin channel and eosin channel based on color deconvolution;

[0067] In hematoxylin channel images, closed regions formed by the arrangement of cell nuclei are detected and defined as candidate glandular units;

[0068] The candidate glandular duct units are fitted with a least squares ellipse to obtain the length of the minor axis and the length of the major axis of the fitted ellipse.

[0069] The morphological parameters include the ratio of the minor axis length of the fitted ellipse to the major axis length of the fitted ellipse.

[0070] The extraction of glandular structure features is based on the optical density separation principle of Beer-Lambert's law, aiming to extract independent tissue structure information from mixed spectra. First, a color deconvolution algorithm is executed. This algorithm constructs a specific optical density matrix based on the absorption characteristics of hematoxylin and eosin dyes for specific wavelengths of light. In one implementation, a Ruifrok-Johnston normalized optical density matrix is ​​used, where the hematoxylin channel vector is set to [0.65, 0.70, 0.29] and the eosin channel vector is set to [0.07, 0.99, 0.11]. The residual channels are orthogonal to the former two. Through matrix operations, the low-magnification pre-scan image in RGB space is demixed into a single-channel hematoxylin grayscale image, thereby shielding the interference from the cytoplasm and matrix background and significantly enhancing the contrast of the cell nucleus region. After acquiring the hematoxylin channel image, the candidate glandular unit detection process is executed. The specific image processing chain is as follows: First, a binary mask of cell nuclei is generated using the Otsu adaptive thresholding method; second, morphological dilation and closure operations with a kernel size of 5×5×5 pixels are applied to connect the discrete cell nuclei arranged along the glandular wall into continuous closed annular regions; then, all closed contours are extracted and filtered based on geometric features to remove noise points with an area less than 500 pixels and non-glandular regions with an area greater than 5000 pixels, such as blood vessels or tissue fissures. The finally retained closed regions are the candidate glandular units. For each selected unit, the system uses the least squares method to fit the ellipse equation, calculates its minor and major axis lengths, and obtains the morphological parameters.

[0071] More specifically, the construction of the section inclination estimation model includes the following steps:

[0072] Assume the cross-section of the glandular duct under an ideal vertical section is circular, with a ratio of its minor axis length to its major axis length of 1;

[0073] Calculate the tilt angle of the cut surface. When the tilt angle of the cut surface is greater than a preset first tilt angle threshold, the region is determined to be a slanted cut region.

[0074] The inclination angle of the cut surface Calculated based on the following formula:

[0075]

[0076] in, To fit the length of the minor axis of the ellipse, To fit the length of the major axis of the ellipse.

[0077] The section tilt estimation model constructed in this embodiment is based on the principle of stereoscopic geometric projection, which idealizes the digestive tract glands in three-dimensional space as a cylindrical structure perpendicular to the mucosa muscle layer. Under this model setting, the cutting plane of the physical slice is regarded as the cross-sectional plane. When the cross-sectional plane is perpendicular to the axis of the cylinder, the cross-section presents a perfect circle with a minor-to-major axis ratio of 1. When there is a tilt angle θ, the cross-sectional projection undergoes geometric deformation into an ellipse. In specific implementation, the ellipse parameters fitted in the previous steps are used to calculate the local physical tilt of each gland unit in real time using the inverse cosine function. For example, when the axis ratio is detected to be 0.5, the tilt angle is calculated to be 60 degrees. Then, a partition threshold determination mechanism is introduced, setting the first tilt angle threshold to 20 degrees. The entire slide field of view is scanned in a grid. Only when more than 60% of the glands in a certain grid area have a calculated tilt angle greater than 20 degrees is the area determined as a slanted section area and the subsequent multi-layer scanning strategy is activated. For areas smaller than the threshold, a single-layer planar scan is maintained.

[0078] More specifically, the calculation of the inclination angle of the physical slice relative to the vertical axis of the mucosa further includes the following steps:

[0079] Within a local area of ​​a preset size, calculate the consistency of the arrangement direction of all candidate glandular units;

[0080] If the angle between the major axis of more than a preset proportion of candidate glandular units in the local area is less than a preset angle threshold, and the variance of the morphological parameters is less than a preset variance threshold, then it is determined to be a systematic embedding tilt.

[0081] For local areas identified as systematically embedded tilt, the adaptive Z-axis scanning strategy is applied using a uniform section tilt angle.

[0082] Systematic embedding tilt specifically refers to a situation in pathological slide preparation where, due to angular deviations in the placement of tissue blocks within the paraffin embedding cassette or miscalibration of the microtome tip, a large area of ​​tissue section forms a uniform and fixed angle with the ideal anatomical plane, rather than a random morphological change caused by the tissue itself due to lesions. The low-magnification pre-scan image is divided into several 500μm × 500μm local grids. For each grid, the angular standard deviation and morphological parameter variance of the long axis direction vectors of all candidate glandular units are calculated. When more than 85% of the glandular long axis angles within a grid are found to be less than 15 degrees, and the axial ratio variance is less than 0.05, the region is determined to have systematic embedding tilt. For regions determined to have systematic tilt, instead of adjusting the Z-axis of individual glands individually, a global plane fitting strategy is applied to calculate the average tilt angle and tilt gradient direction of the region, constructing a unified plane equation, Z = αX + βY + C, to control the scanning lens to perform continuous push-scan motion along this fitted plane. This equation describes the real-time height trajectory of the Z-axis as the microscope objective moves horizontally with the stage during scanning. X is the horizontal abscissa variable; Y is the horizontal ordinate variable; Z represents the vertical height the objective needs to be adjusted to maintain sharp focus at the current (X, Y) coordinates; α is the tilt gradient along the X-axis; β is the tilt gradient along the Y-axis; and C is the basic focusing height, typically the sharp focusing height of the center or starting point of the region.

[0083] More specifically, the generation of the adaptive Z-axis scanning strategy includes the following steps:

[0084] Set the basic Z-axis sampling step size and the basic number of sampling layers;

[0085] As the inclination angle of the cut increases, the step size of the Z-axis is reduced and the number of basic sampling layers is increased. The product of the adjusted sampling step size and the number of sampling layers is greater than or equal to the product of the average diameter of the glandular duct and the tangent of the inclination angle of the cut.

[0086] When the tilt angle of the cut surface is greater than the second tilt angle threshold, the distribution density of the autofocus points in the current field of view is increased, and the focus points are non-uniformly arranged along the tilt gradient direction according to the tilt direction of the gland's long axis.

[0087] In practical implementation, the basic Z-axis sampling step size and basic number of sampling layers are first set, such as a sampling step size of 1.5 μm, and the number of sampling layers per layer. Then, the system performs dynamic strategy adjustments based on the section tilt angle θ calculated in the previous steps. Its core logic follows the full coverage formula N×ΔZ≥D×tan(θ), where N is the number of layers, ΔZ is the relative step size, and D is the average diameter of the glandular ducts, typically set to 50-80 μm. As the tilt angle θ increases, the system first reduces the sampling step size ΔZ, for example, from the default 1.5 μm to 0.8 μm to improve axial resolution. Then, it calculates and increases the required number of sampling layers N according to the above formula to ensure that the total scan depth N×ΔZ can cover the tissue's projected height D×tan(θ) in the Z-axis direction.

[0088] For slightly tilted regions with tilt angles less than 10 degrees, the system maintains a 3-layer base scan to ensure error tolerance. When a tilt angle of 30 degrees is detected and the average gland diameter is set to 50 μm, the system calculates the theoretical Z-axis coverage depth to be 50 × tan(30°) ≈ 28.8 μm. At this point, the system automatically reduces the sampling step size ΔZ to 1.0 μm to improve axial resolution and increases the number of sampling layers N to 30 (30 × 1.0 > 28.8), thereby ensuring that the entire tilted gland structure is completely encompassed within the imaging volume.

[0089] For high-risk fields of view with tilt angles exceeding the second tilt angle threshold, such as 45 degrees, the system activates a gradient-guided non-uniform focusing strategy. First, the system identifies the minor axis direction of the fitted ellipse as the tilt gradient direction, i.e., the direction with the steepest slope. In this direction, the system abandons the traditional uniform grid layout and instead arranges focus points with an exponentially decreasing spacing along both sides of the gradient direction, with the field of view center as the origin. For example, the spacing sequence is d, 0.8d, 0.6d... This significantly increases the focus point density in the edge regions of the field of view where the risk of defocusing is highest. This is similar to setting up denser guardrails at the edge of a cliff, aiming to capture drastic changes in the focal plane caused by large tilt angles.

[0090] More specifically, the high-magnification scan also includes the following steps:

[0091] Acquire multiple frames of the same field of view at different Z-axis heights;

[0092] The interlayer registration offset is calculated based on the tilt angle of the cross section, and spatial correction is performed on multiple frames of images;

[0093] The wavelet transform fusion algorithm is used to extract high-frequency clear textures from each image layer and synthesize an extended depth-of-field image to eliminate local defocus blur caused by oblique cutting.

[0094] In practice, Z-axis stacking scanning is first performed to acquire a sequence of multiple images at different depths within the same field of view. The key is that when the physical slice has a tilt angle θ, the relative step size ΔZ of the microscope objective's vertical vertical movement along the Z-axis causes a relative displacement of the imaging target within the field of view, resulting in inter-layer registration offset. This system pre-calculates this offset based on the geometrically derived formula ΔXY = ΔZact × tan(θ), where ΔZact is the actual Z-axis sampling step size under the current strategy; ΔXY represents the translational distance of the image content on the horizontal plane, with its displacement vector strictly aligned to the previously determined tilt gradient direction, i.e., the major axis direction of the fitted ellipse. The lateral offset ΔX and longitudinal offset ΔY are obtained by decomposing the displacement modulus ΔXY along this major axis direction and are used for reverse translation correction of the image matrix.

[0095] Assuming a 30-degree inclination angle and a Z-axis step size of 1 micrometer, the system calculates an inter-layer horizontal offset of approximately 0.577 micrometers. Before image fusion, the system uses bilinear interpolation to shift the nth layer image relative to the (n-1)th layer in the opposite direction of the gradient by 0.577 micrometers, achieving sub-pixel-level spatial rigid registration and eliminating ghosting caused by changes in viewing angle. For the registered image sequence, the system applies a discrete wavelet transform algorithm. Specifically, the Daubechies wavelet basis is used to decompose each image layer into a low-frequency approximate sub-band and a high-frequency detail sub-band. For the high-frequency coefficients representing clear textures, a fusion rule that takes the largest absolute value is used, preserving the clearest edge information in each layer; for the low-frequency coefficients, a weighted average rule is used. Finally, the inverse wavelet transform reconstructs the final extended depth-of-field image.

[0096] More specifically, it also includes the following three-dimensional voxel reconstruction steps:

[0097] For regions where the tilt angle of the cut exceeds the correction threshold, three-dimensional voxel reconstruction is performed based on the acquired image data containing depth information;

[0098] In three-dimensional voxel space, digital slices are re-sliced ​​along the direction perpendicular to the muscularis mucosae to generate virtual vertical cross-sectional images;

[0099] An association index is established between the original oblique-section image and the virtual vertical-section image in the generated full-slide image to facilitate view switching during slide reading.

[0100] In practice, discrete two-dimensional image sequences acquired by the microscope at different Z-axis heights are treated as continuous three-dimensional signal samples. An isotropic or anisotropic voxel matrix is ​​constructed using a spatial interpolation algorithm. Within this three-dimensional scalar field, a new clipping plane is defined using mathematical geometric transformations. The normal vector of this plane is set to be strictly parallel to the growth direction of the local mucosa muscle layer or glandular duct long axis. Pixel values ​​are then resampled on this virtual plane to generate a virtual vertical cross-sectional image.

[0101] Dense Z-axis scanning is triggered in heavily obliquely cut regions with a slice angle exceeding 15 degrees, acquiring a 20-layer image sequence with a slice spacing of 0.5 micrometers. The processor stacks this sequence into an X×Y×Z voxel space. First, an ellipse fitting step is performed, obtaining the axis length and simultaneously extracting the angle between the major axis of the fitted ellipse and the horizontal axis of the image coordinate system, which is defined as the tilt azimuth angle ϕ. Subsequently, a three-dimensional rotation matrix is ​​constructed by combining the slice angle θ obtained from the axis length ratio and the tilt azimuth angle ϕ. The spatial normal vector n representing the actual growth axis of the tissue is calculated using the spherical coordinate system transformation formula, and the grayscale response values ​​of the virtual plane grid points in voxel space are calculated using trilinear interpolation or cubic convolution interpolation algorithms. The final generated image corrects the elongated elliptical or irregularly fused glandular cross-sections caused by oblique cutting to standard circular or tubular longitudinal sections, restoring the true topological structure of the tissue. For tumor boundary regions suspected of submucosal infiltration, adaptive ROI 3D reconstruction is performed, automatically identifying the orientation of the muscularis mucosae and using it as a reference plane. A series of continuous virtual longitudinal sections are generated along a direction perpendicular to the tangent of the muscularis mucosae, displaying the longitudinal profile of the tissue in 0.2mm increments, similar to the MPR window in CT imaging. In this way, the depth of tumor budding or infiltration, which was originally unclear on the physical oblique section, is precisely quantified in the virtual vertical section, allowing direct measurement of the vertical distance from the deepest part of the tumor to the muscularis mucosae, assisting pathologists in accurate staging.

[0102] More specifically, the identification of tissue regions in the low-magnification pre-scan image further includes the following steps:

[0103] Based on texture feature regions, the tissue region is divided into mucosal layer region and non-mucosal layer region;

[0104] The aforementioned glandular structure feature extraction and adaptive Z-axis scanning strategy are performed only in the mucosal layer region;

[0105] For non-mucosal regions, the default single-layer planar scanning strategy is maintained.

[0106] In practical implementation, a tissue semantic segmentation module is introduced during the low-magnification pre-scanning stage to divide the biological tissue within the field of view into high-value mucosal layer regions, which mainly contain glandular structures, and background non-mucosal layer regions, which contain smooth muscle, fat, and connective tissue. The classic gray-level co-occurrence matrix algorithm is used to extract texture features. The system divides the image into local patches and calculates the entropy and energy feature values ​​of each patch. The discrimination logic is set as follows: when the texture entropy value of a region is greater than a preset threshold and the energy value is low, it is determined to be a mucosal layer, for example, >7.5, indicating complex texture and high disorder, with rich high-frequency textures due to glandular arrangement and dense cell nuclei; conversely, when a region exhibits high homogeneity or obvious linear directionality, it is determined to be a non-mucosal layer, such as smooth muscle fibers. The aforementioned glandular ellipse fitting and tilt angle inverse algorithm is only activated in regions marked as mucosal layers, ignoring muscle layer regions, thereby avoiding tilt angle calculation errors caused by misclassifying fat vacuoles as glandular ducts. A lightweight fully convolutional neural network is used for end-to-end semantic segmentation. The network input is a low-magnification RGB image, which is directly output as a binary mask, where logic 1 represents gland-rich areas. The system generates a discontinuous adaptive scanning heatmap based on this mask, and performs a variable step size Z-axis scanning strategy only within the coverage area of ​​the heatmap; for non-mucosal layers, the Z-axis of the stage is directly locked to a fixed value or a sparse three-point plane fitting is used for fast single-layer scanning.

[0107] like Figure 2 As shown, a digestive tract tumor identification system includes the following:

[0108] A double-magnification optical imaging unit is used to perform low-magnification pre-scanning and high-magnification fine scanning, and output digital image signals;

[0109] The Z-axis precision drive actuator is used to carry the pathological slides and perform longitudinal displacement of the step length and longitudinal displacement of the layer according to the received motion control signals.

[0110] The microscopic morphology analysis unit, connected to the optical imaging unit, is used to identify glandular structures in low-magnification pre-scan images, fit the cross-sectional morphology of glandular ducts, and calculate the tilt angle of pathological slices.

[0111] An adaptive scanning control unit, connected to the micromorphology analysis unit and the Z-axis precision drive execution unit, is used to generate a Z-axis motion control signal containing step size and layer number instructions based on the tilt angle of the cross section.

[0112] An image processing and recognition unit, connected to the optical imaging unit, is used to generate whole-slide image data and identify tumor regions.

[0113] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for identifying gastrointestinal tumors.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.

Claims

1. A method for identifying gastrointestinal tumors, characterized in that, Includes the following steps: A low-magnification pre-scan image of a gastrointestinal pathology slide is acquired, and the tissue region in the low-magnification pre-scan image is identified. Glandular structural features are extracted within the tissue region, and elliptical fitting is performed on candidate glandular units to calculate the morphological parameters of the glandular cross-section. A section tilt estimation model is constructed, and the section tilt angle of the physical slide relative to the mucosal vertical axis is calculated based on the morphological parameters. An adaptive Z-axis scanning strategy is generated based on the section tilt angle, the strategy including adjusting the Z-axis sampling step size and the number of sampling layers. A high-magnification scan is performed according to the adaptive Z-axis scanning strategy to generate full-slide image data containing depth information. Tumor morphological features are extracted based on the full-slide image data to identify gastrointestinal tumor regions.

2. The method for identifying gastrointestinal tumors according to claim 1, characterized in that, The extraction of glandular duct structural features specifically includes the following steps: separating the low-magnification pre-scanned image into hematoxylin and eosin channels based on color deconvolution; detecting annular or tubular closed regions formed by cell nuclei in the hematoxylin channel image, defining them as candidate glandular duct units; performing least-squares ellipse fitting on the candidate glandular duct units to obtain the length of the minor axis and the length of the major axis of the fitted ellipse; the morphological parameters include the ratio of the length of the minor axis to the length of the major axis of the fitted ellipse.

3. The method for identifying gastrointestinal tumors according to claim 2, characterized in that, The construction of the section inclination estimation model specifically includes the following steps: setting the glandular duct cross-section under an ideal vertical section as circular, with a minor axis to major axis ratio of 1; calculating the section inclination angle; when the section inclination angle is greater than a preset first inclination angle threshold, the region is determined to be a slanted section; the section inclination angle... Calculated based on the following formula: in, To fit the length of the minor axis of the ellipse, To fit the length of the major axis of the ellipse.

4. The method for identifying gastrointestinal tumors according to claim 2, characterized in that, The calculation of the tilt angle of the physical slice relative to the vertical axis of the mucosa further includes the following steps: within a local area of ​​a preset size, the consistency of the arrangement direction of all candidate glandular units is calculated; if the angle between the major axes of more than a preset proportion of candidate glandular units in the local area is less than a preset angle threshold, and the variance of the morphological parameters is less than a preset variance threshold, then it is determined to be a systematic embedding tilt; for the local area determined to be a systematic embedding tilt, the adaptive Z-axis scanning strategy is applied using a uniform tilt angle.

5. The method for identifying gastrointestinal tumors according to claim 1, characterized in that, The adaptive Z-axis scanning strategy specifically includes the following steps: setting the basic Z-axis sampling step size and the basic sampling layer number; as the section tilt angle increases, decreasing the Z-axis sampling step size and increasing the basic sampling layer number, the product of the adjusted sampling step size and the sampling layer number being greater than or equal to the product of the average diameter of the glandular duct and the tangent of the section tilt angle; when the section tilt angle is greater than the second tilt angle threshold, increasing the distribution density of autofocus points in the current field of view, and non-uniformly arranging focus points along the tilt gradient direction according to the tilt direction of the glandular long axis.

6. The method for identifying gastrointestinal tumors according to claim 5, characterized in that, The high-magnification scanning process further includes the following steps: acquiring multiple frames of images of the same field of view at different Z-axis heights; calculating the interlayer registration offset based on the tilt angle of the cut surface and performing spatial correction on the multiple frames of images; and using a wavelet transform fusion algorithm to extract high-frequency clear textures from each layer of images and synthesize extended depth-of-field images to eliminate local defocusing blur caused by the oblique cut.

7. The method for identifying gastrointestinal tumors according to claim 1, characterized in that, The process also includes the following three-dimensional voxel reconstruction steps: for regions where the tilt angle of the cut exceeds the correction threshold, three-dimensional voxel reconstruction is performed based on the acquired image data containing depth information; in the three-dimensional voxel space, digital slices are re-sliced ​​along the direction perpendicular to the muscularis mucosae to generate a virtual vertical cut image; an association index between the original oblique cut image and the virtual vertical cut image is established in the generated full slide image to facilitate view switching during slide reading.

8. The method for identifying gastrointestinal tumors according to claim 1, characterized in that, The identification of tissue regions in the low-magnification pre-scan image further includes the following steps: classifying the tissue region into mucosal layer region and non-mucosal layer region based on texture feature region; performing the glandular structure feature extraction and adaptive Z-axis scanning strategy only in the mucosal layer region; and maintaining the default single-layer planar scanning strategy for the non-mucosal layer region.

9. A digestive tract tumor identification system, characterized in that, Includes the following: a double-magnification optical imaging unit for performing low-magnification pre-scanning and high-magnification fine scanning, and outputting digital image signals; The Z-axis precision drive execution unit is used to carry the pathological slide and execute the longitudinal displacement of the step size and the longitudinal displacement of the layer according to the received motion control signal; the micromorphology analysis unit is connected to the optical imaging unit and is used to identify the glandular structure in the low-magnification pre-scan image, fit the cross-sectional morphology of the glandular duct, and calculate the tilt angle of the pathological slice. An adaptive scanning control unit, connected to the microscopic morphology analysis unit and the Z-axis precision drive execution unit, is used to generate a Z-axis motion control signal containing step size and layer number instructions based on the tilt angle of the section; an image processing and recognition unit, connected to the optical imaging unit, is used to generate whole-slide image data and identify tumor regions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements a method for identifying gastrointestinal tumors as described in any one of claims 1 to 8.