Method and device for calculating scanning field coordinates in digital slide scanner

By setting parameters and calculation steps in the digital slice scanner to generate a scan field of view list that is suitable for different conditions, it solves the problem of difficult to adapt to different objective lenses and equipment in the prior art, and realizes efficient scanning field coordinate calculation and preview map generation.

CN114972476BActive Publication Date: 2025-04-25WINMEDIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210537241.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-17
Publication Date
2025-04-25
Estimated Expiration
2042-05-17

AI Technical Summary

Technical Problem

Existing digital slice scanners are difficult to adapt to the scanning requirements of different objective lenses, motors, lead screws and camera scanners, resulting in the inability to effectively generate previews and scan field of view coordinates that meet different conditions.

Method used

By setting the digital slice scanner parameters, calculate the number of movement steps of the slice in the scanner, calculate the width and height of the panoramic microscope image and preview image, and calculate the scan field of view list using the external quadrilateral of the sample area, thereby obtaining the vertical and horizontal steps coordinates of each scan field of view.

Benefits of technology

The preview diagram and scanner movement correspondence between the preview diagram and scanner movement for different objective lenses, motors, lead screws and camera scanners is realized, which meets the scanning requirements under different conditions and improves the applicability and efficiency of the scanner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972476B_ABST
    Figure CN114972476B_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for calculating the coordinates of a scanning field of view in a digital slice scanner. The method comprises: setting parameters of the digital slice scanner and returning the X-axis and Y-axis of the scanner to zero; moving the Y-axis motor to make the objective lens be located at the longitudinal center of the slice, and moving the X-axis motor to determine the motor position when the objective lens is located at the left and right ends of the slice; making the objective lens be located at the transverse center of the slice; determining the motor position when the objective lens is located at the upper and lower ends of the slice; calculating the transverse and longitudinal movement steps of the slice in the digital slice scanner; calculating the width and height of a panoramic microscopic image in the digital slice scanner; calculating the width and height of a preview image; calculating a sample area of ​​the scanning field of view; calculating a scanning field of view list by using an external quadrilateral of the sample area in the preview image; segmenting the scanner step position information of each scanning field of view from the preview image, and obtaining the longitudinal and transverse step coordinates of the current field of view.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method and a device for calculating scanning field coordinates in a digital slice scanner, and in particular, belongs to the technical field of digital slice image processing. Background Art

[0002] A digital slide scanner based on an area array camera is a device that uses an area array camera to collect images, stitch the images, and finally form a whole-view digital pathology slide (WSIs). This device first needs to collect a preview image of the original slide, use the preview image to obtain the field of view information of the microscopic scanning part, collect the corresponding image for each field of view that needs to be collected, and stitch the images to form a digital pathology slide.

[0003] The preview image is taken with a preview camera, and its size is greatly different from the final digital pathology slice. This difference is related to the magnification of the objective lens and the size of the interface (the interface has 0.63x, 1x, etc.); at the same time, the scanner is moved by a stepper motor, and the number of steps for each field of view to move is related to the selected lead screw; it is also related to the pixel size of the camera. All scanning fields of view need to be obtained from the preview image, so the scanner's magnification, moving position and other information must have a corresponding relationship with the preview image; this correspondence must be able to adapt to different objective lenses, magnifications, and different motors and lead screws.

[0004] In order to meet the scanning requirements of different objective lens magnifications, different motors, different lead screws, and different camera scanners, the present invention proposes a new preview image generation method based on the corresponding relationship between the preview image and the scanner. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes a method and device for calculating the scanning field coordinates in a digital slide scanner, which can meet the scanning requirements of different objective lens magnifications, different motors, different lead screws, and different camera scanners.

[0006] The technical solution adopted by the present invention to solve the technical problem is:

[0007] In a first aspect, an embodiment of the present invention provides a method for calculating scanning field coordinates in a digital slide scanner, comprising:

[0008] Set the digital slide scanner parameters and return the scanner's X-axis and Y-axis to zero;

[0009] Move the Y-axis motor to place the objective lens in the longitudinal center of the slice, and move the X-axis motor to determine the motor position when the objective lens is at the left and right ends of the slice;

[0010] Move the X-axis motor to place the objective lens in the horizontal center of the slice, and move the Y-axis motor to determine the motor position when the objective lens is at the upper and lower ends of the slice;

[0011] Count the number of horizontal and vertical steps that the slice moves in the digital slide scanner;

[0012] Calculate the width and height of panoramic microscopic images from digital slide scanners;

[0013] Calculate the width and height of the preview image;

[0014] Calculate the sample area of ​​the scan field of view;

[0015] Calculate the scanning field of view list using the circumscribed quadrilateral of the sample area in the preview image;

