Medical imaging positioning line testing method, device, equipment and storage medium

By reading and comparing the information of the positioning map and the slice map in the medical imaging image sequence, the spatial position of the positioning line is calculated and verified, which solves the problem of inaccurate positioning line testing in the existing technology and achieves more efficiency and high quality. positioning line test.

CN115082373BActive Publication Date: 2024-10-22WINNING HEALTH TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110273729.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-12
Publication Date
2024-10-22
Estimated Expiration
2041-03-12

AI Technical Summary

Technical Problem

The existing medical image positioning line testing method cannot accurately identify whether the positioning line is accurate. It can only detect the existence of the positioning line and cannot improve the test quality.

Method used

By reading the image information of the positioning map and the slice map in the medical imaging image sequence, comparison calculation is performed to determine the spatial position of the positioning line of the slice map in the positioning map, and compare it with the position of the positioning line output by the software to be tested. , obtain test results and ensure the accuracy of the positioning line.

Benefits of technology

It improves the efficiency and quality of the positioning line viewing function test, enables faster testing of whether the positioning line output by the software under test is accurate, and improves the accuracy of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082373B_ABST
    Figure CN115082373B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium method for testing medical image positioning lines, and relates to the field of medical image processing technology. The method includes: reading the first image information of a group of positioning maps and the first image information of the slice map in the medical image sequence of the subject respectively; comparing the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested; if the comparison results are consistent, the first spatial position of the positioning line of the slice map in the positioning map is calculated according to the first image information of the positioning map and the first image information of the slice map; according to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested, the test result of the positioning line output by the software to be tested is obtained. In this scheme, the efficiency of the positioning line viewing function test is improved, and the test quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of medical image processing, and in particular to a method, device, equipment and storage medium for testing medical image positioning lines. Background Art

[0002] With the continuous development of medical imaging technology, medical imaging systems such as Computed Tomography (CT) and Magnetic Resonance (MR) have been increasingly used in the diagnosis of related diseases. For example, a subject is scanned from multiple different angles to obtain a CT / MR two-dimensional slice image sequence of the subject. However, since there are many two-dimensional slice images in a sequence, and different sequence images of the same subject can reflect the lesion information from different perspectives. Therefore, the spatial position relationship between different slice image sequences can be determined based on the positioning line in the CT / MR image sequence, so as to more accurately obtain the spatial position of the subject's lesion. Among them, the positioning line refers to the position of the slice sequence image on the positioning map, that is, the intersection line of the slice image and the positioning map.

[0003] At present, in order to determine whether the positioning line of the slice image in the CT / MR image sequence on the positioning map is accurate, it is necessary to test the positioning line. Specifically, the positioning map and slice image in the image sequence of the subject are opened through the test software, and the positioning line viewing function is clicked to realize the manual test of the positioning line in the CT / MR image sequence.

[0004] However, the existing testing method can only test whether a positioning line can be generated between the positioning map and the slice map in the CT / MR image sequence, and cannot determine whether the positioning line is accurate. Summary of the invention

[0005] The purpose of the present invention is to provide a method, device, equipment and storage medium for testing medical image positioning lines in order to improve the efficiency of positioning line viewing function testing and improve the test quality.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for testing a medical image positioning line, comprising:

[0008] Respectively read the first image information of a group of localization maps and the first image information of the slice map in the medical imaging image sequence of the subject; wherein the first image information is the information recorded on the localization map and the slice map by the imaging device, and the first image information includes: the upper left corner vertex position, the number of rows, the number of columns, and the pixel distance;

[0009] Compare the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested;

[0010] If the comparison results are consistent, calculating the first spatial position of the positioning line of the slice image in the positioning map according to the first image information of the positioning map and the first image information of the slice image;

[0011] According to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested, the test result of the positioning line output by the software to be tested is obtained; the first spatial position is used to characterize the position information of the positioning line in the medical coordinate system where the filming device is located.

[0012] Optionally, calculating the first spatial position of the positioning line of the slice image in the positioning map according to the first image information of the positioning map and the first image information of the slice image includes:

[0013] Determining the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map according to the first image information of the positioning map and the first image information of the slice map;

[0014] Calculating the angle between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map;

[0015] If the angle value is greater than a preset angle, a first spatial position of a positioning line of the slice image in the positioning image is calculated.

