Puncture operation path planning method and device

By constructing a three-dimensional geometric model and spatial index structure, the problem of individualized morphological and posture differences in lung puncture path planning was solved, achieving precise and safe planning of the puncture path and reducing surgical risks.

CN122005082APending Publication Date: 2026-05-12ZHEJIANG LANCET ROBOT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610175188.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-06
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing lung puncture path planning techniques do not take into account the individualized morphology of lung tissue and the spatial orientation differences of the puncture path, resulting in low path planning accuracy, insufficient reliability of safety boundaries, and increased risk of surgical complications.

Method used

By constructing a three-dimensional geometric model based on CT image data, establishing a reference coordinate system, performing spatial sampling and extracting point clouds, establishing a spatial index structure, calculating the minimum spatial distance between the path sampling point and the lung boundary, and combining it with a preset safety threshold to determine the safety of the puncture path.

Benefits of technology

It significantly improves the safety, accuracy, and clinical controllability of puncture path planning, enabling proactive assessment and avoidance of puncture risks, and ensuring the precision and safety of the puncture path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122005082A_ABST
    Figure CN122005082A_ABST
Patent Text Reader

Abstract

The invention provides a puncture operation path planning method and device, and the method comprises the steps: constructing a three-dimensional geometric model for a lung based on CT image data; determining a puncture needle insertion starting point and a lesion target end point in the three-dimensional geometric model, and establishing a reference coordinate system on the three-dimensional geometric model according to the puncture needle insertion starting point and the lesion target end point; executing space sampling on a puncture path constructed along the puncture needle insertion starting point and the lesion target end point to obtain a plurality of path sampling points; extracting a point cloud on the surface of the three-dimensional geometric model, and establishing a spatial index structure; calculating the minimum spatial distance from each path sampling point to the three-dimensional geometric model based on the spatial index structure; the minimum space distance is compared with a preset safety threshold value, and the safety of the puncture path is determined. By adopting the technical scheme, the safety, accuracy and clinical controllability of puncture path planning can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of surgical pathway planning technology, specifically to a method and apparatus for planning puncture surgical pathways. Background Technology

[0002] Lung biopsy is a core minimally invasive technique for diagnosing lung lesions (such as nodules and tumors). The core requirement of its surgical planning is to accurately generate a puncture path from the chest wall surface to the lesion tissue, while avoiding important anatomical structures such as pulmonary blood vessels and bronchi, and establishing a safety boundary to guide the operation range of the puncture needle.

[0003] In existing lung puncture path planning technology, the mainstream approach is for doctors to manually mark the puncture start point (chest wall surface point) and end point (lesion target point) on a two-dimensional CT slice, and generate the puncture path by simply connecting the two spatial points. The path length is calculated using only the basic Euclidean distance formula.

[0004] However, this method of puncture path planning does not take into account the individual morphology of lung tissue and the spatial orientation differences of the puncture path, and still needs improvement. Summary of the Invention

[0005] In view of this, the present invention provides a method and apparatus for puncture surgical path planning, which can improve the safety, accuracy and clinical controllability of puncture path planning.

[0006] In a first aspect, the present invention provides a method for planning a puncture surgical path, comprising:

[0007] A three-dimensional geometric model of the lungs was constructed based on CT image data. In the three-dimensional geometric model, the starting point of the puncture needle insertion and the ending point of the lesion target are determined, and a reference coordinate system is established on the three-dimensional geometric model based on the starting point of the puncture needle insertion and the ending point of the lesion target. Spatial sampling is performed along the puncture path constructed from the starting point of the puncture needle insertion and the ending point of the lesion target to obtain multiple path sampling points; Extract the point cloud from the surface of the three-dimensional geometric model and establish a spatial index structure; Based on the spatial index structure, calculate the minimum spatial distance from each path sampling point to the three-dimensional geometric model; The safety of the puncture path is determined by comparing the minimum spatial distance with a preset safety threshold.

[0008] Optionally, the starting point of the puncture needle has a first coordinate value, and the ending point of the lesion target has a second coordinate value; The step of establishing a reference coordinate system on the three-dimensional geometric model based on the puncture needle insertion point and the lesion target point endpoint includes: The path direction vector of the puncture path is determined based on the first coordinate value and the second coordinate value; The path direction vector is normalized to determine the unit path direction vector; Based on the z-component in the unit path direction vector, determine the auxiliary vector; Based on the unit path direction vector and the auxiliary vector, a first vector orthogonal to the unit path direction vector is determined, and normalization processing is performed to determine the first unit direction vector; Based on the first vector and the unit path direction vector, a second vector is determined, and a normalization process is performed to determine the second unit direction vector; The reference coordinate system is obtained by taking the midpoint between the puncture needle insertion point and the lesion target point as the origin, and the unit path direction vector, the second unit direction vector, and the first unit direction vector as axes, respectively.

[0009] Optionally, the step of extracting the point cloud of the surface of the three-dimensional geometric model and establishing a spatial index structure includes: Traverse all triangular faces of the three-dimensional geometric model and extract point clouds that include at least: face vertices, face centroids, and edge midpoints to form a point cloud set; wherein each point cloud has its own corresponding pixel index coordinates; Transform the pixel index coordinates of each point cloud to the reference coordinate system to determine the corresponding transformed point cloud; Based on the transformed point cloud, the transformed point cloud is recursively divided according to multiple preset spatial coordinate directions. In each division, the point corresponding to the middle position of the point cloud data in the current coordinate direction is selected as the division threshold to construct the corresponding child nodes and form the spatial index structure.

[0010] Optionally, the pixel index of the point cloud is used to characterize the relative position of the point cloud in the CT image data; The step of converting the pixel index coordinates of each point cloud to the reference coordinate system and determining the corresponding converted point cloud includes: obtaining the spatial coordinate system information corresponding to the CT image, wherein the spatial coordinate system information includes at least the starting position parameters of the image space and the spatial sampling interval in three orthogonal directions; and performing spatial mapping processing on the position of each point cloud based on the spatial coordinate system information and the pixel index to determine the position coordinates of the converted point cloud in the actual physical space, so as to convert the converted point cloud to the reference coordinate system. The step of recursively dividing the transformed point cloud according to multiple preset spatial coordinate directions, and selecting the point corresponding to the middle position of the point cloud data in the current coordinate direction as the division threshold in each division, to construct corresponding child nodes and form the spatial index structure, includes: Using a first preset coordinate direction as the initial division direction, a division point corresponding to the middle position of the transformed point cloud in the coordinate direction is determined, and the value of the division point in the coordinate direction is used as a division threshold. Based on the division threshold, the transformed point cloud is divided into a first sub-point cloud and a second sub-point cloud. The first sub-point cloud contains points whose values ​​in the first preset coordinate direction are less than the division threshold, and the second sub-point cloud contains points whose values ​​in the first preset coordinate direction are greater than the division threshold. The first sub-point cloud and the second sub-point cloud are respectively constructed as left and right child nodes of an index structure. The above division operation is performed on the first sub-point cloud with the second preset coordinate direction as the division direction, and the above division operation is performed on the second sub-point cloud with the third preset coordinate direction as the division direction. The partitioning operation is recursively performed on each sub-point cloud according to the preset coordinate direction order to build an index structure layer by layer; When the number of points in any sub-point cloud is less than or equal to a preset threshold, the further division of that sub-point cloud is stopped, and it is identified as a leaf node.