[0016] The scanner step position information of each scanning field of view is segmented from the preview image, and the vertical and horizontal step coordinates of the current field of view are obtained.

[0017] As a possible implementation method of this embodiment, the setting of digital slide scanner parameters includes: the objective lens magnification used by the digital slide scanner is M; the interface magnification is I; the pixel size of the scanning camera is A microns / pixel, and the number of pixels per micron corresponding to the scanning microscopic part is P=M*I / A; the subdivision of the stepper motor is L; the lead of the screw is S; and the distance the motor moves forward each step is D=S / L.

[0018] As a possible implementation of this embodiment, the moving the Y-axis motor to make the objective lens be located in the longitudinal center of the slice, and the moving the X-axis motor to determine the motor position when the objective lens is located at the left and right ends of the slice, include:

[0019] Place the slice into the digital slice scanner, move the Y-axis motor to place the objective lens in the longitudinal center of the slice; move the X-axis motor so that the microscope part of the scanner is at the leftmost end of the slice, and record the motor position at this time as MotorLeft; continue to move the X-axis motor so that the microscope part of the scanner is at the rightmost end of the slice, and record the motor position at this time as MotorRight.

[0020] As a possible implementation of this embodiment, the moving of the X-axis motor to make the objective lens located in the horizontal center of the slice, and the moving of the Y-axis motor to determine the motor positions when the objective lens is located at the upper and lower ends of the slice include:

[0021] Move the X-axis motor so that the objective lens is in the horizontal center of the slice, move the Y-axis motor so that the microscope part of the scanner is at the top of the slice, and record the motor position at this time as MotorTop; continue to move the Y-axis motor so that the microscope part of the scanner is at the bottom of the slice, and record the motor position at this time as MotorBottom.

[0022] As a possible implementation of this embodiment, the step of calculating the number of horizontal and vertical movement steps of the slice in the digital slice scanner includes:

[0023] Calculate the number of steps WidthStep that a slice moves laterally in a digital slide scanner:

[0024] WidthStep=MotorRight-MotorLeft;

[0025] Calculate the number of steps HeightStep that a slice moves vertically in a digital slide scanner:

[0026] HeightStep=MotorBottom-MotorTop.

[0027] As a possible implementation of this embodiment, the calculating the width and height of the panoramic microscopic image in the digital slide scanner includes:

[0028] Calculate the width ImageWidth of a panoramic microscopy image from a digital slide scanner:

[0029] ImageWidth = WidthStep * P * D;

[0030] Calculate the height ImageHeight of a panoramic microscopy image from a digital slide scanner:

[0031] ImageHeight=HeightStep*P*D.

[0032] As a possible implementation of this embodiment, the calculating the width and height of the preview image includes:

[0033] Set the number of pixels of the panoramic microscopic image corresponding to each pixel of the preview image to M;

[0034] Calculate the width of the preview image PreivewWidth: PreivewWidth = ImageWidth / M;

[0035] Calculate the preview image height PreviewHeight:

[0036] PreviewHeight=ImageHeight / M.

[0037] As a possible implementation of this embodiment, the calculating of the sample area of ​​the scanning field of view includes:

[0038] Set the overlap size of each scanning microscope field to OverlapSize; the width of the scanning camera image to ScanImageWidth, and the height to ScanImageHeight;

[0039] The number of horizontal movement steps for each field of view is:

[0040] ViewWidthStep=(ScanImageWidth-OverlapSize) / (P*D);

[0041] The number of vertical movement steps for each field of view is:

[0042] ViewHeightStep=(ScanImageHeight-OverlapSize) / (P*D);

[0043] The number of horizontal steps corresponding to each pixel in the preview image is:

[0044] WidthStepPerPixel=WidthStep / PreivewWidth;

[0045] The number of steps corresponding to each pixel in the preview image is:

[0046] HeightStepPerPixel=HeightStep / PreivewWidth;

[0047] The width of each field of view on the preview image is:

[0048] ViewWidthPreview=ViewWidthStep / WidthStepPerPixel;

[0049] The height of each field of view on the preview image is:

[0050] ViewHeightPreview=ViewHeightStep / HeightStepPerPixel.

[0051] As a possible implementation of this embodiment, the calculation of the scanning field of view list using the circumscribed quadrilateral of the sample area in the preview image includes:

[0052] The starting position of the circumscribed quadrilateral of the sample area in the preview image is: StartX, StartY; the width and height of the circumscribed quadrilateral are SampleWidth and SampleHeight respectively;

[0053] The horizontal starting number of steps of the circumscribed quadrilateral is:

[0054] StartXStep=MotorLeft-StartX*WidthStepPerPixel;

[0055] The number of vertical starting steps of the circumscribed quadrilateral is:

