Data processing method and apparatus, storage medium, and electronic device
By constructing a three-dimensional model of the tibia and steel nails and calculating the target space transformation parameters, a guide plate model is generated. This solves the problem of low accuracy of tibial osteotomy posture caused by reliance on human experience in the existing technology, and achieves accuracy and consistency of the tibial osteotomy plane, thereby improving the efficacy of total knee replacement surgery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING AKEC MEDICAL
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, the spatial orientation of the tibial osteotomy plane relies on human experience, resulting in low accuracy and affecting the efficacy of total knee replacement surgery.
By constructing a 3D model of the tibia and a 3D model of the target steel nail, and using multiple medical images for calculation, the target space transformation parameters are obtained, and a guide plate model is generated to determine the target space orientation of the tibial osteotomy plane, including the coronal angle and the sagittal posterior tilt angle.
It improves the accuracy and consistency of spatial posture in the tibial osteotomy plane, ensures the recovery of lower limb force line after surgery, and avoids the shortcomings of traditional methods that rely on subjective human experience.
Smart Images

Figure CN121943471B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical technology, and more specifically, to a data processing method and apparatus, a storage medium and an electronic device. Background Technology
[0002] In total knee arthroplasty, the spatial orientation of the tibial osteotomy plane directly affects the restoration of lower limb alignment and the long-term stability of the prosthesis; its accuracy is a key factor determining postoperative efficacy. In clinical practice, the positioning of this plane typically relies on the surgeon's subjective judgment of anatomical landmarks, visual calibration using traditional mechanical guides, or empirical interpretation of limited C-arm X-ray images, lacking objective and quantitative reference. Empirical estimation based on bone contours and instrument projections in two-dimensional X-rays is limited by imaging angle, tissue obstruction, and image noise, making it difficult to establish a stable three-dimensional spatial correspondence. The determination of the osteotomy angle is highly dependent on the surgeon's skill level, resulting in relatively low accuracy in coronal and sagittal posterior tilt angles.
[0003] There is currently no effective solution to the technical problem that relies on human experience to determine the spatial orientation of the tibial osteotomy plane, resulting in low accuracy of the spatial orientation of the tibial osteotomy plane. Summary of the Invention
[0004] The main objective of this application is to provide a data processing method and apparatus, storage medium and electronic device to solve the technical problem that the spatial orientation of the tibial osteotomy plane is relatively inaccurate due to reliance on human experience to determine the spatial orientation of the tibial osteotomy plane.
[0005] To achieve the above objectives, according to one aspect of this application, a data processing method is provided. The method includes: constructing a three-dimensional model of the tibia based on a first medical image, and obtaining three-dimensional models of multiple target steel nails, wherein the first medical image includes an image of the tibia; obtaining multiple orthogonal second medical images, and obtaining a first two-dimensional pixel set of the multiple target steel nails and a second two-dimensional pixel set of the tibia based on the multiple second medical images; calculating target space transformation parameters of the multiple target steel nails in tibial coordinates based on the first two-dimensional pixel set, the second two-dimensional pixel set, the three-dimensional model of the tibia, and the three-dimensional model of the steel nails, wherein the target space transformation parameters include at least: a target rotation matrix and a target translation vector; obtaining a guide plate model based on the target space transformation parameters, and obtaining the target space orientation of the tibial osteotomy plane based on the guide plate model, wherein the target space orientation includes at least: the coronal angle of the tibial osteotomy and the sagittal posterior tilt angle of the tibial osteotomy.
[0006] Furthermore, based on the first medical image, constructing a three-dimensional model of the tibia includes: segmenting the first medical image according to the gray value of each voxel in the first medical image to obtain a segmentation result; performing high-precision three-dimensional reconstruction based on multiple target voxels in the segmentation result to obtain a first three-dimensional model; performing low-precision three-dimensional reconstruction based on voxels other than multiple target voxels in the segmentation result to obtain a second three-dimensional model; and stitching the first three-dimensional model and the second three-dimensional model together to obtain a three-dimensional model of the tibia.
[0007] Furthermore, before performing high-precision 3D reconstruction based on multiple target voxel points in the segmentation results to obtain the first 3D model, the method also includes: determining the geometric center of the tibia based on the segmentation results, and calculating the covariance matrix corresponding to the segmentation results based on the geometric center; performing eigenvalue decomposition on the covariance matrix to determine the principal axis direction of the tibia; and filtering the voxel points in the segmentation results based on the geometric center and principal axis direction to obtain multiple target voxel points.
[0008] Furthermore, the voxel points in the segmentation results are filtered based on the geometric center and principal axis direction to obtain multiple target voxel points, including: mapping each voxel point in the segmentation results based on the geometric center and principal axis direction to obtain a one-dimensional coordinate of each voxel point relative to the principal axis direction; determining the maximum projection value of the voxel point in the segmentation results relative to the principal axis direction based on the one-dimensional coordinate of each voxel point relative to the corresponding principal axis direction; and filtering the voxel points in the segmentation results based on the maximum projection value and a preset length threshold to obtain multiple target voxel points.
[0009] Furthermore, high-precision 3D reconstruction is performed on multiple target voxel points in the segmentation results to obtain the first 3D model, including: obtaining the preset maximum length threshold and minimum length threshold when constructing the 3D mesh; constructing the target side length function based on the maximum length threshold, minimum length threshold and curvature of each target voxel point; and performing high-precision 3D reconstruction on multiple target voxel points based on the target side length function to obtain the first 3D model.
[0010] Furthermore, calculations are performed based on the first two-dimensional pixel set, the second two-dimensional pixel set, the tibial 3D model, and the steel nail 3D model to obtain target space transformation parameters for multiple target steel nails in tibial coordinates. These parameters include: mapping the tibial 3D model and the steel nail 3D model to two-dimensional space to construct a first projection error constraint term and a second projection error constraint term, wherein the first projection error constraint term is obtained from all mapped points in the two-dimensional space, and the second projection error constraint term is obtained from boundary mapped points in the two-dimensional space; mapping the first two-dimensional pixel set and the second two-dimensional pixel set to three-dimensional space to construct a back projection error constraint term; constructing a target loss function based on the first and second projection error constraint terms; and performing nonlinear optimization on the preset initial space transformation parameters in the target loss function to obtain the target space transformation parameters.
[0011] Furthermore, mapping the 3D model of the tibia and the 3D model of the steel nail to a 2D space to construct the first and second projection error constraints includes: mapping the 3D model of the steel nail to a 2D space based on preset initial space transformation parameters, camera space transformation parameters in the camera coordinate system corresponding to multiple second medical images, and intrinsic parameter matrices, to obtain a first set of mapping points, and mapping the 3D model of the tibia to a 2D space to obtain a second set of mapping points; constructing the first projection error constraint based on the difference between the first set of mapping points and the first set of 2D pixels, and the difference between the second set of mapping points and the second set of 2D pixels; and constructing the second projection error constraint based on the distance between the boundary points of the first set of mapping points and the boundary points of the first set of 2D pixels, and the distance between the boundary points of the second set of mapping points and the boundary points of the second set of 2D pixels.
[0012] Furthermore, mapping the first and second two-dimensional pixel sets to three-dimensional space to construct the back-projection error constraint term includes: performing coordinate information transformation on the first and second two-dimensional pixel sets to obtain a first homogeneous coordinate set and a second homogeneous coordinate set; calculating the target direction vector corresponding to each pixel in the first and second homogeneous coordinate sets based on the intrinsic parameter matrix in the camera coordinate system corresponding to multiple second medical images, the first homogeneous coordinate set, and the second homogeneous coordinate set; obtaining the camera optical center based on the camera space transformation parameters in the camera coordinate system corresponding to multiple second medical images; mapping the first and second two-dimensional pixel sets based on the target direction vector and the camera optical center to obtain the back-projection ray; and constructing the back-projection error constraint term based on the distance between the back-projection ray, the tibial three-dimensional model, and the steel nail three-dimensional model.
[0013] Furthermore, based on the target space transformation parameters, the guide plate model is obtained by: determining the axial direction of multiple target steel nails based on the target rotation matrix in the target space transformation parameters; determining the distribution direction between multiple target steel nails based on the target translation vector in the target space transformation parameters; calculating the normal vector corresponding to the guide plate based on the axial direction of multiple target steel nails and the distribution direction between multiple target steel nails; and obtaining the guide plate model based on the distribution direction between multiple target steel nails and the normal vector corresponding to the guide plate.
[0014] Furthermore, based on the guide plate model, the target spatial pose of the tibial osteotomy plane is obtained as follows: the first guide plate projection of the coronal plane of the tibial osteotomy is calculated based on the normal vector corresponding to the guide plate in the guide plate model and the first vector pointing from the posterior to the anterior of the tibia; the second guide plate projection of the sagittal plane of the tibial osteotomy is calculated based on the normal vector corresponding to the guide plate in the guide plate model and the second vector pointing from the medial malleolus to the lateral malleolus; the coronal plane angle of the tibial osteotomy is calculated based on the first guide plate projection and the third vector corresponding to the direction of the mechanical axis of the tibia; and the posterior tilt angle of the sagittal plane of the tibial osteotomy is calculated based on the second guide plate projection and the third vector corresponding to the direction of the mechanical axis of the tibia.
[0015] To achieve the above objectives, according to another aspect of this application, a data processing apparatus is provided. The apparatus includes: a construction unit for constructing a three-dimensional model of the tibia based on a first medical image and acquiring three-dimensional models of multiple target steel nails, wherein the first medical image includes an image of the tibia; an acquisition unit for acquiring multiple orthogonal second medical images and obtaining a first two-dimensional pixel set of the multiple target steel nails and a second two-dimensional pixel set of the tibia based on the multiple second medical images; a calculation unit for calculating, based on the first two-dimensional pixel set, the second two-dimensional pixel set, the three-dimensional model of the tibia, and the three-dimensional model of the steel nails, to obtain target space transformation parameters of the multiple target steel nails in tibial coordinates, wherein the target space transformation parameters include at least: a target rotation matrix and a target translation vector; and a first determination unit for obtaining a guide plate model based on the target space transformation parameters and obtaining the target space orientation of the tibial osteotomy plane based on the guide plate model, wherein the target space orientation includes at least: the coronal angle of the tibial osteotomy and the sagittal posterior tilt angle of the tibial osteotomy.
[0016] Furthermore, the construction unit includes: a segmentation module, used to segment the first medical image based on the grayscale value of each voxel point in the first medical image to obtain a segmentation result; a first reconstruction module, used to perform high-precision three-dimensional reconstruction based on multiple target voxel points in the segmentation result to obtain a first three-dimensional model; a second reconstruction module, used to perform low-precision three-dimensional reconstruction based on voxel points other than multiple target voxel points in the segmentation result to obtain a second three-dimensional model; and a stitching module, used to stitch the first three-dimensional model and the second three-dimensional model to obtain a tibial three-dimensional model.
[0017] Furthermore, before performing high-precision three-dimensional reconstruction based on multiple target voxel points in the segmentation results to obtain the first three-dimensional model, the device further includes: a second determining unit, used to determine the geometric center of the tibia based on the segmentation results and calculate the covariance matrix corresponding to the segmentation results based on the geometric center before performing high-precision three-dimensional reconstruction based on multiple target voxel points in the segmentation results to obtain the first three-dimensional model; a decomposition unit, used to perform eigenvalue decomposition on the covariance matrix to determine the principal axis direction of the tibia; and a filtering unit, used to filter the voxel points in the segmentation results based on the geometric center and the principal axis direction to obtain multiple target voxel points.
[0018] Furthermore, the filtering unit includes: a first mapping module, used to map each voxel point in the segmentation result according to the geometric center and the principal axis direction to obtain a one-dimensional coordinate of each voxel point relative to the principal axis direction; a first determining module, used to determine the maximum projection value of the voxel point in the segmentation result relative to the principal axis direction according to the one-dimensional coordinate of each voxel point relative to the corresponding principal axis direction; and a filtering module, used to filter the voxel points in the segmentation result according to the maximum projection value and a preset length threshold to obtain multiple target voxel points.
[0019] Furthermore, the first reconstruction module includes: an acquisition submodule, used to acquire the preset maximum length threshold and minimum length threshold when constructing the 3D mesh; a construction submodule, used to construct a target side length function based on the maximum length threshold, the minimum length threshold and the curvature of each target voxel; and a reconstruction submodule, used to perform high-precision 3D reconstruction of multiple target voxels based on the target side length function to obtain the first 3D model.
[0020] Furthermore, the computational unit includes: a second mapping module, used to map the 3D model of the tibia and the 3D model of the steel nail to a 2D space to construct a first projection error constraint term and a second projection error constraint term, wherein the first projection error constraint term is obtained from all mapping points in the 2D space, and the second projection error constraint term is obtained from the boundary mapping points in the 2D space; a third mapping module, used to map the first set of 2D pixels and the second set of 2D pixels to a 3D space to construct a back projection error constraint term; a construction module, used to construct a target loss function based on the first projection error constraint term and the second projection error constraint term; and a solution module, used to perform nonlinear optimization on the preset initial space transformation parameters in the target loss function to obtain the target space transformation parameters.
[0021] Furthermore, the second mapping module includes: a first mapping submodule, used to map the steel nail 3D model to a 2D space to obtain a first mapping point set, and to map the tibia 3D model to a 2D space to obtain a second mapping point set, based on preset initial spatial transformation parameters, camera spatial transformation parameters in the camera coordinate system corresponding to multiple second medical images, and intrinsic parameter matrices; a first construction submodule, used to construct a first projection error constraint term based on the difference between the first mapping point set and the first 2D pixel set, and the difference between the second mapping point set and the second 2D pixel set; and a second construction submodule, used to construct a second projection error constraint term based on the distance between the boundary points of the first mapping point set and the boundary points of the first 2D pixel set, and the distance between the boundary points of the second mapping point set and the boundary points of the second 2D pixel set.
[0022] Furthermore, the third mapping module includes: a transformation submodule, used to perform coordinate information transformation on the first two-dimensional pixel set and the second two-dimensional pixel set to obtain a first homogeneous coordinate set and a second homogeneous coordinate set; a calculation submodule, used to calculate based on the intrinsic parameter matrix in the camera coordinate system corresponding to multiple second medical images, the first homogeneous coordinate set and the second homogeneous coordinate set, to obtain the target direction vector corresponding to each pixel in the first homogeneous coordinate set and the second homogeneous coordinate set; a determination submodule, used to obtain the camera optical center based on the camera space transformation parameters in the camera coordinate system corresponding to multiple second medical images; a second mapping submodule, used to map the first two-dimensional pixel set and the second two-dimensional pixel set based on the target direction vector and the camera optical center to obtain the back-projection ray; and a third construction submodule, used to construct a back-projection error constraint term based on the distance between the back-projection ray, the tibial 3D model and the steel nail 3D model.
[0023] Further, the first determining unit includes: a second determining module, used to determine the axial direction of multiple target steel nails based on the target rotation matrix in the target space transformation parameters; a third determining module, used to determine the distribution direction among the multiple target steel nails based on the target translation vector in the target space transformation parameters; a first calculation module, used to calculate based on the axial direction of the multiple target steel nails and the distribution direction among the multiple target steel nails to obtain the normal vector corresponding to the guide plate; and a fourth determining module, used to obtain the guide plate model based on the distribution direction among the multiple target steel nails and the normal vector corresponding to the guide plate.
[0024] Further, the first determining unit includes: a second calculation module, used to calculate, based on the normal vector corresponding to the guide plate in the guide plate model and a first vector pointing from the posterior to the anterior of the tibia, to obtain the first guide plate projection of the coronal plane of the tibial osteotomy; a third calculation module, used to calculate, based on the normal vector corresponding to the guide plate in the guide plate model and a second vector pointing from the medial malleolus to the lateral malleolus, to obtain the second guide plate projection of the sagittal plane of the tibial osteotomy; a fourth calculation module, used to calculate, based on the first guide plate projection and a third vector corresponding to the direction of the mechanical axis of the tibia, to obtain the coronal plane angle of the tibial osteotomy; and a fifth calculation module, used to calculate, based on the second guide plate projection and a third vector corresponding to the direction of the mechanical axis of the tibia, to obtain the sagittal plane posterior tilt angle of the tibial osteotomy.
[0025] To achieve the above objectives, according to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the above-described data processing method.
[0026] To achieve the above objectives, according to another aspect of this application, an electronic device is provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the data processing method described above during runtime.
[0027] In this embodiment, the following steps are employed: A three-dimensional model of the tibia is constructed based on a first medical image, and three-dimensional models of multiple target steel nails are obtained, wherein the first medical image includes an image of the tibia; multiple orthogonal second medical images are obtained, and based on the multiple second medical images, a first two-dimensional pixel set of multiple target steel nails and a second two-dimensional pixel set of the tibia are obtained; calculations are performed based on the first two-dimensional pixel set, the second two-dimensional pixel set, the three-dimensional model of the tibia, and the three-dimensional model of the steel nails to obtain target space transformation parameters of multiple target steel nails in tibial coordinates, wherein the target space transformation parameters include at least: a target rotation matrix and a target translation vector; a guide plate model is obtained based on the target space transformation parameters, and the target space orientation of the tibial osteotomy plane is obtained based on the guide plate model, wherein the target space orientation includes at least: the coronal angle of the tibial osteotomy and the sagittal posterior tilt angle of the tibial osteotomy. This solves the technical problem that relying on manual experience to determine the spatial orientation of the tibial osteotomy plane leads to relatively low accuracy of the spatial orientation of the tibial osteotomy plane.
[0028] In this application, a three-dimensional model of the tibia is constructed based on a first medical image, and three-dimensional models of multiple target steel nails are obtained. Simultaneously, multiple orthogonal second medical images are acquired, from which a first two-dimensional pixel set of the target steel nails and a second two-dimensional pixel set of the tibia are extracted. Then, precise registration calculations are performed by combining the aforementioned two-dimensional pixel sets, the three-dimensional model of the tibia, and the three-dimensional model of the steel nails to obtain target spatial transformation parameters of the multiple target steel nails in the tibial coordinate system. These parameters include the target rotation matrix and the target translation vector, thereby achieving a high-precision correlation between the spatial position of the steel nails and the three-dimensional structure of the tibia. Then, a guide plate model that perfectly matches the patient's anatomical structure is generated based on these target spatial transformation parameters, and the target spatial orientation of the tibial osteotomy plane, including the coronal angle and sagittal posterior tilt angle, is derived. This avoids the traditional method of relying on subjective human experience to judge the orientation of the osteotomy plane, improving the objectivity and consistency of the spatial positioning of the osteotomy plane. Therefore, it can effectively solve the problem of low accuracy of the spatial orientation of the tibial osteotomy plane due to human experience, achieving the technical effect of improving the accuracy of the spatial orientation of the tibial osteotomy plane and ensuring the postoperative lower limb alignment recovery effect. Attached Figure Description
[0029] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0030] Figure 1 A hardware structure block diagram of a computer terminal for implementing a data processing method is shown.
[0031] Figure 2 This is a flowchart of a data processing method provided according to an embodiment of this application;
[0032] Figure 3 This is a schematic diagram of the data processing method provided in the embodiments of this application. Figure 1 ;
[0033] Figure 4 This is a schematic diagram of the data processing method provided in the embodiments of this application. Figure 2 ;
[0034] Figure 5 This is a schematic diagram of the data processing method provided in the embodiments of this application. Figure 3 ;
[0035] Figure 6 This is a schematic diagram of a data processing apparatus provided according to an embodiment of this application;
[0036] Figure 7 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0037] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0039] It should be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding access points are provided for users to choose to authorize or refuse. For example, interfaces are set up between this system and relevant users or organizations, providing users with corresponding access points to choose to agree to or refuse automated decision-making results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.
[0040] Example 1
[0041] According to an embodiment of this application, a method embodiment for data processing is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0042] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1A hardware structure block diagram of a computer terminal (or mobile device) for implementing a data processing method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0043] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0044] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the aforementioned data processing method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0045] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0046] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0047] Under the aforementioned operating environment, this application provides the following: Figure 2 The data processing method shown. Figure 2 This is a flowchart of a data processing method according to Embodiment 1 of this application. The data processing method includes:
[0048] Step S201: Based on the first medical image, construct a three-dimensional model of the tibia and obtain three-dimensional models of multiple target steel nails, wherein the first medical image includes an image of the tibia.
[0049] Optionally, CT image data of the target object is acquired to obtain a first medical image. Then, based on the first medical image, a three-dimensional geometric representation of the tibial anatomy is generated through digital processing to obtain a three-dimensional model of the tibia. For example, grayscale normalization and noise suppression preprocessing are performed on the CT image data to enhance the contrast between bone tissue and surrounding soft tissue. Then, three-dimensional reconstruction is performed based on the preprocessed image to obtain a three-dimensional model of the tibia.
[0050] Simultaneously, three-dimensional models of multiple target steel nails are acquired. These target steel nails are two rigid cylinders, axially parallel and with a constant spacing, serving as matching benchmarks for subsequent spatial pose estimation. It should be noted that a three-dimensional digital model corresponding to the actual steel nails used to fix the osteotomy guide plate can be formed based on pre-established steel nail geometry data.
[0051] In an optional embodiment, the coordinate system corresponding to the tibial 3D model is the tibial coordinate system, which is a local coordinate system established based on the tibial anatomical structure itself. Its axes are typically defined along the tibial mechanical axis (SI), the anterior-posterior direction (AP), and the medial-lateral direction (ML). The coordinate system corresponding to the steel nail 3D model is the steel nail's own local coordinate system, where the origin of the steel nail's local coordinate system is defined at the center of the steel nail, the z-axis points proximally along the steel nail's axial direction, and the x-axis and y-axis form a plane perpendicular to the axial direction. In subsequent optimization, the steel nail 3D model can be mapped to the tibial coordinate system through transformation parameters (rotation matrix and translation vector) to achieve a unified expression of its spatial pose and tibial anatomical structure.
[0052] Step S202: Obtain multiple orthogonal second medical images, and based on the multiple second medical images, obtain a first two-dimensional pixel set of multiple target steel nails and a second two-dimensional pixel set of the tibia.
[0053] Optionally, a C-arm X-ray imaging device can be used to acquire two-dimensional X-ray images containing the tibia and the target screw fixed to it from two mutually orthogonal imaging perspectives (usually anteroposterior (AP) and lateral (LAT) views), resulting in the aforementioned multiple second medical images. Each image simultaneously records its imaging geometry parameters, including the C-arm's intrinsic parameters (focal length, principal point offset), rotation matrix, and translation vector. It should be noted that the multiple second medical images are two mutually perpendicular two-dimensional X-ray images.
[0054] For each second medical image, image preprocessing is first performed, including contrast enhancement and noise filtering, to improve edge sharpness. Then, a detection algorithm can be used to extract the images, identifying the pixels of the tibia and the two target steel nails, thereby obtaining the first two-dimensional pixel set of each target steel nail and the second two-dimensional pixel set of the tibia.
[0055] For example, for the k-th X-ray image (i.e., the second medical image mentioned above), the first two-dimensional pixel set is: ,in, Let represent the i-th pixel of the n-th steel nail in k X-ray images. The second two-dimensional pixel set is... .in, The value represents the i-th pixel in the k-th X-ray image.
[0056] Step S203: Based on the first two-dimensional pixel set, the second two-dimensional pixel set, the tibial three-dimensional model, and the steel nail three-dimensional model, calculations are performed to obtain the target space transformation parameters of multiple target steel nails in the tibial coordinate system. The target space transformation parameters include at least the target rotation matrix and the target translation vector.
[0057] Optionally, the tibial and steel nail pixels extracted from two acquired orthogonal X-ray images are used as observation data. Combining the tibial and steel nail 3D models, their geometric correspondence in 3D space is established. Then, the spatial pose parameters of the steel nail that minimize the error between the 3D model projected onto the 2D image and the observed contour points are solved. Finally, the target space transformation parameters of the steel nail relative to the tibial coordinate system are output. The target space transformation parameters are the collective term for the rotation matrix and translation vector used to transform the pose of the steel nail in the steel nail coordinate system to the tibial coordinate system. The target space transformation parameters include the target rotation matrix and the target translation vector.
[0058] Step S204: Based on the target space transformation parameters, obtain the guide plate model, and based on the guide plate model, obtain the target space orientation of the tibial osteotomy plane. The target space orientation includes at least the coronal angle of the tibial osteotomy and the sagittal posterior tilt angle of the tibial osteotomy.
[0059] Optionally, the rotation matrix and translation vector of the steel nails in the tibial coordinate system are transformed into a spatial geometric expression of the osteotomy guide plate. Based on the axial directions of the two steel nails and their spatial distribution vectors, the normal vector of the guide plate placement plane is calculated, and it is determined that this plane passes through the midpoint of the two steel nails, thus constructing a guide plate model that strictly corresponds to the geometric constraints of the steel nails. Then, based on this guide plate model, the target spatial orientation of the tibial osteotomy plane is obtained. By projecting the normal vector of the guide plate plane onto the coronal and sagittal planes respectively, and removing its components in the anteroposterior and medial directions, the projection direction of the osteotomy plane in the coronal and sagittal planes is obtained. Furthermore, the angle between this projection direction and the tibial mechanical axis direction is calculated, thus directly obtaining the coronal angle and sagittal posterior tilt angle of the tibial osteotomy.
[0060] It should be noted that the guide plate model refers to a virtual osteotomy guide plate planar model constructed in the tibial coordinate system based on the spatial pose of the target steel nails (target rotation matrix and target translation vector). Its normal is determined by the cross product of the average axial direction of the two steel nails and the direction of the line connecting the steel nails, and it is used as a reference plane to simulate the osteotomy operation. Tibial osteotomy coronal angle: The angle between the projection of the tibial osteotomy plane onto the coronal plane (medial / lateral direction) and the tibial mechanical axis (SI direction). It is used to evaluate the alignment accuracy of the osteotomy in the varus / valgus direction and is calculated from the angle between the projection of the osteotomy plane normal onto the coronal plane and the SI axis. Tibial osteotomy sagittal posterior tilt angle: The angle between the projection of the tibial osteotomy plane onto the sagittal plane (anteroposterior direction) and the tibial mechanical axis (SI direction). It is used to evaluate the angular deviation of the osteotomy in the anteroposterior tilt direction and can be calculated from the angle between the projection of the osteotomy plane normal onto the sagittal plane and the SI axis.
[0061] In summary, a three-dimensional model of the tibia is constructed based on the first medical image, and three-dimensional models of multiple target steel nails are obtained. Simultaneously, multiple orthogonal second medical images are acquired, from which the first two-dimensional pixel set of the target steel nails and the second two-dimensional pixel set of the tibia are extracted. By performing geometric registration and spatial mapping calculations on these two-dimensional image features and the preoperative three-dimensional model, the target spatial transformation parameters of the target steel nails in the tibial coordinate system are accurately derived, including the target rotation matrix and the target translation vector, thereby achieving objective quantification of the spatial pose of the steel nails. Furthermore, a personalized guide plate model is generated based on these spatial transformation parameters, and the target spatial pose of the tibial osteotomy plane, including the coronal angle and sagittal posterior tilt angle, is directly derived. This improves the accuracy and repeatability of determining the spatial pose of the osteotomy plane, effectively solving the technical problems of large deviations in osteotomy pose and poor surgical consistency caused by human experience in related techniques.
[0062] Optionally, in the data processing method provided in this application embodiment, constructing a three-dimensional model of the tibia based on a first medical image includes: segmenting the first medical image according to the gray value of each voxel in the first medical image to obtain a segmentation result; performing high-precision three-dimensional reconstruction based on multiple target voxel points in the segmentation result to obtain a first three-dimensional model; performing low-precision three-dimensional reconstruction based on voxel points other than multiple target voxel points in the segmentation result to obtain a second three-dimensional model; and stitching the first three-dimensional model and the second three-dimensional model together to obtain a three-dimensional model of the tibia.
[0063] In an optional embodiment, the tibial region is initially segmented using a threshold-based segmentation method based on the grayscale value of each voxel in the first medical image to obtain the segmentation result. Then, high-precision 3D reconstruction is performed based on multiple target voxels in the segmentation result to accurately restore key anatomical structures such as the proximal osteotomy surface, ridge, and articular surfaces of the tibia. At the same time, a low-precision 3D reconstruction strategy is used for non-target voxels to simplify the geometric representation of the distal bone and non-critical support areas. Subsequently, the high-precision reconstructed first 3D model and the low-precision reconstructed second 3D model are precisely stitched together to form a coherent and structurally reasonable tibial 3D model. This significantly reduces model data redundancy and computational resource consumption in non-critical areas while ensuring that the geometric accuracy of the key tibial regions meets the requirements for osteotomy plane positioning. This effectively solves the problems of low efficiency and excessive computational burden caused by high-precision reconstruction of the entire model in traditional methods, and achieves synergistic optimization of 3D modeling accuracy and efficiency.
[0064] In an optional embodiment, the first medical image may be preprocessed and quality corrected first. The CT data is subjected to grayscale range limitation processing to obtain preprocessed CT data, denoted as X′. The preprocessing process satisfies the following relationship:
[0065] (1)
[0066] in, and These represent the mean and standard deviation of the intensity of the CT data, respectively. This is a truncation function used to limit the calculation results to a preset grayscale range; N(X) represents the normalization or identity mapping operation performed on the CT data.
[0067] Then, preliminary segmentation of the entire tibial region was performed. A segmentation method based on CT grayscale thresholding was used to segment the preprocessed and quality-corrected CT data X′, where... , representing the position of the voxel in three-dimensional space. Defining the threshold parameter as τ, the initial segmentation result of the entire tibial region can be represented as a binary mask. :
[0068] (2)
[0069] in, Voxel representation This refers to the tibial region. Voxel representation This is the non-tibial region.
[0070] To improve the connectivity and stability of the initial segmentation results, the binary mask can be further refined after threshold segmentation. Further morphological processing yielded the corrected result. :
[0071] (3)
[0072] in, This represents the opening operation in morphology, used to remove isolated noisy regions. This represents the closing operation in morphology, used to fill the gaps inside segmented regions.
[0073] After obtaining the overall segmentation result Subsequently, based on the overall segmentation results, the local modeling regions related to the osteotomy operation are determined, i.e., multiple target pixels are identified. For example, the proximal local region directly related to the tibial osteotomy operation is identified as the target region (i.e., the location of the target voxel), and the remaining parts are non-target regions (i.e., the location of the non-target voxel). Within the target region, local adaptive threshold segmentation is used to improve boundary accuracy, and a high-density, high-fidelity 3D mesh model is generated based on a curvature adaptive mesh algorithm as the first 3D model. In the non-target region, a uniform mesh generation strategy with fixed large side lengths is used to construct a low-density, lightweight 3D mesh model as the second 3D model. The first 3D model and the second 3D model are spatially aligned in the boundary region, and a seamless connection between geometry and topology is achieved through transition patch fusion technology, ultimately obtaining a complete tibial 3D model.
[0074] In an optional embodiment, a local modeling region of the proximal tibia is determined. (i.e., the region corresponding to the target voxel point), in the local modeling region Generate a local 3D mesh model that meets high precision requirements. In non-critical areas Inside, a low-precision modeling method is used to construct the corresponding 3D mesh model. Local 3D mesh model and 3D mesh model Spatial alignment is performed, and transition patches are generated at the aligned boundaries to achieve geometric and topological continuity between the two types of meshes, resulting in a complete 3D model that combines high local accuracy with low global redundancy. .
[0075] By taking the above steps, while ensuring high-fidelity reconstruction of the geometric details of key osteotomy areas, such as the proximal tibial plateau, ridge, and articular surfaces, the model data volume and computational complexity of the diaphysis and non-critical areas are effectively reduced. This significantly shortens the modeling time, reduces storage overhead, and improves the convergence speed and stability of registration without sacrificing positioning accuracy.
[0076] Optionally, in the data processing method provided in this application embodiment, before performing high-precision three-dimensional reconstruction based on multiple target voxel points in the segmentation result to obtain the first three-dimensional model, the method further includes: determining the geometric center of the tibia based on the segmentation result, and calculating the covariance matrix corresponding to the segmentation result based on the geometric center; performing eigenvalue decomposition on the covariance matrix to determine the principal axis direction of the tibia; and filtering the voxel points in the segmentation result based on the geometric center and the principal axis direction to obtain multiple target voxel points.
[0077] In an optional embodiment, based on the segmentation results obtained from the initial segmentation, the geometric center (centroid) of all voxels of the tibia is calculated as the reference origin for local modeling. For example, based on the corrected global segmentation results... Determine the geometric center (centroid) of the tibial region. The calculation method is as follows:
[0078] (4)
[0079] in, express The set of voxels predicted to be the tibia is defined as follows: .
[0080] After obtaining the geometric center (centroid) Then, a covariance matrix is constructed using the voxel coordinate distribution at the centroid to characterize the principal distribution direction of the tibia's shape in three-dimensional space. For example, the covariance matrix of the voxel set... :
[0081] (5)
[0082] Then, the covariance matrix is decomposed into eigenvalues, and the eigenvector corresponding to the largest eigenvalue is taken as the principal axis direction of the tibia. This direction approximately represents the long axis of the tibia, that is, the principal axis direction from the proximal end to the distal end.
[0083] For example, for the covariance matrix Eigenvalue decomposition yields three eigenvectors. , where the eigenvector corresponding to the largest eigenvalue is Indeed, it is in the direction of the tibial principal axis. .
[0084] Finally, the voxel points in the segmentation results are filtered according to the geometric center and principal axis direction to obtain multiple target voxel points. For example, firstly, a sliding window is moved along the principal axis direction in the proximal tibial region to analyze the local cortical bone thickness changes and identify the curvature change point in the transition area between the plateau bone surface and the metaphysis. This change point is used as the proximal starting boundary, and the length of the target region is dynamically determined in combination with the preset standard thickness (such as 20–40 mm) to ensure that the target voxel points cover the estimated osteotomy plane and its adjacent supporting structures, thereby obtaining multiple corresponding target voxel points.
[0085] In this embodiment, the geometric center of the tibia is determined based on the segmentation results, and the covariance matrix is calculated based on the geometric center. Then, the covariance matrix is decomposed into eigenvalues to obtain the principal axis direction of the tibia. Then, all pixels in the segmentation results are oriented and filtered in combination with the geometric center and the principal axis direction. Only key voxel points close to the proximal end of the tibia along the principal axis direction are retained as target voxel points. Thus, without pre-defining the modeling area, the local anatomical structures directly related to the osteotomy operation are actively identified and focused on. This effectively eliminates redundant data from the distal and non-critical areas from participating in high-precision 3D reconstruction. This not only significantly improves modeling efficiency but also avoids geometric prior bias introduced by global modeling. It ensures that the reconstructed first 3D model accurately reflects the actual anatomical reference plane required for osteotomy. Finally, it achieves high-precision and high-efficiency automatic positioning of the tibial osteotomy plane spatial posture without human experience intervention.
[0086] Optionally, in the data processing method provided in this application embodiment, filtering voxel points in the segmentation result based on the geometric center and principal axis direction to obtain multiple target voxel points includes: mapping each voxel point in the segmentation result based on the geometric center and principal axis direction to obtain a one-dimensional coordinate of each voxel point relative to the principal axis direction; determining the maximum projection value of the voxel point in the segmentation result relative to the principal axis direction based on the one-dimensional coordinate of each voxel point relative to the corresponding principal axis direction; and filtering the voxel points in the segmentation result based on the maximum projection value and a preset length threshold to obtain multiple target voxel points.
[0087] In an optional embodiment, the three-dimensional coordinates of each voxel in the segmentation result are translated relative to the geometric center of the tibia to obtain a one-dimensional coordinate system with the geometric center of the tibia as the origin; for example, a one-dimensional coordinate system is established along the major axis. For any voxel... Define its scalar coordinates (i.e., the one-dimensional coordinates mentioned above) along the principal axis:
[0088] (6)
[0089] Calculate the maximum value among all voxel projection values, i.e., the projection coordinates of the farthest endpoint. For example, define the maximum projection value corresponding to the farthest endpoint:
[0090] (7)
[0091] Finally, the voxel points in the segmentation results are filtered based on the maximum projection value and a preset length threshold to obtain multiple target voxel points. For example, let the thickness of the proximal local modeling related to osteotomy be... The set of voxels for local modeling, R, is defined as follows: ; Corresponding local modeling region Can be defined as , Used to characterize the complete region corresponding to the entire segmentation result.
[0092] In an optional embodiment, after determining multiple target pixels, fine segmentation can also be performed within the local modeling region. Within the tibial region, based on the preprocessed CT data X′(x), local fine segmentation is performed to generate the local fine segmentation result. The specific steps are as follows:
[0093] Initialization processing of local segmentation results. The overall segmentation result is limited to the local modeling region. Within (i.e., filtering out multiple target pixels), a local initial mask is obtained. :
[0094] (8)
[0095] in, Indicates an indicator function, when When the condition is met, the value is 1; otherwise, the value is 0.
[0096] Adaptive threshold fine-grained segmentation processing. In the local modeling region... Within this study, statistical analysis was performed on the grayscale distribution of CT data X′(x) to calculate the local average grayscale value. and local grayscale standard deviation :
[0097] (9)
[0098] Based on the above statistics, the local fine segmentation threshold The calculation formula is:
[0099] (10)
[0100] Where λ is a preset coefficient. In the local modeling region... Within, based on local threshold Secondary thresholding is performed on the CT data within the local modeling region to obtain a fine local segmentation result. .
[0101] Boundary refinement processing. Refine the local segmentation results. Boundary refinement is performed to obtain the final local segmentation result. Its optimization objective can be expressed as:
[0102] (11)
[0103] Where S(x) represents the edge region to be optimized, and D(x) is a data item constructed from grayscale or threshold difference, and its expression is: ; Represents the boundary regularization term. These are the weighting coefficients.
[0104] Finally, based on the local segmentation results The corresponding first three-dimensional model is obtained by performing three-dimensional reconstruction.
[0105] In this embodiment, by performing one-dimensional coordinate mapping on each voxel point in the segmentation result based on the geometric center and principal axis direction, the spatial positional relationship of the voxel points along the principal axis direction of the tibia is accurately established, and the maximum projection value of each voxel point in the principal axis direction is calculated accordingly. Then, combined with a preset length threshold, target voxel points located only in the proximal osteotomy area are selected, effectively eliminating redundant or irrelevant voxels at the distal end. This results in the construction of a local high-precision geometric model in the preoperative modeling stage, thereby improving the technical effect of improving the accuracy of determining the spatial orientation of the tibial osteotomy plane.
[0106] Optionally, in the data processing method provided in this application embodiment, performing high-precision three-dimensional reconstruction based on multiple target voxel points in the segmentation result to obtain a first three-dimensional model includes: obtaining a preset maximum length threshold and a minimum length threshold when constructing a three-dimensional mesh; constructing a target side length function based on the maximum length threshold, the minimum length threshold, and the curvature of each target voxel point; and performing high-precision three-dimensional reconstruction on multiple target voxel points based on the target side length function to obtain the first three-dimensional model.
[0107] In an optional embodiment, in order to achieve high-fidelity, adaptive three-dimensional mesh reconstruction of the key area of proximal tibial osteotomy, this application abandons the redundant calculation caused by the excessively high density of traditional uniform meshes and avoids the problem that fixed mesh size cannot adapt to complex anatomical morphology. Instead, it proposes a local high-precision modeling method driven by a curvature-adaptive target side length function.
[0108] First, set the physical constraints on the mesh edge length: a maximum length threshold and a minimum length threshold. Before generating the 3D mesh, two global parameters are pre-set: the maximum length threshold and the minimum length threshold. : Used to control the maximum allowable edge length of the mesh, preventing excessive local refinement from causing a surge in computational burden (e.g., set to 1.5mm); minimum length threshold The minimum resolvable scale used to ensure geometric details, avoiding numerical instability or noise amplification caused by excessively dense meshes (e.g., set to 0.3mm). These two thresholds constitute the "physical boundary" of mesh density, ensuring that the reconstruction results meet clinical accuracy requirements (such as accurately restoring bone ridges and plateau edges) while avoiding resource waste or algorithm crashes caused by infinite refinement.
[0109] Then, isosurface extraction is performed on the tibial region to generate an initial local 3D mesh model M. R0 Then, in the initial local 3D mesh model M R0 A curvature-adaptive target side length function is constructed. For example, for the bone surface region to which each target voxel belongs, its local curvature metric is calculated. This value reflects the degree of curvature of the bone surface at that point: High curvature regions, such as the tibial plateau edge, medial and lateral condyles, intercondylar crest, and cortical transition, have complex anatomical structures and require high-density meshes for accurate representation; Low curvature regions, such as the proximal plateau center and flat bone surfaces, have gentle geometric changes and can have their mesh density appropriately reduced. The mathematical form of the target side length function based on curvature is:
[0110] = (12)
[0111] Where p represents any point on the surface of the MR0 mesh. This represents the curvature measure at point p. Here, ε is the scaling control parameter, and ε is a positive constant to prevent the denominator from being zero. and These represent the minimum and maximum allowed side length thresholds, respectively, and clip(·) is the truncation function.
[0112] Finally, the target side length function is used as a spatially variable mesh generation criterion and input into the surface reconstruction algorithm; when generating the triangular mesh, the algorithm considers the neighborhood of each vertex... The side lengths of the triangles are dynamically adjusted to generate dense, small-sized triangles in high-curvature regions (such as bone ridges and joint edges) to accurately reproduce fine structures; and sparse, large-sized triangles in low-curvature regions (such as the center of a platform) to reduce the number of vertices and faces in the model; finally, the first 3D model is output.
[0113] In an optional embodiment, a local high-precision 3D mesh model can also be generated based on the fine segmentation results within the local modeling region. Within the local modeling region... Internally, based on local fine segmentation results Isosurface extraction was performed on the tibia region to generate an initial local 3D mesh model MR0. A spatially variable target side length function h(p) was defined on the surface of the initial local 3D mesh model MR0 to adjust the local size of the mesh at different locations, thereby generating a local 3D mesh model M that meets high-precision requirements. R .
[0114] In an optional embodiment, non-critical regions are modeled with low precision and then fused with local high-precision meshes. In non-critical regions... Inside, a low-precision modeling method is used to construct the corresponding 3D mesh model. Specifically, a larger target side length is used in non-critical areas. A mesh is generated such that the distances between adjacent vertices in the low-precision 3D mesh model approximately satisfy the following relationship:
[0115] (13)
[0116] Where vi represents the i-th vertex of the 3D mesh model, and ||·||2 represents the Euclidean distance.
[0117] Will and Spatial alignment is performed, and transition patches are generated at the aligned boundaries to achieve geometric and topological continuity between the two types of meshes, resulting in a complete 3D model M that combines high local accuracy with low global redundancy. tibia .
[0118] In this embodiment, when performing high-precision 3D reconstruction based on multiple target voxels in the segmentation results, the maximum and minimum length thresholds preset during the 3D mesh construction process are obtained, and the target side length function is dynamically constructed in combination with the curvature of each target voxel. This allows the mesh side length to automatically shrink in high curvature regions to accurately capture geometric details, and automatically increase in low curvature regions to avoid redundant mesh generation. This effectively controls the model complexity while maintaining the overall reconstruction accuracy, solving the problem of reconstruction distortion or waste of computational resources in curvature variation regions caused by relying on fixed mesh parameters in traditional methods. It achieves an adaptive balance between geometric fidelity and computational efficiency in the 3D model, significantly improving the accuracy and reliability of the 3D model on which the spatial pose determination of the tibial osteotomy plane depends.
[0119] Optionally, in the data processing method provided in this application embodiment, the calculation based on the first two-dimensional pixel set, the second two-dimensional pixel set, the tibial three-dimensional model, and the steel nail three-dimensional model to obtain the target space transformation parameters of multiple target steel nails in the tibial coordinate system includes: mapping the tibial three-dimensional model and the steel nail three-dimensional model to a two-dimensional space to construct a first projection error constraint term and a second projection error constraint term, wherein the first projection error constraint term is obtained from all mapped points in the two-dimensional space, and the second projection error constraint term is obtained from the boundary mapped points in the two-dimensional space; mapping the first two-dimensional pixel set and the second two-dimensional pixel set to a three-dimensional space to construct a back projection error constraint term; constructing a target loss function based on the first projection error constraint term and the second projection error constraint term; and performing nonlinear optimization on the preset initial space transformation parameters in the target loss function to obtain the target space transformation parameters.
[0120] In an optional embodiment, the 3D model of the tibia and the 3D model of the steel nail are projected onto the 2D image plane through the C-arm X-ray imaging geometry model to generate a corresponding set of mapping points; a first projection error constraint term is obtained based on the error between all mapping points and the first 2D pixel set and the second 2D pixel set; at the same time, a second projection error constraint term is obtained based on the error between the boundary mapping points and the first 2D pixel set and the second 2D pixel set.
[0121] Then, the first and second two-dimensional pixel sets of the tibia and steel nail are mapped to three-dimensional space through the camera back projection formula to form rays originating from the camera optical center. The nearest intersection point between each ray and the surface of the three-dimensional model of the tibia and the three-dimensional model of the steel nail is calculated, and a back projection error constraint term is constructed to ensure that the two-dimensional observation points actually correspond to the model surface in three-dimensional space, thereby enhancing geometric consistency.
[0122] Finally, the first projection error constraint, the second projection error constraint, and the back projection error constraint are weighted and fused to form a joint objective loss function. Taking the initially estimated spatial pose of the steel nails (rotation matrix and translation vector) as the starting point for optimization, a nonlinear optimization algorithm is used to iteratively solve the objective function. By minimizing the comprehensive error, the solution gradually converges to the optimal solution, and finally outputs the accurate target space transformation parameters of the two steel nails in the tibial coordinate system.
[0123] In this embodiment, by projecting the 3D model of the tibia and the 3D model of the steel nail into a 2D space, a first projection error constraint term consisting of all mapped points and a second projection error constraint term consisting of boundary mapped points are constructed respectively. Simultaneously, the collected first and second 2D pixel sets are back-projected into the 3D space to construct a back-projection error constraint term. Then, the three types of error constraints are combined to form a target loss function, and the initial spatial transformation parameters are nonlinearly optimized. Thus, based on the global consistency constraint, the pose estimation drift caused by the sparseness of boundary points or imaging noise is effectively suppressed, significantly improving the stability and accuracy of the spatial pose of the steel nail in the tibial coordinate system. Finally, the reliability of the tibial osteotomy plane normal vector calculated based on this pose is guaranteed, solving the problem of local convergence deviation caused by insufficient boundary constraints when relying only on finite 2D X-ray images.
[0124] Optionally, in the data processing method provided in this application embodiment, mapping the tibial 3D model and the steel nail 3D model to a 2D space to construct a first projection error constraint term and a second projection error constraint term includes: mapping the steel nail 3D model to a 2D space to obtain a first mapping point set based on preset initial space transformation parameters, camera space transformation parameters in the camera coordinate system corresponding to multiple second medical images, and intrinsic parameter matrices; mapping the tibial 3D model to a 2D space to obtain a second mapping point set; constructing a first projection error constraint term based on the difference between the first mapping point set and the first 2D pixel set, and the difference between the second mapping point set and the second 2D pixel set; and constructing a second projection error constraint term based on the distance between the boundary points of the first mapping point set and the boundary points of the first 2D pixel set, and the distance between the boundary points of the second mapping point set and the boundary points of the second 2D pixel set.
[0125] In an optional embodiment, mapping the tibial 3D model and the steel nail 3D model to a 2D space to construct a first projection error constraint term and a second projection error constraint term includes:
[0126] First, based on the preset initial spatial transformation parameters (which can be set according to human experience), namely the initial rotation matrix and translation vector of the steel nail relative to the tibial coordinate system, combined with the camera rotation matrix, translation vector and intrinsic parameter matrix of the C-arm imaging system corresponding to each second medical image in the intraoperative coordinate system, perspective projection transformation is performed on all vertices of the three-dimensional model of the steel nail and the three-dimensional model of the tibial bone, respectively, to generate the first mapping point set of the steel nail in the two-dimensional image and the second mapping point set of the tibial bone in the two-dimensional image.
[0127] Then, the Euclidean distance between each point in the first set of mapping points and its corresponding first set of two-dimensional pixels is calculated, and all distances are summed with weights. The weights can be adaptively adjusted according to the confidence level or gradient strength of the pixels to construct a first projection error constraint term that reflects the overall accuracy of the steel nail projection matching. Further, the Euclidean distance between each point in the second set of mapping points and the second set of two-dimensional pixels is calculated, and the weighted summation is used to construct a first projection error constraint term that reflects the degree of alignment of the overall tibial contour.
[0128] Furthermore, contour boundary points are extracted from the first set of mapped points and the first set of two-dimensional pixels, respectively. Only the minimum distance set between the boundary points of the two sets is calculated, and the sum of their squares is accumulated to form a projection error constraint term that only focuses on the consistency of structural edges. Similarly, the boundary points of the second set of mapped points and the second set of two-dimensional pixels are processed in the same way to obtain the tibial boundary projection error. Finally, the boundary projection errors of the steel nail and the tibia are combined to form the second projection error constraint term.
[0129] In an optional embodiment, a first projection error constraint term based on two-dimensional contour information is constructed. It is used to measure the projection error between a 3D model after imaging projection and the 2D points observed in an X-ray image. The projection error between the 3D model points of the tibia and the 3D model points of the steel nail is constituted by the following expression:
[0130] (14)
[0131] in, and Let represent the two-dimensional pixel points of the tibia and the two-dimensional pixel points of the nth steel nail observed in the k-th X-ray image, respectively. and These represent the corresponding two-dimensional projection points obtained from the 3D model of the tibia and the 3D model of the steel nail through the imaging projection model, respectively; This represents the formula for calculating Mahalanobis distance. The projection relationship from a 3D point to a 2D image is defined as follows:
[0132] (15)
[0133] (16)
[0134] in, , The initial rotation matrix and initial displacement vector of the steel nail in the tibial coordinate system can be estimated from the orientation and position information of the steel nail in the X-ray image, or the initial values can be set and optimized in subsequent iterations. , The rotation matrix and displacement vector of the C-arm device are represented by K; K represents the intrinsic parameter matrix of the C-arm device. For three-dimensional points in the tibial three-dimensional model, These are three-dimensional points in the three-dimensional model of the steel nail.
[0135] Construct the second projection error constraint term Based on the imaging projection model, the point set in the 3D model is projected onto the plane of the k-th X-ray image, generating the corresponding 2D projection boundary point set. (Tibia 3D model) 3D model with steel nails The set of its projection boundary points in the k-th X-ray image is denoted as and Calculate its relationship with the first two-dimensional pixel point respectively. and the second two-dimensional pixel The distance between them is used to construct the model projection error constraint term, and its mathematical expression is as follows:
[0136] (17)
[0137] in, d represents the formula for calculating Mahalanobis distance, and d() represents the calculation of the minimum Euclidean distance.
[0138] In this embodiment, based on preset initial spatial transformation parameters, camera spatial transformation parameters in the camera coordinate system corresponding to multiple second medical images, and intrinsic parameter matrices, the 3D model of the steel nail and the 3D model of the tibia are mapped to 2D space respectively, generating corresponding first mapping point sets and second mapping point sets. Combining the first and second 2D pixel sets extracted from actual medical images, a first projection error constraint term is constructed by calculating the overall positional deviation between the point sets. At the same time, a second projection error constraint term is constructed by utilizing the geometric distance relationship between the boundary points of the mapping point set and the pixel set. This constraint mechanism takes into account both the overall point cloud alignment accuracy and the geometric consistency of the contour boundary, thereby significantly improving the stability and robustness of the alignment between the 3D model and the 2D image. It effectively overcomes problems such as boundary blurring and pose estimation drift caused by relying solely on overall point errors, ultimately achieving high-precision and high-stability estimation of the spatial pose of the tibial osteotomy plane, and solving the technical problem of inaccurate osteotomy plane positioning caused by relying on human experience.
[0139] Optionally, in the data processing method provided in this application embodiment, mapping the first two-dimensional pixel set and the second two-dimensional pixel set to three-dimensional space to construct a back-projection error constraint term includes: performing coordinate information transformation on the first two-dimensional pixel set and the second two-dimensional pixel set to obtain a first homogeneous coordinate set and a second homogeneous coordinate set; calculating the target direction vector corresponding to each pixel in the first homogeneous coordinate set and the second homogeneous coordinate set based on the intrinsic parameter matrix in the camera coordinate system corresponding to multiple second medical images, the first homogeneous coordinate set, and the second homogeneous coordinate set; obtaining the camera optical center based on the camera space transformation parameters in the camera coordinate system corresponding to multiple second medical images; mapping the first two-dimensional pixel set and the second two-dimensional pixel set based on the target direction vector and the camera optical center to obtain a back-projection ray; and constructing a back-projection error constraint term based on the distance between the back-projection ray, the tibial three-dimensional model, and the steel nail three-dimensional model.
[0140] In an optional embodiment, for each pixel in the first two-dimensional pixel set and the second two-dimensional pixel set, its two-dimensional image coordinates are converted into homogeneous coordinates to obtain the first homogeneous coordinate set and the second homogeneous coordinate set; based on the C-arm camera intrinsic parameter matrix corresponding to each second medical image, the above homogeneous coordinates are back-projected to obtain the unit direction vector of each pixel in the camera coordinate system, i.e., the target direction vector; combined with the camera space transformation parameters corresponding to each image, the position of the camera optical center corresponding to the image in three-dimensional space is calculated; using the target direction vector and the camera optical center, a three-dimensional spatial ray originating from the camera optical center and passing through the corresponding pixel is constructed, i.e., the back-projection ray.
[0141] Then, the shortest Euclidean distance between each back-projection ray and the surface of the preoperative 3D tibial model and the steel nail model is calculated, and the nearest intersection point between the ray and the tibial model and the steel nail model is obtained respectively. The squares of the minimum distances between all rays and the model surface are summed to construct a back-projection error constraint term. This constraint term ensures that each contour point extracted from the 2D image is geometrically matched with the real bone or steel nail surface in 3D space, thereby enhancing the 3D consistency of registration, suppressing pose drift caused by image noise, artifacts or contour extraction errors, and significantly improving the stability and accuracy of steel nail spatial pose estimation.
[0142] In an optional embodiment, a backprojection error constraint term based on two-dimensional backprojection is constructed. First, the two-dimensional pixels extracted from the k-th X-ray image are represented in homogeneous coordinate form. For a two-dimensional pixel... Its homogeneous representation is: .
[0143] Based on the C-arm device intrinsic parameter matrix K, the camera coordinate system direction vector corresponding to the i-th pixel is defined as follows: The position of the camera optical center corresponding to the k-th X-ray image in three-dimensional space is determined as follows: .
[0144] Based on the camera coordinate system direction vector corresponding to the i-th pixel relative to the optical center position of the camera The back-projection constraint region of two-dimensional contour points in three-dimensional space can be represented as a ray along the line of sight. For the 3D model of the tibia and the 3D model of the steel nail, the corresponding back-projection constraint points are defined as follows:
[0145] (18)
[0146] in, The scale parameter of the back-projection ray describes the position in three-dimensional space from the optical center of the imaging system along the line of sight determined by the two-dimensional contour points; its value is a positive real number. Based on this, the geometric consistency error between the back-projection ray and the surface of the three-dimensional model is defined as the back-projection error constraint term. The specific formula is as follows:
[0147] (19)
[0148] Where d() represents the calculation of the minimum Euclidean distance.
[0149] In an optional embodiment, the objective function is jointly optimized. The first projection error constraint constructed above is then applied. Back projection error constraints and the second projection error constraint We perform weighted integration to construct a unified joint objective function. Its expression is as follows:
[0150] (20)
[0151] in, , , There are three hyperparameters.
[0152] Based on the objective optimization function Nonlinear optimization is performed to solve the problem. By iteratively updating the model parameters, the objective function value is gradually reduced, thereby estimating the rotation matrix of the steel nail in the tibial coordinate system. With translation vector In each iteration, the parameter update amount The following relationship must be satisfied:
[0153] (twenty one)
[0154] in, This represents the Jacobian matrix of the objective function with respect to the optimization variables. It represents the error between the current model and the image. This is achieved by comparing the objective function in two consecutive iterations. The convergence of the optimization process is judged by the changes in the objective function. The optimization process is terminated when the change in the objective function is less than a preset threshold or the number of iterations reaches a preset upper limit.
[0155] In this embodiment, by converting the first two-dimensional pixel set and the second two-dimensional pixel set into the first homogeneous coordinate set and the second homogeneous coordinate set, respectively, and combining the camera intrinsic parameter matrix and camera space transformation parameters corresponding to multiple images, the target direction vector and camera optical center corresponding to each pixel are accurately calculated, thereby generating a three-dimensional back-projection ray that starts from the camera optical center and passes through the corresponding pixel. Then, based on the minimum Euclidean distance between the back-projection ray and the tibial three-dimensional model and the steel nail three-dimensional model, a back-projection error constraint term is constructed, so that the optimization process can directly use the consistency of the projection of the two-dimensional image points and the three-dimensional model in space for pose estimation. This overcomes the problem of constraint ambiguity and poor stability caused by the lack of a three-dimensional mapping mechanism in traditional methods, significantly improves the accuracy and robustness of the joint estimation of the spatial pose of the steel nail and osteotomy guide plate, and finally achieves high-accuracy automatic determination of the spatial pose of the tibial osteotomy plane.
[0156] In an alternative embodiment, the following can be employed: Figure 3 The schematic diagram illustrates the 3D reconstruction of the tibia. Patient CT image data is acquired, and CT data preprocessing and quality correction are performed to obtain preprocessed CT data. The preprocessed CT data is then used for preliminary segmentation of the entire tibial region. Based on the preliminary segmentation results, the Regions of Interest (ROIs) related to osteotomy are determined. High-precision meshes are generated in the ROIs, and low-precision meshes are generated in the non-ROIs. The high-precision and low-precision meshes are then fused to obtain the final 3D model of the tibia.
[0157] Optionally, in the data processing method provided in this application embodiment, obtaining the guide plate model based on the target space transformation parameters includes: determining the axial direction of multiple target steel nails based on the target rotation matrix in the target space transformation parameters; determining the distribution direction between the multiple target steel nails based on the target translation vector in the target space transformation parameters; calculating the normal vector corresponding to the guide plate based on the axial direction of the multiple target steel nails and the distribution direction between the multiple target steel nails; and obtaining the guide plate model based on the distribution direction between the multiple target steel nails and the normal vector corresponding to the guide plate.
[0158] In an optional embodiment, based on the target rotation matrix in the target space transformation parameters, the axial direction of each target steel nail in the tibial coordinate system is calculated. That is, by rotating the standard axial vector (such as [0,0,1]) in the inherent coordinate system of the steel nail to the spatial orientation defined by the current target rotation matrix, the spatial orientation of each steel nail is obtained. Based on the target translation vector in the target space transformation parameters, the vector difference between the end positions of two target steel nails is calculated as the distribution direction between the steel nails, reflecting their lateral spatial arrangement in the proximal tibia.
[0159] Then, the average vector of the two steel nail axes is cross-multiplied with the distribution direction between the steel nails to obtain a vector perpendicular to the plane formed by the two. This vector is the normal vector of the plane to which the osteotomy guide plate needs to be placed (i.e., the normal vector to the guide plate), ensuring that the geometric relationship between the guide plate plane and the two steel nails is consistent. Based on this normal vector and the midpoint position of the two steel nails, the plane equation of the guide plate is defined, and a three-dimensional guide plate model is generated by extending along the plane with the preset guide plate geometric dimensions, which fully expresses its spatial pose and shape in the tibial coordinate system.
[0160] In an optional embodiment, a spatial model of the osteotomy guide is constructed based on the pin pose parameters transformed to the tibial coordinate system. This is determined according to the target rotation matrix. Define the axial direction of the nth steel nail. :
[0161] (twenty two)
[0162] in, =[0,0,1] T It is a unit vector in the world coordinate system, used to represent the axial direction of the steel nail in its own coordinate system. It is the target translation vector of the two steel nails. It can construct the spatial distribution direction of the steel nails in the tibial coordinate system. :
[0163] (twenty three)
[0164] Furthermore, based on the spatial distribution direction of the steel nails The average direction of the two steel nails along their axial directions can be used to determine the normal vector of the plane on which the osteotomy guide plate is placed, through the cross product of the vectors. The normal vector of the plane on which the guide plate is placed can be determined by the cross product operation:
[0165] (twenty four)
[0166] Guide plate model Ultimately, it can be determined as follows:
[0167] (25)
[0168] in, This represents any three-dimensional point that satisfies the constraints of this plane.
[0169] In this embodiment, the axial directions of multiple target steel nails are calculated based on the target rotation matrix in the target space transformation parameters. Simultaneously, the spatial distribution direction of multiple target steel nails is determined based on the difference between the target translation vectors. Then, the accurate normal vector of the guide plate is obtained by performing a cross product operation between the mean of the axial directions and the distribution directions. The geometric plane model of the guide plate is constructed by combining the midpoint of the distribution direction with the normal vector. This transforms the steel nail pose parameters into a guide plate model with clear mathematical expression and geometric constraints, completely eliminating the uncertainty of the traditional subjective setting of the osteotomy plane pose based on human experience. It realizes a fully automated, reproducible, and highly consistent geometric derivation process from orthopedic navigation data to surgical instrument positioning, significantly improving the accuracy and stability of the tibial osteotomy guide plate's planar spatial pose.
[0170] Optionally, in the data processing method provided in this application embodiment, obtaining the target spatial pose of the tibial osteotomy plane based on the guide plate model includes: calculating the first guide plate projection of the coronal plane of the tibial osteotomy based on the normal vector corresponding to the guide plate in the guide plate model and the first vector pointing from the posterior to the anterior of the tibia; calculating the second guide plate projection of the sagittal plane of the tibial osteotomy based on the normal vector corresponding to the guide plate in the guide plate model and the second vector pointing from the medial malleolus to the lateral malleolus; calculating the coronal plane angle of the tibial osteotomy based on the first guide plate projection and the third vector corresponding to the mechanical axis direction of the tibia; and calculating the posterior tilt angle of the sagittal plane of the tibial osteotomy based on the second guide plate projection and the third vector corresponding to the mechanical axis direction of the tibia.
[0171] In an optional embodiment, a dot product and orthogonal projection operation is performed between the guide plate normal vector in the guide plate model and a first vector pointing from the posterior to the anterior aspect of the tibia (i.e., the anterior-posterior direction, AP direction). This eliminates the component of the normal vector in the AP direction, yielding the projection vector of the guide plate plane in the coronal plane, i.e., the first guide plate projection. This vector characterizes the tilt direction of the osteotomy plane in the coronal plane. An orthogonal projection is then performed between the guide plate normal vector and a second vector pointing from the medial malleolus to the lateral malleolus (i.e., the medial-lateral direction, ML direction). This eliminates the component of the normal vector in the ML direction, yielding the projection vector of the guide plate plane in the sagittal plane, i.e., the second guide plate projection. This vector reflects the posterior tilt tendency of the osteotomy plane in the sagittal plane.
[0172] Then, the cosine of the angle between the projection of the first guide plate and the third vector (i.e., the SI direction, from bottom to top along the long axis of the tibia) corresponding to the mechanical axis of the tibia is calculated to obtain the angle between the two. This angle is the coronal angle of the tibial osteotomy, which is used to evaluate the degree of deviation of the osteotomy surface in the varus / valgus direction. Similarly, the cosine of the angle between the projection of the second guide plate and the third vector is calculated to obtain the angle between them. This angle is the sagittal posterior tilt angle of the tibial osteotomy, which is used to quantify the degree of posterior or anterior tilt of the osteotomy surface in the anteroposterior direction. Finally, the coronal angle and the sagittal posterior tilt angle are used as the target posture parameters for simulating the osteotomy plane in three-dimensional space.
[0173] In an optional embodiment, the coronal angle and sagittal posterior tilt angle of the tibial osteotomy are calculated based on the guide plane. A first guide projection of the coronal plane of the tibial osteotomy is determined based on existing guide plane data. And the projection of the second guide plate to determine the coronal angle of the tibial osteotomy. :
[0174] (26)
[0175] in, This indicates the anterior-posterior direction (i.e., the first vector) in the tibial coordinate system. This represents the inward and outward directions (i.e., the second vector). The coronal angle (CTR) and sagittal posterior tilt angle (STR) of the tibial osteotomy are ultimately determined.
[0176] (27)
[0177] in, This indicates the direction of the tibial mechanical axis in the tibial coordinate system (i.e., the third vector).
[0178] In an optional embodiment, the pin pose parameters transformed to the tibial coordinate system (i.e. and A three-dimensional model of the steel nail in the tibial coordinate system is generated. Then, the three-dimensional model of the steel nail in the tibial coordinate system and the three-dimensional model of the tibia are superimposed to obtain a complete and accurate spatial distribution model of the steel nail in the tibial coordinate system. Through this fused model, the spatial relative relationship between the steel nail and the tibial anatomical structure (such as the cortex, plateau edge, and medullary canal opening) can be visualized intuitively, which helps to determine whether the steel nail implantation deviates from the safe area and whether there is cortical penetration or tilting deviation.
[0179] In an alternative embodiment, the following can be employed: Figure 4The schematic diagram illustrates the accurate assessment of the target spatial pose of the tibial osteotomy plane. X-ray images are acquired, and two-dimensional pixels of the tibia and the screw are extracted. Screw pose variables are initialized, and a constrained objective optimization function is constructed for iterative optimization. The process determines convergence; if convergence occurs, the optimized screw pose variables (rotation matrix and translation vector) are output; otherwise, the parameters are updated, and the iterative optimization process is repeated. An osteotomy guide model is constructed based on the optimized screw pose variables, and then the sagittal posterior tilt angle and coronal angle of the tibial osteotomy are output from the guide model.
[0180] In an alternative embodiment, the following can be employed: Figure 5 The schematic diagram illustrates the accurate assessment of the target spatial orientation of the tibial osteotomy plane, constructing a high-precision 3D model of the local area related to the tibial osteotomy operation and a low-precision 3D model of the non-critical area, thereby obtaining the tibial 3D model M. tibia X-ray images were acquired, and two-dimensional pixels of the tibia and the steel nail were extracted. Based on the three-dimensional models of the tibia and the steel nail, as well as the two-dimensional pixels of the tibia and the steel nail, the guide plate model was reconstructed through iterative optimization. Finally, the target spatial pose of the tibial osteotomy plane was calculated based on the guide plate model.
[0181] The data processing method provided in this application embodiment constructs a three-dimensional model of the tibia based on a first medical image and obtains three-dimensional models of multiple target steel nails, wherein the first medical image includes an image of the tibia; it obtains multiple orthogonal second medical images and, based on the multiple second medical images, obtains a first two-dimensional pixel set of multiple target steel nails and a second two-dimensional pixel set of the tibia; it calculates the target space transformation parameters of the multiple target steel nails in the tibial coordinate system based on the first two-dimensional pixel set, the second two-dimensional pixel set, the three-dimensional model of the tibia, and the three-dimensional model of the steel nails, wherein the target space transformation parameters include at least: a target rotation matrix and a target translation vector; it obtains a guide plate model based on the target space transformation parameters, and obtains the target space orientation of the tibial osteotomy plane based on the guide plate model, wherein the target space orientation includes at least: the coronal angle of the tibial osteotomy and the sagittal posterior tilt angle of the tibial osteotomy plane. This solves the technical problem that relying on manual experience to determine the spatial orientation of the tibial osteotomy plane leads to relatively low accuracy of the spatial orientation of the tibial osteotomy plane.
[0182] In this application, a three-dimensional model of the tibia is constructed based on a first medical image, and three-dimensional models of multiple target steel nails are obtained. Simultaneously, multiple orthogonal second medical images are acquired, from which a first two-dimensional pixel set of the target steel nails and a second two-dimensional pixel set of the tibia are extracted. Then, precise registration calculations are performed by combining the aforementioned two-dimensional pixel sets, the three-dimensional model of the tibia, and the three-dimensional model of the steel nails to obtain target spatial transformation parameters of the multiple target steel nails in the tibial coordinate system. These parameters include the target rotation matrix and the target translation vector, thereby achieving a high-precision correlation between the spatial position of the steel nails and the three-dimensional structure of the tibia. Then, a guide plate model that perfectly matches the patient's anatomical structure is generated based on these target spatial transformation parameters, and the target spatial orientation of the tibial osteotomy plane, including the coronal angle and sagittal posterior tilt angle, is derived. This avoids the traditional method of relying on subjective human experience to judge the orientation of the osteotomy plane, improving the objectivity and consistency of the spatial positioning of the osteotomy plane. Therefore, it can effectively solve the problem of low accuracy of the spatial orientation of the tibial osteotomy plane due to human experience, achieving the technical effect of improving the accuracy of the spatial orientation of the tibial osteotomy plane and ensuring the postoperative lower limb alignment recovery effect.
[0183] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0184] Example 2
[0185] This application also provides a data processing apparatus. It should be noted that the data processing apparatus of this application can be used to execute the data processing method provided in this application. The data processing apparatus provided in this application will be described below.
[0186] According to embodiments of this application, a data processing apparatus for implementing the above-described data processing method is also provided, such as... Figure 6 As shown, the device includes: a construction unit 601, an acquisition unit 602, a calculation unit 603, and a first determination unit 604.
[0187] The construction unit 601 is used to construct a three-dimensional model of the tibia based on the first medical image and to obtain three-dimensional models of multiple target steel nails, wherein the first medical image includes an image of the tibia;
[0188] The acquisition unit 602 is used to acquire multiple orthogonal second medical images, and based on the multiple second medical images, obtain a first two-dimensional pixel set of multiple target steel nails and a second two-dimensional pixel set of the tibia;
[0189] The calculation unit 603 is used to calculate based on the first two-dimensional pixel set, the second two-dimensional pixel set, the tibial three-dimensional model and the steel nail three-dimensional model to obtain the target space transformation parameters of multiple target steel nails in the tibial coordinates. The target space transformation parameters include at least: the target rotation matrix and the target translation vector.
[0190] The first determining unit 604 is used to obtain the guide plate model based on the target space transformation parameters, and to obtain the target space orientation of the tibial osteotomy plane based on the guide plate model. The target space orientation includes at least the coronal angle of the tibial osteotomy and the sagittal posterior tilt angle of the tibial osteotomy.
[0191] The data processing apparatus provided in this application embodiment constructs a three-dimensional model of the tibia based on a first medical image by a construction unit 601, and acquires three-dimensional models of multiple target steel nails, wherein the first medical image includes an image of the tibia; an acquisition unit 602 acquires multiple orthogonal second medical images, and obtains a first two-dimensional pixel set of multiple target steel nails and a second two-dimensional pixel set of the tibia based on the multiple second medical images; a calculation unit 603 calculates the target space transformation parameters of the multiple target steel nails in the tibia coordinate based on the first two-dimensional pixel set, the second two-dimensional pixel set, the three-dimensional model of the tibia, and the three-dimensional model of the steel nails, wherein the target space transformation parameters include at least: a target rotation matrix and a target translation vector; a first determination unit 604 obtains a guide plate model based on the target space transformation parameters, and obtains the target space orientation of the tibial osteotomy plane based on the guide plate model, wherein the target space orientation includes at least: the coronal angle of the tibial osteotomy and the sagittal posterior tilt angle of the tibial osteotomy, thus solving the technical problem that the accuracy of the spatial orientation of the tibial osteotomy plane is relatively low due to the reliance on manual experience to determine the spatial orientation of the tibial osteotomy plane.
[0192] In this application, a three-dimensional model of the tibia is constructed based on a first medical image, and three-dimensional models of multiple target steel nails are obtained. Simultaneously, multiple orthogonal second medical images are acquired, from which a first two-dimensional pixel set of the target steel nails and a second two-dimensional pixel set of the tibia are extracted. Then, precise registration calculations are performed by combining the aforementioned two-dimensional pixel sets, the three-dimensional model of the tibia, and the three-dimensional model of the steel nails to obtain target spatial transformation parameters of the multiple target steel nails in the tibial coordinate system. These parameters include the target rotation matrix and the target translation vector, thereby achieving a high-precision correlation between the spatial position of the steel nails and the three-dimensional structure of the tibia. Then, a guide plate model that perfectly matches the patient's anatomical structure is generated based on these target spatial transformation parameters, and the target spatial orientation of the tibial osteotomy plane, including the coronal angle and sagittal posterior tilt angle, is derived. This avoids the traditional method of relying on subjective human experience to judge the orientation of the osteotomy plane, improving the objectivity and consistency of the spatial positioning of the osteotomy plane. Therefore, it can effectively solve the problem of low accuracy of the spatial orientation of the tibial osteotomy plane due to human experience, achieving the technical effect of improving the accuracy of the spatial orientation of the tibial osteotomy plane and ensuring the postoperative lower limb alignment recovery effect.
[0193] Optionally, in the data processing apparatus provided in this application embodiment, the construction unit includes: a segmentation module, used to segment the first medical image based on the gray value of each voxel point in the first medical image to obtain a segmentation result; a first reconstruction module, used to perform high-precision three-dimensional reconstruction based on multiple target voxel points in the segmentation result to obtain a first three-dimensional model; a second reconstruction module, used to perform low-precision three-dimensional reconstruction based on voxel points other than multiple target voxel points in the segmentation result to obtain a second three-dimensional model; and a stitching module, used to stitch the first three-dimensional model and the second three-dimensional model to obtain a tibial three-dimensional model.
[0194] Optionally, in the data processing apparatus provided in this application embodiment, before performing high-precision three-dimensional reconstruction based on multiple target voxel points in the segmentation result to obtain a first three-dimensional model, the apparatus further includes: a second determining unit, used to determine the geometric center of the tibia based on the segmentation result and calculate the covariance matrix corresponding to the segmentation result based on the geometric center before performing high-precision three-dimensional reconstruction based on multiple target voxel points in the segmentation result to obtain the first three-dimensional model; a decomposition unit, used to perform eigenvalue decomposition on the covariance matrix to determine the principal axis direction of the tibia; and a filtering unit, used to filter the voxel points in the segmentation result based on the geometric center and the principal axis direction to obtain multiple target voxel points.
[0195] Optionally, in the data processing apparatus provided in this application embodiment, the filtering unit includes: a first mapping module, used to map each voxel point in the segmentation result according to the geometric center and the principal axis direction to obtain a one-dimensional coordinate of each voxel point relative to the principal axis direction; a first determining module, used to determine the maximum projection value of the voxel point in the segmentation result relative to the principal axis direction according to the one-dimensional coordinate of each voxel point relative to the corresponding principal axis direction; and a filtering module, used to filter the voxel points in the segmentation result according to the maximum projection value and a preset length threshold to obtain multiple target voxel points.
[0196] Optionally, in the data processing apparatus provided in this application embodiment, the first reconstruction module includes: an acquisition submodule, used to acquire a preset maximum length threshold and a minimum length threshold when constructing a three-dimensional mesh; a construction submodule, used to construct a target side length function based on the maximum length threshold, the minimum length threshold and the curvature of each target voxel point; and a reconstruction submodule, used to perform high-precision three-dimensional reconstruction of multiple target voxel points based on the target side length function to obtain a first three-dimensional model.
[0197] Optionally, in the data processing apparatus provided in this application embodiment, the computing unit includes: a second mapping module, used to map the tibial 3D model and the steel nail 3D model to a 2D space to construct a first projection error constraint term and a second projection error constraint term, wherein the first projection error constraint term is obtained from all mapping points in the 2D space, and the second projection error constraint term is obtained from boundary mapping points in the 2D space; a third mapping module, used to map the first 2D pixel set and the second 2D pixel set to a 3D space to construct a back projection error constraint term; a construction module, used to construct a target loss function based on the first projection error constraint term and the second projection error constraint term; and a solution module, used to perform nonlinear optimization solution on the preset initial space transformation parameters in the target loss function to obtain the target space transformation parameters.
[0198] Optionally, in the data processing apparatus provided in this application embodiment, the second mapping module includes: a first mapping submodule, used to map the three-dimensional model of the steel nail to a two-dimensional space to obtain a first mapping point set, and to map the three-dimensional model of the tibia to a two-dimensional space to obtain a second mapping point set, based on preset initial spatial transformation parameters, camera spatial transformation parameters in the camera coordinate system corresponding to multiple second medical images, and intrinsic parameter matrices; a first construction submodule, used to construct a first projection error constraint term based on the difference between the first mapping point set and the first two-dimensional pixel set, and the difference between the second mapping point set and the second two-dimensional pixel set; and a second construction submodule, used to construct a second projection error constraint term based on the distance between the boundary points of the first mapping point set and the boundary points of the first two-dimensional pixel set, and the distance between the boundary points of the second mapping point set and the boundary points of the second two-dimensional pixel set.
[0199] Optionally, in the data processing apparatus provided in this application embodiment, the third mapping module includes: a transformation submodule, used to perform coordinate information transformation on the first two-dimensional pixel set and the second two-dimensional pixel set to obtain a first homogeneous coordinate set and a second homogeneous coordinate set; a calculation submodule, used to calculate based on the intrinsic parameter matrix in the camera coordinate system corresponding to multiple second medical images, the first homogeneous coordinate set and the second homogeneous coordinate set, to obtain the target direction vector corresponding to each pixel in the first homogeneous coordinate set and the second homogeneous coordinate set; a determination submodule, used to obtain the camera optical center based on the camera space transformation parameters in the camera coordinate system corresponding to multiple second medical images; a second mapping submodule, used to map the first two-dimensional pixel set and the second two-dimensional pixel set based on the target direction vector and the camera optical center to obtain the back-projection ray; and a third construction submodule, used to construct a back-projection error constraint term based on the distance between the back-projection ray, the tibial three-dimensional model and the steel nail three-dimensional model.
[0200] Optionally, in the data processing apparatus provided in this application embodiment, the first determining unit includes: a second determining module, used to determine the axial direction of multiple target steel nails based on the target rotation matrix in the target space transformation parameters; a third determining module, used to determine the distribution direction among the multiple target steel nails based on the target translation vector in the target space transformation parameters; a first calculation module, used to calculate based on the axial direction of the multiple target steel nails and the distribution direction among the multiple target steel nails to obtain the normal vector corresponding to the guide plate; and a fourth determining module, used to obtain the guide plate model based on the distribution direction among the multiple target steel nails and the normal vector corresponding to the guide plate.
[0201] Optionally, in the data processing apparatus provided in this application embodiment, the first determining unit includes: a second calculation module, used to calculate, based on the normal vector corresponding to the guide plate in the guide plate model and a first vector pointing from the posterior to the anterior of the tibia, to obtain the first guide plate projection of the coronal plane of the tibial osteotomy; a third calculation module, used to calculate, based on the normal vector corresponding to the guide plate in the guide plate model and a second vector pointing from the medial malleolus to the lateral malleolus, to obtain the second guide plate projection of the sagittal plane of the tibial osteotomy; a fourth calculation module, used to calculate, based on the first guide plate projection and a third vector corresponding to the direction of the mechanical axis of the tibia, to obtain the coronal plane angle of the tibial osteotomy; and a fifth calculation module, used to calculate, based on the second guide plate projection and the third vector corresponding to the direction of the mechanical axis of the tibia, to obtain the sagittal plane posterior tilt angle of the tibial osteotomy.
[0202] It should be noted that the aforementioned construction unit 601, acquisition unit 602, calculation unit 603, and first determination unit 604 correspond to steps S201 to S204 in Embodiment 1. The four units and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should also be noted that the aforementioned modules or units can be hardware or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). These units can also run as part of a device in the computer terminal 10 provided in Embodiment 1.
[0203] Example 3
[0204] Embodiments of this application may provide an electronic device. Figure 7 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 7 As shown, the electronic device may include: one or more ( Figure 7 (Only one is shown) processor 702, memory 704, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0205] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0206] The processor can access information and applications stored in the memory via a transmission device to execute the following steps: Based on a first medical image, construct a three-dimensional model of the tibia and obtain three-dimensional models of multiple target steel nails, wherein the first medical image includes an image of the tibia; acquire multiple orthogonal second medical images, and based on the multiple second medical images, obtain a first two-dimensional pixel set of multiple target steel nails and a second two-dimensional pixel set of the tibia; calculate, based on the first two-dimensional pixel set, the second two-dimensional pixel set, the three-dimensional model of the tibia, and the three-dimensional model of the steel nails, obtain target space transformation parameters of the multiple target steel nails in tibial coordinates, wherein the target space transformation parameters include at least: a target rotation matrix and a target translation vector; based on the target space transformation parameters, obtain a guide plate model, and based on the guide plate model, obtain the target space orientation of the tibial osteotomy plane, wherein the target space orientation includes at least: the coronal angle of the tibial osteotomy and the sagittal posterior tilt angle of the tibial osteotomy.
[0207] The processor can access the information and application programs stored in the memory via the transmission device to execute the following steps: Constructing a three-dimensional model of the tibia based on a first medical image includes: segmenting the first medical image according to the grayscale value of each voxel in the first medical image to obtain a segmentation result; performing high-precision three-dimensional reconstruction based on multiple target voxels in the segmentation result to obtain a first three-dimensional model; performing low-precision three-dimensional reconstruction based on voxels other than the multiple target voxels in the segmentation result to obtain a second three-dimensional model; and stitching the first three-dimensional model and the second three-dimensional model together to obtain a three-dimensional model of the tibia.
[0208] The processor can access information and applications stored in memory via a transmission device to execute the following steps: Before performing high-precision 3D reconstruction based on multiple target voxel points in the segmentation results to obtain the first 3D model, the method further includes: determining the geometric center of the tibia based on the segmentation results, and calculating the covariance matrix corresponding to the segmentation results based on the geometric center; performing eigenvalue decomposition on the covariance matrix to determine the principal axis direction of the tibia; and filtering the voxel points in the segmentation results based on the geometric center and principal axis direction to obtain multiple target voxel points.
[0209] The processor can access information and applications stored in the memory via a transmission device to perform the following steps: filtering voxel points in the segmentation result based on the geometric center and principal axis direction to obtain multiple target voxel points, including: mapping each voxel point in the segmentation result based on the geometric center and principal axis direction to obtain a one-dimensional coordinate of each voxel point relative to the principal axis direction; determining the maximum projection value of the voxel point in the segmentation result relative to the principal axis direction based on the one-dimensional coordinate of each voxel point relative to the principal axis direction; and filtering the voxel points in the segmentation result based on the maximum projection value and a preset length threshold to obtain multiple target voxel points.
[0210] The processor can access the information and application programs stored in the memory via a transmission device to execute the following steps: performing high-precision 3D reconstruction based on multiple target voxel points in the segmentation result to obtain a first 3D model, including: obtaining the maximum length threshold and minimum length threshold preset during 3D mesh construction; constructing a target side length function based on the maximum length threshold, minimum length threshold, and curvature of each target voxel point; and performing high-precision 3D reconstruction on multiple target voxel points based on the target side length function to obtain the first 3D model.
[0211] The processor can access information and applications stored in the memory via a transmission device to execute the following steps: Calculating target space transformation parameters of multiple target steel nails in tibial coordinates based on a first two-dimensional pixel set, a second two-dimensional pixel set, a tibial 3D model, and a steel nail 3D model, including: mapping the tibial 3D model and the steel nail 3D model to a two-dimensional space to construct a first projection error constraint term and a second projection error constraint term, wherein the first projection error constraint term is obtained from all mapped points in the two-dimensional space, and the second projection error constraint term is obtained from boundary mapped points in the two-dimensional space; mapping the first two-dimensional pixel set and the second two-dimensional pixel set to a three-dimensional space to construct a back projection error constraint term; constructing a target loss function based on the first and second projection error constraint terms; and performing nonlinear optimization on the preset initial space transformation parameters in the target loss function to obtain the target space transformation parameters.
[0212] The processor can access information and applications stored in the memory via a transmission device to execute the following steps: mapping the tibial 3D model and the steel nail 3D model to a 2D space to construct a first projection error constraint term and a second projection error constraint term, including: mapping the steel nail 3D model to a 2D space to obtain a first mapping point set, and mapping the tibial 3D model to a 2D space to obtain a second mapping point set, based on preset initial space transformation parameters, camera space transformation parameters in the camera coordinate system corresponding to multiple second medical images, and intrinsic parameter matrices; constructing a first projection error constraint term based on the difference between the first mapping point set and the first 2D pixel set, and the difference between the second mapping point set and the second 2D pixel set; and constructing a second projection error constraint term based on the distance between the boundary points of the first mapping point set and the boundary points of the first 2D pixel set, and the distance between the boundary points of the second mapping point set and the boundary points of the second 2D pixel set.
[0213] The processor can invoke information and applications stored in the memory via a transmission device to execute the following steps: mapping the first two-dimensional pixel set and the second two-dimensional pixel set to three-dimensional space to construct a back-projection error constraint term, including: performing coordinate information transformation on the first two-dimensional pixel set and the second two-dimensional pixel set to obtain a first homogeneous coordinate set and a second homogeneous coordinate set; calculating the target direction vector corresponding to each pixel in the first homogeneous coordinate set and the second homogeneous coordinate set based on the intrinsic parameter matrix in the camera coordinate system corresponding to multiple second medical images, the first homogeneous coordinate set, and the second homogeneous coordinate set; obtaining the camera optical center based on the camera space transformation parameters in the camera coordinate system corresponding to multiple second medical images; mapping the first two-dimensional pixel set and the second two-dimensional pixel set based on the target direction vector and the camera optical center to obtain a back-projection ray; and constructing a back-projection error constraint term based on the distance between the back-projection ray, the tibial three-dimensional model, and the steel nail three-dimensional model.
[0214] The processor can access the information and application program stored in the memory via the transmission device to execute the following steps: obtaining the guide plate model based on the target space transformation parameters includes: determining the axial direction of multiple target steel nails based on the target rotation matrix in the target space transformation parameters; determining the distribution direction between multiple target steel nails based on the target translation vector in the target space transformation parameters; calculating the normal vector corresponding to the guide plate based on the axial direction of multiple target steel nails and the distribution direction between multiple target steel nails; and obtaining the guide plate model based on the distribution direction between multiple target steel nails and the normal vector corresponding to the guide plate.
[0215] The processor can access the information and application programs stored in the memory via a transmission device to execute the following steps: Based on the guide plate model, the target spatial pose of the tibial osteotomy plane is obtained, including: calculating the first guide plate projection of the coronal plane of the tibial osteotomy using the normal vector corresponding to the guide plate in the guide plate model and a first vector pointing from the posterior to the anterior of the tibia; calculating the second guide plate projection of the sagittal plane of the tibial osteotomy using the normal vector corresponding to the guide plate in the guide plate model and a second vector pointing from the medial malleolus to the lateral malleolus; calculating the coronal plane angle of the tibial osteotomy using the first guide plate projection and a third vector corresponding to the direction of the tibial mechanical axis; and calculating the posterior tilt angle of the sagittal plane of the tibial osteotomy using the second guide plate projection and a third vector corresponding to the direction of the tibial mechanical axis.
[0216] Those skilled in the art will understand that Figure 7 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 7 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 7 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 7 The different configurations shown.
[0217] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0218] Example 4
[0219] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the data processing method provided in Embodiment 1.
[0220] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0221] This application also provides a computer program product, which, when executed on a data processing device, is a program adapted to perform data processing method steps.
[0222] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0223] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0224] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0225] The units described as separate components may or may not be physically separate. 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 network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0226] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0227] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0228] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A data processing method, characterized in that, include: Based on the first medical image, a three-dimensional model of the tibia is constructed, and three-dimensional models of multiple target steel nails are obtained, wherein the first medical image includes an image of the tibia; Acquire multiple orthogonal second medical images, and based on the multiple second medical images, obtain the first two-dimensional pixel set of the multiple target steel nails and the second two-dimensional pixel set of the tibia; The target space transformation parameters of the multiple target steel nails in tibial coordinates are calculated based on the first two-dimensional pixel set, the second two-dimensional pixel set, the tibial three-dimensional model, and the steel nail three-dimensional model. The target space transformation parameters include at least: target rotation matrix and target translation vector. Based on the target space transformation parameters, a guide plate model is obtained, and based on the guide plate model, the target space orientation of the tibial osteotomy plane is obtained, wherein the target space orientation includes at least: the coronal angle of the tibial osteotomy and the sagittal posterior tilt angle of the tibial osteotomy. The target space transformation parameters of the multiple target steel nails in tibial coordinates are calculated based on the first two-dimensional pixel set, the second two-dimensional pixel set, the tibial three-dimensional model, and the steel nail three-dimensional model, including: The 3D model of the tibia and the 3D model of the steel nail are mapped to a 2D space to construct a first projection error constraint term and a second projection error constraint term. The first projection error constraint term is obtained from all the mapping points in the 2D space, and the second projection error constraint term is obtained from the boundary mapping points in the 2D space. The first two-dimensional pixel set and the second two-dimensional pixel set are mapped to three-dimensional space to construct a back projection error constraint term; Based on the first projection error constraint term, the second projection error constraint term, and the back projection error constraint term, a joint objective loss function is formed by weighted fusion. The preset initial spatial transformation parameters in the target loss function are solved nonlinearly to obtain the target spatial transformation parameters.
2. The method according to claim 1, characterized in that, Based on first-line medical imaging, the construction of a three-dimensional model of the tibia includes: The first medical image is segmented based on the gray value of each voxel in the first medical image to obtain the segmentation result; Based on the segmentation results, high-precision three-dimensional reconstruction is performed on multiple target voxel points to obtain a first three-dimensional model; Based on the voxel points other than the multiple target voxel points in the segmentation results, low-precision three-dimensional reconstruction is performed to obtain a second three-dimensional model; The first three-dimensional model and the second three-dimensional model are stitched together to obtain the three-dimensional model of the tibia.
3. The method according to claim 2, characterized in that, Before performing high-precision 3D reconstruction based on multiple target voxel points in the segmentation result to obtain the first 3D model, the method further includes: Based on the segmentation results, the geometric center of the tibia is determined, and the covariance matrix corresponding to the segmentation results is calculated based on the geometric center. The covariance matrix is decomposed into eigenvalues to determine the principal axis direction of the tibia; The voxel points in the segmentation result are filtered according to the geometric center and the principal axis direction to obtain the plurality of target voxel points.
4. The method according to claim 3, characterized in that, Based on the geometric center and the principal axis direction, the voxel points in the segmentation result are filtered to obtain the plurality of target voxel points, including: Each voxel point in the segmentation result is mapped according to the geometric center and the principal axis direction to obtain a one-dimensional coordinate of each voxel point relative to the principal axis direction; Based on the one-dimensional coordinates of each voxel point relative to the principal axis direction, determine the maximum projection value of the voxel point in the segmentation result relative to the principal axis direction; Based on the maximum projection value and the preset length threshold, the voxel points in the segmentation result are filtered to obtain the multiple target voxel points.
5. The method according to claim 2, characterized in that, Based on the segmentation results, high-precision 3D reconstruction is performed on multiple target voxel points to obtain the first 3D model, which includes: Obtain the preset maximum and minimum length thresholds when constructing a 3D mesh; Based on the maximum length threshold, the minimum length threshold, and the curvature of each target voxel, a target side length function is constructed; The first three-dimensional model is obtained by performing high-precision three-dimensional reconstruction of the multiple target voxel points based on the target side length function.
6. The method according to claim 1, characterized in that, Mapping the tibial 3D model and the steel nail 3D model to a 2D space to construct the first projection error constraint term and the second projection error constraint term includes: Based on the preset initial spatial transformation parameters, the camera spatial transformation parameters and intrinsic parameter matrix in the camera coordinate system corresponding to the multiple second medical images, the three-dimensional model of the steel nail is mapped to a two-dimensional space to obtain a first set of mapping points, and the three-dimensional model of the tibia is mapped to a two-dimensional space to obtain a second set of mapping points. Based on the difference between the first set of mapped points and the first set of two-dimensional pixels, and the difference between the second set of mapped points and the second set of two-dimensional pixels, the first projection error constraint term is constructed; The second projection error constraint term is constructed based on the distance between the boundary points of the first mapping point set and the boundary points of the first two-dimensional pixel set, and the distance between the boundary points of the second mapping point set and the boundary points of the second two-dimensional pixel set.
7. The method according to claim 5, characterized in that, Mapping the first two-dimensional pixel set and the second two-dimensional pixel set to three-dimensional space to construct the back projection error constraint term includes: The coordinate information of the first two-dimensional pixel set and the second two-dimensional pixel set is transformed to obtain the first homogeneous coordinate set and the second homogeneous coordinate set; The target direction vector corresponding to each pixel in the first homogeneous coordinate set and the second homogeneous coordinate set is calculated based on the intrinsic parameter matrix in the camera coordinate system corresponding to the multiple second medical images. The camera optical center is obtained based on the camera space transformation parameters in the camera coordinate system corresponding to the multiple second medical images; The first two-dimensional pixel set and the second two-dimensional pixel set are mapped according to the target direction vector and the camera optical center to obtain the back projection ray; The back projection error constraint term is constructed based on the distance between the back projection ray, the tibial 3D model, and the steel nail 3D model.
8. The method according to claim 1, characterized in that, Based on the target space transformation parameters, the guide plate model is obtained as follows: Based on the target rotation matrix in the target space transformation parameters, the axial directions of the plurality of target steel nails are determined; Based on the target translation vector in the target space transformation parameters, determine the distribution direction among the plurality of target steel nails; The normal vector corresponding to the guide plate is obtained by calculating based on the axial direction of the plurality of target steel nails and the distribution direction among the plurality of target steel nails; The guide plate model is obtained based on the distribution direction between the multiple target steel nails and the normal vector corresponding to the guide plate.
9. The method according to claim 1, characterized in that, Based on the guide plate model, the target spatial pose of the tibial osteotomy plane is obtained as follows: Based on the normal vector corresponding to the guide plate in the guide plate model and the first vector pointing from the back of the tibia to the front, the first guide plate projection of the coronal plane of the tibial osteotomy is calculated. Based on the normal vector corresponding to the guide plate in the guide plate model and the second vector pointing from the medial malleolus to the lateral malleolus, the second guide plate projection of the sagittal plane of tibial osteotomy is calculated. The coronal angle of the tibial osteotomy is obtained by calculating based on the third vector corresponding to the projection of the first guide plate and the direction of the mechanical axis of the tibia. The sagittal tilt angle of the tibial osteotomy is obtained by calculating based on the third vector corresponding to the projection of the second guide plate and the direction of the tibial mechanical axis.
10. A data processing apparatus, characterized in that, include: A construction unit is used to construct a three-dimensional model of the tibia based on a first medical image and to acquire three-dimensional models of multiple target steel nails, wherein the first medical image includes an image of the tibia; The acquisition unit is used to acquire multiple orthogonal second medical images, and based on the multiple second medical images, obtain a first two-dimensional pixel set of the multiple target steel nails and a second two-dimensional pixel set of the tibia; The calculation unit is used to calculate based on the first two-dimensional pixel set, the second two-dimensional pixel set, the tibial three-dimensional model and the steel nail three-dimensional model to obtain the target space transformation parameters of the plurality of target steel nails in the tibial coordinates, wherein the target space transformation parameters include at least: target rotation matrix and target translation vector; The first determining unit is used to obtain a guide plate model based on the target space transformation parameters, and to obtain the target space orientation of the tibial osteotomy plane based on the guide plate model, wherein the target space orientation includes at least: the coronal angle of the tibial osteotomy and the sagittal posterior tilt angle of the tibial osteotomy. The device is further configured to map the tibial 3D model and the steel nail 3D model to a 2D space to construct a first projection error constraint term and a second projection error constraint term, wherein the first projection error constraint term is obtained from all mapping points in the 2D space, and the second projection error constraint term is obtained from the boundary mapping points in the 2D space. The first two-dimensional pixel set and the second two-dimensional pixel set are mapped to three-dimensional space to construct a back projection error constraint term; Based on the first projection error constraint term, the second projection error constraint term, and the back projection error constraint term, a joint objective loss function is formed by weighted fusion. The preset initial spatial transformation parameters in the target loss function are solved nonlinearly to obtain the target spatial transformation parameters.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the data processing method according to any one of claims 1 to 9.
12. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the data processing method according to any one of claims 1 to 9.