Point cloud segmentation-based femoral neck registration method, system and medium
1. A femoral neck registration method based on point cloud segmentation is characterized by comprising the following steps:
step S1: segmenting the fractured femoral neck of the obtained CT image to obtain two parts, namely fractured femoral head A and femoral shaft B, and performing surface drawing to obtain surface patch data and point cloud data;
step S2: inputting the point cloud data of the femoral head A and the femoral body B into a pointet neural network, and segmenting to respectively obtain a femoral head junction surface a and a femoral body fracture junction surface B;
step S3: registering the femoral head interface a and the femoral shaft fracture interface b obtained by segmentation by using an iterative procedure, wherein a is source, b is target, and obtaining a rotation matrix Msource->targ;
Step S4: and applying the obtained rotation matrix to the segmented femoral head A, wherein A 'is A x M to obtain a finally spliced femoral model, and A' is the femoral head to which the rotation matrix M is applied.
2. The method for femoral neck registration based on point cloud segmentation according to claim 1, wherein the step S2 includes the following steps:
step S2.1: in the pointnet, the problem of rotatability of different data is solved by using a three-dimensional STN, and the pose information of the point cloud is learned to carry out subsequent segmentation tasks;
step S2.2: the disorder problem is solved by using a global pooling layer in the pointnet, and the network extracts characteristics of each point to a certain degree and then acquires the overall characteristics of the point cloud through the global pooling layer.
3. The method for femoral neck registration based on point cloud segmentation of claim 2, wherein the step S2 further comprises:
step S2.3: before the femur neck is segmented by using a pointet program, some marked point cloud data are required to be used for training, and point cloud segmentation is carried out after a trained pointet model is obtained.
4. The method for registering femoral neck based on point cloud segmentation as claimed in claim 1, wherein the iterative procedure in step S3 is mainly optimized by a least square method, and a rotation matrix is obtained by finding a nearest neighbor matching point of each point to calculate an error.
5. A femoral neck registration system based on point cloud segmentation, the system comprising the following modules:
module M1: segmenting the fractured femoral neck of the obtained CT image to obtain two parts, namely fractured femoral head A and femoral shaft B, and performing surface drawing to obtain surface patch data and point cloud data;
module M2: inputting the point cloud data of the femoral head A and the femoral body B into a pointet neural network, and segmenting to respectively obtain a femoral head junction surface a and a femoral body fracture junction surface B;
module M3: registering the femoral head interface a and the femoral shaft fracture interface b obtained by segmentation by using an iterative procedure, wherein a is source, b is target, and obtaining a rotation matrix Msource->target;
Module M4: and applying the obtained rotation matrix to the segmented femoral head A, wherein A 'is A x M to obtain a finally spliced femoral model, and A' is the femoral head to which the rotation matrix M is applied.
6. The point cloud segmentation based femoral neck registration system of claim 5, wherein the module M2 comprises the following modules:
module M2.1: in the pointnet, the problem of rotatability of different data is solved by using a three-dimensional STN, and the pose information of the point cloud is learned to carry out subsequent segmentation tasks;
module M2.2: the problem of needless nature is solved by using a global pooling layer in the pointnet, and the network extracts characteristics of each point to a certain degree and then obtains the overall characteristics of the point cloud through the global pooling layer.
7. The point cloud segmentation-based femoral neck registration system of claim 6, wherein the module M2 further comprises:
module M2.3: before the femur neck is segmented by using a pointet program, some marked point cloud data are required to be used for training, and point cloud segmentation is carried out after a trained pointet model is obtained.
8. The system of claim 5, wherein the iterative procedure in the module M3 is optimized mainly by the least square method, and the rotation matrix is obtained by finding the nearest matching point of each point to calculate the error.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
Background
In the current femoral neck fracture operation process, a doctor needs to restore a fractured femoral body of a patient to the original position before an operation, and a reference of a complete femoral model is needed for the operation, so that preoperative operation planning by utilizing an image acquired by CT is very important before the operation.
The invention discloses a broken bone model registration method based on a Gaussian mixture model and a contour descriptor in a Chinese patent with the publication number of CN111383353A, which comprises the following steps: s1: clustering the low curvature points by using a Gaussian mixture model; s2: carrying out ellipse fitting on each cluster, and extracting a cross-section point set according to the ellipse parameters; s3: constructing a profile descriptor according to the profile of the section; s4: reducing the dimension of the contour descriptor by using a convolution self-encoder to obtain a geometric feature vector; s5: and extracting matching points according to the geometric vectors, screening to obtain reference points, and then registering the fractured bone model according to the reference points.
The invention carries out registration by combining the Gaussian mixture model and the profile description sub-features, although the broken bones can be registered, the effect is difficult to ensure the robustness because the broken bones depend on the feature points extracted by the features. Therefore, a technical solution is needed to improve the above technical problems.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a femoral neck registration method, a system and a medium based on point cloud segmentation.
The invention provides a femur neck registration method based on point cloud segmentation, which comprises the following steps:
step S1: segmenting the fractured femoral neck of the obtained CT image to obtain two parts, namely fractured femoral head A and femoral shaft B, and performing surface drawing to obtain surface patch data and point cloud data;
step S2: inputting the point cloud data of the femoral head A and the femoral body B into a pointet neural network, and segmenting to respectively obtain a femoral head junction surface a and a femoral body fracture junction surface B;
step S3: registering the femoral head interface a and the femoral shaft fracture interface b obtained by segmentation by using an iterative procedure, wherein a is source, b is target, and obtaining a rotation matrix Msource->target;
Step S4: and applying the obtained rotation matrix to the segmented femoral head A, A '═ M to obtain a finally spliced femoral model, wherein A' is the femoral head to which the rotation matrix M is applied.
Preferably, the step S2 includes the steps of:
step S2.1: in the pointenet, the problem of rotatability of different data is solved by using a three-dimensional STN (spatial Transformation network), and the pose information of the point cloud is learned to carry out subsequent segmentation task;
step S2.2: the disorder problem is solved by using a global pooling layer in the pointnet, and the network extracts characteristics of each point to a certain degree and then acquires the overall characteristics of the point cloud through the global pooling layer.
Preferably, the step S2 further includes:
step S2.3: before the femur neck is segmented by using a pointet program, some marked point cloud data are required to be used for training, and point cloud segmentation is carried out after a trained pointet model is obtained.
Preferably, the iterative procedure in step S3 is mainly optimized by a least square method, and an error is calculated by finding a nearest neighbor matching point of each point to obtain a rotation matrix.
The invention also provides a femoral neck registration system based on point cloud segmentation, which comprises the following modules:
module M1: segmenting the fractured femoral neck of the obtained CT image to obtain two parts, namely fractured femoral head A and femoral shaft B, and performing surface drawing to obtain surface patch data and point cloud data;
module M2: inputting the point cloud data of the femoral head A and the femoral body B into a pointet neural network, and segmenting to respectively obtain a femoral head junction surface a and a femoral body fracture junction surface B;
module M3: registering the femoral head interface a and the femoral shaft fracture interface b obtained by segmentation by using an iterative procedure, wherein a is source, b is target, and obtaining a rotation matrix Msource->targe;
Module M4: and applying the obtained rotation matrix to the segmented femoral head A, wherein A 'is A x M to obtain a finally spliced femoral model, and A' is the femoral head to which the rotation matrix M is applied.
Preferably, the module M2 includes the following modules:
module M2.1: in the pointenet, the problem of rotatability of different data is solved by using a three-dimensional STN (spatial Transformation network), and the pose information of the point cloud is learned to carry out subsequent segmentation task;
module M2.2: the disorder problem is solved by using a global pooling layer in the pointnet, and the network extracts characteristics of each point to a certain degree and then acquires the overall characteristics of the point cloud through the global pooling layer.
Preferably, the module M2 further includes:
module M2.3: before the femur neck is segmented by using a pointet program, some marked point cloud data are required to be used for training, and point cloud segmentation is carried out after a trained pointet model is obtained.
Preferably, the iterative procedure in the module M3 is mainly optimized by a least square method, and the rotation matrix is obtained by searching a nearest neighbor matching point of each point to calculate an error.
The invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as set forth above.
Compared with the prior art, the invention has the following beneficial effects:
1. the fracture surface of the femoral neck can be automatically extracted, and the key information in the registration process is automatically extracted, so that the subsequent preoperative planning operation of the fractured femoral neck is facilitated, the accuracy of the composite model is improved, and excessive manual operation is not needed;
2. the invention solves the problem of operation registration before operation planning of fractured femoral neck by adopting a pointet point cloud segmentation algorithm and an icp point cloud registration algorithm;
3. the invention adopts a point cloud segmentation algorithm based on deep learning, thereby realizing the automatic extraction of the point cloud of the junction of the fractured femur;
4. according to the invention, the thighbone is spliced by adopting an ICP (inductively coupled plasma) algorithm, so that the fractured femoral head and the thighbone model are automatically compounded;
5. compared with other methods for preoperative planning of femoral neck fracture, the method provided by the invention can be automatically operated without additional super-parameter adjustment, so that the learning cost of a user is reduced, and the accuracy of the method is ensured.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
fig. 1 is a schematic diagram of the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
The invention provides a femoral neck registration method based on point cloud segmentation.
The invention provides a femur neck registration method based on point cloud segmentation, which comprises the following steps:
step 1: and segmenting the fractured femoral neck of the obtained CT image to obtain two parts, namely fractured femoral head A and femoral shaft B, and then performing surface drawing to obtain surface patch data and point cloud data.
Step 2: and inputting the point cloud data of the femoral head A and the femoral body B into a pointet neural network, and segmenting to respectively obtain a femoral head junction surface a and a femoral body fracture junction surface B. Step 2.1: in the pointnet, the problem of rotatability of obtaining different data is solved by using a three-dimensional STN (spatial Transformation network), namely learning the optimal pose information of a point cloud for subsequent segmentation tasks. Step 2.2: the disorder problem is solved by using a global maximum pooling layer in the pointnet, namely, after each point is subjected to certain feature extraction by the network, the global maximum pooling layer is used for acquiring the overall features of the point cloud. Step 2.3: before the femoral neck is segmented by using a pointnet algorithm, some marked point cloud data are required to be used for training, and point cloud segmentation can be performed after a trained pointnet model is obtained.
And step 3: registering the femoral head interface a and the femoral shaft fracture interface b obtained by segmentation by using an iterative procedure, wherein a is source, b is target, and obtaining a rotation matrix Msource->target(ii) a Step 3.1: the ICP algorithm is optimized mainly through a least square method, and errors are calculated by searching nearest neighbor matching points of each point, so that an optimal rotation matrix is obtained.
Setting the source point set as the femoral head PsrcThe target point set is the femoral body Ptgt,
(1) In the target point cloud PsrcPoint taking set pi∈Psrc;
(2) Finding a source point cloud PtgtCorresponding point set q in (1)i∈PtgtSo that | qi-pi||=min;
(3) Calculating a rotation and translation matrix M so as to minimize an error function;
(4) to piUsing the last stepThe obtained rotation translation matrix M is transformed to obtain a new corresponding point set
pi′={pi′=piM,pi∈Psrc};
(5) Calculating pi' and corresponding point set qiAverage distance of (d);
(6) if the distance is smaller than a given threshold value or larger than a preset maximum iteration number, stopping iterative computation, otherwise, returning to the step 2 until a convergence condition is met.
And 4, step 4: and applying the obtained rotation matrix to the segmented femoral head A, wherein A 'is A x M to obtain a finally spliced femoral model, and A' is the femoral head to which the rotation matrix M is applied.
The invention also provides a femur neck registration system based on point cloud segmentation, which comprises the following modules:
module M1: and segmenting the fractured femoral neck of the obtained CT image to obtain two parts, namely fractured femoral head A and femoral shaft B, and performing surface drawing to obtain surface patch data and point cloud data.
Module M2: inputting the point cloud data of the femoral head A and the femoral body B into a pointet neural network, and segmenting to respectively obtain a femoral head junction surface a and a femoral body fracture junction surface B; module M2.1: in the pointnet, the problem of rotatability of different data is solved by using a three-dimensional STN, and the pose information of the point cloud is learned to carry out subsequent segmentation tasks; module M2.2: in the pointnet, the problem of unneeded performance is solved by using a global pooling layer, and after each point is subjected to certain-degree feature extraction by the network, the global features of the point cloud are obtained by the global pooling layer; module M2.3: before the femur neck is segmented by using a pointet program, some marked point cloud data are required to be used for training, and point cloud segmentation is carried out after a trained pointet model is obtained.
Module M3: registering the femoral head interface a and the femoral shaft fracture interface b obtained by segmentation by using an iterative procedure, wherein a is source, b is target, and obtaining a rotation matrix Msource->target(ii) a The iterative procedure is optimized mainly by the least square methodAnd calculating errors by searching nearest neighbor matching points of each point to obtain a rotation matrix.
Module M4: and applying the obtained rotation matrix to the segmented femoral head A, wherein A 'is A x M to obtain a finally spliced femoral model, and A' is the femoral head to which the rotation matrix M is applied.
The invention also provides a computer-readable storage medium having a computer program stored thereon, which, when being executed by a processor, carries out the steps of the method as described above.
The fracture surface of the femoral neck can be automatically extracted, and the key information in the registration process is automatically extracted, so that the subsequent preoperative planning operation of the fractured femoral neck is facilitated, the accuracy of the composite model is improved, and excessive manual operation is not needed; by adopting a pointet point cloud segmentation algorithm and an icp point cloud registration algorithm, the problem of surgical registration before surgical planning of fractured femoral neck is solved; by adopting a point cloud segmentation algorithm based on deep learning, the automatic extraction of the point cloud of the joint surface of the fractured femur is realized; the method comprises the steps of splicing thighbones by adopting an ICP (inductively coupled plasma) algorithm, so that the fractured femoral head and a femoral body model are automatically compounded; compared with other methods for preoperative planning of femoral neck fracture, the method provided by the invention can be automatically operated without additional hyper-parameter adjustment, so that the learning cost of a user is reduced, and the accuracy of the method is ensured.
Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, units provided by the present invention as pure computer readable program code, the system and its various devices, modules, units provided by the present invention can be fully implemented by logically programming method steps in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system and various devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units included in the system for realizing various functions can also be regarded as structures in the hardware component; means, modules, units for performing the various functions may also be regarded as structures within both software modules and hardware components for performing the method.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.