[0016] Optionally, obtaining a test result of the positioning line output by the software to be tested according to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested includes:

[0017] The first spatial position of the positioning line is compared with the second spatial position of the positioning line output by the software to be tested to obtain a test result of the positioning line output by the software to be tested.

[0018] Optionally, after calculating the angle value between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map, the method further includes:

[0019] If the angle value is less than or equal to the preset angle, it is determined that there is no positioning line in the positioning map of the slice image;

[0020] The test result of the positioning line output by the software under test is obtained according to the first information that the positioning line does not exist and the second information that the positioning line is output by the software under test; the second information is used to indicate whether the slicing image has a positioning line in the positioning image.

[0021] Optionally, calculating the angle value between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map includes:

[0022] Calculating the length and width vectors of the positioning image and the length and width vectors of the slice image respectively according to the spatial position coordinates of the positioning image and the spatial position coordinates of the slice image;

[0023] Calculating a first plane equation of the positioning map and a second plane equation of the slice map according to the length and width vectors of the positioning map, the length and width vectors of the slice map, and the spatial position coordinates respectively;

[0024] Calculating a first plane normal vector of the positioning image and a second plane normal vector of the slice image according to the first plane equation and the second plane equation respectively;

[0025] The angle value between the positioning image and the slice image is calculated using the first plane normal vector and the second plane normal vector.

[0026] Optionally, calculating a first spatial position of a positioning line of the slice image in the positioning image includes:

[0027] The first spatial position of the positioning line of the slice image in the positioning map is calculated according to the first plane equation, the second plane equation, and the positions of the upper left corner vertices of the positioning map and the slice image.

[0028] Optionally, after comparing the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured acquired by the software to be tested, the method further includes:

[0029] If the comparison results are inconsistent, an abnormal test result is obtained, and the abnormal test result is used to indicate that the positioning line output by the software to be tested does not meet the expected result.

[0030] In a second aspect, an embodiment of the present application further provides a device for testing a medical image positioning line, the device comprising: a reading module, a comparison module, a calculation module and a testing module;

[0031] The reading module is used to read the first image information of a group of positioning maps and the first image information of the slice map in the medical image sequence of the subject respectively; wherein the first image information is the information recorded on the positioning map and the slice map by the filming device, and the first image information includes: the upper left corner vertex position, the number of rows, the number of columns, and the pixel distance;

[0032] The comparison module is used to compare the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested;

[0033] The calculation module is used to calculate the first spatial position of the positioning line of the slice image in the positioning map according to the first image information of the positioning map and the first image information of the slice image if the comparison results are consistent;

[0034] The test module is used to obtain the test result of the positioning line output by the software to be tested based on the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested; the first spatial position is used to characterize the position information of the positioning line in the medical coordinate system where the filming device is located.

[0035] Optionally, the computing module is further used for:

[0036] Determining the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map according to the first image information of the positioning map and the first image information of the slice map;

[0037] Calculating the angle between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map;

[0038] If the angle value is greater than a preset angle, a first spatial position of a positioning line of the slice image in the positioning image is calculated.

[0039] Optionally, the test module is further used to:

[0040] The first spatial position of the positioning line is compared with the second spatial position of the positioning line output by the software to be tested to obtain a test result of the positioning line output by the software to be tested.

[0041] Optionally, the test module is further used to:

[0042] If the angle value is less than or equal to the preset angle, it is determined that there is no positioning line in the positioning map of the slice image;

[0043] The test result of the positioning line output by the software under test is obtained according to the first information that the positioning line does not exist and the second information that the positioning line is output by the software under test; the second information is used to indicate whether the slicing image has a positioning line in the positioning image.

[0044] Optionally, the computing module is further used for:

[0045] Calculating the length and width vectors of the positioning image and the length and width vectors of the slice image respectively according to the spatial position coordinates of the positioning image and the spatial position coordinates of the slice image;

[0046] Calculating a first plane equation of the positioning map and a second plane equation of the slice map according to the length and width vectors of the positioning map, the length and width vectors of the slice map, and the spatial position coordinates respectively;

[0047] Calculating a first plane normal vector of the positioning image and a second plane normal vector of the slice image according to the first plane equation and the second plane equation respectively;

[0048] The angle value between the positioning image and the slice image is calculated using the first plane normal vector and the second plane normal vector.

[0049] Optionally, the computing module is further used for:

[0050] The first spatial position of the positioning line of the slice image in the positioning map is calculated according to the first plane equation, the second plane equation, and the positions of the upper left corner vertices of the positioning map and the slice image.

[0051] Optionally, the test module is further used to:

[0052] If the comparison results are inconsistent, an abnormal test result is obtained, and the abnormal test result is used to indicate that the positioning line output by the software to be tested does not meet the expected result.

[0053] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the method provided in the first aspect.

[0054] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method provided in the first aspect are executed.

[0055] The beneficial effects of this application are:

[0056] The embodiments of the present application provide a method, device, equipment and storage medium for testing medical image positioning lines. The method comprises: respectively reading first image information of a group of positioning maps and first image information of slice maps in a sequence of medical image images of a subject; comparing the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured acquired by the software to be tested; if the comparison results are consistent, calculating the first spatial position of the positioning line of the slice map in the positioning map according to the first image information of the positioning map and the first image information of the slice map; obtaining the test result of the positioning line output by the software to be tested according to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested. In the present scheme, after the comparison results of “the first image information of the positioning map and the first image information of the slice map” and “the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested” are consistent, then, according to the “first spatial position of the positioning line of the slice map in the positioning map”, the “second spatial position of the positioning line output by the software to be tested” is tested to determine whether the result of “the second spatial position of the positioning line output by the software to be tested” is accurate, so that the accuracy of the positioning line output by the software to be tested can be tested more quickly, which improves the efficiency of the positioning line viewing function test and improves the test quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0058] Figure 1 A schematic diagram of the position of a positioning line in a medical image provided by an embodiment of the present application;

[0059] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0060] Figure 3 A schematic diagram of a flow chart of a method for testing a medical image positioning line provided in an embodiment of the present application;

[0061] Figure 4 A schematic flow chart of another method for testing a medical image positioning line provided in an embodiment of the present application;

[0062] Figure 5 A schematic flow chart of another method for testing a medical image positioning line provided in an embodiment of the present application;

[0063] Figure 6 A schematic flow chart of another method for testing a medical image positioning line provided in an embodiment of the present application;

[0064] Figure 7 A schematic diagram of the structure of a testing device for medical image positioning lines provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0066] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0067] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0068] Before describing the technical solution provided by the present application in detail, some of the terms involved in the present application are briefly described.

[0069] In the field of disease diagnosis based on medical imaging, for example, there are a large number of slice images in medical imaging sequences such as CT and MR, and it is necessary to analyze multiple sets of two-dimensional slice images of human tissues and organs from different viewpoints. Therefore, the precise position of a slice image in the CT / MR two-dimensional slice image sequence of the subject on the positioning map can be determined based on multiple positioning lines in the positioning map, so as to obtain the size and shape of the lesion and facilitate diagnosis.

[0070] Figure 1A schematic diagram of the position of a positioning line in a medical image provided by an embodiment of the present application; Figure 1 As shown in FIG. 1 , there are positional relationships among the positioning map, slice map and positioning line in medical images.

[0071] 1. Positioning map: refers to the two-dimensional image of the subject in a single direction.

[0072] 2. Slice image: refers to the two-dimensional sagittal, coronal and axial planes of the subject.

[0073] 3. Positioning line: refers to the position of the slice sequence image on the positioning map, that is, the intersection line between each slice image and the positioning map.

[0074] Figure 2 The following is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application; the electronic device may be a processing device such as a computer. Figure 2 As shown, the electronic device includes: a processor 201 and a memory 202 .

[0075] The processor 201 and the memory 202 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, the electrical connection can be achieved through one or more communication buses or signal lines.

[0076] The processor 201 may be an integrated circuit chip having the ability to process signals. The processor 101 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. The methods, steps, and logic diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor.

[0077] The memory 202 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.

[0078] The memory 202 is used to store programs, and the processor 201 calls the programs stored in the memory 202 to execute the medical image positioning line testing method provided in the following embodiment.

[0079] Understandably, Figure 2 The structure described is for illustration only. The electronic device may also include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations are shown. Figure 2 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0080] As follows, the implementation principle and corresponding beneficial effects of the medical image positioning line testing method provided by the present application will be described through multiple specific embodiments.

[0081] Figure 3 A schematic diagram of a flow chart of a method for testing a medical image positioning line provided in an embodiment of the present application; the execution subject of the method can be the above Figure 2 Electronic devices such as Figure 3 As shown, the method includes:

