[0045] Example 1
[0046] This embodiment takes the registration of carotid blood vessel data as an example, and provides a spatial registration method for three-dimensional volume data, such as figure 1 shown, including the following steps:
[0047] S1, obtaining the first three-dimensional volume data and the second three-dimensional volume data of the same object;
[0048] S2, performing rough registration on the first three-dimensional volume data and the second three-dimensional volume data by principal component analysis;
[0049] S3: Obtain the centroid points of each section perpendicular to the first direction for the two three-dimensional volume data after the rough registration, obtain the centroid point set of each three-dimensional volume data in the first direction, and perform straight line fitting on the centroid point set. After the combination, the direction vector is obtained;
[0050] S4, obtain the registration rotation transformation matrix between the two groups of direction vectors obtained in step S3; obtain the registration translation transformation matrix according to the coordinates of the center centroid points of the two centroid point sets;
[0051] S5 , performing coordinate transformation on the second three-dimensional volume data by using the registration rotation transformation matrix and the registration translation transformation matrix to complete the registration.
[0052] In this embodiment, taking the Z-axis direction as the first direction, step S3 and step S4 are further decomposed, and the following steps are provided: figure 2 Detailed steps shown:
[0053] Step 1. Acquire 3D volume data.
[0054] The original 3D volume data Vo and the target 3D volume data Vt to be registered are obtained. The two sets of 3D volume data have the same spatial pixel distance and the same size, and are 3D volume data of the same object acquired in different periods or under different conditions. The original 3D volume data Vo such as image 3 As shown in the left figure of , the target 3D volume data Vt to be registered is as follows image 3 shown on the right.
[0055] Step 2. PCA rough registration.
[0056] The original three-dimensional volume data Vo and the target three-dimensional volume data Vt to be registered are processed by the classical PCA method to obtain the first principal component direction vector of the two, which are (x o ,y o ,z o ) and (x t ,y t ,z t ),as follows Figure 4 shown, Figure 4 The left picture is the first principal component direction vector of the original 3D volume data Vo, Figure 4 The figure on the right shows the first principal component direction vector of the target 3D volume data Vt to be registered. Rotate the original 3D volume data Vo and the target 3D volume data Vt to be registered to be parallel to the Z axis of the coordinate system according to the first principal component direction vector to obtain the coarsely registered 3D volume data Vo' (corresponding to the original 3D volume data Vo) and the three-dimensional volume data Vt' (corresponding to the target three-dimensional volume data Vt to be registered), taking this coordinate system as the spatial coordinate system of the three-dimensional volume data, the three-dimensional volume data Vo' and Vt' after rough registration are respectively as follows Figure 5 shown on the left and right.
[0057] Step 3: Obtain a set of scattered points of geometric space positions of the three-dimensional volume data.
[0058] After rough registration of the three-dimensional volume data Vo' and Vt', the geometric centroid points of all XY cuts perpendicular to the Z-axis direction are obtained respectively. The specific method is to record the coordinate of each pixel on the XY slice in the X direction as x i , the coordinate in the Y direction is y i , the corresponding pixel value is p i , then the coordinate x of the centroid in the X direction and the coordinate y in the Y direction are:
[0059]
[0060] In the Z direction, each centroid point on the XY section forms a scatter point set under the three-dimensional coordinate system containing the geometric space position information of the three-dimensional volume data, that is, the centroid point set, and the obtained centroid point coordinates are normalized. In this step, the obtained three-dimensional volume data Vo' and the three-dimensional volume data Vt' are respectively obtained as follows: Image 6 shown on the left and right.
[0061] Step 4: Determine the direction vector of the three-dimensional volume data.
[0062] According to the set of three-dimensional centroid points of the three-dimensional volume data Vo' and the three-dimensional volume data Vt' obtained in step 3, a three-dimensional straight line is fitted, and the direction vector (x) of the fitted straight line is obtained respectively. o ',y o ',z o ') and (x t ',y t ',z t '), respectively representing the spatial direction information of the 3D volume data Vo' and the 3D volume data Vt', respectively Figure 7 shown on the left and right.
[0063] Step 5. Obtain the registration rotation transformation matrix.
[0064] According to the two sets of direction vectors (x o ',y o ',z o ') and (x t ',y t ',z t '), calculate the direction vector (x t ',y t ',z t ') and the direction vector (x o ',y o ',z o ') The angle that needs to be rotated to remain parallel. The rotation angle θ around the X-axis can be obtained by the dot product and cross product of the vector x :
[0065] θ x =atan(((0,y t ',z t ')*(0,y o ',z o '))/((0,y t ',z t ')×(0,y o ',z o '))),
[0066] Further, obtain the X-direction rotation matrix M x :
[0067]
[0068] Similarly, the rotation angle θ around the Y-axis can be obtained y and the rotation angle θ around the Z axis z , Y and Z direction rotation matrix M y and M z :
[0069] θ y =atan(((x t ',0,z t ')*(x o ',0,z o '))/((x t ',0,z t ')×(x o ',0,z o ')))
[0070] θ z =atan(((x t ',y t ',0)*(x o ',y o ',0))/((x t ',y t ',0)×(x o ',y o ',0)))
[0071]
[0072]
[0073] Thus, the registration rotation transformation matrix M is obtained r =M z *M y *M x.
[0074] Step 6: Obtain a registration translation transformation matrix.
[0075] According to the set of centroid points of the three-dimensional volume data Vo' obtained in step 3, the center centroid point C is obtained o =(x 1 , y 1 ,z 1 ), in the same way, the center centroid point C of the three-dimensional volume data Vt' can be obtained t =(x 2 , y 2 ,z 2 ), find the translation coordinate C=C 0 -C t =(x 1 -x 2 , y 1 -y 2 ,z 1 -z 2 ) to obtain the registration translation transformation matrix M s =[x 1 -x 2 y 1 -y 2 z 1 -z 2 ].
[0076] Step 7, 3D volume data registration.
[0077] According to the registration and rotation transformation matrix M obtained in step 5 and step 6 r with the registration translation transformation matrix M s , perform coordinate transformation on the three-dimensional volume data Vt', so that it is transformed into the same coordinate system as the three-dimensional volume data Vo', complete the registration of the three-dimensional volume data, and obtain the registered three-dimensional volume data V r , the original 3D volume data and the registered 3D volume data are as follows Figure 8 shown on the left and right.
[0078]In addition to taking the Z-axis direction as the first direction in this embodiment, based on the same principle, in other embodiments, the Y-axis direction can also be used as the first direction to acquire all XZ directions of the three-dimensional volume data perpendicular to the Y-axis direction The geometric centroid point on the slice; or, taking the X-axis direction as the first direction, obtain the geometric centroid point of the 3D volume data on all YZ slices perpendicular to the X-axis direction.
[0079] According to the three-dimensional volume data of the target to be registered and the original three-dimensional volume data, the method provided by the invention uses the centroid point of the two-dimensional section to simplify the three-dimensional volume data set, reduces the three-dimensional registration problem to two-dimensional to solve, and calculates the to-be-registered The direction vector and translation coordinates of the target 3D volume data are registered, the rotation transformation matrix and the translation transformation matrix are registered, and the 3D volume data is registered and transformed. The invention makes full use of the geometric space information of the three-dimensional volume data, reduces the size of the data set, shortens the registration time, and improves the registration efficiency and real-time performance.
[0080] Although this embodiment takes the registration of the three-dimensional volume data of the carotid artery as an example, the method provided by the present invention can also be used for other parts of the human body or animals, medical equipment and other general object surface geometry in the field of medical imaging In addition, in addition to the field of medical imaging, the commonly used fields of the method and device of the present invention include reverse engineering, industrial inspection, computer vision, CG production, 3D printing and intelligent manufacturing, etc. involving computer vision and image processing technical field.