Method and device for marking an angle in a medical image, storage medium, computer device
By automatically labeling the target angle range and value in medical images, the problem of unintuitive angle labeling in existing technologies is solved, improving doctors' diagnostic efficiency and accuracy.
Patent Information
- Application Number
- CN202211412731.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2042-11-11
AI Technical Summary
The angle annotation of medical imaging results in existing technologies lacks intuitiveness, leading to low work efficiency for doctors and errors in judging the location of lesions.
By automatically acquiring regions of interest in medical images, drawing target angles and obtaining their location information, the range and value of the target angles are automatically marked.
It improves the intuitiveness of target angle marking, enhances doctors' work efficiency, and ensures the accuracy of lesion location judgment.
Smart Images

Figure CN115861182B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the medical image technology field, and in particular to a medical image angle marking method and device, a storage medium and a computer device. BACKGROUND
[0002] With the continuous improvement of medical technology, imaging diagnosis is an important basis for doctors to diagnose diseases in clinical practice and is an indispensable examination method for disease diagnosis. The current commonly used imaging diagnosis methods include DR method, CT method, MRI method, etc. After imaging diagnosis, imaging results can be obtained, and important marking and annotation of the imaging results are very important post-processing methods. Among them, angle marking is an important way to mark the relative position of the lesion. When doctors review the imaging results, they can determine the relative position of the lesion according to the angle marking.
[0003] However, in the prior art, when marking the angle of the imaging results, only the angle is marked, and doctors cannot determine whether the angle corresponds to an acute angle or an obtuse angle according to the marked angle, which is less intuitive, greatly reduces the work efficiency of doctors, and is prone to errors in determining the position of the lesion. SUMMARY
[0004] Therefore, the present application provides a medical image angle marking method and device, a storage medium and a computer device. By automatically marking the target angle, the range and the value of the target angle corresponding to the region of interest on the medical image, the intuitiveness of the target angle marking can be greatly improved, the work efficiency of doctors can be improved, and the accuracy of the doctors' determination of the position of the lesion can be ensured.
[0005] According to one aspect of the present application, a medical image angle marking method is provided, comprising:
[0006] Obtaining a region of interest in a medical image;
[0007] In response to a drawing action of a target angle on the region of interest, obtaining position information of the target angle;
[0008] Based on the position information of the target angle, automatically marking the range of the target angle and the value corresponding to the range.
[0009] According to another aspect of the present application, a medical image angle marking device is provided, comprising:
[0010] A region of interest obtaining module for obtaining a region of interest in a medical image;
[0011] A position information obtaining module for obtaining position information of a target angle in response to a drawing action of the target angle on the region of interest;
[0012] a marking module, configured to mark a range of the target angle and a value corresponding to the range of the target angle automatically based on the position information of the target angle.
[0013] According to yet another aspect of the present application, a storage medium is provided, which stores a computer program, and the program is executed by a processor to implement the method for marking an angle in a medical image.
[0014] According to still another aspect of the present application, a computer device is provided, which comprises a storage medium, a processor and a computer program stored in the storage medium and executable on the processor, and the processor implements the method for marking an angle in a medical image when executing the program.
[0015] By means of the above technical solutions, the method and device for marking an angle in a medical image, the storage medium and the computer device provided by the present application can first acquire a region of interest on a medical image before marking the medical image. The region of interest can be a region where a patient has a lesion. After determining the region of interest, a target angle corresponding to the region of interest can be drawn, and the target angle can be used to further determine the range of the lesion of the patient. When drawing the target angle on the region of interest, the position information of the target angle can be determined according to the drawing action of the target angle. After determining the position information of the target angle, the range of the target angle can be marked automatically according to the position information, and the value corresponding to the range of the target angle, i.e., the angle corresponding to the target angle, can also be marked. The present application can mark the target angle, the range of the target angle and the value corresponding to the range of the target angle on the region of interest on the medical image automatically, which can greatly improve the intuitiveness of the target angle marking, improve the work efficiency of doctors and ensure the accuracy of the judgment of the lesion position of doctors.
[0016] The above description is only a summary of the technical solutions of the present application. In order to more clearly understand the technical means of the present application, the specific embodiments of the present application can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 a flowchart of a method for marking an angle in a medical image provided by an embodiment of the present application is shown;
[0019] Figure 2A composition diagram of a target angle provided by an embodiment of the present application is shown.
[0020] Figure 3 A flow diagram of another method for marking an angle in a medical image provided by an embodiment of the present application is shown.
[0021] Figure 4 A vector diagram provided by an embodiment of the present application is shown.
[0022] Figure 5 Another composition diagram of a target angle provided by an embodiment of the present application is shown.
[0023] Figure 6 A flow diagram for calculating an arc starting radian and an arc ending radian provided by an embodiment of the present application is shown.
[0024] Figure 7 Another flow diagram for calculating an arc starting radian and an arc ending radian provided by an embodiment of the present application is shown.
[0025] Figure 8 A structure diagram of a marking device for an angle in a medical image provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] The present application will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0027] In the present embodiment, a method for marking an angle in a medical image is provided, as shown in the figure, the method comprises: Figure 1
[0028] Step 101, obtaining a region of interest in a medical image;
[0029] The method for marking an angle in a medical image provided by the present embodiment can automatically mark the range and value of a target angle on a region of interest in a medical image, so that a doctor can quickly determine whether a lesion occurs on the acute angle side or the obtuse angle side of the target angle. Before marking the medical image, the region of interest on the medical image can be obtained first. The region of interest can be a region where a patient has a lesion, i.e. a symptom region. For a lung image, it can be a lung nodule.
[0030] Step 102, in response to a drawing action of a target angle on the region of interest, obtaining position information of the target angle;
[0031] In this embodiment, after the region of interest is determined, the doctor can draw a target angle corresponding to the region of interest, for example, first draw one side of the angle, and then draw another side with one end point of the side as a vertex. When or after the target angle is drawn on the region of interest, the position information of the target angle can be determined according to the drawing action of the target angle. Here, the position information of the target angle can include the start point coordinate, the end point coordinate, and the vertex coordinate of the target angle. The coordinate corresponding to the start point of the target angle is the start point coordinate, the coordinate corresponding to the end point of the target angle is the end point coordinate, and the coordinate corresponding to the vertex of the target angle is the vertex coordinate. The composition of the target angle is as shown in Figure 2
[0032] Step 103, based on the position information of the target angle, automatically marking the range of the target angle and the value corresponding to the range.
[0033] In this embodiment, after the position information of the target angle is determined, the range of the target angle can be automatically marked according to the position information, and the value corresponding to the range of the target angle, i.e., the angle corresponding to the target angle, can also be marked.
[0034] By applying the technical solution of this embodiment, before marking the medical image, the region of interest on the medical image can be obtained first. The region of interest can be the region where the patient has a lesion. After the region of interest is determined, the target angle corresponding to the region of interest can be drawn, and the range of the lesion of the patient can be further determined through the target angle. When the target angle is drawn on the region of interest, the position information of the target angle can be determined according to the drawing action of the target angle. After the position information of the target angle is determined, the range of the target angle can be automatically marked according to the position information, and the value corresponding to the range of the target angle, i.e., the angle corresponding to the target angle, can also be marked. The embodiment of the present application can greatly improve the intuitiveness of the target angle marking by automatically marking the target angle, the range and the value of the target angle corresponding to the region of interest on the medical image, which can improve the work efficiency of the doctor and also ensure the accuracy of the judgment of the doctor on the lesion position.
[0035] Further, as a refinement and expansion of the specific implementation manner of the above embodiment, in order to completely describe the specific implementation process of the embodiment, another method for marking an angle in a medical image is provided, as shown in Figure 3 The method comprises the following steps:
[0036] Step 201, obtaining a region of interest in a medical image;
[0037] The method for marking an angle in a medical image provided by the embodiments of the present application can automatically mark the range and value of the target angle of the region of interest on the medical image, so that the doctor can quickly determine whether the position of the lesion is located on the acute angle side or the obtuse angle side of the target angle. Before marking the medical image, the region of interest on the medical image can be obtained first. The region of interest can be the region of the patient where the lesion occurs.
[0038] In step 202, the starting point coordinate, the ending point coordinate and the vertex coordinate of the target angle are obtained based on the sequence of the drawing actions of the target angle of the region of interest. The position information includes the starting point coordinate, the ending point coordinate and the vertex coordinate of the target angle.
[0039] In this embodiment, when the target angle is drawn, the drawing of the target angle is divided into sequential actions, for example, the starting point of the target angle is drawn first, then the vertex of the target angle, and finally the ending point of the target angle. Therefore, when the target angle is drawn, the starting point coordinate, the ending point coordinate and the vertex coordinate of the target angle can be determined according to the drawing action. Here, the position of the target angle can include the starting point coordinate, the ending point coordinate and the vertex coordinate of the target angle.
[0040] In step 203, the radius of the arc line is obtained.
[0041] In this embodiment, the radius of the arc line can be obtained, and the radius of the arc line can be preset. If it is desired to make the arc line marking more obvious, the radius of the arc line can be set to be larger. In other embodiments, the radius of the arc line can also be determined according to the length of the side of the drawn angle, for example, the arc length can be one-tenth of the length of the side, that is, the proportion relationship between the arc length and the side length is set. The radius of the arc can also be manually set by the marker (doctor).
[0042] In step 204, the arc line starting point coordinate and the arc line ending point coordinate of the arc line are obtained based on the radius of the arc line and the starting point coordinate, the ending point coordinate and the vertex coordinate of the target angle.
[0043] In this embodiment, after the radius of the arc line is determined, the arc line starting point coordinate and the arc line ending point coordinate can also be determined, so that the range of the target angle can be marked using the arc line starting point coordinate, the arc line ending point coordinate and the radius of the arc line subsequently. Therefore, the arc line starting point coordinate and the arc line ending point coordinate can be determined based on the radius of the arc line, the starting point coordinate, the ending point coordinate and the vertex coordinate of the target angle. The arc line starting point coordinate refers to the coordinate corresponding to the arc line starting point when the arc line is marked for the target angle. The arc line ending point coordinate refers to the coordinate corresponding to the arc line ending point when the arc line is marked for the target angle.
[0044] In step 205, the range of the target angle is marked by an arc line based on the arc line start point coordinate, the arc line end point coordinate and the vertex coordinate of the target angle, and a value corresponding to the range is marked.
[0045] In this embodiment, the range of the target angle is marked by an arc line. After the arc line start point coordinate and the arc line end point coordinate are determined, an arc line for marking the range of the target angle can be drawn according to the arc line start point coordinate, the arc line end point coordinate and the vertex coordinate of the target angle. Specifically, the arc line is drawn with the vertex coordinate of the target angle as the center, starting from the arc line start point coordinate and ending at the arc line end point coordinate, so that the range of the target angle is marked by the arc line. In addition, after the range of the target angle is marked by the arc line, a value corresponding to the range can be marked.
[0046] In the embodiments of the present application, step 204 can optionally include:
[0047] In step 204-1, a first straight line equation is established based on the start point coordinate and the vertex coordinate of the target angle.
[0048] In this embodiment, the first straight line equation can be established by using the start point coordinate and the vertex coordinate of the target angle. The first straight line can pass through the start point of the target angle and the vertex of the target angle at the same time.
[0049] In step 204-2, a second straight line equation is established based on the end point coordinate and the vertex coordinate of the target angle.
[0050] In this embodiment, the second straight line equation can be established by using the end point coordinate and the vertex coordinate of the target angle. The second straight line can pass through the end point of the target angle and the vertex of the target angle at the same time.
[0051] In step 204-3, the arc line start point coordinate is obtained based on the radius of the arc line, the first straight line equation and two formulas, and the arc line end point coordinate is obtained based on the radius of the arc line, the second straight line equation and the two formulas.
[0052] In this embodiment, after the first straight line equation and the second straight line equation are established, on the one hand, the arc line start point coordinate can be calculated by using the radius of the arc line, the first straight line equation and the two formulas; on the other hand, the arc line end point coordinate can be calculated by using the radius of the arc line, the second straight line equation and the two formulas.
[0053] Specifically, taking the calculation of the arc line start point coordinate as an example. First, the first slope of the first straight line can be determined, then the relationship between the first slope and a preset slope can be judged, and the arc line start point coordinate can be further calculated according to the relationship between the first slope and the preset slope. The preset slope can be positive infinity and negative infinity.
[0054] If the judgment result shows that the first slope is positive infinity or negative infinity, it means that the first straight line is a straight line perpendicular to the horizontal axis. At this time, the x-coordinate of the starting point of the arc is... radianA It can be the same as the x-coordinate in the vertex coordinates of the target angle. If the y-coordinate value of the vertex coordinates of the target angle is greater than the y1 value of the y-coordinate in the starting point coordinates of the target angle, then the y-coordinate of the starting point coordinates of the arc... radianA It equals yr, and conversely, it equals y+r. Where r is the radius of the arc.
[0055] When the judgment result shows that the first slope is neither positive infinity nor negative infinity, it indicates that the first straight line is not perpendicular to the horizontal axis. In this case, the intercept of the first straight line can be calculated. Specifically, the formula b = y – k * x can be used, where k is the first slope calculated above, and x and y can be obtained from the coordinates of the vertex of the target angle. Then, the intercept b can be obtained. Next, the coordinates of the starting point of the arc can be calculated using two formulas. The two formulas are as follows:
[0056]
[0057] Specifically, when the two roots are equal, x radianA =x radianA1 When x≤x radianA1 When x ≤ x1, or x1 ≤ x radianA1 When x ≤ x, x radianA =x radianA1 When x≤x radianA2 When x ≤ x1, or x1 ≤ x radianA2 When x ≤ x, x radianA =x radianA2 .
[0058] Where A = k 2 +1, B=2*[(by)*kx], C=(by) 2 +x 2 -r 2 x and y can be obtained from the vertex coordinates of the target angle;
[0059]
[0060]
[0061] y radianA =k*x radianA +b;
[0062] The coordinates of the starting point of the arc (x) can then be calculated using the above formula. radianA y radianA Similarly, the coordinates of the endpoint of the arc can be calculated using the same process described above.
[0063] In the embodiments of the present application, step 205 comprises:
[0064] Step 205-1, obtaining a first vector pointing from the arc starting point to the vertex of the target angle;
[0065] Step 205-2, obtaining a second vector pointing from the arc starting point to the arc ending point;
[0066] Step 205-3, calculating the cross product result between the first vector and the second vector according to the vector cross product method;
[0067] Step 205-4, obtaining the relative position relationship between the vertex of the target angle and the position of the second vector based on the positive or negative of the cross product result, the relative position relationship comprising that the vertex of the target angle is on the left side, the right side or the same line of the second vector;
[0068] Step 205-5, determining the arc starting point radian and the arc ending point radian based on the relative position relationship and the position relationship of the arc starting point coordinate, the arc ending point coordinate and the vertex coordinate of the target angle;
[0069] Step 205-6, performing arc line marking on the range of the target angle based on the arc starting point radian and the arc ending point radian, and calculating and marking the numerical value corresponding to the range.
[0070] In this embodiment, first, the first vector and the second vector can be determined, wherein the first vector is a vector pointing from the arc starting point to the vertex of the angle, and the second vector is a vector pointing from the arc starting point to the arc ending point, as shown in FIG. 1. Figure 4 The vector AM is the first vector, and the vector AB is the second vector. Wherein, the vertex coordinate of the target angle is (x, y), the arc starting point coordinate is (x radianA , y radianA ), the arc ending point coordinate is (x radianB , y radianB ), the vector AM is (x-x radianA , y-y radianA ), and the vector AB is (x radianB -x radianA , y radianB -y radianA ). Then, the cross product result between the first vector and the second vector can be calculated by using the vector cross product method, vector AB*vector AM=x1y2-x2y1=(x radianB -x radianA )*(y-y radianA )–(x-x radianA )*(y radianB -yradianA After obtaining the cross product result, a preset sign function can be used to extract the sign from the cross product result, where the preset sign function can be a sign() function, and the result extracted by the preset sign function can be positive, negative, or zero.
[0071] Then, the relative positional relationship between the vertex of the target angle and the position of the second vector can be determined according to the positive or negative of the cross product result. Specifically, if the cross product result is positive, it indicates that the vertex of the target angle is on the left side of the second vector; if the cross product result is negative, it indicates that the vertex of the target angle is on the right side of the second vector; and if the cross product result is 0, it indicates that the vertex of the target angle is collinear with the second vector.
[0072] Then, the starting radian of the arc and the ending radian of the arc can be determined according to the relative positional relationship obtained above and the positional relationship among the starting coordinate of the arc, the ending coordinate of the arc, and the vertex coordinate of the target angle. Here, a straight line passing through the vertex and the starting point of the target angle is referred to as a first straight line (collinear with the first side), and a straight line passing through the vertex and the ending point of the target angle is referred to as a second straight line (collinear with the second side). The radian value between the first straight line and the horizontal axis of the coordinate system is the starting radian of the arc, and the radian value between the second straight line and the horizontal axis of the coordinate system is the ending radian of the arc, as shown in FIG. 4. Figure 5 It is noted that the starting point of the arc is on the first straight line, and the ending point of the arc is on the second straight line.
[0073] After the starting radian of the arc and the ending radian of the arc are determined, the range of the target angle can be further marked by the arc according to the starting radian of the arc and the ending radian of the arc, and the corresponding numerical value can be calculated and labeled.
[0074] In the embodiment of the present application, step 205-5 comprises: determining a first judgment path based on a first relationship between the vertical coordinate of the vertex coordinate of the target angle and the vertical coordinate of the arc start point coordinate; determining a second judgment path after the first judgment path based on a second relationship between the vertical coordinate of the vertex coordinate of the target angle and the vertical coordinate of the arc end point coordinate; when the second judgment path indicates that the third relationship between the horizontal coordinate of the vertex coordinate of the target angle and the horizontal coordinate of the arc start point coordinate is to be determined, determining a third judgment path after the second judgment path based on the third relationship, and determining a fourth judgment path after the third judgment path based on the relative position relationship, and determining the arc start point radian and the arc end point radian based on the fourth judgment path; when the second judgment path indicates that the fourth relationship between the horizontal coordinate of the arc start point coordinate and the horizontal coordinate of the arc end point coordinate is to be determined, determining a third judgment path after the second judgment path based on the fourth relationship, and determining the arc start point radian and the arc end point radian based on the third judgment path.
[0075] In this embodiment, as shown in Figure 6 and Figure 7 , when determining the arc start point radian and the arc end point radian, first, a first judgment path can be determined according to a first relationship between the vertical coordinate of the vertex coordinate of the target angle and the vertical coordinate of the arc start point coordinate. When the first relationship indicates that the vertical coordinate of the vertex coordinate is less than or equal to the vertical coordinate of the arc start point coordinate, the first judgment path is as shown in Figure 6 ; when the first relationship indicates that the vertical coordinate of the vertex coordinate is greater than the vertical coordinate of the arc start point coordinate, the first judgment path is as shown in Figure 7 .
[0076] Next, a second judgment path after the first judgment path can be determined according to a second relationship between the vertex coordinate of the target angle and the vertical coordinate of the arc end point coordinate. Figure 6 or Figure 7 .
[0077] If the second judgment path indicates that a third relationship between the horizontal coordinate of the vertex coordinate of the target angle and the horizontal coordinate of the arc start point coordinate is to be determined, then a third judgment path after the second judgment path is determined according to the third relationship, and a fourth judgment path after the third judgment path can be further determined according to the relative position relationship, i.e., the positive or negative of the cross product result. Finally, the arc start point radian and the arc end point radian can be obtained according to the determined fourth judgment path.
[0078] If the second decision path indicates a fourth relationship between the x-coordinates of the arc's starting and ending coordinates, then a third decision path can be determined based on this fourth relationship. Finally, the starting and ending radians of the arc can be obtained based on this third decision path.
[0079] For example, from Figure 6 as well as Figure 7 It can be seen that the first decision path can be to determine y and y radianA The second judgment path can be to judge the size relationship between y and y radianB The size relationship between them. Figure 6 In the middle, the third judgment path can be to judge x and x radianA The fourth path to determine the relationship between the magnitudes of the cross product results can be the path after determining the sign of the cross product. Figure 7 In the middle, the third judgment path can be to judge x and x radianA The size relationship between them, or to determine x radianA With x radianB The size relationship between them, when the third judgment path is to judge x and x radianA When determining the size relationship between the two, a fourth judgment path can be determined. This fourth judgment path can be the path after judging the sign of the cross product result; when the third judgment path is to judge x... radianA With x radianB When determining the size relationship between them, the starting radian and ending radian of the arc can be determined directly based on the judgment result of the third judgment path.
[0080] Optionally, in this embodiment of the application, the step 205-6, "marking the range of the target angle with an arc based on the arc starting radian and the arc ending radian", includes: drawing the arc using the arc method of html-canvas based on the arc starting radian and the arc ending radian.
[0081] In this embodiment, when automatically marking the target angle with an arc, the `arc` method of `html-canvas` can be used. The `arc` method is a method for drawing a circle on a 2D canvas, and it has six parameters: `arc(x,y,r,sAngle,eAngle,counterclockwise)`. These six parameters represent: `x` and `y` are the coordinates of the center of the circle, i.e., the coordinates of the vertex of the target angle; `r` is the radius of the circle, i.e., the radius of the arc; `sAngle` is the starting angle of the drawing, i.e., the starting radian of the arc; `eAngle` is the ending angle of the drawing, i.e., the ending radian of the arc; and `counterclockwise` indicates whether the drawing is clockwise or counterclockwise, with `false` for clockwise and `true` for counterclockwise, and the default value is `false`.
[0082] Furthermore, as Figure 1 In a specific implementation of the method, this application provides a device for marking angles in medical images, such as... Figure 8 As shown, the device includes:
[0083] The region of interest (ROI) acquisition module is used to acquire regions of interest in medical images;
[0084] The location information acquisition module is used to acquire the location information of the target angle in response to the action of drawing the target angle of the region of interest;
[0085] The marking module is used to automatically mark the range of the target angle and the corresponding numerical value based on the position information of the target angle.
[0086] Optionally, the location information acquisition module is used to:
[0087] Based on the sequence of drawing actions of the target angle in the region of interest, the starting point coordinates, ending point coordinates, and vertex coordinates of the target angle are obtained, wherein the position information includes the starting point coordinates, ending point coordinates, and vertex coordinates of the target angle.
[0088] Optionally, the range of the target angle is indicated by an arc; the marking module includes:
[0089] A radius acquisition unit is used to acquire the radius of the arc.
[0090] The coordinate acquisition unit is used to acquire the arc start coordinates and arc end coordinates of the arc based on the radius of the arc and the start coordinates, end coordinates and vertex coordinates of the target angle;
[0091] The marking unit is used to mark the range of the target angle with an arc based on the coordinates of the starting point of the arc, the coordinates of the ending point of the arc, and the coordinates of the vertex of the target angle, and to mark the numerical value corresponding to the range.
[0092] Optionally, the coordinate acquisition unit is used for:
[0093] Based on the starting point coordinates and vertex coordinates of the target angle, establish a first straight line equation; based on the ending point coordinates and vertex coordinates of the target angle, establish a second straight line equation; based on the radius of the arc, the first straight line equation, and the two formulas, obtain the starting point coordinates of the arc, and based on the radius of the arc, the second straight line equation, and the two formulas, obtain the ending point coordinates of the arc.
[0094] Optionally, the marking unit is used for:
[0095] obtaining a first vector pointing from the arc start point to the vertex of the target angle; obtaining a second vector pointing from the arc start point to the arc end point; calculating a cross product result between the first vector and the second vector according to a vector cross product method; obtaining a relative position relationship between the vertex of the target angle and the position of the second vector based on a positive or negative of the cross product result, the relative position relationship including that the vertex of the target angle is on a left side, a right side, or a same line of the second vector; determining an arc start radian and an arc end radian based on the relative position relationship and a position relationship among the arc start point coordinate, the arc end point coordinate, and the vertex coordinate of the target angle; and performing arc labeling on a range of the target angle based on the arc start radian and the arc end radian, and calculating and labeling a numerical value corresponding to the range.
[0096] Optionally, the marking unit is further configured to:
[0097] determine a first judgment path based on a first relationship between the vertical coordinates of the vertex coordinate of the target angle and the arc start point coordinate; determine a second judgment path after the first judgment path based on a second relationship between the vertical coordinates of the vertex coordinate of the target angle and the arc end point coordinate; when the second judgment path indicates that a third relationship between the horizontal coordinates of the vertex coordinate of the target angle and the arc start point coordinate is to be judged, determine a third judgment path after the second judgment path based on the third relationship, determine a fourth judgment path after the third judgment path based on the relative position relationship, and determine the arc start radian and the arc end radian based on the fourth judgment path; and when the second judgment path indicates that a fourth relationship between the horizontal coordinates of the arc start point coordinate and the arc end point coordinate is to be judged, determine a third judgment path after the second judgment path based on the fourth relationship, and determine the arc start radian and the arc end radian based on the third judgment path.
[0098] Optionally, the marking unit is further configured to:
[0099] the arc is drawn by using an arc method of html-canvas based on the arc start radian and the arc end radian.
[0100] It should be noted that other corresponding descriptions of the various functional units involved in the medical image angle marking device provided in the embodiments of the present application can be referred to the corresponding descriptions in the Figures 1 to 7 method, which will not be repeated here.
[0101] Based on the above method as shown in Figures 1 to 7 , correspondingly, the embodiments of the present application also provide a storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the above method as shown in .Figures 1 to 7 The method of marking angles in the medical images shown.
[0102] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.
[0103] Based on the above, Figures 1 to 7 The method shown, and Figure 8 To achieve the above objectives, the present application also provides a computer device, specifically a personal computer, server, network device, etc., as shown in the virtual device embodiment. This computer device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to achieve the above-described objectives. Figures 1 to 7 The method of marking angles in the medical images shown.
[0104] Optionally, the computer device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, Wi-Fi interfaces), etc.
[0105] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0106] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and stores the hardware and software resources of a computer device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software within the physical device.
[0107] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software with a necessary general hardware platform, or by hardware. Before the medical image is marked, the region of interest on the medical image can be acquired first. The region of interest can be the region where the patient has a lesion. After the region of interest is determined, the target angle corresponding to the region of interest can be drawn, and the target angle can be used to further determine the range of the lesion of the patient. When the target angle is drawn on the region of interest, the position information of the target angle can be determined according to the drawing action of the target angle. After the position information of the target angle is determined, the range of the target angle can be automatically marked according to the position information, and the value corresponding to the range of the target angle, that is, the angle corresponding to the target angle, can also be marked. The embodiments of the present application mark the target angle, the range and the value of the target angle corresponding to the region of interest on the medical image automatically, which can greatly improve the intuitiveness of the target angle marking, improve the work efficiency of the doctors, and ensure the accuracy of the judgment of the lesion position of the doctors.
[0108] Those skilled in the art can understand that the modules or flows in the drawings are not necessarily necessary for implementing the present application. Those skilled in the art can understand that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the description of the implementation scenario, or can be changed and located in one or more devices different from the implementation scenario. The modules of the above implementation scenario can be combined as one module, or can be further split into multiple sub-modules.
[0109] The above application numbers are only for description, and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any changes that those skilled in the art can think of should fall within the protection scope of the present application.
Claims
1. A method of marking a corner in a medical image, characterized in that, The method comprises: acquiring a region of interest in a medical image; in response to a drawing action of a target angle on the region of interest, acquiring position information of the target angle, comprising: based on the sequence of the drawing action of the target angle on the region of interest, acquiring the start point coordinate, the end point coordinate and the vertex coordinate of the target angle, wherein the position information comprises the start point coordinate, the end point coordinate and the vertex coordinate of the target angle; wherein the range of the target angle is indicated by an arc line; based on the position information of the target angle, automatically indicating the range of the target angle and the corresponding numerical value of the range, comprising: acquiring the radius of the arc line; based on the radius of the arc line, and the start point coordinate, the end point coordinate and the vertex coordinate of the target angle, acquiring the arc line start point coordinate and the arc line end point coordinate of the arc line; based on the arc line start point coordinate, the arc line end point coordinate and the vertex coordinate of the target angle, indicating the range of the target angle by an arc line, and marking the corresponding numerical value of the range.
2. The method of claim 1, wherein, The method comprises: based on the radius of the arc line, and the start point coordinate, the end point coordinate and the vertex coordinate of the target angle, acquiring the arc line start point coordinate and the arc line end point coordinate of the arc line, comprising: establishing a first straight line equation based on the start point coordinate and the vertex coordinate of the target angle; establishing a second straight line equation based on the end point coordinate and the vertex coordinate of the target angle; 3. The method of claim 2, wherein, based on the radius of the arc line, the first straight line equation and two formulas, acquiring the arc line start point coordinate, and based on the radius of the arc line, the second straight line equation and the two formulas, acquiring the arc line end point coordinate. The method comprises: based on the arc line start point coordinate, the arc line end point coordinate and the vertex coordinate of the target angle, indicating the range of the target angle by an arc line, and marking the corresponding numerical value of the range, comprising: acquiring a first vector from the arc line start point to the vertex of the target angle; acquiring a second vector from the arc line start point to the arc line end point; calculating the cross product result between the first vector and the second vector according to the vector cross product method; based on the positive and negative of the cross product result, acquiring the relative position relationship between the vertex of the target angle and the position of the second vector, the relative position relationship comprising that the vertex of the target angle is on the left side, the right side or collinear with the second vector; 4. The method of claim 3, wherein, based on the relative position relationship, and the position relationship of the arc line start point coordinate, the arc line end point coordinate and the vertex coordinate of the target angle, determining the arc line start point radian and the arc line end point radian; based on the arc line start point radian and the arc line end point radian, indicating the range of the target angle by an arc line, and calculating and marking the corresponding numerical value of the range. The method comprises: based on the relative position relationship, and the position relationship of the arc line start point coordinate, the arc line end point coordinate and the vertex coordinate of the target angle, determining the arc line start point radian and the arc line end point radian, comprising: based on the first relationship between the vertical coordinates of the vertex coordinate of the target angle and the arc line start point coordinate, determining a first judgment path; determine a second judging path after the first judging path based on a second relationship between the vertex coordinate of the target angle and a vertical coordinate in the arc end coordinate; when the second judging path indicates to judge a third relationship between the vertex coordinate of the target angle and a horizontal coordinate in the arc start coordinate, determine a third judging path after the second judging path based on the third relationship, and determine a fourth judging path after the third judging path based on the relative position relationship, and determine the arc start radian and the arc end radian based on the fourth judging path; when the second judging path indicates to judge a fourth relationship between the arc start coordinate and the arc end coordinate, determine a third judging path after the second judging path based on the fourth relationship, and determine the arc start radian and the arc end radian based on the third judging path.
5. The method of claim 3, wherein, the arc line labeling based on the arc start radian and the arc end radian includes: the arc line labeling based on the arc start radian and the arc end radian includes:
6. An apparatus for marking a corner in a medical image, characterized by including: an interested region acquisition module, configured to acquire an interested region in a medical image; a position information acquisition module, configured to acquire position information of a target angle in response to a drawing action of the target angle in the interested region; a labeling module, configured to automatically label a range of the target angle and a value corresponding to the range based on the position information of the target angle; the position information acquisition module is specifically configured to: acquire a start coordinate, an end coordinate and a vertex coordinate of the target angle based on a sequence of the drawing action of the target angle in the interested region, wherein the position information includes the start coordinate, the end coordinate and the vertex coordinate of the target angle; the range of the target angle is labeled by an arc line; the labeling module includes: a radius acquisition unit, configured to acquire a radius of the arc line; a coordinate acquisition unit, configured to acquire an arc start coordinate and an arc end coordinate of the arc line based on the radius of the arc line and the start coordinate, the end coordinate and the vertex coordinate of the target angle; and a labeling unit, configured to label the range of the target angle by the arc line based on the arc start coordinate, the arc end coordinate and the vertex coordinate of the target angle, and label the value corresponding to the range.
7. A storage medium having stored thereon a computer program, characterized in that the computer program is executed by the processor to implement the method in any one of claims 1 to 5.
8. A computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, the processor executes the computer program to implement the method in any one of claims 1 to 5.
Citation Information
Patent Citations
Animation algorithm of arc motion
CN108845858A
Method and device for displaying query result based on graph database and storage medium
CN110489119A