[0082] S301 , respectively reading first image information of a group of localization maps and first image information of slice maps in a sequence of medical imaging images of a subject.

[0083] The first image information is the known information value recorded by the filming device on the positioning map and the slice map, and the first image information includes: the upper left corner vertex position, the number of rows, the number of columns, and the pixel distance.

[0084] The filming equipment may refer to a CT device, a nuclear magnetic resonance imaging system, etc., and the CT device and the nuclear magnetic resonance imaging system may be used to obtain different sequence images of the subject.

[0085] In this example, the first image information may also be referred to as a Digital Imaging and Communications in Medicine (DICOM) image, which is a common image in the medical field. Specifically, the DICOM image information is as follows:

[0086] The position of the upper left corner of the image——Image Position(a1,b2,c3);

[0087] Number of rows - Rows(r);

[0088] Number of columns – Columns (c);

[0089] Pixel Spacing(s) (unit: mm);

[0090] The cosine of the angle between the image and the coordinates - Image Orientation (x1, x2, x3, y1, y2, y3).

[0091] In this embodiment, the first image information DICOM1 of the localization map and the first image information DICOM2 of the slice map can be read respectively through the medical image of the subject.

[0092] S302, comparing the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested.

[0093] Among them, the software to be tested refers to image processing software in the medical industry. The image processing software has the function of viewing positioning lines. Users can use the image processing software to open a positioning image and a slice image in a CT / MR image sequence to be examined, and click to view the positioning line function. However, due to the complexity and variability of medical imaging information, the image processing software can only understand whether there is a positioning line between the positioning map and the slice map, and cannot distinguish whether the position of the slice map displayed in the positioning map (i.e., the positioning line) is accurate.

[0094] Generally, when the first image information DICOM1 of the localization map and the first image information DICOM2 of the slice map are known, the localization line L generated by the slice map in the localization map is unique.

[0095] In order to improve the efficiency and accuracy of the subsequent positioning line test, consider first comparing the first image information DICOM1 of the positioning map and the first image information DICOM2 of the slice map with the second image information DICOM10 of the position map to be measured obtained by the software to be tested and the second image information DICOM20 of the slice map to be tested one by one, so as to determine whether the "first image information DICOM1 of the positioning map" and the "second image information DICOM10 of the position map to be measured obtained by the software to be tested" and the "first image information DICOM2 of the slice map" and the "second image information DICOM20 of the slice map to be tested" are equal.

[0096] S303: If the comparison results are consistent, calculate the first spatial position of the positioning line of the slice image in the positioning map according to the first image information of the positioning map and the first image information of the slice image.

[0097] In this embodiment, if the results of comparing the "first image information DICOM1 of the positioning map" with the "second image information DICOM10 of the positioning map to be measured obtained by the tested software", and the "first image information DICOM2 of the slice map" with the "second image information DICOM20 of the slice map to be measured" are equal, then the first spatial position P1 of the positioning line L1 of the slice map in the positioning map can be calculated based on the first image information DICOM1 of the positioning map and the first image information DICOM2 of the slice map.

[0098] S304 , obtaining a test result of the positioning line output by the software to be tested according to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested.

[0099] The first spatial position is used to represent the position information of the positioning line L1 in the medical coordinate system where the radiographic device is located.

[0100] On the basis of the above embodiment, after calculating the first spatial position P1 of the positioning line L1 of the slice image in the positioning map, the accuracy of the second spatial position P10 of the positioning line L10 output by the software to be tested can be tested according to the first spatial position P1 of the positioning line L1 to obtain the test result of the positioning line L10 output by the software to be tested. The test result includes two situations: consistency or inconsistency.

[0101] For example, if the "first spatial position P1 of positioning line L1" is inconsistent with the "second spatial position P10 of positioning line L10 output by the software under test", it can be determined that the result of "the second spatial position P10 of positioning line L10 output by the software under test" is inaccurate and has deviations.

[0102] For another example, if the "first spatial position P1 of positioning line L1" is equal to the "second spatial position P10 of positioning line L10 output by the software to be tested", it can be determined that the result of "the second spatial position P10 of positioning line L10 output by the software to be tested" is accurate, and whether the positioning line output by the software to be tested is accurate can be tested more quickly, thereby improving the efficiency of testing the positioning line viewing function and improving the test quality.