[0011] Optionally, calculating the minimum spatial distance from each path sampling point to the three-dimensional geometric model based on the spatial index structure includes: For each of the path sampling points, a traversal operation is performed on the spatial index structure to determine the nearest neighbor point to each path sampling point, and the distance value is used as the initial implicit distance; In response to the neighboring point not being located inside the triangular facet, the initial implicit distance is used as the minimum spatial distance; In response to the neighboring point being located inside the triangular facet, a new distance value is determined as the minimum spatial distance based on the coordinates of one vertex of the triangular facet containing the neighboring point, the normal vector of the triangular facet, and the path sampling point.

[0012] Optionally, the method for determining whether the neighboring point is located inside the triangular facet is as follows: Obtain the basic information of the triangular facet, which is uniquely determined by three non-collinear vertices, each of which has corresponding three-dimensional spatial coordinates; Based on the three-dimensional spatial coordinates of the three vertices, the normal vector of the triangular facet is obtained through the vector cross product operation; Based on the directional relationship between the normal vector and each coordinate axis in the three-dimensional coordinate system, the coordinate plane with the smallest angle to the normal vector is selected as the projection plane. The neighboring points and the three vertices of the triangular facet are synchronously projected from three-dimensional space onto the projection plane to obtain the corresponding two-dimensional point coordinates and two-dimensional triangles; Within the projection plane, a ray is emitted from the coordinates of the two-dimensional point along a preset direction, and the number of intersections between the ray and each side of the two-dimensional triangle is counted. The inclusion relationship between the spatial point and the triangular facet is determined based on the number of intersection points. When the number of intersection points is odd, the spatial point is determined to be inside the triangular facet. When the number of intersection points is even or the two-dimensional point coincides with the boundary of the two-dimensional triangle, the spatial point is determined to be outside the triangular facet or on the boundary. The new distance value is determined using the following method:

[0013] in, Let be the coordinates of one vertex of the triangular facet; Let be the normal vector of the triangular facet; These are the path sampling points.

[0014] Optionally, comparing the minimum spatial distance with a preset safety threshold to determine the safety of the puncture path includes: In response to the existence of any path sampling point whose minimum spatial distance is less than the lower limit of the preset safety threshold, the puncture path is determined to be unsafe; If the minimum spatial distance corresponding to all path sampling points is within the preset safety threshold range, an early warning indication will be output; In response to the fact that the minimum spatial distance corresponding to all path sampling points is greater than the upper limit of the preset safety threshold range, the puncture path is determined to be a safe path.

[0015] Optionally, the puncture surgical path planning method satisfies one or more of the following: In response to the puncture path being a safe path, a safe boundary is generated with the puncture path as the central axis, adapting to the posture of the puncture path. In response to the puncture path being a safe path, the puncture path is selected as the selected path, and the selected path and its corresponding safe boundary are set to a first color, while other areas are set to a second color. After the selected path is determined, the slice index of the starting or ending key point of the path in the 3D image is calculated, and the coordinate position of the image view in the three directions is determined according to the slice index, the corresponding slice spacing and the minimum coordinate value in each direction, so that the image view is automatically positioned to the key point and kept synchronized with the path position in real time.

[0016] Optionally, generating a safety boundary with the puncture path as the central axis, adapting the posture of the puncture path, includes: The center of the puncture path is taken as the center of the safety boundary geometry, and the total length of the puncture path is taken as the height of the safety boundary geometry. Based on the spatial dimensions of the lesion tissue and the thickness of the chest wall, the radius of the safety boundary geometry is determined, wherein the radius is adjusted according to the chest wall thickness based on a preset basic safety radius; The cylinder is used as the basic shape of the safety boundary geometry; The cylinder is rotated and transformed based on the reference coordinate system so that the direction of the cylinder's axis is consistent with the direction of the puncture path. Based on the rotation transformation, the cylinder is translated so that the center position of the cylinder coincides with the center position of the puncture path, thereby achieving position and orientation matching of the safety boundary geometry in three-dimensional space. By performing spatial transformation on the initial vertices of the cylinder, a safety boundary geometric model that is precisely aligned with the puncture path is generated. Construct an implicit distance constraint model to describe the distance relationship between spatial points and the surface of the safety boundary geometry; Based on the implicit distance constraint model, the point cloud on the surface of the three-dimensional geometric model is judged. When the point cloud is within the safe boundary range, it is determined that the safe boundary is in contact with the surface of the three-dimensional geometric model. By limiting the adaptation error between the safe boundary and the surface of the three-dimensional geometric model to within a preset threshold range, the fit optimization between the safe boundary and the surface of the three-dimensional geometric model is achieved.

[0017] In a second aspect, the present invention provides a puncture surgical path planning device, comprising: Building units are used to construct three-dimensional geometric models of the lungs based on CT image data; A unit is established to determine the starting point of the puncture needle insertion and the ending point of the lesion target in the three-dimensional geometric model, and to establish a reference coordinate system on the three-dimensional geometric model based on the starting point of the puncture needle insertion and the ending point of the lesion target. The sampling unit is used to perform spatial sampling along the puncture path constructed by the starting point of the puncture needle and the ending point of the lesion target point, and obtain multiple path sampling points. An extraction unit is used to extract the point cloud of the surface of the three-dimensional geometric model and establish a spatial index structure; The planning unit is used to calculate the minimum spatial distance from each path sampling point to the three-dimensional geometric model based on the spatial index structure, and to compare the minimum spatial distance with a preset safety threshold to determine the safety of the puncture path.

[0018] Compared with the prior art, the technical solution of the embodiments of the present invention has the following advantages: The puncture path planning method provided in this invention constructs a three-dimensional geometric model of the lung based on CT image data. This model realistically recreates the spatial morphology of the lung and uniformly describes the spatial relationship between the lung boundary and internal lesions, ensuring the spatial accuracy of the puncture path analysis from the outset. Based on clearly defining the starting point of the puncture needle insertion and the endpoint of the lesion target, a reference coordinate system is established in the three-dimensional geometric model. Spatial sampling is performed along the constructed puncture path, transforming the continuous puncture process into a calculable and analyzable multi-point spatial representation, avoiding rough judgments based solely on a single geometric line segment. Furthermore, by extracting the point cloud from the surface of the three-dimensional geometric model and establishing a spatial index structure, the minimum spatial distance between the path sampling point and the lung boundary is quickly and accurately calculated, thereby continuously monitoring the safe interval of the puncture path throughout the entire advancement process. Based on this, comparing the minimum spatial distance with a preset safety threshold allows for the identification of potentially high-risk paths before or during the planning stage of the puncture, enabling proactive risk assessment and avoidance. In other words, this method constructs a systematic safety judgment mechanism that runs through three-dimensional modeling, path quantitative representation and spatial distance assessment, transforming the traditional experience-based puncture path selection into a quantitative analysis process based on objective spatial data, thereby significantly improving the safety, accuracy and clinical controllability of lung puncture path planning. Attached Figure Description

[0019] Figure 1 A flowchart of a puncture surgery path planning method provided in an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of a three-dimensional geometric model of the lung provided in an embodiment of the present invention.

[0021] Figure 3 This is a flowchart of constructing a reference coordinate system provided by an embodiment of the present invention.

[0022] Figure 4 This is a flowchart of constructing a spatial index structure provided by an embodiment of the present invention.

[0023] Figure 5 This is a schematic diagram of the geometric generation and transformation of a safety boundary provided in an embodiment of the present invention.

[0024] Figure 6 This is a schematic diagram of the structure of a puncture surgery path planning device provided in an embodiment of the present invention. Detailed Implementation

[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0026] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0027] As described in the background section, existing lung puncture path planning techniques do not consider the individualized morphology of lung tissue or the spatial orientation differences of the puncture path. They only perform a translation operation to initially align the cylinder with the path. In other words, the existing methods have many defects and cannot adapt to the current surgical requirements.

