A pathological wax block-slice verification method of linear laser three-dimensional-two-dimensional image fusion
By using line laser 3D-2D image fusion technology, the problem of time-consuming and mismatched comparison between paraffin block numbering and slide labeling after paraffin block sectioning in traditional pathology departments has been solved. This has enabled high-precision verification of the consistency between paraffin blocks and slides, improving the accuracy and safety of pathological diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUN YAT SEN UNIVERSITY CANCER CENTER (CANCER HOSPITAL AFFILIATED TO SUN YAT SEN UNIVERSITY CANCER RESEARCH INSTITUTE OF SUN YAT SEN UNIVERSITY)
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-19
AI Technical Summary
In traditional pathology departments, after paraffin sections are prepared, technicians need to visually compare the paraffin block number with the slide label. This process is time-consuming and highly subjective, and sample mismatch is very likely to occur in high-throughput scenarios. Existing methods cannot assess the geometric consistency between the actual tissue outline of the paraffin section and the stained tissue area in the slide, making it difficult to detect hidden errors caused by section offset, tissue loss, or cross-contamination.
A line laser 3D-2D image fusion method is adopted to reconstruct the macroscopic contour and surface topological features by acquiring the 3D point cloud data of the pathological paraffin block, generate a 2D paraffin block contour image, and perform initial spatial alignment with the 2D tissue contour of the HE stained slide. Combined with rigid and non-rigid registration, a consistency score is calculated to determine the consistency between the paraffin block and the slide, and a difference marker and alarm signal are output when there is inconsistency.
It achieves high-precision, fully automated consistency verification of pathological paraffin blocks and slides, improving the accuracy and robustness of matching and discrimination. The system can automatically locate discrepancies, generate structured reports, and trigger audible and visual alarms, enabling traceable and auditable quality control throughout the entire process.
Smart Images