[0103] In summary, an embodiment of the present application provides a method for testing medical image positioning lines, the method comprising: respectively reading a set of first image information of a positioning map and a first image information of a slice map in a sequence of medical image images of a subject; comparing the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested; if the comparison results are consistent, calculating the first spatial position of the positioning line of the slice map in the positioning map according to the first image information of the positioning map and the first image information of the slice map; obtaining the test result of the positioning line output by the software to be tested according to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested. In the present scheme, after the comparison results of “the first image information of the positioning map and the first image information of the slice map” and “the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested” are consistent, then, according to the “first spatial position of the positioning line of the slice map in the positioning map”, the “second spatial position of the positioning line output by the software to be tested” is tested to determine whether the result of “the second spatial position of the positioning line output by the software to be tested” is accurate, so that the accuracy of the positioning line output by the software to be tested can be tested more quickly, which improves the efficiency of the positioning line viewing function test and improves the test quality.

[0104] Figure 4 A schematic flow chart of another method for testing a medical image positioning line provided in an embodiment of the present application; the above step S303: calculating the first spatial position of the positioning line of the slice image in the positioning map according to the first image information of the positioning map and the first image information of the slice image, including:

[0105] S401 : Determine spatial position coordinates of the positioning map and spatial position coordinates of the slice map according to first image information of the positioning map and first image information of the slice map.

[0106] According to the "first image information DICOM1 of the positioning map" and the "first image information DICOM2 of the slice map", the spatial position coordinates of the positioning map and the slice map can be determined respectively, as shown below:

[0107] In this embodiment, according to the vertex position of the upper left corner of the image in the "first image information DICOM1 of the positioning map", the vertex coordinates of the upper left corner of the positioning map can be determined. Then, according to the cosine value of the angle between the image and the coordinates in the DICOM1 image information (Image Orientation (x1, x2, x3, y1, y2, y3)), the number of rows (Rows (r)), the number of columns (Columns (c)), the pixel distance (Pixel Spacing (s)), etc., the positioning map can be calculated. Figure 4The position coordinates of the vertices (denoted as A, B, C, D) and the spatial position coordinates of the positioning graph are as follows:

[0108] Upper left corner: A=(a1, b2, c3), upper right corner: B=A+(Wx1, Wx2, Wx3), lower right corner: C=B+(Hy1, Hy2, Hy3), lower left corner: D=A+(Hy1, Hy2, Hy3).

[0109] Wherein, W and H are the image width and image height of the localization map, respectively, and can be calculated from the number of rows, columns, and pixel distance in the DICOM1 image information. Specifically, the image width is W=cs, and the image height is H=rs.

[0110] Similarly, the spatial position coordinates P2 of the slice image can also be obtained according to the “first image information DICOM2 of the slice image”, which will not be described in detail here.

[0111] S402: Calculate the angle between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map.

[0112] The following embodiment will specifically explain how to calculate the angle value between the positioning map and the slice map based on the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map.

[0113] Figure 5 A schematic flow chart of another method for testing a medical image positioning line provided in an embodiment of the present application; Figure 5 As shown, the above calculation of the angle value between the positioning map and the slice map based on the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map includes:

[0114] S501 , respectively calculating the length and width vectors of the positioning graph and the length and width vectors of the slice graph according to the spatial position coordinates of the positioning graph and the spatial position coordinates of the slice graph.

[0115] For example, taking the calculation of the length and width vectors of the positioning map as an example, the image length vector can be obtained based on the position coordinates of the four vertices A, B, C, and D of the positioning map: Image width vector:

[0116] Similarly, the length vector and width vector of the slice image can also be obtained according to the spatial position coordinates of the slice image, which will not be described in detail here.

[0117] S502: Calculate a first plane equation of the positioning map and a second plane equation of the slice map according to the length and width vectors of the positioning map, the length and width vectors of the slice map, and the spatial position coordinates.

[0118] For example, still taking the calculation of the first plane equation of the positioning map as an example, the image length vector of the positioning map can be: Image width vector: And positioning Figure 4 The position coordinates of the vertices A, B, C, and D are used to calculate the first plane equation a*x+b*y+c*z+d=0 of the positioning graph Plane1.