[0056] StartYStep=MotorTop-StartY*HeightStepPerPixe+;

[0057] The number of horizontal steps of the circumscribed quadrilateral is:

[0058] WidthStep=SampleWidth*WidthStepPerPixel;

[0059] The number of vertical steps of the circumscribed quadrilateral is:

[0060] HeightStep=StartYStep*HeightStepPerPixel.

[0061] As a possible implementation of this embodiment, segmenting the scanner step position information of each scanning field of view from the preview image, obtaining the vertical and horizontal step coordinates of the current field of view, and segmenting the scanner step position information of each field of view to be scanned from the preview image, includes:

[0062] Double loop from horizontal and vertical steps, increasing horizontal width step WidthStep and vertical height step HeightStep each time;

[0063] Get the horizontal and vertical step coordinates (XStep, YStep) of the current field of view;

[0064] Determine whether the area corresponding to the binary preview image is less than 255. If it is less than 255, add the current view to the ListView, otherwise ignore it;

[0065] The next field of view search is performed again until all scanning fields of view are searched.

[0066] In a second aspect, an embodiment of the present invention provides a device for calculating the coordinates of a scanning field of view in a digital slide scanner, comprising:

[0067] A parameter setting module is used to set the parameters of the digital slide scanner and reset the X-axis and Y-axis of the scanner to zero;

[0068] The lateral movement module is used to move the Y-axis motor to make the objective lens be located in the longitudinal center of the slice, and to move the X-axis motor to determine the motor position when the objective lens is located at the left and right ends of the slice;

[0069] The longitudinal movement module is used to move the X-axis motor to place the objective lens in the horizontal center of the slice, and to move the Y-axis motor to determine the motor position when the objective lens is at the upper and lower ends of the slice;

[0070] A moving step number calculation module is used to calculate the horizontal and vertical moving steps of the slice in the digital slice scanner;

[0071] A microscopic image calculation module is used to calculate the width and height of a panoramic microscopic image in a digital slide scanner;

[0072] A preview image calculation module is used to calculate the width and height of the preview image;

[0073] A sample area calculation module, used to calculate the sample area of ​​the scanning field of view;

[0074] A field of view list calculation module, used to calculate a scanning field of view list using the circumscribed quadrilateral of the sample area in the preview image;

[0075] The vertical and horizontal step coordinate acquisition module is used to segment the scanner step position information of each scanning field of view from the preview image and obtain the vertical and horizontal step coordinates of the current field of view.

[0076] The technical solution of the embodiment of the present invention may have the following beneficial effects:

[0077] A method for calculating the coordinates of the scanning field of view in a digital slide scanner according to the technical solution of an embodiment of the present invention includes: setting the parameters of the digital slide scanner and returning the X-axis and Y-axis of the scanner to zero; moving the Y-axis motor so that the objective lens is in the longitudinal center of the slice, moving the X-axis motor to determine the motor position when the objective lens is at the left and right ends of the slice; making the objective lens in the transverse center of the slice; determining the motor position when the objective lens is at the upper and lower ends of the slice; calculating the number of transverse and longitudinal movement steps of the slice in the digital slide scanner; calculating the width and height of the panoramic microscopic image in the digital slide scanner; calculating the width and height of the preview image; calculating the sample area of ​​the scanning field of view; calculating the scanning field of view list using the circumscribed quadrilateral of the sample area in the preview image; segmenting the scanner step position information of each scanning field of view from the preview image to obtain the longitudinal and transverse step coordinates of the current field of view. The present invention proposes a method for the correspondence between the preview image and the scanner movement of different objective lenses, different interfaces, different motors, different lead screws, and different scanning cameras in an area array camera scanner, which meets the scanning requirements of different objective lens magnifications, different motors, different lead screws, and different camera scanners. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 is a flow chart of a method for calculating scanning field coordinates in a digital slide scanner according to an exemplary embodiment;

[0079] Figure 2 It is a structural diagram of a device for calculating scanning field coordinates in a digital slide scanner according to an exemplary embodiment. DETAILED DESCRIPTION

[0080] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:

[0081] In order to clearly illustrate the technical features of the present solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The disclosure below provides many different embodiments or examples for realizing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. In addition, the present invention may repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed. It should be noted that the components illustrated in the accompanying drawings are not necessarily drawn to scale. The present invention omits the description of known components and processing techniques and processes to avoid unnecessary limitations on the present invention.

[0082] Figure 1 FIG. 1 is a flow chart showing a method for calculating the coordinates of the scanning field of view in a digital slide scanner according to an exemplary embodiment. Figure 1 As shown, an embodiment of the present invention provides a method for calculating the scanning field coordinates in a digital slide scanner, comprising:

[0083] Set the digital slide scanner parameters and return the scanner's X-axis and Y-axis to zero;

[0084] Move the Y-axis motor to place the objective lens in the longitudinal center of the slice, and move the X-axis motor to determine the motor position when the objective lens is at the left and right ends of the slice;

[0085] Move the X-axis motor to place the objective lens in the horizontal center of the slice, and move the Y-axis motor to determine the motor position when the objective lens is at the upper and lower ends of the slice;

[0086] Count the number of horizontal and vertical steps that the slice moves in the digital slide scanner;

[0087] Calculate the width and height of panoramic microscopic images from digital slide scanners;

[0088] Calculate the width and height of the preview image;

[0089] Calculate the sample area of ​​the scan field of view;

[0090] Calculate the scanning field of view list using the circumscribed quadrilateral of the sample area in the preview image;

[0091] The scanner step position information of each scanning field of view is segmented from the preview image, and the vertical and horizontal step coordinates of the current field of view are obtained.

[0092] As a possible implementation method of this embodiment, the setting of digital slide scanner parameters includes: the objective lens magnification used by the digital slide scanner is M; the interface magnification is I; the pixel size of the scanning camera is A microns / pixel, and the number of pixels per micron corresponding to the scanning microscopic part is P=M*I / A; the subdivision of the stepper motor is L; the lead of the screw is S; and the distance the motor moves forward each step is D=S / L.

[0093] As a possible implementation of this embodiment, the moving the Y-axis motor to make the objective lens be located in the longitudinal center of the slice, and the moving the X-axis motor to determine the motor position when the objective lens is located at the left and right ends of the slice, include:

[0094] Place the slice into the digital slice scanner, move the Y-axis motor to place the objective lens in the longitudinal center of the slice; move the X-axis motor so that the microscope part of the scanner is at the leftmost end of the slice, and record the motor position at this time as MotorLeft; continue to move the X-axis motor so that the microscope part of the scanner is at the rightmost end of the slice, and record the motor position at this time as MotorRight.

[0095] As a possible implementation of this embodiment, the moving of the X-axis motor to make the objective lens located in the horizontal center of the slice, and the moving of the Y-axis motor to determine the motor positions when the objective lens is located at the upper and lower ends of the slice include:

[0096] Move the X-axis motor so that the objective lens is in the horizontal center of the slice, move the Y-axis motor so that the microscope part of the scanner is at the top of the slice, and record the motor position at this time as MotorTop; continue to move the Y-axis motor so that the microscope part of the scanner is at the bottom of the slice, and record the motor position at this time as MotorBottom.

[0097] As a possible implementation of this embodiment, the step of calculating the number of horizontal and vertical movement steps of the slice in the digital slice scanner includes:

[0098] Calculate the number of steps WidthStep that a slice moves laterally in a digital slide scanner:

[0099] WidthStep=MotorRight-MotorLeft;

[0100] Calculate the number of steps HeightStep that a slice moves vertically in a digital slide scanner:

[0101] HeightStep=MotorBottom-MotorTop.

[0102] As a possible implementation of this embodiment, the calculating the width and height of the panoramic microscopic image in the digital slide scanner includes:

[0103] Calculate the width ImageWidth of a panoramic microscopy image from a digital slide scanner:

[0104] ImageWidth = WidthStep * P * D;

[0105] Calculate the height ImageHeight of a panoramic microscopy image from a digital slide scanner:

[0106] ImageHeight=HeightStep*P*D.

[0107] As a possible implementation of this embodiment, the calculating the width and height of the preview image includes:

[0108] Set the number of pixels of the panoramic microscopic image corresponding to each pixel of the preview image to M;

[0109] Calculate the width of the preview image PreivewWidth: PreivewWidth = ImageWidth / M;

[0110] Calculate the preview image height PreviewHeight:

[0111] PreviewHeight=ImageHeight / M.

[0112] As a possible implementation of this embodiment, the calculating of the sample area of ​​the scanning field of view includes:

[0113] Set the overlap size of each scanning microscope field to OverlapSize; the width of the scanning camera image to ScanImageWidth, and the height to ScanImageHeight;

[0114] The number of horizontal movement steps for each field of view is:

[0115] ViewWidthStep=(ScanImageWidth-OverlapSize) / (P*D);

[0116] The number of vertical movement steps for each field of view is:

[0117] ViewHeightStep=(ScanImageHeight-OverlapSize) / (P*D);

[0118] The number of horizontal steps corresponding to each pixel in the preview image is:

[0119] WidthStepPerPixel=WidthStep / PreivewWidth;

[0120] The number of steps corresponding to each pixel in the preview image is:

[0121] HeightStepPerPixel=HeightStep / PreivewWidth;

[0122] The width of each field of view on the preview image is:

[0123] ViewWidthPreview=ViewWidthStep / WidthStepPerPixel;

[0124] The height of each field of view on the preview image is:

[0125] ViewHeightPreview=ViewHeightStep / HeightStepPerPixel.

[0126] As a possible implementation of this embodiment, the calculation of the scanning field of view list using the circumscribed quadrilateral of the sample area in the preview image includes:

[0127] The starting position of the circumscribed quadrilateral of the sample area in the preview image is: StartX, StartY; the width and height of the circumscribed quadrilateral are SampleWidth and SampleHeight respectively;

[0128] The horizontal starting number of steps of the circumscribed quadrilateral is:

[0129] StartXStep=MotorLeft-StartX*WidthStepPerPixel;

[0130] The number of vertical starting steps of the circumscribed quadrilateral is:

[0131] StartYStep=MotorTop-StartY*HeightStepPerPixe+;

[0132] The number of horizontal steps of the circumscribed quadrilateral is:

[0133] WidthStep=SampleWidth*WidthStepPerPixel;

[0134] The number of vertical steps of the circumscribed quadrilateral is:

[0135] HeightStep=StartYStep*HeightStepPerPixel.

[0136] As a possible implementation of this embodiment, segmenting the scanner step position information of each scanning field of view from the preview image, obtaining the vertical and horizontal step coordinates of the current field of view, and segmenting the scanner step position information of each field of view to be scanned from the preview image, includes:

[0137] Double loop from horizontal and vertical steps, increasing horizontal width step WidthStep and vertical height step HeightStep each time;

[0138] Get the horizontal and vertical step coordinates (XStep, YStep) of the current field of view;

[0139] Determine whether the area corresponding to the binary preview image is less than 255. If it is less than 255, add the current view to the ListView, otherwise ignore it;

[0140] The next field of view search is performed again until all scanning fields of view are searched.

[0141] like Figure 2 As shown, an embodiment of the present invention provides a device for calculating the coordinates of a scanning field of view in a digital slide scanner, comprising:

[0142] A parameter setting module is used to set the parameters of the digital slide scanner and reset the X-axis and Y-axis of the scanner to zero;

[0143] The lateral movement module is used to move the Y-axis motor to place the objective lens in the longitudinal center of the slice, and to move the X-axis motor to determine the motor position when the objective lens is at the left and right ends of the slice;

[0144] The longitudinal movement module is used to move the X-axis motor to place the objective lens in the horizontal center of the slice, and to move the Y-axis motor to determine the motor position when the objective lens is at the upper and lower ends of the slice;

[0145] A moving step number calculation module is used to calculate the horizontal and vertical moving steps of the slice in the digital slice scanner;

[0146] A microscopic image calculation module is used to calculate the width and height of a panoramic microscopic image in a digital slide scanner;

[0147] A preview image calculation module is used to calculate the width and height of the preview image;

[0148] A sample area calculation module, used to calculate the sample area of ​​the scanning field of view;

[0149] A field of view list calculation module, used to calculate a scanning field of view list using the circumscribed quadrilateral of the sample area in the preview image;

[0150] The vertical and horizontal step coordinate acquisition module is used to segment the scanner step position information of each scanning field of view from the preview image and obtain the vertical and horizontal step coordinates of the current field of view.

[0151] The specific process of calculating the coordinates of the scanning field of view of a digital slide scanner by using the device for calculating the coordinates of the scanning field of view in the digital slide scanner of this embodiment is as follows.

[0152] 1. The objective lens magnification of the digital slide scanner is M = 20 times; the magnification of the interface is I = 0.63 times; the pixel size of the scanning camera is A = 3.45 microns / pixel. Under the current hardware environment, the calculation formula for the number of pixels per micron corresponding to the scanning microscopic part is: P (unit: pixel / micron) = M*I / A = 20*0.63 / 3.45 = 3.65217 pixels / micron;

[0153] 2. The subdivision of the stepper motor is L (step / turn) = 3200 steps / turn; the lead of the screw is S (micrometer, that is, the screw advances S micrometers for one rotation of 360 degrees) = 3180 micrometers / turn; the distance the motor advances per step is: D (unit: micrometer / step) = S / L = 3180 / 3200 = 0.99375 micrometers / step;

[0154] 3. Return the X and Y axes of the scanner to zero; place the slice into the digital slice scanner, move the Y axis motor so that the objective lens is roughly in the longitudinal center of the slice; move the X axis motor, observe the microscopic part of the scanner, to the leftmost end of the slice, and record the motor position at this time as MotorLeft (unit: step) = 28800 steps; continue to move the X axis motor to the rightmost end of the slice, and record the motor position at this time as MotorRight (unit: step) = 4600 steps;