Figure CN122243914A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and in particular to a method for verifying pathological paraffin blocks and slides by fusion of three-dimensional and two-dimensional images using line laser. Background Technology
[0002] Medical image processing technology refers to a series of methods that utilize computer algorithms to acquire, enhance, analyze, visualize, and extract information from medical image data, aiming to assist in clinical diagnosis, treatment planning, and biomedical research. This technology is widely applied to various imaging modalities such as X-ray, CT, MRI, ultrasound, endoscopy, and digital pathology slides, covering core tasks such as image denoising, segmentation, registration, 3D reconstruction, feature quantization, and AI-assisted interpretation. Its goal is to improve the accuracy, objectivity, and efficiency of image interpretation, promoting the development of precision medicine and intelligent diagnosis and treatment.
[0003] In traditional pathology departments, after paraffin sections are prepared, technicians need to visually compare the paraffin block number with the slide label and judge the consistency of tissue morphology based on experience. This process is time-consuming and highly subjective, and sample mismatch is very likely to occur in high-throughput scenarios. Moreover, existing methods cannot assess the geometric consistency between the actual tissue outline of the paraffin section and the stained tissue area in the slide. Relying solely on labels or rough appearance makes it difficult to detect hidden errors caused by section offset, tissue loss, or cross-contamination. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a pathological paraffin block-slide verification method based on line laser 3D-2D image fusion. This solves the problem that in traditional pathology departments, after paraffin block sections are prepared, technicians need to visually compare the paraffin block number with the slide label and judge the consistency of tissue morphology based on experience. This process is time-consuming and highly subjective, and sample mismatch is very likely to occur in high-throughput scenarios. Furthermore, existing methods cannot assess the geometric consistency between the actual tissue outline of the paraffin block section and the stained tissue area in the slide. Relying solely on labels or rough appearance judgment makes it difficult to detect hidden errors caused by section offset, tissue loss, or cross-contamination.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for verifying pathological paraffin blocks and slides using line laser three-dimensional-two-dimensional image fusion, comprising: Obtain three-dimensional point cloud data of the pathological paraffin block section, and reconstruct the macroscopic contour and surface topological features of the paraffin block section. The reconstructed 3D point cloud is orthogonally projected onto a 2D plane to generate a 2D wax block outline image; Acquire transmission images of HE-stained slides corresponding to the paraffin blocks and extract two-dimensional tissue contours of the stained areas; Based on the synchronous rotation angle of the wax block stage and the glass slide stage, the two-dimensional wax block outline image and the two-dimensional tissue outline are initially aligned in spatial orientation. Rigid registration is performed on the two-dimensional wax block contour and the two-dimensional tissue contour after initial alignment, and non-rigid deformation compensation is activated based on the registration result. After completing rigid or non-rigid registration, calculate the degree of regional overlap and the maximum edge deviation between the two contours to generate a consistency score; Based on the consistency score and the preset threshold, it is determined whether the wax block and the glass slide are consistent, and if they are inconsistent, a difference mark and an alarm signal are output.
[0007] As a preferred embodiment of the pathological paraffin block-slide verification method based on line laser 3D-2D image fusion described in this invention, the specific steps for acquiring 3D point cloud data of the pathological paraffin block cross-section and reconstructing the macroscopic contour and surface topological features of the paraffin block cross-section are as follows: A continuous linear laser beam is projected onto the cut surface of the pathological paraffin block using a line laser contour scanner. The laser beam intersects with the surface of the paraffin block to form a bright line that is deformed due to the surface undulations. Synchronously trigger a high-resolution industrial camera to acquire a grayscale image containing the bright line of the deformation; Based on the pre-completed camera-laser joint calibration results, the camera intrinsic parameter matrix is obtained. And the spatial equation of the laser plane in the camera coordinate system; For each pixel on the laser center line detected in the image The back projection is then transformed into a three-dimensional ray originating from the optical center of the camera; Calculate the intersection of the ray and the laser plane, and use it as a three-dimensional sampling point on the surface of the wax block; Repeat the above process, covering the entire cross-sectional area of the wax block, accumulating all intersections to form a dense three-dimensional point cloud. ,in Indicates the first Spatial coordinates of each sampling point; The point cloud is used to fully characterize the macroscopic geometric contour and microscopic surface topology of the wax block cross-section.
[0008] As a preferred embodiment of the pathological paraffin block-slide verification method based on line laser 3D-2D image fusion described in this invention, the specific steps of orthogonally projecting the reconstructed 3D point cloud onto a 2D plane to generate a 2D paraffin block contour image are as follows: Based on the physical orientation information of the stage during wax block slicing, determine the normal vector of the slicing surface. ; Build with Let be an orthogonal projection coordinate system with projection direction, whose basis vectors are two mutually orthogonal and perpendicular to each other. unit vector constitute; Point cloud Each point in Calculate its two-dimensional coordinates on the projection plane, the expression is: ; in, For point clouds The centroid is used to eliminate translational offset; Collect all projection points The convex hull algorithm is used to extract the sequence of outermost boundary points. ; Connect the boundary points to form a closed polygon, and fill the internal region to generate a binarized two-dimensional wax block outline image; in, and Let the orthogonal basis vectors of the projection plane be the tangent normal vector. Uniquely certain; Let the centroid of the point cloud be defined as ; For the first The coordinates of a three-dimensional point on a two-dimensional projection plane.
[0009] As a preferred embodiment of the pathological paraffin block-slide verification method using line laser three-dimensional-two-dimensional image fusion as described in this invention, the specific steps for acquiring the transmission image of the HE-stained slide corresponding to the paraffin block and extracting the two-dimensional tissue contour of the stained area are as follows: The sectioned and stained glass slide is placed on a transmissive white light illumination stage, and an RGB image of the entire slide is captured using a color industrial camera. ; Will Convert to HSV color space and separate the hue channels. ; right The Otsu adaptive thresholding segmentation method is applied to generate the initial binary image. The stained tissue area is set to 1, and the background is set to 0. right Perform morphological closing operations, first dilate and then erode, to eliminate internal pores and smooth tissue edges; A contour tracing algorithm is used to traverse all connected regions, calculate the area of each region, retain the connected region with the largest area as the effective organization region, and extract the set of external boundary points of the effective organization region to form a two-dimensional organization contour.
[0010] As a preferred embodiment of the pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion according to the present invention, the specific steps for initially aligning the two-dimensional paraffin block contour image with the two-dimensional tissue contour based on the synchronous rotation angle of the paraffin block stage and the slide stage are as follows: During the wax block slicing process, the stage rotation angle Recorded and stored in real time by a high-precision encoder; Geometric center of the two-dimensional wax block outline image Using the center of rotation, all boundary points on this contour Apply inverse rotation transformation: ; Obtain the corrected wax block contour point set ; in, The actual rotation angle of the stage when slicing the wax block is provided by the encoder; The geometric center of the wax block outline image is calculated as the mean of the coordinates of all outline points. The first after angle compensation Coordinates of the contour points; By placing the corrected contour and the two-dimensional tissue contour in the same image coordinate system, initial orientation alignment based on physical slice angles is achieved.
[0011] As a preferred embodiment of the pathological paraffin block-slide verification method for line laser three-dimensional-two-dimensional image fusion described in this invention, the steps of performing rigid registration between the initially aligned two-dimensional paraffin block contour and the two-dimensional tissue contour, and determining whether to initiate non-rigid deformation compensation based on the registration result, are as follows: Let the set of points representing the outline of the wax block be... The organizational contour point set is ; The optimal rigid transformation parameters, including the rotation matrix, are solved using the iterative nearest-point algorithm. Translation vector This minimizes the following objective function, expressed as: ; After rigid registration is completed, the maximum unidirectional deviation distance between the two profiles is calculated, and the expression is: ; like If the deformation sensitivity threshold is exceeded, it is determined that there is significant non-rigid deformation, and thin plate spline transformation is initiated. in, It is a two-dimensional rotation matrix that satisfies and ; It is a translation vector; It reflects the degree of the furthest deviation between the profiles after registration and is used to trigger a non-rigid compensation mechanism; The registered wax block contour points are used as the control source point set. The corresponding organizational contour points are used as the target point set. Solve for the TPS displacement field function Local non-rigid corrections are applied to the tissue contour to make it fit the geometry of the wax block better.
[0012] As a preferred embodiment of the pathological paraffin block-slide verification method for line laser three-dimensional-two-dimensional image fusion described in this invention, the following steps are taken: After completing rigid or non-rigid registration, the degree of regional overlap and the maximum edge deviation between the two contours are calculated to generate a consistency score. The finally registered wax block outline and tissue outline are rasterized into binary mask images of the same resolution. and ; Calculate the intersection-combination ratio index The expression is: ; Simultaneously, calculate the two-way Hausdorff distance. The expression is: ; in, and These are the boundary point sets between the registered wax block and the tissue, respectively; Introducing a normalization factor Defined as the diagonal length of the bounding box of two contours, the normalized edge consistency index is calculated. The expression is: ; By integrating regional and edge information, a comprehensive consistency score is generated, expressed as: ; in, This indicates the number of pixels in the overlapping area of the two masks. Indicates the number of pixels in the union; The value ranges from [0,1], and the larger the value, the higher the degree of overlap between regions; The Hausdorff distance reflects the edge deviation of the two profiles in the worst-case scenario. For scale normalization parameters, ensure It has scale invariance; These are preset weighting coefficients used to balance the contributions of the region and the edge.
[0013] As a preferred embodiment of the pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion described in this invention, the steps of determining whether the paraffin block and slide are consistent based on a consistency score and a preset threshold, and outputting a difference marker and alarm signal when they are inconsistent, are as follows: Set a consistency score threshold ; like ≥ If the system determines that the current paraffin block and glass slide are from the same source, it records the successful verification status and allows the patient to proceed to the subsequent pathological diagnosis process. like < The system then overlays the display in the graphical user interface. and Highlighted in red The area is highlighted in blue. area; Generate a structured verification anomaly report, including the set of pixel coordinates of the discrepancy regions and the intersection-union ratio (IU). Hausdorff distance Normalized score Verify the timestamp, operator identification, and device number; Simultaneously trigger the audible and visual alarm device, emitting a continuous buzzing sound and flashing red light to prompt the operator to immediately verify the wax block number, slide label, and sectioning order; All verification results and anomaly logs are automatically stored in the hospital's pathology information system, supporting audit traceability and quality control analysis.
[0014] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the pathological paraffin block-slide verification method of line laser three-dimensional-two-dimensional image fusion as described in the first aspect of the present invention.
[0015] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the pathological paraffin block-slide verification method of line laser three-dimensional-two-dimensional image fusion as described in the first aspect of the present invention.
[0016] The beneficial effects of this invention are as follows: By fusing three-dimensional scanning with linear laser and two-dimensional HE staining images, a high-precision, fully automated method for verifying the consistency of pathological paraffin blocks and slides is constructed. This effectively solves the problems of low efficiency, strong subjectivity, and susceptibility to errors in traditional manual verification methods. The method utilizes the synchronization information of physical slide angles to achieve initial orientation alignment, combines rigid and non-rigid registration strategies to adapt to tissue deformation, and introduces a multi-index fusion scoring mechanism based on cross-union ratio and normalized Hausdorff distance, which effectively improves the accuracy and robustness of matching and discrimination. At the same time, when inconsistencies are detected, the system can automatically locate the difference area, generate a structured report, and trigger an audible and visual alarm, realizing full-process traceability and auditable quality control. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of the pathological paraffin block-slide verification method using linear laser 3D-2D image fusion in Example 1.
[0019] Figure 2 This is a schematic diagram of the three-dimensional point cloud reconstruction process in Example 1.
[0020] Figure 3 This is a schematic diagram of the TPS non-rigid transformation principle in Example 1. Detailed Implementation
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0023] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0024] Example 1, referring to Figures 1-3As one embodiment of the present invention, this embodiment provides a method for verifying pathological paraffin blocks and slides using line laser three-dimensional-two-dimensional image fusion, comprising the following steps: S1. Obtain three-dimensional point cloud data of the pathological paraffin block cross-section and reconstruct the macroscopic contour and surface topological features of the paraffin block cross-section.
[0025] Furthermore, a continuous linear laser beam is projected onto the cut surface of the pathological paraffin block using a line laser contour scanner. The laser beam intersects with the surface of the paraffin block to form a bright line that is deformed due to the surface undulations. Synchronously trigger a high-resolution industrial camera to acquire a grayscale image containing the bright line of the deformation; Based on the pre-completed camera-laser joint calibration results, the camera intrinsic parameter matrix is obtained. And the spatial equation of the laser plane in the camera coordinate system; For each pixel on the laser center line detected in the image The back projection is then transformed into a three-dimensional ray originating from the optical center of the camera; Calculate the intersection of the ray and the laser plane, and use it as a three-dimensional sampling point on the surface of the wax block; Repeat the above process, covering the entire cross-sectional area of the wax block, accumulating all intersections to form a dense three-dimensional point cloud. ,in Indicates the first Spatial coordinates of each sampling point; The point cloud is used to fully characterize the macroscopic geometric contour and microscopic surface topology of the wax block cross-section.
[0026] It should be noted that by using line laser contour scanning combined with triangulation to obtain the three-dimensional point cloud of the wax block cross-section, it is possible to reconstruct the macroscopic contour and microscopic topological details of the surface with high precision without contacting the sample. This avoids the physical damage to the wax block caused by traditional contact measurement, and overcomes the limitation that pure two-dimensional images cannot reflect tissue thickness and surface undulations. This provides a reliable three-dimensional geometric basis for subsequent accurate fusion verification with slide images.
[0027] S2. Project the reconstructed 3D point cloud orthogonally onto a 2D plane to generate a 2D wax block outline image.
[0028] Furthermore, based on the physical orientation information of the stage during wax block slicing, the normal vector of the slicing plane is determined. ; Build with Let be an orthogonal projection coordinate system with projection direction, whose basis vectors are two mutually orthogonal and perpendicular to each other. unit vector constitute; Point cloud Each point in Calculate its two-dimensional coordinates on the projection plane, the expression is: ; in, For point clouds The centroid is used to eliminate translational offset; Collect all projection points The convex hull algorithm is used to extract the sequence of outermost boundary points. ; Connect the boundary points to form a closed polygon, and fill the internal region to generate a binarized two-dimensional wax block outline image; in, and Let the orthogonal basis vectors of the projection plane be the tangent normal vector. Uniquely certain; Let the centroid of the point cloud be defined as ; For the first The coordinates of a three-dimensional point on a two-dimensional projection plane.
[0029] It should be noted that by generating the two-dimensional wax block contour through orthogonal projection based on the actual slide posture, the projection direction is strictly consistent with the real plane of the pathological slide, effectively eliminating the contour distortion caused by arbitrary angle projection. Combined with centroid normalization and convex hull boundary extraction, the generated two-dimensional contour not only retains the key geometric features of the original three-dimensional structure, but also has format compatibility with direct comparison with slide images, improving the initial alignment accuracy of subsequent registration.
[0030] S3. Acquire transmission images of HE-stained slides corresponding to the wax block and extract the two-dimensional tissue contours of the stained areas.
[0031] Furthermore, the sectioned and stained glass slide is placed on a transmissive white light illumination stage, and an industrial color camera is used to capture an RGB image of the entire slide. ; Will Convert to HSV color space and separate the hue channels. ; right The Otsu adaptive thresholding segmentation method is applied to generate the initial binary image. The stained tissue area is set to 1, and the background is set to 0. right Perform morphological closing operations, first dilate and then erode, to eliminate internal pores and smooth tissue edges; A contour tracing algorithm is used to traverse all connected regions, calculate the area of each region, retain the connected region with the largest area as the effective organization region, and extract the set of external boundary points of the effective organization region to form a two-dimensional organization contour.
[0032] It should be noted that using the hue channel in the HSV color space combined with Otsu adaptive threshold segmentation to extract HE-stained areas can effectively suppress interference caused by uneven illumination, background noise, and differences in staining depth, accurately separating tissue areas with pathological significance. Morphological closing operations and maximum connected component screening further eliminate bubbles, scratches, or edge artifacts, ensuring that the extracted two-dimensional tissue contours truly reflect the boundaries of effective diagnostic areas in the slide, providing high-quality input for subsequent fusion verification.
[0033] S4. Based on the synchronous rotation angle of the wax block stage and the glass slide stage, perform initial spatial alignment of the two-dimensional wax block contour image and the two-dimensional tissue contour.
[0034] Furthermore, during the wax block slicing process, the stage rotation angle... Recorded and stored in real time by a high-precision encoder; Geometric center of the two-dimensional wax block outline image Using the center of rotation, all boundary points on this contour Apply inverse rotation transformation: ; Obtain the corrected wax block contour point set ; in, The actual rotation angle of the stage when slicing the wax block is provided by the encoder; The geometric center of the wax block outline image is calculated as the mean of the coordinates of all outline points. Here are the coordinates of the jjth contour point after angle compensation; By placing the corrected contour and the two-dimensional tissue contour in the same image coordinate system, initial orientation alignment based on physical slice angles is achieved.
[0035] It should be noted that by reading the rotation angle θ recorded by the stage encoder during the slicing process and performing a reverse rotation transformation on the wax block contour, initial orientation correction based on the physical operation process is achieved, which fundamentally solves the spatial misalignment problem caused by the arbitrary placement of the wax block on the stage or the inconsistent orientation during glass slide scanning. This alignment method does not rely on image feature matching, has determinism and repeatability, and reduces the search space and failure risk of subsequent registration algorithms.
[0036] S5. Perform rigid registration on the two-dimensional wax block contour and the two-dimensional tissue contour after initial alignment, and determine whether to start non-rigid deformation compensation based on the registration result.
[0037] Furthermore, let the set of points representing the outline of the wax block be... The organizational contour point set is ; The optimal rigid transformation parameters, including the rotation matrix, are solved using the iterative nearest-point algorithm. Translation vector This minimizes the following objective function, expressed as: ; After rigid registration is completed, the maximum unidirectional deviation distance between the two profiles is calculated, and the expression is: ; like If the deformation sensitivity threshold is exceeded, it is determined that there is significant non-rigid deformation, and thin plate spline transformation is initiated. in, It is a two-dimensional rotation matrix that satisfies and ; It is a translation vector; It reflects the degree of the furthest deviation between the profiles after registration and is used to trigger a non-rigid compensation mechanism; The registered wax block contour points are used as the control source point set. The corresponding organizational contour points are used as the target point set. Solve for the TPS displacement field function Local non-rigid corrections are applied to the tissue contour to make it fit the geometry of the wax block better.
[0038] It should be noted that the two-stage registration strategy, which combines rigid registration with non-rigid deformation compensation, can efficiently handle overall translation and rotational deviations, and can also perform fine correction for local contour offsets caused by easily deformable tissues such as fat and lymph nodes. By dynamically determining whether to enable thin plate spline transformation through the maximum unidirectional deviation distance, overfitting of rigid samples is avoided, and the balance between computational efficiency and deformation adaptability is taken into account, which significantly improves the matching robustness under different tissue types.
[0039] S6. After completing rigid or non-rigid registration, calculate the degree of regional overlap and the maximum edge deviation between the two contours to generate a consistency score.
[0040] Furthermore, the finally registered wax block contour and tissue contour are rasterized into binary mask images of the same resolution. and ; Calculate the intersection-combination ratio index The expression is: ; Simultaneously, calculate the two-way Hausdorff distance. The expression is: ; in, and These are the boundary point sets between the registered wax block and the tissue, respectively; Introducing a normalization factor Defined as the diagonal length of the bounding box of two contours, the normalized edge consistency index is calculated. The expression is: ; By integrating regional and edge information, a comprehensive consistency score is generated, expressed as: ; in, This indicates the number of pixels in the overlapping area of the two masks. Indicates the number of pixels in the union; The value ranges from [0,1], and the larger the value, the higher the degree of overlap between regions; The Hausdorff distance reflects the edge deviation of the two profiles in the worst-case scenario. For scale normalization parameters, ensure It has scale invariance; These are preset weighting coefficients used to balance the contributions of the region and the edge.
[0041] It should be noted that the consistency scoring mechanism that integrates the cross-union ratio and the normalized Hausdorff distance comprehensively considers the coverage of the contour region and the geometric consistency of the boundary, overcoming the one-sidedness of the single index evaluation. Among them, the Hausdorff distance is sensitive to local abrupt changes, while the cross-union ratio reflects the degree of global overlap. The score formed by the weighted fusion of the two has stronger discriminative power and noise resistance, and can more objectively and comprehensively quantify the correspondence between the wax block and the glass slide.
[0042] S7. Based on the consistency score and the preset threshold, determine whether the wax block and the glass slide are consistent, and output a difference mark and alarm signal when they are inconsistent.
[0043] Furthermore, a consistency score threshold is set. ; like ≥ If the system determines that the current paraffin block and glass slide are from the same source, it records the successful verification status and allows the patient to proceed to the subsequent pathological diagnosis process. like < The system then overlays the display in the graphical user interface. and Highlighted in red The area is highlighted in blue. area; Generate a structured verification anomaly report, including the set of pixel coordinates of the discrepancy regions and the intersection-union ratio (IU). Hausdorff distance Normalized score Verify the timestamp, operator identification, and device number; Simultaneously trigger the audible and visual alarm device, emitting a continuous buzzing sound and flashing red light to prompt the operator to immediately verify the wax block number, slide label, and sectioning order; All verification results and anomaly logs are automatically stored in the hospital's pathology information system, supporting audit traceability and quality control analysis.
[0044] It should be noted that when discrepancies are identified, the system not only outputs binary results, but also visualizes the difference areas through color coding, generates a structured report containing multi-dimensional quantitative indicators, and links audible and visual alarms with information system logs, forming a closed loop of quality control. This improves the response efficiency and verification accuracy of pathology technicians to abnormal samples, effectively prevents clinical misdiagnosis caused by mismatch between paraffin blocks and slides, and ensures the reliability of pathological diagnosis and medical safety.
[0045] This embodiment also provides a computer device applicable to the pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion as proposed in the above embodiment.
[0046] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0047] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the pathological paraffin block-slide verification method for realizing three-dimensional-two-dimensional image fusion using line laser as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0048] Example 2 is the second embodiment of the present invention. This embodiment provides a specific application scenario of the pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion in highly deformable tissue samples, further expanding the adaptability of this technical solution to pathological samples that are prone to local compression, distortion or slice deformation.
[0049] This embodiment maintains the same core steps as Embodiment 1, but optimizes parameter configuration and dynamic triggering mechanisms for tissue deformation characteristics to ensure the robustness of the method under complex tissue types. Specifically, it includes the following steps: S1. Obtain three-dimensional point cloud data of the pathological paraffin block cross-section and reconstruct the macroscopic contour and surface topological features of the paraffin block cross-section.
[0050] Furthermore, a line laser profiler is used to project a continuous linear laser beam of specific wavelength and power, simultaneously triggering a high-resolution industrial camera to acquire grayscale images. Based on the camera's intrinsic parameter matrix and the laser plane equation, a dense three-dimensional point cloud is generated using the triangulation principle. In this embodiment, a wax block of adipose tissue is used, and the scanning resolution is improved to a finer level to capture local depressions caused by microscopic surface undulations.
[0051] S2. Project the reconstructed 3D point cloud orthogonally onto a 2D plane to generate a 2D wax block outline image.
[0052] Furthermore, the normal vector of the slicing surface is determined based on the orientation of the slicing platform, an orthogonal projection coordinate system is constructed, and the two-dimensional coordinates of each point on the projection plane are calculated. Translational offset is eliminated by subtracting the centroid, and the convex hull boundary is extracted to generate a binary contour image. In this embodiment, the fat wax block has a large centroid offset due to surface inhomogeneity; this projection ensures that contour distortion is controlled within an extremely low range.
[0053] S3. Acquire transmission images of HE-stained slides corresponding to the wax block and extract the two-dimensional tissue contours of the stained areas.
[0054] Furthermore, an RGB image of the entire slide is captured using a color camera, converted to the HSV color space to separate the tone channels, and then morphological closing operations are performed on the tone channels after applying adaptive thresholding to extract the maximum connected component boundaries. In this embodiment, Gaussian filtering preprocessing is added to address uneven staining of adipose tissue, eliminating oil droplet artifacts and ensuring the integrity of the tissue contour.
[0055] S4. Based on the synchronous rotation angle of the wax block stage and the glass slide stage, perform initial spatial alignment between the two-dimensional wax block outline image and the two-dimensional tissue outline.
[0056] Furthermore, the rotation angle recorded by the encoder is read, and an inverse rotation transformation is applied to the wax block contour to achieve initial alignment.
[0057] S5. Perform rigid registration on the two-dimensional wax block contour and the two-dimensional tissue contour after initial alignment, and determine whether to start non-rigid deformation compensation based on the registration result.
[0058] Furthermore, an iterative nearest-point algorithm is employed to solve for the optimal rigid transformation parameters, including the rotation matrix and translation vector, minimizing the sum of distances between the two contour point sets. After rigid registration, the maximum unidirectional deviation distance between the two contours is calculated. In this embodiment, for adipose tissue, the preset deformation sensitivity threshold is lowered to a more stringent level, which typically triggers a thin-plate spline transformation: using the registered wax block points as the control source point set and the corresponding tissue contour points as the target point set, the displacement field function is solved to perform local non-rigid correction on the tissue contour. This embodiment ensures adaptation to compression deformation by lowering the threshold and presetting more control points.
[0059] S6. After completing rigid or non-rigid registration, calculate the degree of regional overlap and the maximum edge deviation between the two contours to generate a consistency score.
[0060] Furthermore, the finally registered wax block contour and tissue contour are converted into binary mask images of the same resolution, and the intersection-over-union (IoU) ratio is calculated. Simultaneously, the bidirectional Hausdorff distance is calculated, and a normalization factor is introduced to calculate a normalized edge consistency index. The region and edge information are then fused to generate a comprehensive consistency score. In this embodiment, the weighting coefficients are adjusted to emphasize region overlap. Under typical conditions, fat samples achieve high IoU, Hausdorff distance, and comprehensive scores.
[0061] S7. Based on the consistency score and the preset threshold, determine whether the wax block and the glass slide are consistent, and output a difference mark and alarm signal when they are inconsistent.
[0062] Furthermore, a threshold is set for judging highly deformed samples. If the score is lower than the threshold, the difference area is highlighted, a report is generated, and an alarm is triggered.
[0063] It should be noted that this embodiment achieves more refined non-rigid compensation for highly deformable tissues such as fat and lymph nodes by dynamically reducing the deformation threshold, increasing the control points of thin plate splines, and adjusting the scoring weights. The success rate is significantly improved compared to standard samples, effectively expanding the application of this invention in the verification of complex pathological paraffin blocks such as breast and liver. At the same time, it avoids over-calculation of rigid samples, which meets the requirement in the patent examination guidelines that specific implementation methods should cover different technical effect scenarios.
[0064] Example 3, the third embodiment of the present invention, provides a high-throughput automated application scenario for the pathological paraffin block-slide verification method based on line laser 3D-2D image fusion, fully integrated with a hospital pathology information system. This further expands the application of this technical solution in batch processing, multi-device networked quality control, and traceability auditing in large medical institutions. This embodiment reuses the steps of Example 1 in its core process but adds a pathology information system interface, batch parallel processing, and an automatic parameter adaptation mechanism. Specifically, it includes the following steps: S1 to S4 are the same as in Example 1, using multi-threaded parallel scanning and image acquisition for batches of paraffin blocks, with the rotation angle being uploaded synchronously in real time through the pathology information system interface.
[0065] S5. Perform rigid registration on the two-dimensional wax block contour and the two-dimensional tissue contour after initial alignment, and determine whether to start non-rigid deformation compensation based on the registration result.
[0066] Furthermore, after rigid registration is completed, the maximum unidirectional deviation distance is calculated, and the threshold is automatically adjusted based on the sample types pre-stored in the pathology information system. If a thin-plate spline transformation is triggered, the displacement field solution is accelerated using a graphics processor, keeping the processing time within a short range.
[0067] S6. After completing rigid or non-rigid registration, calculate the degree of regional overlap and the maximum edge deviation between the two contours to generate a consistency score.
[0068] Furthermore, the intersection-union ratio, Hausdorff distance, normalized margin consistency index, and comprehensive score are calculated, and all indicators are written to the pathology information system database in real time through the interface.
[0069] S7. Based on the consistency score and the preset threshold, determine whether the wax block and the glass slide are consistent, and output a difference mark and alarm signal when they are inconsistent.
[0070] Furthermore, a threshold for judgment is set in high-throughput mode; if inconsistencies are found, in addition to highlighting in the graphical interface and providing a structured report, the data is automatically pushed to the quality control module through the pathology information system interface, triggering an audible and visual alarm and locking subsequent slide processing; all logs support audit traceability. In this embodiment, multiple samples are typically processed in batches, resulting in a high success rate for consistency verification and a short time to generate difference reports.
[0071] It should be noted that this embodiment, through pathology information system integration, multi-threaded graphics processor acceleration, and adaptive parameter mechanism, achieves an upgrade from single-machine verification to hospital-level batch quality control, expanding the application of this invention in high-throughput pathology laboratories, remote multi-center collaborative diagnosis, and medical quality traceability systems. At the same time, it meets the requirements of the Patent Law and Examination Guidelines that embodiments should reflect industrial applicability and system integration diversity, avoiding the limitations of a single scenario and ensuring that this technical solution covers the entire process of clinical practice, scientific research, and management.
[0072] In summary, this invention constructs a high-precision, fully automated method for verifying the consistency of pathological paraffin blocks and slides by fusing three-dimensional laser scanning with two-dimensional HE staining images. This effectively solves the problems of low efficiency, strong subjectivity, and susceptibility to errors in traditional manual verification methods. The method utilizes the synchronization information of physical slide angles to achieve initial orientation alignment, combines rigid and non-rigid registration strategies to adapt to tissue deformation, and introduces a multi-index fusion scoring mechanism based on cross-union ratio and normalized Hausdorff distance, effectively improving the accuracy and robustness of matching and discrimination. At the same time, when inconsistencies are detected, the system can automatically locate the discrepancy area, generate a structured report, and trigger audible and visual alarms, achieving full-process traceability and auditable quality control.
[0073] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for verifying pathological paraffin blocks and slides using line laser 3D-2D image fusion, characterized in that: include: Obtain three-dimensional point cloud data of the pathological paraffin block section, and reconstruct the macroscopic contour and surface topological features of the paraffin block section. The reconstructed 3D point cloud is orthogonally projected onto a 2D plane to generate a 2D wax block outline image; Acquire transmission images of HE-stained slides corresponding to the paraffin blocks and extract two-dimensional tissue contours of the stained areas; Based on the synchronous rotation angle of the wax block stage and the glass slide stage, the two-dimensional wax block outline image and the two-dimensional tissue outline are initially aligned in spatial orientation. Rigid registration is performed on the two-dimensional wax block contour and the two-dimensional tissue contour after initial alignment, and non-rigid deformation compensation is activated based on the registration result. After completing rigid or non-rigid registration, calculate the degree of regional overlap and the maximum edge deviation between the two contours to generate a consistency score; Based on the consistency score and the preset threshold, it is determined whether the wax block and the glass slide are consistent, and if they are inconsistent, a difference mark and an alarm signal are output.
2. The pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion as described in claim 1, characterized in that: The specific steps for obtaining the three-dimensional point cloud data of the pathological paraffin block section and reconstructing the macroscopic contour and surface topological features of the paraffin block section are as follows: A continuous linear laser beam is projected onto the cut surface of the pathological paraffin block using a line laser contour scanner. The laser beam intersects with the surface of the paraffin block to form a bright line that is deformed due to the surface undulations. Synchronously trigger a high-resolution industrial camera to acquire a grayscale image containing the bright line of the deformation; Based on the pre-completed camera-laser joint calibration results, the camera intrinsic parameter matrix is obtained. And the spatial equation of the laser plane in the camera coordinate system; For each pixel on the laser center line detected in the image The back projection is then transformed into a three-dimensional ray originating from the optical center of the camera; Calculate the intersection of the ray and the laser plane, and use it as a three-dimensional sampling point on the surface of the wax block; Repeat the above process, covering the entire cross-sectional area of the wax block, accumulating all intersections to form a dense three-dimensional point cloud. ,in Indicates the first Spatial coordinates of each sampling point; The point cloud is used to fully characterize the macroscopic geometric contour and microscopic surface topology of the wax block cross-section.
3. The pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion as described in claim 2, characterized in that: The specific steps for orthogonally projecting the reconstructed 3D point cloud onto a 2D plane to generate a 2D wax block contour image are as follows: Based on the physical orientation information of the stage during wax block slicing, determine the normal vector of the slicing surface. ; Build with Let be an orthogonal projection coordinate system with projection direction, whose basis vectors are two mutually orthogonal and perpendicular to each other. unit vector constitute; Point cloud Each point in Calculate its two-dimensional coordinates on the projection plane, the expression is: ; in, For point clouds The centroid is used to eliminate translational offset; Collect all projection points The outermost boundary point sequence is extracted using the convex hull algorithm. ; Connect the boundary points to form a closed polygon, and fill the internal region to generate a binarized two-dimensional wax block outline image; in, and Let the orthogonal basis vectors of the projection plane be the tangent normal vector. Uniquely certain; Let the centroid of the point cloud be defined as ; For the first The coordinates of a three-dimensional point on a two-dimensional projection plane.
4. The pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion as described in claim 3, characterized in that: The specific steps for acquiring the transmission image of the HE-stained slide corresponding to the wax block and extracting the two-dimensional tissue contour of the stained area are as follows: The sectioned and stained glass slide is placed on a transmissive white light illumination stage, and an RGB image of the entire slide is captured using a color industrial camera. ; Will Convert to HSV color space and separate the hue channels. ; right The Otsu adaptive thresholding segmentation method is applied to generate the initial binary image. The stained tissue area is set to 1, and the background is set to 0. right Perform morphological closing operations, first dilate and then erode, to eliminate internal pores and smooth tissue edges; A contour tracing algorithm is used to traverse all connected regions, calculate the area of each region, retain the connected region with the largest area as the effective organization region, and extract the set of external boundary points of the effective organization region to form a two-dimensional organization contour.
5. The pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion as described in claim 4, characterized in that: The initial spatial alignment of the two-dimensional wax block contour image and the two-dimensional tissue contour is performed based on the synchronous rotation angle of the wax block stage and the glass slide stage. The specific steps are as follows: During the wax block slicing process, the stage rotation angle Recorded and stored in real time by a high-precision encoder; Geometric center of the two-dimensional wax block outline image Using the center of rotation, all boundary points on this contour Apply inverse rotation transformation: ; Obtain the corrected wax block contour point set ; in, The actual rotation angle of the stage when slicing the wax block is provided by the encoder; The geometric center of the wax block outline image is calculated as the mean of the coordinates of all outline points. The first after angle compensation Coordinates of the contour points; By placing the corrected contour and the two-dimensional tissue contour in the same image coordinate system, initial orientation alignment based on physical slice angles is achieved.
6. The pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion as described in claim 5, characterized in that: The process involves rigidly registering the initially aligned 2D wax block contour with the 2D tissue contour, and determining whether to initiate non-rigid deformation compensation based on the registration result. The specific steps are as follows: Let the set of points representing the outline of the wax block be... The organizational contour point set is ; The optimal rigid transformation parameters, including the rotation matrix, are solved using the iterative nearest-point algorithm. Translation vector This minimizes the following objective function, expressed as: ; After rigid registration is completed, the maximum unidirectional deviation distance between the two profiles is calculated, and the expression is: ; like If the deformation sensitivity threshold is exceeded, it is determined that there is significant non-rigid deformation, and thin plate spline transformation is initiated. in, It is a two-dimensional rotation matrix that satisfies and ; It is a translation vector; It reflects the degree of the furthest deviation between the profiles after registration and is used to trigger a non-rigid compensation mechanism; The registered wax block contour points are used as the control source point set. The corresponding organizational contour points are used as the target point set. Solve for the TPS displacement field function Local non-rigid corrections are applied to the tissue contour to make it fit the geometry of the wax block better.
7. The pathological paraffin block-slide verification method based on line laser three-dimensional-two-dimensional image fusion as described in claim 6, characterized in that: After completing rigid or non-rigid registration, the degree of regional overlap and maximum edge deviation between the two contours are calculated to generate a consistency score. The specific steps are as follows: The finally registered wax block outline and tissue outline are rasterized into binary mask images of the same resolution. and ; Calculate the intersection-combination ratio index The expression is: ; Simultaneously, calculate the two-way Hausdorff distance. The expression is: ; in, and These are the boundary point sets between the registered wax block and the tissue, respectively; Introducing a normalization factor Defined as the diagonal length of the bounding box of two contours, the normalized edge consistency index is calculated. The expression is: ; By integrating regional and edge information, a comprehensive consistency score is generated, expressed as: ; in, This indicates the number of pixels in the overlapping area of the two masks. Indicates the number of pixels in the union; The value ranges from [0,1], and the larger the value, the higher the degree of overlap between regions; The Hausdorff distance reflects the edge deviation of the two profiles in the worst-case scenario. For scale normalization parameters, ensure It has scale invariance; These are preset weighting coefficients used to balance the contributions of the region and the edge.
8. The method for pathological paraffin block-slide verification using line laser three-dimensional-two-dimensional image fusion as described in claim 7, characterized in that: The steps for determining whether the wax block and the glass slide are consistent based on the consistency score and a preset threshold, and outputting a difference marker and alarm signal when they are inconsistent, are as follows: Set a consistency score threshold ; like ≥ If the system determines that the current paraffin block and glass slide are from the same source, it records the successful verification status and allows the patient to proceed to the subsequent pathological diagnosis process. like < The system then overlays the display in the graphical user interface. and Highlighted in red The area is highlighted in blue. area; Generate a structured verification anomaly report, including the set of pixel coordinates of the discrepancy regions and the intersection-union ratio (IU). Hausdorff distance Normalized scoring Verify the timestamp, operator identification, and device number; Simultaneously trigger the audible and visual alarm device, emitting a continuous buzzing sound and flashing red light to prompt the operator to immediately verify the wax block number, slide label, and sectioning order; All verification results and anomaly logs are automatically stored in the hospital's pathology information system, supporting audit traceability and quality control analysis.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the pathological paraffin block-slide verification method of line laser three-dimensional-two-dimensional image fusion as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the pathological paraffin block-slide verification method of line laser three-dimensional-two-dimensional image fusion as described in any one of claims 1 to 8.