[0119] Similarly, the second plane equation of the slice image Plane2, e*x+f*y+g*z+h=0, can also be calculated, which will not be described in detail here.

[0120] S503: Calculate a first plane normal vector of the positioning image and a second plane normal vector of the slice image according to the first plane equation and the second plane equation respectively.

[0121] Based on the above embodiment, the first plane normal vector of the positioning map Plane1 can be obtained according to the first plane equation a*x+b*y+c*z+d=0 of the positioning map Plane1 and the second plane equation e*x+f*y+g*z+h=0 of the slice map Plane2. (a, b, c), the second plane normal vector of slice image Plane2 (e, f, g).

[0122] S504: Calculate the angle between the positioning image and the slice image using the first plane normal vector and the second plane normal vector.

[0123] For example, in this example, by calculating the cosine value between the first plane normal vector and the second plane normal vector, specifically: Thus, the angle between the normal vectors of the two planes of the positioning map Plane1 and the slice map Plane2 can be calculated, and the angle between the normal vectors of the two planes is also the angle value α0 between the positioning map Plane1 and the slice map Plane2.

[0124] The following steps will explain in detail the processing after the angle value between the positioning map and the slice map is calculated.

[0125] S403: If the angle value is greater than the preset angle, calculate the first spatial position of the positioning line of the slice image in the positioning image.

[0126] Based on the above embodiment, if the angle value α0 between the positioning map and the slice map calculated above is greater than the preset angle α1, it can be determined that there is a positioning line in the slice map in the positioning map, and the spatial position of the positioning line can be calculated.

[0127] Optionally, the first spatial position of the positioning line of the slice image in the positioning map can be calculated according to the first plane equation, the second plane equation, and the upper left corner vertex positions of the positioning map and the slice image. The specific calculation process is as follows:

[0128] According to the first plane equation a*x+b*y+c*z+d=0 of the positioning map Plane1, the second plane equation e*x+f*y+g*z+h=0 of the slice map Plane2, and the coordinates of the upper left corner A of the image in the positioning map Plane1, the equation of the intersection line between the positioning map Plane1 and the slice map Plane2 can be calculated. Then, according to the length and width vectors of the positioning map Plane1 and the slice map Plane2, and the coordinates of the four vertices in the positioning map Plane1, the spatial position of the positioning line can be calculated.

[0129] Optionally, obtaining a test result of the positioning line output by the software to be tested according to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested includes:

[0130] The first spatial position of the positioning line is compared with the second spatial position of the positioning line output by the software to be tested to obtain the test result of the positioning line output by the software to be tested, so as to confirm whether the test result of the positioning line output by the software to be tested is accurate, thereby realizing the automated testing of the positioning line output by the software to be tested and improving the test efficiency.

[0131] Figure 6 A schematic flow chart of another method for testing a medical image positioning line provided in an embodiment of the present application; after the above step S402: calculating the angle value between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map, it also includes:

[0132] S601: If the angle value is less than or equal to a preset angle, determine that there is no positioning line in the positioning map of the slice map.

[0133] For example, if the angle α1 between the positioning map and the slice map obtained by the above calculation is less than or equal to the preset angle α0, then the slice map may not have a positioning line in the positioning map, or it may be assumed that the two planes of the positioning map and the slice map are nearly parallel and cannot generate an intersection line.

[0134] S602: Obtain a test result of the positioning line output by the software to be tested according to first information indicating that the positioning line does not exist and second information indicating that the positioning line is output by the software to be tested.

[0135] The second information is used to indicate whether there is a positioning line in the positioning map in the slice map.

[0136] In one feasible manner, for example, if the second information indicates that the slice map output by the software to be tested does not have a positioning line in the positioning map, then the second information of the positioning line output by the software to be tested can be automatically tested based on the first information indicating the absence of the positioning line to obtain the test results. The test results can also be generated in the form of a document, and the keyword code module for sending emails can be called by the Robot Framework, and the email address can be configured to automatically send the test results to the tester's email, thereby improving the accuracy of obtaining the test results.

[0137] If the second information of the positioning line output by the software to be tested indicates the existence of the positioning line, then the second information of the positioning line output by the software to be tested can be automatically tested based on the first information indicating the absence of the positioning line, and the test result can be obtained, thereby improving the efficiency of testing whether the positioning line function in the software to be tested is accurate, improving the credibility of the positioning line function in the software to be tested, and reducing the chance of incorrect judgment.