[0155] Move the X-axis motor so that the objective lens is roughly in the horizontal center of the slice; move the Y-axis motor, observe the microscopic part of the scanner, to the top of the slice, and record the motor position at this time as MotorTop (unit: step) = 45500 steps; continue to move the Y-axis motor to the bottom of the slice, and record the motor position at this time as MotorBottom (unit: step) = 500 steps;

[0156] Calculate the number of horizontal and vertical steps a slice moves in a digital slide scanner:

[0157] Number of lateral movement steps: WidthStep (unit: step) = MotorRight - MotorLeft = 28800 - 4600 = 24200 steps;

[0158] Number of vertical movement steps: HeightStep (unit: step) = MotorBottom-MotorTop = 45500-500 = 45000 steps;

[0159] 4. Calculate the width and height of the panoramic microscopic image in the digital slide scanner:

[0160] ImageWidth (unit: pixel) = WidthStep*P*D = 24200*3.65217*0.99375 = 87830;

[0161] ImageHeight (unit: pixel) = HeightStep*P*D = 45000*3.65217*0.99375 = 163320;

[0162] Set the number of pixels of the panoramic microscopic image corresponding to each pixel of the preview image to: M = 256 (the value range is (256, 512). A value that is too small or too large will cause the preview image to be too large or too small);

[0163] Calculate the width and height of the preview image:

[0164] Width: PreivewWidth (unit: pixel) = ImageWidth / M = 87830 / 256 = 343;

[0165] Height: PreviewHeight (unit: pixel) = ImageHeight / M = 163320 / 256 = 637;

[0166] 5. Set the overlap size of each scanning microscopic field of view to OverlapSize = 150 (range: (100, 200), unit: pixel); the width of the image of the scanning camera is: ScanImageWidth = 2448, and the height is: ScanImageHeight = 2048;

[0167] Number of horizontal steps per field of view:

[0168] ViewWidthStep=(ScanImageWidth-OverlapSize) / (P*D)=(2448-150) / (3.65217*0.99375)=2298 / 3.62934=633;

[0169] Number of vertical movement steps per field of view:

[0170] ViewHeightStep=(ScanImageHeight-OverlapSize) / (P*D)=(2048-150) / (3.65217*0.99375)=1898 / 3.62934=523;

[0171] The number of horizontal steps corresponding to each pixel in the preview image:

[0172] WidthStepPerPixel=WidthStep / PreivewWidth=24200 / 343=70.5539;

[0173] The number of steps corresponding to each pixel in the preview image vertically:

[0174] HeightStepPerPixel=HeightStep / PreivewWidth=45000 / 637=70.6436;

[0175] The width of each field of view on the preview image:

[0176] ViewWidthPreview=ViewWidthStep / WidthStepPerPixel=633 / 70.5539=9;

[0177] The height of each field of view on the preview image:

[0178] ViewHeightPreview=ViewHeightStep / HeightStepPerPixel=523 / 70.6436=8;

[0179] The scanning field of view list is calculated using the circumscribed quadrilateral of the sample area in the preview image calculated and identified by the above formula: the starting position of the circumscribed quadrilateral of the sample area in the preview image is: StartX=30, StartY=100; the width and height of the circumscribed quadrilateral are: SampleWidth=88, SampleHeight=128;

[0180] The starting number of steps for the circumscribed quadrilateral is:

[0181] StartXStep=

[0182] MotorLeft-StartX*WidthStepPerPixel=28800-30*70.5539=26683;

[0183] StartYStep=

[0184] MotorTop-StartY*HeightStepPerPixe=45500-100*70.6436=38435;

[0185] The horizontal and vertical steps of the circumscribed quadrilateral are:

[0186] WidthStep=SampleWidth*WidthStepPerPixel=88*70.5539=6208;

[0187] HeightStep=StartYStep*HeightStepPerPixel=128*70.6436=9042;

[0188] 6. Segment the position information of the scanner steps for each field of view that needs to be scanned from the preview image;

[0189] Step 1: XStep=StartXStep=26683; YStep=StartYStep=38435;

[0190] Step 2: StartXStep-WidthStep=26683-6208=20475; if XStep>=20475, go to step 3;

[0191] Step 3: StartYStep-HeightStep=38435-9042=29393; if YStep>=29393, go to step 4;

[0192] Step 4: The rectangular area Rect of the field of view in the preview image is:

[0193] Rect.X=(MotorLeft-XStep) / WidthStepPerPixel=(28800-26683) / 70.6436=29;

[0194] Rect.Y=(MotorTop-YStep) / HeightStepPerPixel=(45500-38435) / 70.5539=100;