[0028] Specifically, this manifests in: First, the path and safety boundary are poorly adapted: the spatial axis system and rotation transformation model of the puncture path have not been established, and the direction of the fixed radius cylinder is inconsistent with the direction of the puncture path, resulting in the center of the safety boundary being misaligned, making it impossible to accurately wrap the puncture channel, and easily leading to misjudgment of important structures such as blood vessels and bronchi.

[0029] Second, the feasibility of the pathway is not verified: the pathway is generated by connecting two points without verifying the intersection of the three-dimensional geometric features of the lung tissue (chest wall, lung parenchyma, and diseased tissue), which may lead to the risk of the pathway penetrating the pleura excessively and damaging blood vessels or bronchi.

[0030] Third, insufficient individualized adaptation: the radius of the safety boundary is a fixed value and is not dynamically adjusted according to individualized parameters such as the size of the lung lesion and the thickness of the chest wall. It also does not achieve precise fit with the lung surface through geometric trimming, resulting in the safety boundary either covering too much normal lung tissue or failing to completely avoid risk areas.

[0031] Fourth, poor image linkage: The spatial coordinates of key points along the puncture path are not linked in real time with parameters such as slice index, slice thickness, and resolution of CT images, making it impossible for doctors to quickly locate the corresponding anatomical level and affecting planning efficiency.

[0032] In other words, these shortcomings result in low accuracy of puncture path planning and insufficient reliability of safety boundaries in existing technologies, increasing the risk of surgical complications and failing to meet the clinical needs of "precise and minimally invasive" lung puncture surgery.

[0033] Based on this, in order to solve at least one of the above-mentioned technical problems, embodiments of the present invention provide a puncture surgical path planning method. By constructing a systematic safety judgment mechanism that integrates three-dimensional modeling, path quantitative representation and spatial distance assessment, the traditional experience-based puncture path selection is transformed into a quantitative analysis process based on objective spatial data, thereby significantly improving the safety, accuracy and clinical controllability of lung puncture path planning.

[0034] To enable those skilled in the art to better understand and implement this solution, the following detailed description of the specific solution, principles, advantages, and effects of the present invention is provided with reference to the accompanying drawings and specific embodiments.

[0035] See Figure 1 The flowchart shown in this embodiment of the invention provides a method for planning a puncture surgical path, as follows: Figure 1 As shown, the following steps can be performed: S101 constructs a three-dimensional geometric model of the lungs based on CT image data.

[0036] In some embodiments, lung CT image data of a patient can be acquired, which may be continuous tomographic images in DICOM format.

[0037] For a detailed description of how to acquire CT image data, please refer to existing examples; this is not the focus of this solution.

[0038] The CT image data is preprocessed, including but not limited to image denoising, grayscale normalization, and artifact correction. Then, lung tissue segmentation algorithms based on threshold segmentation, region growing, or deep learning are used to extract lung structures from the CT image data.

[0039] After lung region segmentation is completed, the segmentation results are reconstructed in three dimensions to generate a three-dimensional geometric model of the lungs. The three-dimensional geometric model can realistically reflect the spatial morphology and boundary information of the lungs.

[0040] For example, multimodal image preprocessing (e.g., nonlocal mean filtering for noise reduction, adaptive histogram equalization to enhance tissue contrast), layered contour extraction (dynamic threshold segmentation based on CT values ​​+ Canny edge detection), and moving cubes algorithm are used to generate a three-dimensional solid model, ensuring that the model can accurately reproduce key anatomical features such as chest wall thickness, vascular branches, and lesion morphology, with a model boundary position error ≤0.3mm.

[0041] In this way, it is possible to generate Figure 2 The three-dimensional geometric model S of the lung is shown.

[0042] It should be noted that for a more detailed implementation of constructing a three-dimensional geometric model of the lungs based on CT image data, please refer to the existing examples.

[0043] By performing step S101, three-dimensional reconstruction of the lung CT images is performed to obtain a three-dimensional geometric model of the lung tissue (chest wall, lung parenchyma, lesion tissue, blood vessels, and bronchi), providing an anatomical basis for subsequent path planning and safety boundary calculation; at the same time, a unified image space coordinate system is established. Clearly define the spatial positioning benchmark.

[0044] For example, the image spatial coordinate system has the following spatial coordinate system information: Spatial resolution: These correspond to the pixel spacing along the x-axis (sagittal), y-axis (coronal), and z-axis (axial) directions, respectively, and are consistent with the original resolution of the CT image.

[0045] Coordinate range: ,in The minimum coordinate value in the coordinate system. This represents the maximum coordinate value. The coordinate range defines the range of the generated 3D geometric model S.

[0046] In one embodiment, the origin Set it to the lower left corner of the CT scan field of view to ensure that the coordinates are mapped one-to-one with the actual anatomical space.

[0047] S102, determine the starting point of the puncture needle insertion and the ending point of the lesion target in the three-dimensional geometric model, and establish a reference coordinate system on the three-dimensional geometric model based on the starting point of the puncture needle insertion and the ending point of the lesion target.

[0048] In some embodiments, after determining the three-dimensional geometric model, the puncture and needle insertion point is selected by the physician or automatically recommended by the system based on clinical needs. The starting point for the puncture needle is usually located on the body surface or at the outer boundary of the lung.

[0049] Simultaneously, the endpoint of the lesion target is determined in the three-dimensional geometric model. The endpoint of the lesion target corresponds to the spatial location of the lung lesion.

[0050] At the aforementioned puncture needle insertion point Targeting the endpoint of the lesion The direction of the axis can be used as the reference axis to establish a reference coordinate system in the three-dimensional geometric model, which can be used to uniformly describe the positional relationship of subsequent puncture paths and spatial sampling points.

[0051] In some embodiments, the puncture needle entry point Having the first coordinate value The endpoint of the lesion target Having a second coordinate value .

[0052] In some examples, the starting point of the puncture needle. This can refer to the puncture site on the chest wall surface or the endpoint of the lesion target. It can refer to the target point in the diseased tissue.

[0053] Accordingly, see Figure 3 The flowchart shown in the embodiment of the present invention provides a process for constructing a reference coordinate system, as follows: Figure 3 As shown, it includes: S301, determine the path direction vector of the puncture path based on the first coordinate value and the second coordinate value.

[0054] In some embodiments, the vector difference between the first coordinate value and the second coordinate value can be used as the path direction vector of the puncture path, which defines the spatial orientation of the puncture path.

[0055] For example, path direction vector .

[0056] S302, The path direction vector is normalized to determine the unit path direction vector.

[0057] In some embodiments, after determining the path direction vector, a normalization process can be further performed to obtain a unit path direction vector.

[0058] In some embodiments, step S302 may include: determining the Euclidean norm of the path direction vector, and using the Euclidean norm to normalize the path direction vector to obtain a unit path direction vector.

[0059] For example, the Euclidean norm is: .

[0060] Accordingly, the unit path direction vector is: .

[0061] S303, determine the auxiliary vector based on the z component in the unit path direction vector.

[0062] In some embodiments, the auxiliary vector determined based on the specific value of the z-component is different.

[0063] For example, in response to the z-direction component of the unit path direction vector When initializing the auxiliary vector ;when When initializing the auxiliary vector .

[0064] S304. Based on the unit path direction vector and the auxiliary vector, determine a first vector orthogonal to the unit path direction vector, and perform normalization processing to determine the first unit direction vector.

[0065] In some embodiments, a cross product operation is performed on the unit path direction vector and the auxiliary vector to obtain a first vector orthogonal to the unit path direction vector.