[0138] Optionally, after comparing the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested, the method further includes:

[0139] If the comparison results are inconsistent, an abnormal test result is obtained, and the abnormal test result is used to indicate that the positioning line output by the software to be tested does not meet the expected result.

[0140] In this actual embodiment, for example, if the "first image information DICOM1 of the positioning map" is not equal to the "second image information DICOM10 of the positioning map to be measured obtained by the software to be tested", or the "first image information DICOM2 of the slice map" is not equal to the "second image information DICOM20 of the slice map to be tested", or both are not equal at the same time, it can be determined that there is an abnormality in the image information obtained by the software to be tested, and the software to be tested needs to re-acquire the "second image information DICOM10 of the positioning map to be measured obtained by the software to be tested" and / or the "second image information DICOM20 of the slice map to be tested", and the DICOM image information comparison result can also be directly sent to the tester.

[0141] The following describes the device and storage medium corresponding to the medical image positioning line testing method provided in the present application. The specific implementation process and technical effects are as mentioned above and will not be described in detail below.

[0142] Figure 7 A schematic diagram of a medical image positioning line testing device provided in an embodiment of the present application; Figure 7 As shown, the device includes: a reading module 701, a comparison module 702, a calculation module 703 and a testing module 704.

[0143] The reading module 701 is used to read the first image information of a group of localization maps and the first image information of the slice map in the medical image sequence of the subject respectively; wherein the first image information is the information recorded on the localization map and the slice map by the filming device, and the first image information includes: the upper left corner vertex position, the number of rows, the number of columns, and the pixel distance;

[0144] A comparison module 702 is used to compare the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested;

[0145] The calculation module 703 is used to calculate the first spatial position of the positioning line of the slice image in the positioning map according to the first image information of the positioning map and the first image information of the slice image if the comparison results are consistent;

[0146] The test module 704 is used to obtain the test result of the positioning line output by the software to be tested according to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested; the first spatial position is used to represent the position information of the positioning line in the medical coordinate system where the filming device is located.

[0147] Optionally, the calculation module 703 is further configured to:

[0148] Determine the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map according to the first image information of the positioning map and the first image information of the slice map;

[0149] Calculate the angle between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map;

[0150] If the angle value is greater than the preset angle, the first spatial position of the positioning line of the slice image in the positioning image is calculated.

[0151] Optionally, the testing module 704 is further configured to:

[0152] The first spatial position of the positioning line is compared with the second spatial position of the positioning line output by the software to be tested to obtain a test result of the positioning line output by the software to be tested.

[0153] Optionally, the testing module 704 is further configured to:

[0154] If the angle value is less than or equal to the preset angle, it is determined that the slice image does not have a positioning line in the positioning map;

[0155] The test result of the positioning line output by the software to be tested is obtained according to the first information that the positioning line does not exist and the second information that the positioning line is output by the software to be tested; the second information is used to indicate whether there is a positioning line in the positioning map of the slice map.

[0156] Optionally, the calculation module 703 is further configured to:

[0157] According to the spatial position coordinates of the positioning image and the spatial position coordinates of the slice image, respectively calculating the length and width vectors of the positioning image and the length and width vectors of the slice image;

[0158] Calculating the first plane equation of the positioning map and the second plane equation of the slice map according to the length and width vectors of the positioning map, the length and width vectors of the slice map, and the spatial position coordinates respectively;

[0159] Calculate the first plane normal vector of the positioning image and the second plane normal vector of the slice image according to the first plane equation and the second plane equation respectively;

[0160] The angle between the positioning image and the slice image is calculated using the first plane normal vector and the second plane normal vector.

[0161] Optionally, the calculation module 703 is further configured to:

[0162] The first spatial position of the positioning line of the slice image in the positioning map is calculated according to the first plane equation, the second plane equation, and the positions of the upper left corner vertices of the positioning map and the slice image.

[0163] Optionally, the testing module 704 is further configured to:

[0164] If the comparison results are inconsistent, an abnormal test result is obtained, and the abnormal test result is used to indicate that the positioning line output by the software to be tested does not meet the expected result.

[0165] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0166] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0167] Optionally, the present invention also provides a program product, such as a computer-readable storage medium, comprising a program, which is used to execute the above method embodiment when executed by a processor.

[0168] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0169] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0170] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0171] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

Claims

