Automatic mold generation method, system and storage medium for personalized radiotherapy compensation film
By reconstructing the three-dimensional model from the patient CT image and generating upper and lower molds, the gap problem of conventional compensation membranes in uneven positions on the body surface is solved, and the automated production of personalized radiotherapy compensation membranes and the uniformity of dose distribution are achieved, the operation process is simplified, and the effect of radiation therapy is improved.
Patent Information
- Application Number
- CN202210520660.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-12
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-05-12
AI Technical Summary
In the prior art, conventional square flat compensation membranes have voids of varying sizes between the uneven body surface and the skin, resulting in uneven radiation absorption dose of superficial tissues, affecting the radiation treatment effect, and making molds requires professional knowledge and time-consuming and labor-intensive.
By obtaining the patient CT image, the three-dimensional model is reconstructed using the edge detection algorithm, the rectangular body surface is constructed and the curved surface is cut, the curved surface orientation and angle are adjusted, the upper and lower molds are generated, and the silicone injection holes and exhaust holes are set, and a personalized radiotherapy compensation membrane is finally obtained through 3D printing.
The automated production of personalized radiotherapy compensation membrane is realized, which improves the fit and dose distribution uniformity of the compensation membrane, simplifies the operation process, and improves the treatment effect.
Smart Images

Figure CN115203885B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of personalized radiotherapy compensation films, and in particular to a mold automatic generation method, system and storage medium for personalized radiotherapy compensation films. Background Art
[0002] The dose build-up effect refers to the phenomenon in which the absorbed electron dose increases with depth during radiotherapy for tumors, reaching a peak at a certain depth. This effect causes the absorbed dose in superficial target tissues to not reach its peak during high-energy radiation therapy and to be relatively unevenly distributed, compromising treatment efficacy. Therefore, selecting a compensating film of appropriate thickness and close-to-skin material to cover the skin surface can both correct the maximum dose, stabilizing it within the target area, and improve dose distribution. Conventional square, flat compensating films currently used in radiotherapy have gaps of varying sizes between them and the skin at locations with uneven surfaces. These gaps also reduce the absorbed dose in superficial tissues. If a compensating film with the appropriate shape and material, tailored to the patient's surface, could be indirectly produced using 3D-printed molds and then cast, the resulting film could significantly improve radiotherapy efficacy. Creating such a mold using specialized graphic design software requires proficiency, time-consuming, and extensive prior knowledge. Summary of the Invention
[0003] In view of the problems existing in the prior art, the present invention discloses a method for automatically generating a mold for a personalized radiotherapy compensation film, comprising the following steps:
[0004] Obtaining a CT image of the patient, preprocessing the CT image, extracting pixel points belonging to the patient's body surface curve in the CT image using an edge detection algorithm to obtain a binary image containing the patient's body surface, and performing surface rendering on the binary image to reconstruct a three-dimensional model containing only the patient's body surface curve;
[0005] Construct a cuboid that completely contains the target area on the body surface to be irradiated during radiotherapy, and use the boundary of this cuboid to cut the three-dimensional model to obtain a body surface surface with only one slice;
[0006] Adjust the orientation and angle of the body surface in the coordinate axis. Using a cuboid as a standard, move the center of the cuboid and the body surface to the origin. Then, perform two spatial rotations on the cuboid and the body surface so that each side of the cuboid is parallel to the coordinate axis. Use the PCA principal normal vector algorithm to obtain the principal normal vector of the rotated body surface. Rotate the body surface again so that the principal normal vector is parallel to the coordinate axis to obtain a new body surface suitable for generating a mold.
[0007] A set of upper and lower molds capable of casting a radiotherapy compensation film is automatically generated based on the new body surface curve features. A silicone injection hole and an exhaust hole are set on the upper mold. The exhaust hole is used to exhaust the air in the upper and lower molds when injecting silicone.
[0008] Print the upper and lower molds, inject silicone into the mold cavity through the silicone injection hole, and obtain a compensation film after solidification.
[0009] When constructing the cuboid: determine a rectangle in the two-dimensional window that can contain the surface target area, calculate the world coordinates corresponding to the four points of the rectangle, calculate the point in the three-dimensional model that is closest to the plane where the rectangle is located, construct a plane based on the coordinates of this point and the normal vector of the rectangle, construct a new rectangle based on the projection points of the four points of the rectangle on the plane, determine the new plane where the other four points of the cuboid are located, use the projections of the four points of the new rectangle on the new plane as the other four points, and use the other four points and the four points in the new rectangle to form a cuboid.
[0010] When performing two spatial rotations on the cuboid and its surface: in the first rotation: the straight line perpendicular to the straight line where the y-axis is located and the straight line with the normal vector of the upper surface of the cuboid as the direction vector is used as the rotation axis, and the angle between the unit vector in the positive direction of the y-axis and the normal vector of the upper surface of the cuboid is used as the rotation angle; in the second rotation: the straight line where the y-axis is located is used as the rotation axis, and the minimum angle between the four sides of the upper surface of the cuboid and the straight line where the x-axis is located is used as the rotation angle; when the surface is rotated again: the rotation axis is the straight line perpendicular to the straight line with the principal normal vector as the direction vector and the straight line where the y-axis is located, and the rotation angle is the angle between the principal normal vector and the unit vector in the positive direction of the y-axis.
[0011] When generating the lower mold: find the edges of the new body surface that are only used by one triangle, use the coordinates of the points that make up these edges to form an edge point ring queue, find the smallest cuboid RecA whose sides are parallel to the coordinate axis and can completely contain the surface, and another cuboid RecB with the same center as the smallest cuboid RecA and each side is longer than a certain value d of RecA, and a cuboid RecC with each side longer than a certain value d of RecB, for the two points that make up one side in the edge point ring queue
[0012]
[0013] Find points on the line passing through the center of RecA and parallel to the y-axis whose y coordinates are the same as those of these two points.
[0014]
[0015] Draw a ray from point B1 to point A1 and calculate its intersection with RecA, RecB, and RecC
[0016]
[0017] Similarly,
[0018]
[0019] Taking a certain value h as the height of the combined part of the two molds, and H determined by the height of the highest point of the upper mold surface, the points of the combined patch are as follows
[0020]
[0021]
[0022]
[0023]
[0024]
[0025] O(0, 0, 0).
[0026] Construct quadrilateral patches or triangular patches, which include: a quadrilateral patch composed of A1, A2, C1, and C2; a quadrilateral patch composed of C1, C2, C′1, and C′2; a quadrilateral patch composed of C′1, C′2, E′1, and E′2; a quadrilateral patch composed of E′1, E′2, E″1, and E″2; a quadrilateral patch composed of E″1, E″2, D′1, and D′2; a quadrilateral patch composed of D′1, D′2, D″1, and D″2; and a triangular patch composed of D″1, D″2, and O;
[0027] For each two points forming an edge in the edge point sequence, the above-mentioned mold units are generated respectively and combined to form a complete lower mold.
[0028] When generating the upper mold: copy the new surface and move each point upward by a certain distance t to form the upper mold surface, where t is the desired compensation film thickness. Reverse the normal vector of the patch, and the points of the combined upper mold patch are as follows:
[0029]
[0030]
[0031] O′(0,0,0).
[0032] Construct quadrilateral patches or triangular patches, which include: a quadrilateral patch consisting of A′1, A′2, C′1, and C′2; a quadrilateral patch consisting of C′1, C′2, E′1, and E′2; a quadrilateral patch consisting of E′1, E′2, E″1, and E″2; a quadrilateral patch consisting of E″1, E″2, D′1, and D′2; a quadrilateral patch consisting of D′1, D′2, D″′1, and D″′2; and a triangular patch consisting of D″′1, D″′2, and O′;
[0033] For each two points forming an edge in the edge point sequence, the above-mentioned mold units are generated respectively and combined to form a complete upper mold.
[0034] When setting the silicone injection hole: at the highest point of the entire upper mold surface, with this highest point as the center, a rectangular parallelepiped is used to cut the upper mold as the silicone injection hole, and four curved trapezoids are used to fill the inner edge of the cut.
[0035] When setting the vent hole: divide the surface of the upper mold into grids of a certain size on the XOZ plane, find the highest point of the surface of the upper mold in each grid, use the highest point as the center, use a cylinder with a radius r to cut the upper mold as a circular vent hole, and use an uncovered cylinder to fill the inner edge of the cut.
[0036] 8. An automatic mold generation system for personalized radiotherapy compensation film, comprising:
[0037] The model acquisition unit obtains a CT image of the patient, pre-processes the CT image, extracts pixel points belonging to the patient's body surface curve in the CT image using an edge detection algorithm to obtain a binary image containing the patient's body surface, and then performs surface rendering on the binary image to reconstruct a three-dimensional model containing only the patient's body surface curve;
[0038] The surface construction unit constructs a cuboid that completely contains the target area on the body surface to be irradiated during radiotherapy, and uses the boundary of the cuboid to cut the three-dimensional model to obtain a body surface surface with only one slice;
[0039] a surface adjustment unit that receives the surface feature information transmitted by the surface construction unit, adjusts the orientation and angle of the surface in the coordinate axis, takes a rectangular parallelepiped as a standard, moves the center of the rectangular parallelepiped and the surface to the origin, and then performs two spatial rotations on the rectangular parallelepiped and the surface so that each side of the rectangular parallelepiped is parallel to the coordinate axis; the surface adjustment unit further uses a PCA principal normal vector algorithm to obtain a principal normal vector of the rotated surface, rotates the surface again so that the principal normal vector is parallel to the coordinate axis, and obtains a new surface suitable for generating a mold;
[0040] a mold generation unit, which receives the new body surface curved surface feature information transmitted by the curved surface adjustment unit, and automatically generates a set of upper and lower molds capable of casting the radiotherapy compensation film based on the new body surface curved surface features, and sets a silicone injection hole and an exhaust hole on the upper mold, wherein the exhaust hole is used to exhaust the air in the upper and lower molds when injecting silicone;
[0041] The 3D printing unit prints the upper and lower molds, and injects silicone into the mold cavity through the silicone injection hole to obtain a compensation film after solidification.
[0042] A computer-readable storage medium stores a computer program, wherein when the computer program is run, the method for automatically generating a mold for a personalized radiotherapy compensation film according to any one of claims 1 to 7 is executed.
[0043] Due to the adoption of the above-mentioned technical solution, the present invention provides a method, system and storage medium for automatically generating a mold for personalized radiotherapy compensation film, wherein the method reconstructs a three-dimensional model based on the patient's CT image, can manually determine a rectangular block containing the radiotherapy target area, use this rectangular block to cut the patient's target area surface curve and automatically generate a mold suitable for casting the personalized radiotherapy compensation film. This method only requires the user to input the patient's CT image and select the radiotherapy target area, and the appropriate mold can be automatically derived. The method is simple and effective, the process is fully automated, and can be used clinically for the production of personalized radiotherapy compensation films, and the produced compensation films are highly personalized. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 Flowchart for realizing the method of the present invention
[0046] Figure 2 Schematic diagram of the input CT image
[0047] Figure 3 The effect of edge extraction
[0048] Figure 4 The effect diagram of flood filling
[0049] Figure 5 Draw the reconstruction effect map for the surface
[0050] Figure 6 To determine the effect of the cuboid
[0051] Figure 7 The effect of moving the center of the cuboid and its contained surfaces to the origin
[0052] Figure 8 To calculate the principal normal vector of the surface and straighten the surface effect diagram using the PCA principal normal vector algorithm
[0053] Figure 9 Schematic diagram of the lower mold (left) and cross-section diagram (right)
[0054] Figure 10 Schematic diagram of the upper mold (left) and cross-section diagram (right)
[0055] Figure 11 Schematic diagram of the cross section when the upper and lower molds are combined
[0056] Figure 12 Schematic diagram of the lower mold surface unit
[0057] Figure 13 Schematic diagram of the upper mold surface unit
[0058] Figure 14 Virtual rendering of the mold
[0059] Figure 15 Virtual rendering of the upper mold
[0060] Figure 16 The structural diagram of this system DETAILED DESCRIPTION
[0061] To make the technical solutions and advantages of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention:
[0062] like Figure 1 The method for automatically generating a mold for a personalized radiotherapy compensation film includes the following steps:
[0063] S1: Input the patient's CT image, preprocess the CT image and reconstruct a 3D model containing only the body surface. The specific method is as follows:
[0064] S11. Convert the CT image into an 8-bit grayscale image. Assuming that the set of all CT values in the original image is S, the value of a pixel in the transformed image is Corresponding to the original point CT value P i for:
[0065]
[0066] S12. Use the FindContours algorithm to extract edges from the 8-bit grayscale image and filter out relatively small edges. Redraw the edges on the binary image and use a 3×3 filter operator to dilate the image to fill the gaps between edge pixels to obtain an edge map.
[0067] S13. Process the edge map as follows: maintain a point queue and a matrix of the same size as the original image, with all pixel values in the matrix initially set to 1. Expand the image by a row of zero pixels. Select the points in this row as initial seed points and add them to the queue. Once the row is filled, delete the row. Each time a point is taken from the queue, its eight-neighborhood is traversed. If the point is zero pixels, add it to the queue and rewrite the corresponding position in the matrix to zero pixels, thus obtaining the edge interior fill map.
[0068] S14. For the edge internal fill map, use the MarchingCubes algorithm to perform surface drawing to reconstruct the 3D model and use vtkPolyData to save the model.
[0069] S2: In the coordinate system of the obtained three-dimensional model, the specific method of constructing a rectangular parallelepiped containing the surface of the radiotherapy target area is:
[0070] S21. Determine a rectangle in the two-dimensional window that can contain the body surface target area, and calculate the world coordinates corresponding to the four points of the rectangle.
[0071] S22. Calculate the point in the human body model that is closest to the plane, construct a plane based on the coordinates of this point and the normal vector of the rectangle, and construct a new rectangle based on the projection points of the four points of the rectangle on the plane.
[0072] S23. Determine a new plane where the other four points of the cuboid lie, use the projections of the four points of the new rectangle on the new plane as the other four points, and combine the other four points with the four points in the new rectangle to form a cuboid.
[0073] S24. Use the boundary of the cuboid to cut the three-dimensional model to obtain vtkPolyData containing the surface of the target area.
[0074] S3: The specific method for adjusting the orientation of the body surface in the coordinate axis to be suitable for generating a mold and the angle of the surface to be suitable for casting the compensation film is as follows:
[0075] S31. Take the center of the lower surface of the cuboid I(I x ,I y ,I z ) as the standard, move the body surface coordinates to the origin, and obtain the body surface and rectangular parallelepiped with the center at the origin.
[0076] S32. Take the cuboid obtained in S31 with its center at the origin as the standard, and use the straight lines perpendicular to the straight line where the y-axis is and the straight line with the normal vector of the upper surface of the cuboid as direction vectors as the rotation axis, and use the angle between the unit vector in the positive direction of the y-axis and the normal vector of the upper surface of the cuboid as the rotation angle, and rotate the surface surface and the cuboid with its center at the origin; when rotating again, use the straight line where the y-axis is as the rotation axis, and use the minimum angle between the four sides of the upper surface of the cuboid with its center at the origin and the straight line where the x-axis is as the rotation angle, and rotate the surface surface and the cuboid with its center at the origin so that each side of the cuboid is parallel to the coordinate axis, and obtain the surface surface at the center.
[0077] S33. Calculate the principal normal vector of the body surface at the center using the PCA principal normal vector algorithm. The calculation method is: Assume that the equation of the plane
[0078] z=a0x+a1y+a2
[0079] According to the least squares method
[0080]
[0081] Take partial derivatives of a0, a1, and a2 respectively, and we get
[0082]
[0083]
[0084] a0∑x i +a1∑y i +a2n=∑z i
[0085] Expressed in matrix form as
[0086]
[0087] According to Cramer's rule,
[0088]
[0089] The plane normal vector obtained by fitting, i.e. (a0, a1, -1), is normalized, and the normal vector of the plane formed by this vector and the y-axis is used as the axis. Another rotation is performed, and the angle is the angle between the vector and the y-axis. The direction of the main normal vector of the surface is adjusted to be consistent with the y-axis to obtain the new surface surface.
[0090] S4: Generate a set of upper and lower molds based on the new surface obtained in S3. The specific method is as follows:
[0091] S41. Calculate the edges of the new body surface that are only used by a group of triangular facets, and form a ring point sequence as the surface edge point sequence.
[0092] S42. Find the smallest cuboid RecA whose sides are parallel to the coordinate axes and can completely contain the surface, another cuboid RecB with the same center as RecA and whose sides are longer than RecA by a certain value d, and another cuboid RecC whose sides are longer than RecB by a certain value d.
[0093]
[0094] Find points on the line passing through the center of RecA and parallel to the y-axis whose y coordinates are the same as those of these two points.
[0095]
[0096] Draw a ray from point B1 to point A1 and calculate its intersection with RecA, RecB, and RecC
[0097]
[0098] Similarly,
[0099]
[0100] S43. The method for generating the lower mold is as follows:
[0101] Taking a certain value h as the height of the combined part of the two molds, and H determined by the height of the highest point of the upper mold surface, the points of the combined patch are as follows
[0102]
[0103]
[0104]
[0105]
[0106]
[0107] O(0, 0, 0).
[0108] Then, quadrilateral patches (or two triangular patches that share a side) or triangular patches are formed in vtkPolydata. These patches include: quadrilateral patches composed of A1, A2, C1, C2, quadrilateral patches composed of C1, C2, C'1, C'2, quadrilateral patches composed of C'1, C'2, E'1, E'2, quadrilateral patches composed of E'1, E'2, E"1, E"2, quadrilateral patches composed of E"1, E"2, D'1, D'2, quadrilateral patches composed of D'1, D'2, D"1, D"2, and triangular patches composed of D"1, D"2, and O.
[0109] For each two points that make up an edge in the edge point sequence, the above-mentioned mold units are generated in vtkPolydata respectively, and combined to form a complete lower mold.
[0110] S44. The specific method of generating the upper mold is as follows:
[0111] Duplicate the new surface and move each point upward by a certain distance t, where t is the desired compensation film thickness. Reverse the normal vector of the patch. The points of the combined mold patch are as follows:
[0112]
[0113]
[0114] O′(0,0,0).
[0115] Add quadrilateral or triangular patches to vtkPolydata. These patches include: quadrilateral patches consisting of A'1, A'2, C'1, C'2; quadrilateral patches consisting of C'1, C'2, E'1, E'2; quadrilateral patches consisting of E'1, E'2, E"1, E"2; quadrilateral patches consisting of E"1, E"2, D'1, D'2; quadrilateral patches consisting of D'1, D'2, D"'1, D"'2; triangular patches consisting of D"'1, D"'2, O'.
[0116] For each two points forming an edge in the edge point sequence, the above-mentioned mold units are generated respectively and combined to form a complete upper mold.
[0117] S5. Set a silicone injection hole and a vent hole on the obtained upper mold. The generation method is:
[0118] S51. The method for setting the silicone injection hole is: at the highest point of the entire upper mold surface curve, with this highest point as the center, use a rectangular block that passes through the upper mold surface curve to cut the upper mold as the silicone injection hole, and use four curved trapezoids to fill the inner edge of the cut.
[0119] The method of setting the vent hole in S52 is: divide the surface of the upper mold into grids of a certain size on the XOZ plane, find the highest point of the surface of the upper mold in each grid, take this highest point as the center, use a cylinder with a radius of r to cut the upper mold as a circular vent hole, and use an uncovered cylinder to fill the inner edge of the cut.
[0120] S6. Export the STL files of the upper and lower molds, 3D print them, and then pour silicone of suitable material and wait for it to solidify to obtain a personalized radiotherapy compensation membrane.
[0121] like Figure 16As shown, corresponding to the mold automatic generation method for personalized radiotherapy compensation film provided by the present invention, the present invention also provides a mold automatic generation system for personalized radiotherapy compensation film, including: a model acquisition unit, a surface construction unit, a surface adjustment unit, a mold generation unit and a 3D printing unit.
[0122] The model acquisition unit obtains the patient's CT image, preprocesses the CT image, uses the edge detection algorithm to extract the pixel points belonging to the patient's body surface curve in the CT image to obtain a binary image containing the patient's body surface, and then performs surface rendering on the binary image to reconstruct a three-dimensional model containing only the patient's body surface curve.
[0123] The surface construction unit constructs a cuboid that completely contains the body surface target area to be irradiated during radiotherapy, and uses the boundary of the cuboid to cut the three-dimensional model to obtain a body surface surface with only one layer.
[0124] The surface adjustment unit is used to receive the surface feature information transmitted by the surface construction unit, adjust the orientation and angle of the surface in the coordinate axis, take the cuboid as the standard, move the center of the cuboid and the surface to the origin, and then perform two spatial rotations on the cuboid and the surface so that each side of the cuboid is parallel to the coordinate axis; the surface adjustment unit also uses the PCA principal normal vector algorithm to obtain the principal normal vector of the rotated surface, rotates the surface again so that the principal normal vector is parallel to the coordinate axis, and obtains a new surface suitable for generating a mold.
[0125] The mold generation unit receives the new surface feature information transmitted by the surface adjustment unit, and automatically generates a set of upper and lower molds capable of casting the radiotherapy compensation film based on the new surface feature, and sets a silicone injection hole and an exhaust hole on the upper mold, wherein the exhaust hole is used to discharge the air present in the upper and lower molds when injecting silicone.
[0126] The 3D printing unit is used to print the upper and lower molds, and inject silicone into the mold cavity through the silicone injection hole to obtain a compensation film after solidification.
[0127] An embodiment of the present invention further discloses a computer-readable storage medium, which stores a computer instruction set. When the computer instruction set is executed by a processor, it implements the automatic mold generation method for personalized radiotherapy compensation film provided in any of the above embodiments.
[0128] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0129] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, and can be electrical or other forms.
[0131] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0132] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0133] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
[0135] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A method for automatically generating molds for personalized radiotherapy compensation films, characterized in that include: Obtaining a CT image of the patient, preprocessing the CT image, extracting pixel points belonging to the patient's body surface curve in the CT image using an edge detection algorithm to obtain a binary image containing the patient's body surface, and performing surface rendering on the binary image to reconstruct a three-dimensional model containing only the patient's body surface curve; Construct a cuboid that completely contains the target area on the body surface to be irradiated during radiotherapy, and use the boundary of this cuboid to cut the three-dimensional model to obtain a body surface surface with only one slice; Adjust the orientation and angle of the body surface in the coordinate axis. Using a cuboid as a standard, move the center of the cuboid and the body surface to the origin. Then, perform two spatial rotations on the cuboid and the body surface so that each side of the cuboid is parallel to the coordinate axis. Use the PCA principal normal vector algorithm to obtain the principal normal vector of the rotated body surface. Rotate the body surface again so that the principal normal vector is parallel to the coordinate axis to obtain a new body surface suitable for generating a mold. A set of upper and lower molds capable of casting a radiotherapy compensation film is automatically generated based on the new body surface curve features. A silicone injection hole and an exhaust hole are set on the upper mold. The exhaust hole is used to exhaust the air in the upper and lower molds when injecting silicone. Print the upper and lower molds, inject silicone into the mold cavity through the silicone injection hole, and obtain a compensation film after solidification; When generating the next mold: Find the edges of the new body surface that are only used by one triangle, use the coordinates of the points that make up these edges to form a ring queue of edge points, find the smallest cuboid RecA whose sides are parallel to the coordinate axes and can completely contain the surface, and another cuboid RecB with the same center as the smallest cuboid RecA and each side is longer than a certain value d of RecA, and a cuboid RecC with each side longer than a certain value d of RecB, for the two points that make up one side in the edge point ring queue Find points on the line passing through the center of RecA and parallel to the y-axis whose y coordinates are the same as those of these two points. Draw a ray from point B1 to point A1 and calculate its intersection with RecA, RecB, and RecC Similarly, Taking a certain value h as the height of the combined part of the two molds, and H determined by the height of the highest point of the upper mold surface, the points of the combined patch are as follows O(0,0,0) Construct quadrilateral patches or triangular patches, which include: quadrilateral patches composed of A1, A2, C1, C2, and triangular patches composed of C1, C2, C ' 1. C ' 2 quadrilateral patches, composed of C ' 1. C ' 2. E ' 1. E ' 2 quadrilateral patches, composed of E ' 1. E ' 2. E ' 1 ' 、E ' 2 ' The quadrilateral patch is composed of E ' 1 ' 、E ' 2 ' 、D ' 1. D ' 2 quadrilateral patch, composed of D ' 1. D ' 2. D ' 1 ' 、D ' 2 ' The quadrilateral patch is composed of D ' 1 ' 、D ' 2 ' , a triangular patch composed of O; For each two points that make up an edge in the edge point sequence, mold units are generated respectively and combined to form a complete lower mold.
2. The method according to claim 1, wherein: When constructing the cuboid: determine a rectangle in the two-dimensional window that can contain the surface target area, calculate the world coordinates corresponding to the four points of the rectangle, calculate the point in the three-dimensional model that is closest to the plane where the rectangle is located, construct a plane based on the coordinates of this point and the normal vector of the rectangle, construct a new rectangle based on the projection points of the four points of the rectangle on the plane, determine the new plane where the other four points of the cuboid are located, use the projections of the four points of the new rectangle on the new plane as the other four points, and use the other four points and the four points in the new rectangle to form a cuboid.
3. The method according to claim 2, wherein: When performing two spatial rotations on the cuboid and its surface: in the first rotation: the straight line perpendicular to the straight line where the y-axis is located and the straight line with the normal vector of the upper surface of the cuboid as the direction vector is used as the rotation axis, and the angle between the unit vector in the positive direction of the y-axis and the normal vector of the upper surface of the cuboid is used as the rotation angle; in the second rotation: the straight line where the y-axis is located is used as the rotation axis, and the minimum angle between the four sides of the upper surface of the cuboid and the straight line where the x-axis is located is used as the rotation angle; when the surface is rotated again: the rotation axis is the straight line perpendicular to the straight line with the principal normal vector as the direction vector and the straight line where the y-axis is located, and the rotation angle is the angle between the principal normal vector and the unit vector in the positive direction of the y-axis.
4. The method according to claim 1, wherein: When generating the upper mold: The new surface is copied and each point is moved upward by a certain distance t to form the upper mold surface. t is the desired compensation film thickness. The normal vector of the patch is reversed, and the points of the combined upper mold patch are as follows: O ' (0,0,0) Construct quadrilateral or triangular patches, which contain: ' 1. A ' 2. C ' 1. C ' 2 quadrilateral patches, composed of C ' 1. C ' 2. E ' 1. E ' 2 quadrilateral patches, composed of E ' 1. E ' 2. E ' 1 ' 、e ' 2 ' The quadrilateral patch is composed of e ' 1 ' 、e ' 2 ' d ' 1. D ' 2 quadrilateral patch, composed of d ' 1. D ' 2. D ' 1 ’' 、D ' 2 ‘' The quadrilateral patch is composed of D ' 1 ’' 、D ' 2 ‘' , O ' The triangles composed of For each two points forming an edge in the edge point sequence, the above-mentioned mold units are generated respectively and combined to form a complete upper mold.
5. The method according to claim 1, wherein: When setting the silicone injection hole: at the highest point of the entire upper mold surface, with this highest point as the center, a rectangular parallelepiped is used to cut the upper mold as the silicone injection hole, and four curved trapezoids are used to fill the inner edge of the cut.
6. The method according to claim 5, characterized in that: When setting the vent hole: divide the surface of the upper mold into grids of a certain size on the XOZ plane, find the highest point of the surface of the upper mold in each grid, use the highest point as the center, use a cylinder with a radius r to cut the upper mold as a circular vent hole, and use an uncovered cylinder to fill the inner edge of the cut.
7. A mold automatic generation system according to the method of claim 1, characterized in that include: The model acquisition unit obtains a CT image of the patient, pre-processes the CT image, extracts pixel points belonging to the patient's body surface curve in the CT image using an edge detection algorithm to obtain a binary image containing the patient's body surface, and then performs surface rendering on the binary image to reconstruct a three-dimensional model containing only the patient's body surface curve; The surface construction unit constructs a cuboid that completely contains the target area on the body surface to be irradiated during radiotherapy, and uses the boundary of the cuboid to cut the three-dimensional model to obtain a body surface surface with only one slice; a surface adjustment unit that receives the surface feature information transmitted by the surface construction unit, adjusts the orientation and angle of the surface in the coordinate axis, takes a rectangular parallelepiped as a standard, moves the center of the rectangular parallelepiped and the surface to the origin, and then performs two spatial rotations on the rectangular parallelepiped and the surface so that each side of the rectangular parallelepiped is parallel to the coordinate axis; the surface adjustment unit further uses a PCA principal normal vector algorithm to obtain a principal normal vector of the rotated surface, rotates the surface again so that the principal normal vector is parallel to the coordinate axis, and obtains a new surface suitable for generating a mold; a mold generation unit, which receives the new body surface curved surface feature information transmitted by the curved surface adjustment unit, and automatically generates a set of upper and lower molds capable of casting the radiotherapy compensation film based on the new body surface curved surface features, and sets a silicone injection hole and an exhaust hole on the upper mold, wherein the exhaust hole is used to exhaust the air in the upper and lower molds when injecting silicone; The 3D printing unit prints the upper and lower molds, and injects silicone into the mold cavity through the silicone injection hole to obtain a compensation film after solidification.
8. A computer-readable storage medium storing a computer program, wherein: When the computer program is running, the method for automatically generating a mold for a personalized radiotherapy compensation film according to any one of claims 1 to 5 is executed.
Citation Information
Patent Citations
Physical compensator generating, equipment, medium and system based on 3D printing
CN108635682A
Method and system for evaluating effect of radiotherapy
WO2014169744A1