[0066] Next, the Euclidean norm of the first vector is determined, and the first vector is normalized using the Euclidean norm to obtain the first unit direction vector.

[0067] For example, the first vector .

[0068] in, .

[0069] Next, normalization is performed to determine the first unit direction vector. .

[0070] S305, based on the first vector and the unit path direction vector, determine the second vector, and perform normalization processing to determine the second unit direction vector.

[0071] In some embodiments, a cross product operation is performed on the first vector and the unit path direction vector to obtain a second vector that is orthogonal to both the unit path direction vector and the first vector.

[0072] Next, the Euclidean norm of the second vector is determined, and the second vector is normalized using the Euclidean norm to obtain the second unit direction vector.

[0073] For example, the second vector .

[0074] Next, normalization is performed to determine the second unit direction vector. .

[0075] S306, with the midpoint between the puncture needle insertion point and the lesion target point endpoint as the origin, and with the unit path direction vector, the second unit direction vector, and the first unit direction vector as axes, the reference coordinate system is obtained.

[0076] In some embodiments, after determining the unit path direction vector, the second unit direction vector, and the first unit direction vector, a reference coordinate system is constructed with the midpoint between the puncture needle insertion point and the lesion target point endpoint as the origin.

[0077] For example, see Figure 2 The midpoint is shown Using the origin as the starting point, respectively with , and The reference coordinate system is denoted by the axis.

[0078] Thus, by adopting the above scheme, a path direction vector is constructed based on the coordinate relationship between the starting point of the puncture needle insertion and the ending point of the lesion target. Then, the normalization process, auxiliary vector selection, and orthogonal vector calculation are completed in sequence. This allows for the adaptive establishment of a set of mutually orthogonal and normalized direction basis vectors, thereby accurately constructing a reference coordinate system with the puncture path as the core. This reference coordinate system is highly consistent with the actual puncture direction, has good geometric stability and consistency, and can effectively avoid the problems of coordinate system degradation or direction uncertainty. This improves the accuracy of puncture path spatial description and attitude calculation, and provides a reliable coordinate basis for subsequent puncture planning, navigation display, and surgical control, thereby improving the safety and accuracy of puncture operation.

[0079] S103, along the puncture path constructed from the starting point of the puncture needle insertion and the ending point of the lesion target, perform spatial sampling to obtain multiple path sampling points.

[0080] In some embodiments, a puncture path in the form of a straight line or a curve can be constructed based on the starting point of the puncture needle and the ending point of the lesion target.

[0081] Spatial sampling is performed along the puncture path at preset sampling intervals to obtain multiple path sampling points. The path sampling points are distributed sequentially along the puncture path to characterize the spatial position of the puncture needle during the advancement process.

[0082] In some embodiments, according to "sampling step size" "For line segments" Uniform sampling generates a set of sampling points, where each sampling point in the set corresponds to a path sampling point.

[0083] For example, the set of sampling points: .in, .

[0084] It should be noted that the sampling step length is set based on ensuring that the sampling density covers the "puncture needle diameter range" (the clinically commonly used puncture needle diameter is 1.1~2.0mm) to avoid missing potential risk points due to sparse sampling (e.g., a sampling step length > 0.5mm may miss high-risk points near blood vessels).

[0085] Accordingly, the puncture path is the starting point of the puncture needle insertion. endpoint of the lesion target The total length of the spatial line segments between them The Euclidean distance is calculated directly using the formula, as follows:

[0086] in, The starting point for puncture and needle insertion. Three-dimensional coordinates (unit: mm); Endpoint of the lesion target Three-dimensional coordinates (unit: mm); It is the Euclidean distance between two points, that is, the total distance that the puncture needle needs to penetrate (covering the complete path from the chest wall, lung parenchyma to the lesion).

[0087] S104, extract the point cloud of the surface of the three-dimensional geometric model and establish a spatial index structure.

[0088] In some embodiments, point cloud extraction is performed on the outer surface of the three-dimensional geometric model to obtain surface point cloud data representing the outer contour of the lung.

[0089] Specifically, the three-dimensional geometric model is represented in the form of a triangular mesh, which includes vertex information and facet topological relationships.

[0090] Subsequently, point cloud sampling was performed on the surface of the three-dimensional geometric model of the lungs.

[0091] Specifically, a number of discrete sampling points are generated on the model surface according to a preset sampling density or number of sampling points, so that the sampling points are evenly distributed on the outer surface of the three-dimensional geometric model, thereby forming surface point cloud data. Each sampling point contains at least three-dimensional spatial coordinate information, and surface normal information or region identification information can be added as needed.

[0092] After obtaining the surface point cloud, the point cloud data is normalized, including removing outliers and redundant points, in order to improve the point cloud quality and reduce the computational complexity of subsequent calculations.

[0093] Next, a spatial index structure is established based on the processed surface point cloud. This spatial index structure is either a KD-tree or an octree, which hierarchically divides the point cloud space to achieve rapid organization and management of the point cloud data. The spatial index structure supports spatial operations such as nearest neighbor queries, range queries, or region searches.

[0094] Through the above steps, the extraction of point clouds from the surface of a three-dimensional geometric model and the construction of its spatial index structure were realized. This method can effectively improve the efficiency of point cloud spatial query and provide basic data support for lung geometric analysis, morphological measurement and subsequent processing.

[0095] See Figure 4 The flowchart shown in the embodiment of the present invention provides a method for constructing a spatial index structure, as follows: Figure 4 As shown, the following can be executed: S401, traverse all triangular faces of the three-dimensional geometric model and extract point clouds including at least: face vertices, face centroids, and edge midpoints to form a point cloud set; wherein, each point cloud has its own corresponding pixel index coordinates.

[0096] In some embodiments, for each triangular facet, the extraction includes at least the following point information: The three vertices of the triangular facet; the centroid of the facet calculated based on the three vertices; and the midpoints of each side of the triangular facet.

[0097] The extracted points are stored as point cloud data to form a point cloud set.

[0098] Preferably, each point cloud data includes not only its three-dimensional coordinates in the model space, but also its corresponding pixel index coordinates. The pixel index coordinates are used to characterize the position of the point in the two-dimensional image or rendering result.

[0099] For example, a point cloud set can be formed by extracting at least three types of points: "patch vertices, patch centroids, and edge midpoints". .

[0100] It should be noted that when determining the point cloud density, the requirement of "≥5 points per mm² surface" must be met. This ensures that the resulting point cloud aggregate covers detailed structures such as the inflection points of blood vessel branches and narrow segments of the bronchi, avoiding deviations in nearest distance calculations due to sparse point clouds.

[0101] S402, transform the pixel index coordinates of each point cloud to the reference coordinate system to determine the corresponding transformed point cloud.

[0102] In some embodiments, pixel index coordinates are transformed to a reference coordinate system according to a preset mapping relationship to obtain a transformed point cloud that corresponds one-to-one with the point cloud.

[0103] The above transformation ensures that all point cloud data are under the same coordinate reference system, which facilitates subsequent spatial partitioning and index construction.

[0104] In one embodiment, the pixel index of the point cloud is used to characterize the relative position of the point cloud in the CT image data.

[0105] Accordingly, step S402 may include: obtaining spatial coordinate system information corresponding to the CT image, wherein the spatial coordinate system information includes at least the starting position parameters of the image space and the spatial sampling interval in three orthogonal directions; based on the spatial coordinate system information and the pixel index, performing spatial mapping processing on the position of each point cloud to determine the position coordinates of the transformed point cloud in the actual physical space, so as to transform the transformed point cloud to the reference coordinate system.