[0195] Rect.Width=ViewWidthPreview=9;

[0196] Rect.Height=ViewHeightPreview=8;

[0197] Go to step 5;

[0198] Step 5: The color of the area where Rect is located in the binary preview image is 255; if it is equal to 255, go to step 7;

[0199] Step 7: YStep = YStep - ViewWidthStep = 38435 - 523 = 37912; Go to step 3;

[0200] Step 3: StartYStep-HeightStep=38435-9042=29393; if YStep>=29393, go to step 4;

[0201] Step 4: The rectangular area Rect of the field of view in the preview image is:

[0202] Rect.X=(MotorLeft-XStep) / WidthStepPerPixel=(28800-26683) / 70.6436=29;

[0203] Rect.Y=(MotorTop-YStep) / HeightStepPerPixel=(45500-37912) / 70.5539=108;

[0204] Go to step 5;

[0205] Step 5: The color of the area where the Rect is located in the binary preview image is 243; if it is less than 255, go to step 6;

[0206] Step 6: Add the coordinates (XStep, YStep) to the scan list ListView; go to step 7;

[0207] According to the above process, traverse the X and Y axes to obtain the final scan list ListView; when Xstep in step 8 continues to decrease, go to step 2: XStep>=StartX-WidthStep, and then go to step 9 to obtain the end of the scan field of view list.

[0208] The above calculation formula is a detailed step-by-step calculation method, which can be simplified when used in the final field of view list calculation.

[0209] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for calculating the coordinates of a scanning field of view in a digital slide scanner, characterized in that: include: Set the digital slide scanner parameters and return the scanner's X-axis and Y-axis to zero; Move the Y-axis motor to place the objective lens in the longitudinal center of the slice, and move the X-axis motor to determine the motor position when the objective lens is at the left and right ends of the slice; Move the X-axis motor to place the objective lens in the horizontal center of the slice, and move the Y-axis motor to determine the motor position when the objective lens is at the upper and lower ends of the slice; Count the number of horizontal and vertical steps that the slice moves in the digital slide scanner; Calculate the width and height of panoramic microscopic images from digital slide scanners; Calculate the width and height of the preview image; Calculate the sample area of ​​the scan field of view; Calculate the scanning field of view list using the circumscribed quadrilateral of the sample area in the preview image; The scanner step position information of each scanning field of view is segmented from the preview image, and the vertical and horizontal step coordinates of the current field of view are obtained.

2. The method for calculating the scanning field coordinates in a digital slide scanner according to claim 1, characterized in that: The parameters of the digital slide scanner are set as follows: the objective lens magnification used by the digital slide scanner is M1; the interface magnification is I; the pixel size of the scanning camera is A micrometers / pixel, and the number of pixels per micrometer corresponding to the scanning microscopic part is P=M1*I / A; the subdivision of the stepper motor is L; the lead of the lead screw is S; and the distance the motor moves forward per step is D=S / L.

3. The method for calculating the scanning field coordinates in a digital slide scanner according to claim 2, characterized in that: The moving of the Y-axis motor to make the objective lens be located at the longitudinal center of the slice, and the moving of the X-axis motor to determine the motor position when the objective lens is located at the left and right ends of the slice, include: Place the slice into the digital slice scanner, move the Y-axis motor to place the objective lens in the longitudinal center of the slice; move the X-axis motor so that the microscope part of the scanner is at the leftmost end of the slice, and record the motor position at this time as MotorLeft; continue to move the X-axis motor so that the microscope part of the scanner is at the rightmost end of the slice, and record the motor position at this time as MotorRight.

4. The method for calculating the scanning field coordinates in a digital slide scanner according to claim 3, characterized in that: The moving of the X-axis motor to make the objective lens be located in the horizontal center of the slice, and the moving of the Y-axis motor to determine the motor positions when the objective lens is located at the upper and lower ends of the slice, include: Move the X-axis motor so that the objective lens is in the horizontal center of the slice, move the Y-axis motor so that the microscope part of the scanner is at the top of the slice, and record the motor position at this time as MotorTop; continue to move the Y-axis motor so that the microscope part of the scanner is at the bottom of the slice, and record the motor position at this time as MotorBottom.

5. The method for calculating the scanning field coordinates in a digital slide scanner according to claim 4, characterized in that: The step of calculating the number of horizontal and vertical movement of the slice in the digital slice scanner includes: Calculate the number of steps WidthStep that a slice moves laterally in a digital slide scanner: WidthStep=MotorRight-MotorLeft; Calculate the number of steps HeightStep that a slice moves vertically in a digital slide scanner: HeightStep=MotorBottom-MotorTop.