1. A method for testing a medical image positioning line, characterized in that: include: Respectively read the first image information of a group of localization maps and the first image information of the slice map in the medical imaging image sequence of the subject; wherein the first image information is the information recorded on the localization map and the slice map by the imaging device, and the first image information includes: the upper left corner vertex position, the number of rows, the number of columns, and the pixel distance; Compare the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested; If the comparison results are consistent, calculating the first spatial position of the positioning line of the slice image in the positioning map according to the first image information of the positioning map and the first image information of the slice image; According to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested, a test result of the positioning line output by the software to be tested is obtained; the first spatial position is used to characterize the position information of the positioning line in the medical coordinate system where the filming device is located; The step of calculating the first spatial position of the positioning line of the slice image in the positioning map according to the first image information of the positioning map and the first image information of the slice image comprises: Determining the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map according to the first image information of the positioning map and the first image information of the slice map; Calculating the angle between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map; If the angle value is greater than a preset angle, a first spatial position of a positioning line of the slice image in the positioning image is calculated.

2. The method according to claim 1, characterized in that The step of obtaining a test result of the positioning line output by the software to be tested according to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested comprises: The first spatial position of the positioning line is compared with the second spatial position of the positioning line output by the software to be tested to obtain a test result of the positioning line output by the software to be tested.

3. The method according to claim 1, characterized in that: After calculating the angle value between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map, the method further includes: If the angle value is less than or equal to the preset angle, it is determined that there is no positioning line in the positioning map of the slice image; The test result of the positioning line output by the software under test is obtained according to the first information that the positioning line does not exist and the second information that the positioning line is output by the software under test; the second information is used to indicate whether the slicing image has a positioning line in the positioning image.

4. The method according to claim 1, characterized in that The step of calculating the angle value between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map comprises: Calculating the length and width vectors of the positioning image and the length and width vectors of the slice image respectively according to the spatial position coordinates of the positioning image and the spatial position coordinates of the slice image; Calculating a first plane equation of the positioning map and a second plane equation of the slice map according to the length and width vectors of the positioning map, the length and width vectors of the slice map, and the spatial position coordinates respectively; Calculating a first plane normal vector of the positioning image and a second plane normal vector of the slice image according to the first plane equation and the second plane equation respectively; The angle value between the positioning image and the slice image is calculated using the first plane normal vector and the second plane normal vector.

5. The method according to claim 4, characterized in that The calculating the first spatial position of the positioning line of the slice image in the positioning image comprises: The first spatial position of the positioning line of the slice image in the positioning map is calculated according to the first plane equation, the second plane equation, and the positions of the upper left corner vertices of the positioning map and the slice image.

6. The method according to any one of claims 1 to 5, characterized in that: After comparing the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested, the method further includes: If the comparison results are inconsistent, an abnormal test result is obtained, and the abnormal test result is used to indicate that the positioning line output by the software to be tested does not meet the expected result.

7. A device for testing positioning lines of medical images, characterized in that: The device comprises: a reading module, a comparison module, a calculation module and a testing module; The reading module is used to read the first image information of a group of positioning maps and the first image information of the slice map in the medical image sequence of the subject respectively; wherein the first image information is the information recorded on the positioning map and the slice map by the filming device, and the first image information includes: the upper left corner vertex position, the number of rows, the number of columns, and the pixel distance; The comparison module is used to compare the first image information of the positioning map and the first image information of the slice map with the second image information of the positioning map to be measured and the second image information of the slice map to be measured obtained by the software to be tested; The calculation module is used to calculate the first spatial position of the positioning line of the slice image in the positioning map according to the first image information of the positioning map and the first image information of the slice image if the comparison results are consistent; The testing module is used to obtain the test result of the positioning line output by the software to be tested according to the first spatial position of the positioning line and the second spatial position of the positioning line output by the software to be tested; the first spatial position is used to represent the position information of the positioning line in the medical coordinate system where the filming device is located; Wherein, the computing module is also used for: Determining the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map according to the first image information of the positioning map and the first image information of the slice map; Calculating the angle between the positioning map and the slice map according to the spatial position coordinates of the positioning map and the spatial position coordinates of the slice map; If the angle value is greater than a preset angle, a first spatial position of a positioning line of the slice image in the positioning image is calculated.

8. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of any method as claimed in claims 1-6.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are executed.