[0106] Specifically, based on the image spatial coordinate system , will gather clouds coordinates and CT image resolution Linked calibration to ensure alignment with line segments The coordinate spaces are completely consistent (to avoid distance errors caused by coordinate misalignment), specifically: Obtain the spatial coordinate system of CT images Reference parameters and spatial resolution .

[0107] Extracting raw coordinates: Obtaining cloud collections Pixel index coordinates of each point (The pixel row and column indices correspond to the X-axis, Y-axis and Z-axis respectively).

[0108] The formula is used to perform a coordinate transformation, converting the pixel index into physical coordinates (unit: mm):

[0109]

[0110]

[0111] In this way, by performing batch conversion on the entire point cloud, and by comparing it with the coordinate range of key points on the puncture path and verifying the consistency of distance calculations, the consistency between the calibrated point cloud and the line segment is ensured. The coordinate spaces are completely consistent.

[0112] S403, based on the transformed point cloud, the transformed point cloud is recursively divided according to multiple preset spatial coordinate directions. In each division, the point corresponding to the middle position of the point cloud data in the current coordinate direction is selected as the division threshold to construct the corresponding child nodes and form the spatial index structure.

[0113] In some embodiments, the transformed point cloud is recursively divided according to a plurality of preset spatial coordinate directions. The spatial coordinate directions may be selected sequentially as the X-axis direction, the Y-axis direction, and the Z-axis direction, or selected cyclically in other predetermined order.

[0114] In each recursive partitioning process, the spatial coordinate direction used for partitioning is first determined; then, the current point cloud data is sorted or statistically analyzed along this spatial coordinate direction, and the point located at the middle position is selected as the partitioning threshold. The point at the middle position can be the median point or an approximate median point.

[0115] Using the aforementioned partitioning threshold as a boundary, the current point cloud is divided into at least two sub-point cloud sets, and corresponding child nodes are constructed based on each of the sub-point cloud sets. For each child node, the above partitioning process is repeated until a preset termination condition is met. The termination condition may include, but is not limited to, the number of point clouds in the child node being less than a threshold, or the recursion depth reaching an upper limit.

[0116] The spatial index structure is constructed layer by layer through the above recursive partitioning method.

[0117] Specifically, step S403 may include: using a first preset coordinate direction as the initial division direction, determining the division point corresponding to the middle position of the transformed point cloud in that coordinate direction, and using the value of the division point in that coordinate direction as the division threshold, dividing the transformed point cloud into a first sub-point cloud and a second sub-point cloud according to the division threshold, wherein the first sub-point cloud contains points whose values ​​in the first preset coordinate direction are less than the division threshold, and the second sub-point cloud contains points whose values ​​in the first preset coordinate direction are greater than the division threshold, and constructing the first sub-point cloud and the second sub-point cloud as left and right child nodes of an index structure respectively; performing the above division operation on the first sub-point cloud using the second preset coordinate direction as the division direction, and performing the above division operation on the second sub-point cloud using the third preset coordinate direction as the division direction; recursively performing the division operation on each sub-point cloud according to a preset coordinate direction order to build an index structure layer by layer; when the number of points contained in any sub-point cloud is less than or equal to a preset threshold, stopping the further division of the sub-point cloud and determining it as a leaf node.

[0118] For example, using the X-axis as the initial dividing axis, select a point cloud set. The median on the X-axis is used as the dividing threshold to divide the point cloud into the left subtree. Median) and right subtree ( median).

[0119] The above operation is recursively repeated on the left subtree using the Y-axis and the right subtree using the Z-axis, until the number of point clouds contained in the subtree is ≤5 (leaf node threshold).

[0120] For example, the root node is divided along the X-axis. If pt.x < the threshold, it enters the left subtree. The next level of the left subtree is divided along the Y-axis. The comparison between pt.y and the threshold continues until the leaf node is entered, until all points in the leaf node are less than or equal to 5.

[0121] Thus, the time complexity of tree construction is... Subsequent line segments The time complexity of the nearest neighbor search for any point on the list is O(n). Compared to the original solution of "traversing all of Efficiency increased by more than 20 times (especially when) hour).

[0122] It should be noted that in this invention, the three-dimensional geometric model, puncture path, spatial location of path sampling points, and point cloud data are all described based on the three-dimensional space of CT images.

[0123] Among them, the three-dimensional space is the image space corresponding to the CT image data. Its spatial resolution is consistent with the original pixel spacing of the CT image, and it is used to uniformly characterize the spatial positional relationship of the lung tissue structure and the puncture path.

[0124] In the image space, the puncture needle entry point, the lesion target point endpoint, and the path sampling point are all represented in three-dimensional coordinates. The calculation of each spatial distance is completed in the same image space coordinate system, thereby ensuring the accuracy and consistency of the spatial measurement results.

[0125] S105, Based on the spatial index structure, calculate the minimum spatial distance from each path sampling point to the three-dimensional geometric model.

[0126] In some embodiments, based on the spatial index structure, for each path sampling point, the nearest surface point cloud point is searched, and the minimum spatial distance from the path sampling point to the surface of the three-dimensional geometric model is calculated.

[0127] The minimum spatial distance reflects the safe distance between the puncture path and the lung boundary at the sampling location.

[0128] In some embodiments, step S105 may include: for each of the path sampling points, performing a traversal operation on the spatial index structure to determine the nearest neighbor point to each path sampling point and using the distance value as an initial implicit distance; in response to the neighbor point not being located inside the triangular facet, using the initial implicit distance as the minimum spatial distance; in response to the neighbor point being located inside the triangular facet, determining a new distance value as the minimum spatial distance based on the coordinates of one vertex of the triangular facet containing the neighbor point, the normal vector of the triangular facet, and the path sampling point.

[0129] Specifically, for each path sampling point By performing a traversal operation on the spatial index structure, the sampling points along the path can be determined. nearest neighbor Thus, sampling points can be based on corresponding paths. and neighboring points Determine the Euclidean distance between the two as the initial implicit distance. .

[0130] Based on this, neighboring points were further identified. Whether it is located inside the triangular facet, and if the nearest point is determined If it is not inside the triangular facet, then directly use the initial implicit distance. As the minimum spatial distance.

[0131] Correspondingly, if neighboring points are determined Inside the triangular facet, a new distance value is recalculated and used as the minimum spatial distance.

[0132] In some embodiments, the method for determining whether the neighboring point is located inside the triangular facet is as follows: Basic information of the triangular facet is obtained, wherein the triangular facet is uniquely determined by three non-collinear vertices, each vertex corresponding to three-dimensional spatial coordinates; based on the three-dimensional spatial coordinates of the three vertices, the normal vector of the triangular facet is obtained through a vector cross product operation; according to the directional relationship between the normal vector and each coordinate axis in the three-dimensional coordinate system, the coordinate plane with the smallest angle to the normal vector is selected as the projection plane; the neighboring point and the three vertices of the triangular facet are synchronously projected from three-dimensional space onto the projection plane to obtain the corresponding two-dimensional point coordinates and a two-dimensional triangle; within the projection plane, a ray is emitted from the two-dimensional point coordinates along a preset direction, and the number of intersections between the ray and each side of the two-dimensional triangle is counted; based on the number of intersections, the inclusion relationship between the spatial point and the triangular facet is determined; when the number of intersections is odd, the spatial point is determined to be inside the triangular facet; when the number of intersections is even or the two-dimensional point coincides with the boundary of the two-dimensional triangle, the spatial point is determined to be outside or on the boundary of the triangular facet.