6. The method for calculating the scanning field coordinates in a digital slide scanner according to claim 5, characterized in that: The method of calculating the width and height of the panoramic microscopic image in the digital slide scanner comprises: Calculate the width ImageWidth of a panoramic microscopy image from a digital slide scanner: ImageWidth = WidthStep*P*D; Calculate the height ImageHeight of a panoramic microscopy image from a digital slide scanner: ImageHeight= HeightStep*P*D; The calculation of the width and height of the preview image includes: Set the number of pixels of the panoramic microscopic image corresponding to each pixel of the preview image to M2; Calculate the width of the preview image PreivewWidth: PreivewWidth = ImageWidth / M2; Calculate the preview image height PreviewHeight: PreviewHeight= ImageHeight / M2.

7. The method for calculating the scanning field coordinates in a digital slide scanner according to claim 6, characterized in that: The calculation of the sample area of ​​the scanning field of view includes: Set the overlap size of each scanning microscope field to OverlapSize; the width of the scanning camera image to ScanImageWidth, and the height to ScanImageHeight; The number of horizontal movement steps for each field of view is: ViewWidthStep=(ScanImageWidth-OverlapSize) / (P*D); The number of vertical movement steps for each field of view is: ViewHeightStep= (ScanImageHeight -OverlapSize) / (P*D); The number of horizontal steps corresponding to each pixel in the preview image is: WidthStepPerPixel = WidthStep / PreivewWidth; The number of steps corresponding to each pixel in the preview image is: HeightStepPerPixel =HeightStep / PreivewWidth; The width of each field of view on the preview image is: ViewWidthPreview=ViewWidthStep / WidthStepPerPixel; The height of each field of view on the preview image is: ViewHeightPreview=ViewHeightStep / HeightStepPerPixel.

8. The method for calculating the scanning field coordinates in a digital slide scanner according to claim 7, characterized in that: The method of calculating the scanning field of view list by using the circumscribed quadrilateral of the sample area in the preview image includes: The starting position of the circumscribed quadrilateral of the sample area in the preview image is: StartX, StartY; the width and height of the circumscribed quadrilateral are SampleWidth and SampleHeight respectively; The horizontal starting number of steps of the circumscribed quadrilateral is: StartXStep= MotorLeft-StartX*WidthStepPerPixel; The number of vertical starting steps of the circumscribed quadrilateral is: StartYStep= MotorTop-StartY*HeightStepPerPixel; The horizontal width steps of the circumscribed quadrilateral are: WidthStepPer= SampleWidth*WidthStepPerPixel; The number of vertical height steps of the circumscribed quadrilateral is: HeightStepPer= StartYStep* HeightStepPerPixel.

9. The method for calculating the scanning field coordinates in a digital slide scanner according to claim 8, characterized in that: The stepping out of each scanning field of view from the preview image to obtain the vertical and horizontal stepping coordinates of the current field of view includes: Double loop from horizontal and vertical steps, increasing horizontal width step number WidthStepPer and vertical height step number HeightStepPer each time; Get the horizontal and vertical step coordinates (XStep, YStep) of the current field of view; Determine whether the area corresponding to the binary preview image is less than 255. If it is less than 255, add the current view to the ListView, otherwise ignore it; The next field of view search is performed again until all scanning fields of view are searched.

10. A device for calculating the coordinates of the scanning field of view in a digital slide scanner, characterized in that: include: A parameter setting module is used to set the parameters of the digital slide scanner and reset the X-axis and Y-axis of the scanner to zero; The lateral movement module is used to move the Y-axis motor to place the objective lens in the longitudinal center of the slice, and to move the X-axis motor to determine the motor position when the objective lens is at the left and right ends of the slice; The longitudinal movement module is used to move the X-axis motor to place the objective lens in the horizontal center of the slice, and to move the Y-axis motor to determine the motor position when the objective lens is at the upper and lower ends of the slice; A moving step number calculation module is used to calculate the horizontal and vertical moving steps of the slice in the digital slice scanner; A microscopic image calculation module is used to calculate the width and height of a panoramic microscopic image in a digital slide scanner; A preview image calculation module is used to calculate the width and height of the preview image; A sample area calculation module, used to calculate the sample area of ​​the scanning field of view; A field of view list calculation module, used to calculate a scanning field of view list using the circumscribed quadrilateral of the sample area in the preview image; The vertical and horizontal step coordinate acquisition module is used to segment the scanner step position information of each scanning field of view from the preview image and obtain the vertical and horizontal step coordinates of the current field of view.

Citation Information

Patent Citations

  • Pathological section double-objective-lens self-adaptive scanning control method and pathological section double-objective-lens self-adaptive scanning control system

    CN112508952A

  • Scanning electron microscope

    JP1996129985A