[0133] Specifically, any triangular facet is uniquely determined by its three vertices, denoted as . The three-dimensional coordinates of the three vertices are as follows: Then the normal vector of the triangular facet For can be by Calculated.

[0134] Then, neighboring points All three vertices are projected onto a two-dimensional plane. To avoid projection distortion, the normal vector of the triangular facet is chosen. The plane with the smallest angle to a certain coordinate axis is used as the projection plane.

[0135] For example, if the normal vector If the Z component is the largest, then it is projected onto the XY plane.

[0136] Accordingly, neighboring points 3D coordinates With the 3 vertices of the triangular face Synchronously projected onto this plane, two-dimensional coordinates are obtained. and .

[0137] Then, in the two-dimensional plane, from Emit a ray in any direction (such as the positive X-axis) and count the intersections of this ray with the three sides of the triangle. Number of intersections: If the number of intersections is odd, it means... Inside a two-dimensional triangle; if the number is even or coincides with a vertex / edge, it indicates that it is outside or on the boundary.

[0138] If neighboring points If the point is located inside the triangle (not a vertex or edge), then the "point-to-face distance" is further calculated to correct the implicit distance (to avoid deviations in point-to-point distances).

[0139] For example, the new distance value is determined in the following manner:

[0140] in, Let be the coordinates of one vertex of the triangular facet; Let be the normal vector of the triangular facet; These are the path sampling points.

[0141] S106, compare the minimum spatial distance with a preset safety threshold to determine the safety of the puncture path.

[0142] In some embodiments, a preset safety threshold defines the minimum safety threshold during the puncture process. Based on the relationship between the minimum spatial distance and the preset safety threshold, it is possible to determine whether the currently determined puncture path is safe.

[0143] In some embodiments, a preset safety threshold is set based on the puncture needle diameter, model accuracy, and clinical safety redundancy, as shown in the following formula:

[0144] in, This indicates a preset safety threshold. For example, 1.1~2.0 mm is commonly used clinically (e.g., 1.1 mm for fine-needle biopsy needles and 1.6 mm for conventional biopsy needles). This represents the safety redundancy factor. For example, a value of 1.2 to 1.5 is determined based on clinical experience to ensure sufficient obstacle avoidance space is reserved. This indicates the accuracy error of the three-dimensional geometric model (≤0.3mm, determined by the CT image resolution and the three-dimensional reconstruction algorithm).

[0145] This indicates the radius of safe movement of the puncture needle.

[0146] Furthermore, the warning threshold can be further determined. .

[0147] In this case, step S106 may include: In response to the existence of any path sampling point whose minimum spatial distance is less than the lower limit of the preset safety threshold, the puncture path is determined to be unsafe.

[0148] If the minimum spatial distance corresponding to all path sampling points is within the preset safety threshold range, an early warning indication is output.

[0149] In response to the fact that the minimum spatial distance corresponding to all path sampling points is greater than the upper limit of the preset safety threshold range, the puncture path is determined to be a safe path.

[0150] Specifically, for line segments sampling point set Calculate each sampling point one by one implicit distance ; Risk assessment: If there are arbitrary sampling points satisfy The path was determined to have a "potential damage risk" to the important structure S, and a path adjustment prompt was given (it is recommended to select a different path). or (Avoid risky areas).

[0151] Warning determination: If all sampling points satisfy (Warning threshold), output "risk warning", and suggest that doctors confirm the path again (not mandatory adjustment, preserving clinical decision-making space); Safety determination: If all sampling points The path is deemed safe and can be used for subsequent puncture procedures.

[0152] Thus, by adopting the above approach and establishing a path intersection verification model based on an implicit distance function, we can accurately determine whether the puncture path damages important lung structures and ensure the clinical feasibility of the path.

[0153] In some embodiments, after determining that the puncture path is a safe path, the following steps may be further performed: In response to the puncture path being a safe path, a safe boundary is generated with the puncture path as the central axis, adapting to the posture of the puncture path.

[0154] That is, design individualized safety boundary calculation methods to adapt to the anatomical characteristics of different patients and avoid over-coverage of normal lung tissue or omission of risk areas.

[0155] In some embodiments, the step of generating a safety boundary with the puncture path as the central axis, adapting to the posture of the puncture path, includes: The center of the puncture path is used as the center of the safety boundary geometry, and the total length of the puncture path is used as the height of the safety boundary geometry. Based on the spatial dimensions of the lesion tissue and the chest wall thickness, the radius of the safety boundary geometry is determined, wherein the radius is adjusted according to the chest wall thickness based on a preset basic safety radius. A cylinder is used as the basic shape of the safety boundary geometry. The cylinder is rotated based on the reference coordinate system so that the cylinder's axis is aligned with the puncture path direction. After the rotational transformation, the cylinder is translated so that the center of the cylinder coincides with the center of the puncture path. The system achieves position and orientation matching of the safety boundary geometry in three-dimensional space. It generates a safety boundary geometry model precisely aligned with the puncture path by performing spatial transformation on the initial vertices of the cylinder. An implicit distance constraint model is constructed to describe the distance relationship between spatial points and the surface of the safety boundary geometry. Based on this implicit distance constraint model, the point cloud on the surface of the three-dimensional geometry model is judged. When the point cloud is within the safety boundary range, it is determined that the safety boundary fits the surface of the three-dimensional geometry model. Furthermore, by limiting the adaptation error between the safety boundary and the surface of the three-dimensional geometry model to within a preset threshold range, the fitting optimization between the safety boundary and the surface of the three-dimensional geometry model is achieved.

[0156] As an example, the following can be done: Parameters for cylindrical foundations determined: cylinder center : Take the center point of the puncture path, with coordinates as .

[0157] cylinder height : equal to the total length of the puncture path ,Right now .

[0158] cylinder radius The formula is as follows: Based on the dynamic calculation of lesion size and chest wall thickness:

[0159] in, The base safety radius (e.g., initialized to 1 mm). The adjustment factor is (e.g., 0.3~0.5), and T is the chest wall thickness (measured from CT images).

[0160] Cylindrical rotation transformation: Achieving precise matching of the cylinder's posture with the puncture path using a homogeneous transformation matrix includes: Constructing the rotation matrix R: based on an orthonormal axis system Construct a 3×3 rotation matrix: .

[0161] in, , , It is the unit path direction vector The amount, , , , , , Is orthogonal unit vectors Quantity.

[0162] Constructing the homogeneous transformation matrix The transformations are fused by rotation and translation, and take the following form: .

[0163] in, , , Center of the cylinder The coordinates.

[0164] Cylinder vertex transformation: Assume the initial vertex coordinates of the cylinder are Calculate the transformed vertices using the homogeneous transformation matrix. :

[0165] Expanded to: ; ; .

[0166] Safety boundary fit optimization: The relative position of the cylinder and lung tissue is constrained by an implicit distance function to ensure that the boundary fits the lung surface: 1) Constructing the implicit distance function for the cylinder Describing spatial points Radial distance to the cylindrical surface:

[0167] 2) Fit judgment: If the lung tissue surface points ( (for the point set on the lung surface) satisfies If the point is within the safety boundary, it ensures that there is no obvious gap between the boundary and the lung tissue, and the fitting error is ≤0.3mm.

[0168] Thus, by performing the above steps, the safety boundary can be determined. A schematic diagram of the geometric generation and transformation of the safety boundary (cylinder) is shown below. Figure 5 As shown.

[0169] In response to the puncture path being a safe path, the puncture path is selected as the selected path, and the selected path and its corresponding safe boundary are set to a first color, while other areas are set to a second color.

[0170] For example, the selected puncture path and its safety boundary are marked in green, for example: RGB color space: (0, 1, 0).

[0171] Unselected paths and boundaries are marked in red in the RGB color space, for example: RGB color space: (1, 0, 0).

[0172] It should be noted that other colors can also be used for differentiation, as long as the first and second colors used are different.

[0173] After the selected path is determined, the slice index of the starting or ending key point of the path in the 3D image is calculated, and the coordinate position of the image view in the three directions is determined according to the slice index, the corresponding slice spacing and the minimum coordinate value in each direction, so that the image view is automatically positioned to the key point and kept synchronized with the path position in real time.

[0174] Specifically, after a preset path is selected, the image view automatically locates the key point of the path, which is either the starting key point or the ending key point of the path; the positioning coordinates of the image view are calculated from the slice index of the key point in the 3D image.

[0175] Specifically, the coordinates of the image view in the first direction are equal to the product of the slice index of the key point in the first direction and the corresponding slice spacing, plus the minimum coordinate value in the first direction; the coordinates of the image view in the second direction are equal to the product of the slice index of the key point in the second direction and the corresponding slice spacing, plus the minimum coordinate value in the second direction; the coordinates of the image view in the third direction are equal to the product of the slice index of the key point in the third direction and the corresponding slice spacing, plus the minimum coordinate value in the third direction; thereby keeping the position of the image view synchronized with the path in real time.

[0176] As an example, the index value of the corresponding CT slice is calculated based on the coordinates of the key points and the image resolution, where: Sagittal slice index: .

[0177] Coronal slice index: .

[0178] Axis slice index: .

[0179] in, For floor operations, x, y, and z are the corresponding axis coordinates of the key points.

[0180] In this case, assuming the CT slice thickness is... The initial slice position is The actual anatomical location of the slice corresponding to the key point. for: ,in Slice index for the corresponding view .

[0181] Thus, when automatically locating the coordinates of key points on the path in CT image views, the following conditions are met: .

[0182] in, , , Use slice indexes corresponding to key points to ensure that the view and path positions are synchronized in real time.

[0183] It should be noted that CT is multi-sequence CT, where each sequence represents a two-dimensional slice, and the slice thickness of each sequence is the same, basically within 1 mm.

[0184] The solutions described in the above embodiments have at least the following beneficial effects: First, the accuracy of the puncture path is significantly improved: by constructing an orthogonal axis system and homogeneous rotation transformation, the safety boundary and path orientation are perfectly matched, solving the problem of misalignment in the direction of the traditional fixed cylinder; combined with the implicit distance function verification optimized by kdtree, blood vessels and bronchi can be accurately avoided, and the path safety rate is improved by more than 90%.

[0185] Second, individualized adaptation of safety boundaries: The cylinder radius is dynamically calculated based on the chest wall thickness and combined with lung tissue fitting constraints. Compared with the traditional fixed radius scheme, the adaptation error is reduced, effectively reducing excessive coverage of normal lung tissue.

[0186] Third, operational efficiency is greatly optimized: real-time linkage between key point coordinates and CT slice index and anatomical location allows doctors to locate the anatomical level corresponding to the path without manually switching slices; differentiated color markings reduce the misselection rate of multiple paths, and the overall planning efficiency is improved by 60%.

[0187] Fourth, it has strong clinical adaptability: the core algorithms (3D reconstruction, axis system construction, rotation transformation) do not depend on specific hardware / software, and can be realized by only inputting the 3D geometric data of CT images. It can be adapted to CT equipment and surgical planning systems of different hospitals and has a wide range of application scenarios.

[0188] The above description, in conjunction with embodiments, illustrates the puncture surgical path planning method. To facilitate understanding and implementation by those skilled in the art, the following further describes the puncture surgical path planning device corresponding to the method.

[0189] See Figure 6 The diagram shown is a structural schematic of a puncture surgical path planning device provided in an embodiment of the present invention. Figure 6 As shown, the puncture surgical path planning device 600 may include: Building unit 610 is used to build a three-dimensional geometric model of the lungs based on CT image data; Establishment unit 620 is used to determine the puncture needle entry point and the lesion target end point in the three-dimensional geometric model, and to establish a reference coordinate system on the three-dimensional geometric model based on the puncture needle entry point and the lesion target end point; The sampling unit 630 is used to perform spatial sampling along the puncture path constructed by the starting point of the puncture needle and the ending point of the lesion target point, and obtain multiple path sampling points. Extraction unit 640 is used to extract the point cloud of the surface of the three-dimensional geometric model and establish a spatial index structure; The planning unit 650 is used to calculate the minimum spatial distance from each path sampling point to the three-dimensional geometric model based on the spatial index structure, and to compare the minimum spatial distance with a preset safety threshold to determine the safety of the puncture path.

[0190] about Figure 6 For more information on the working principle, operation method, and beneficial effects of the puncture surgical path planning device shown, please refer to the preceding text and... Figures 1 to 5 The specific details will not be repeated here.

[0191] It is understandable that the above division of units is only a logical functional division; in actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, the above modules can be implemented by the processor calling software.

[0192] While the embodiments disclosed in this specification are as described above, the present invention is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.

Claims

1. A method for planning a puncture surgical path, characterized in that, include: A three-dimensional geometric model of the lungs was constructed based on CT image data. In the three-dimensional geometric model, the starting point of the puncture needle insertion and the ending point of the lesion target are determined, and a reference coordinate system is established on the three-dimensional geometric model based on the starting point of the puncture needle insertion and the ending point of the lesion target. Spatial sampling is performed along the puncture path constructed from the starting point of the puncture needle insertion and the ending point of the lesion target to obtain multiple path sampling points; Extract the point cloud from the surface of the three-dimensional geometric model and establish a spatial index structure; Based on the spatial index structure, calculate the minimum spatial distance from each path sampling point to the three-dimensional geometric model; The safety of the puncture path is determined by comparing the minimum spatial distance with a preset safety threshold.

2. The puncture surgical path planning method according to claim 1, characterized in that, The puncture needle insertion point has a first coordinate value, and the lesion target point has a second coordinate value; The step of establishing a reference coordinate system on the three-dimensional geometric model based on the puncture needle insertion point and the lesion target point endpoint includes: The path direction vector of the puncture path is determined based on the first coordinate value and the second coordinate value; The path direction vector is normalized to determine the unit path direction vector; Based on the z-component in the unit path direction vector, determine the auxiliary vector; Based on the unit path direction vector and the auxiliary vector, a first vector orthogonal to the unit path direction vector is determined, and normalization processing is performed to determine the first unit direction vector; Based on the first vector and the unit path direction vector, a second vector is determined, and a normalization process is performed to determine the second unit direction vector; The reference coordinate system is obtained by taking the midpoint between the puncture needle insertion point and the lesion target point as the origin, and the unit path direction vector, the second unit direction vector, and the first unit direction vector as axes, respectively.

3. The puncture surgical path planning method according to claim 1, characterized in that, The step of extracting the point cloud from the surface of the three-dimensional geometric model and establishing a spatial index structure includes: Traverse all triangular faces of the three-dimensional geometric model and extract point clouds that include at least: face vertices, face centroids, and edge midpoints to form a point cloud set; wherein each point cloud has its own corresponding pixel index coordinates; Transform the pixel index coordinates of each point cloud to the reference coordinate system to determine the corresponding transformed point cloud; Based on the transformed point cloud, the transformed point cloud is recursively divided according to multiple preset spatial coordinate directions. In each division, the point corresponding to the middle position of the point cloud data in the current coordinate direction is selected as the division threshold to construct the corresponding child nodes and form the spatial index structure.

4. The puncture surgical path planning method according to claim 3, characterized in that, The pixel index of the point cloud is used to characterize the relative position of the point cloud in the CT image data; The step of converting the pixel index coordinates of each point cloud to the reference coordinate system and determining the corresponding converted point cloud includes: obtaining the spatial coordinate system information corresponding to the CT image, wherein the spatial coordinate system information includes at least the starting position parameters of the image space and the spatial sampling interval in three orthogonal directions; and performing spatial mapping processing on the position of each point cloud based on the spatial coordinate system information and the pixel index to determine the position coordinates of the converted point cloud in the actual physical space, so as to convert the converted point cloud to the reference coordinate system. The step of recursively dividing the transformed point cloud according to multiple preset spatial coordinate directions, and selecting the point corresponding to the middle position of the point cloud data in the current coordinate direction as the division threshold in each division, to construct corresponding child nodes and form the spatial index structure, includes: Using a first preset coordinate direction as the initial division direction, a division point corresponding to the middle position of the transformed point cloud in the coordinate direction is determined, and the value of the division point in the coordinate direction is used as a division threshold. Based on the division threshold, the transformed point cloud is divided into a first sub-point cloud and a second sub-point cloud. The first sub-point cloud contains points whose values ​​in the first preset coordinate direction are less than the division threshold, and the second sub-point cloud contains points whose values ​​in the first preset coordinate direction are greater than the division threshold. The first sub-point cloud and the second sub-point cloud are respectively constructed as left and right child nodes of an index structure. The above division operation is performed on the first sub-point cloud with the second preset coordinate direction as the division direction, and the above division operation is performed on the second sub-point cloud with the third preset coordinate direction as the division direction. The partitioning operation is recursively performed on each sub-point cloud according to the preset coordinate direction order to build an index structure layer by layer; When the number of points in any sub-point cloud is less than or equal to a preset threshold, the further division of that sub-point cloud is stopped, and it is identified as a leaf node.

5. The puncture surgical path planning method according to claim 3, characterized in that, The step of calculating the minimum spatial distance from each path sampling point to the three-dimensional geometric model based on the spatial index structure includes: For each of the path sampling points, a traversal operation is performed on the spatial index structure to determine the nearest neighbor point to each path sampling point, and the distance value is used as the initial implicit distance; In response to the neighboring point not being located inside the triangular facet, the initial implicit distance is used as the minimum spatial distance; In response to the neighboring point being located inside the triangular facet, a new distance value is determined as the minimum spatial distance based on the coordinates of one vertex of the triangular facet containing the neighboring point, the normal vector of the triangular facet, and the path sampling point.

6. The puncture surgical path planning method according to claim 5, characterized in that, The method used to determine whether the neighboring point is located inside the triangular facet is as follows: Obtain the basic information of the triangular facet, which is uniquely determined by three non-collinear vertices, each of which has corresponding three-dimensional spatial coordinates; Based on the three-dimensional spatial coordinates of the three vertices, the normal vector of the triangular facet is obtained through the vector cross product operation; Based on the directional relationship between the normal vector and each coordinate axis in the three-dimensional coordinate system, the coordinate plane with the smallest angle to the normal vector is selected as the projection plane. The neighboring points and the three vertices of the triangular facet are synchronously projected from three-dimensional space onto the projection plane to obtain the corresponding two-dimensional point coordinates and two-dimensional triangles; Within the projection plane, a ray is emitted from the coordinates of the two-dimensional point along a preset direction, and the number of intersections between the ray and each side of the two-dimensional triangle is counted. The inclusion relationship between the spatial point and the triangular facet is determined based on the number of intersection points. When the number of intersection points is odd, the spatial point is determined to be inside the triangular facet. When the number of intersection points is even or the two-dimensional point coincides with the boundary of the two-dimensional triangle, the spatial point is determined to be outside the triangular facet or on the boundary. The new distance value is determined using the following method: in, Let be the coordinates of one vertex of the triangular facet; Let be the normal vector of the triangular facet; These are the path sampling points.

7. The puncture surgical path planning method according to claim 1, characterized in that, The step of comparing the minimum spatial distance with a preset safety threshold to determine the safety of the puncture path includes: In response to the existence of any path sampling point whose minimum spatial distance is less than the lower limit of the preset safety threshold, the puncture path is determined to be unsafe; If the minimum spatial distance corresponding to all path sampling points is within the preset safety threshold range, an early warning indication will be output; In response to the fact that the minimum spatial distance corresponding to all path sampling points is greater than the upper limit of the preset safety threshold range, the puncture path is determined to be a safe path.

8. The puncture surgical path planning method according to claim 1 or 7, characterized in that, Meet one or more of the following conditions: In response to the puncture path being a safe path, a safe boundary is generated with the puncture path as the central axis, adapting to the posture of the puncture path. In response to the puncture path being a safe path, the puncture path is selected as the selected path, and the selected path and its corresponding safe boundary are set to a first color, while other areas are set to a second color. After the selected path is determined, the slice index of the starting or ending key point of the path in the 3D image is calculated, and the coordinate position of the image view in the three directions is determined according to the slice index, the corresponding slice spacing and the minimum coordinate value in each direction, so that the image view is automatically positioned to the key point and kept synchronized with the path position in real time.

9. The puncture surgical path planning method according to claim 8, characterized in that, The step of generating a safety boundary with the puncture path as the central axis, adapting to the posture of the puncture path, includes: The center of the puncture path is taken as the center of the safety boundary geometry, and the total length of the puncture path is taken as the height of the safety boundary geometry. Based on the spatial dimensions of the lesion tissue and the thickness of the chest wall, the radius of the safety boundary geometry is determined, wherein the radius is adjusted according to the chest wall thickness based on a preset basic safety radius; The cylinder is used as the basic shape of the safety boundary geometry; The cylinder is rotated and transformed based on the reference coordinate system so that the direction of the cylinder's axis is consistent with the direction of the puncture path. Based on the rotation transformation, the cylinder is translated so that the center position of the cylinder coincides with the center position of the puncture path, thereby achieving position and orientation matching of the safety boundary geometry in three-dimensional space. By performing spatial transformation on the initial vertices of the cylinder, a safety boundary geometric model that is precisely aligned with the puncture path is generated. Construct an implicit distance constraint model to describe the distance relationship between spatial points and the surface of the safety boundary geometry; Based on the implicit distance constraint model, the point cloud on the surface of the three-dimensional geometric model is judged. When the point cloud is within the safe boundary range, it is determined that the safe boundary is in contact with the surface of the three-dimensional geometric model. By limiting the adaptation error between the safe boundary and the surface of the three-dimensional geometric model to within a preset threshold range, the fit optimization between the safe boundary and the surface of the three-dimensional geometric model is achieved.

10. A puncture surgical path planning device, characterized in that, include: Building units are used to construct three-dimensional geometric models of the lungs based on CT image data; A unit is established to determine the starting point of the puncture needle insertion and the ending point of the lesion target in the three-dimensional geometric model, and to establish a reference coordinate system on the three-dimensional geometric model based on the starting point of the puncture needle insertion and the ending point of the lesion target. The sampling unit is used to perform spatial sampling along the puncture path constructed by the starting point of the puncture needle and the ending point of the lesion target point, and obtain multiple path sampling points. An extraction unit is used to extract the point cloud of the surface of the three-dimensional geometric model and establish a spatial index structure; The planning unit is used to calculate the minimum spatial distance from each path sampling point to the three-dimensional geometric model based on the spatial index structure, and to compare the minimum spatial distance with a preset safety threshold to determine the safety of the puncture path.