Brain three-dimensional image registration method based on dynamic planning strategy
The dynamic programming strategy of the brain three-dimensional images is used to register, which solves the problems of multiple parameters and large GPU resource consumption in the existing technology, and achieves high-precision image registration.
Patent Information
- Application Number
- CN202510472630.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-18
AI Technical Summary
The existing medical image registration algorithms have problems such as many registration parameters and large GPU memory usage, and traditional methods and deep learning-based methods have insufficient accuracy.
The dynamic programming strategy is used to register the template image and the image to be registered, taking into account the image information of the entire row and column, and image registration is achieved through recursive formulas and index matrix.
It improves the accuracy of medical image registration, reduces the consumption of GPU resources, simplifies registration parameters, and improves registration efficiency.
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical image registration, and relates to an algorithm based on dynamic programming, which is applicable to the registration of three-dimensional brain images. Background Art
[0002] Medical image registration refers to seeking a mapping or a spatial transformation between two (or more) different medical images, so as to reduce the differences caused by individuals in the transformed images.
[0003] Existing brain imaging technologies mainly include: magnetic resonance imaging (MRI), functional magnetic resonance imaging (fMRI), computed tomography imaging (CT), etc. These technologies can generate three-dimensional brain gray-scale images, and the basic unit of the images is a voxel.
[0004] There are certain differences in the brain structures of different individuals. In addition, factors such as image resolution and axis direction will also cause differences in the images. Therefore, a brain template is usually set in brain structure analysis, and other brain images are mapped onto the standard template.
[0005] Traditional medical image registration algorithms include registration methods based on voxel similarity, normal distribution transformation method (NDT), voxelized generalized iterative closest point algorithm (VGICP), etc. In recent years, image registration algorithms based on deep learning have been widely proposed, such as the VoxelMorph model based on the U-Net architecture.
[0006] The present invention uses a dynamic programming strategy to register the template image and the image to be registered, and the algorithm comprehensively considers the image information of the entire row and the entire column. Summary of the Invention
[0007] In order to further improve the accuracy of medical image registration and solve the problems of too many registration parameters and too large GPU memory usage brought by traditional medical image registration and image registration algorithms based on deep learning, the present invention uses a dynamic programming strategy to register the template image and the image to be registered.
[0008] The method of the present invention is roughly divided into the following steps:
[0009] Step (1): Preprocess the used three-dimensional brain image dataset, including operations such as skull stripping, image shearing, and radiotherapy registration. Use the preprocessed image as the three-dimensional brain image to be registered, and select a standard brain MRI image as the three-dimensional template image.
[0010] Step (2): According to the characteristics of the image to be registered and the template image, a three-dimensional brain image registration method based on the dynamic programming strategy is constructed. The three-dimensional brain image to be registered and the three-dimensional template image are input into the proposed registration method for registration, and the registered three-dimensional brain image is obtained.
[0011] Further, the step (2) includes the following steps:
[0012] (2.1) The three-dimensional template image is represented as T x,y,z , (1 ≤ x ≤ m, 1 ≤ y ≤ n, 1 ≤ z ≤ t); the three-dimensional brain image to be registered is represented as B x,y,z , (1 ≤ x ≤ m, 1 ≤ y ≤ n, 1 ≤ z ≤ t). Where m, n, and t are the length, width, and height of the three-dimensional image respectively.
[0013] (2.2) Based on the X, Y, Z coordinate systems, first fix the coordinate values of the Y-axis and Z-axis, that is, y = j, z = k. At this time, T x,j,k (1 ≤ x ≤ m) is a line in the three-dimensional image.
[0014] (2.3) Perform a dynamic programming comparison algorithm on the local T x,j,k (1 ≤ x ≤ m) of the three-dimensional template image and the local B x,j,k (1 ≤ x ≤ m) of the three-dimensional brain image:
[0015] The recursive formula of the dynamic programming algorithm is: Distance(u,v) = max{Distance(u - 1, v - 1) + |T u,j,k - B v,j,k |, Distance(u - 2, v - 1) + |T u,j,k - B v,j,k | + |T u-1,j,k - B v,j,k |, Distance(u - 1, v - 2) + |T u,j,k - B v,j,k | + |T u,j,k - B v-1,j,k |}
[0016] Where Distance(u, v) is the distance in the algorithm between the local T x,j,k (1 ≤ x ≤ u) of the three-dimensional template image and the local B x,j,k (1 ≤ x ≤ v) of the three-dimensional brain image.
[0017] (2.4) Establish an index matrix S for the dynamic programming comparison result:
[0018] In the recurrence formula of
[0010] , the algorithm finds the maximum value among three terms. If the maximum value is equal to the first term, then S(u, v) = 1; if the maximum value is equal to the second term, then S(u, v) = 2; if the maximum value is equal to the third term, then S(u, v) = 3.
[0019] (2.5) Restore the registered image:
[0020] Calculate each value of the two-dimensional matrix Distance(u, v) (1 ≤ u ≤ m, 1 ≤ v ≤ m) based on the recurrence formula.
[0021] Calculate each value of the two-dimensional matrix S(u, v) (1 ≤ u ≤ m, 1 ≤ v ≤ m) based on the recurrence formula.
[0022] Restore the registered image based on Distance(u, v) (1 ≤ u ≤ m, 1 ≤ v ≤ m) and S(u, v) (1 ≤ u ≤ m, 1 ≤ v ≤ m) as follows:
[0023] Starting from S(m, m) and tracing back to the upper left corner S(1, 1) of the matrix, there are three cases. The registered image is denoted as P x,j,k , and the initial value is set to be empty.
[0024] If S(u, v) = 1, add the voxel B x,j,k in front of the registered image P v,j,k .
[0025] If S(u, v) = 2, add the voxel B x,j,k in front of the registered image P v,j,k twice, that is, add two identical voxels.
[0026] If S(u, v) = 3, add a voxel in front of the registered image P x,j,k (1 ≤ x ≤ m), and the value of the added voxel is equal to (B v,j,k +B v-1,j,k ) / 2.
[0027] Trace back to S(1, 1) to generate the complete P x,j,k (1 ≤ x ≤ m).
[0028] (2.6) For each pair (j, k) (1 ≤ j ≤ n, 1 ≤ k ≤ t), repeat the operations in step (2.5) to generate the corresponding P x,j,k (1 ≤ x ≤ m).
[0029] (2.7) Merge the P x,j,k (1 ≤ x ≤ m, 1 ≤ j ≤ n, 1 ≤ k ≤ t) together, then a complete three-dimensional registered image is formed.
[0030] (2.8) Based on the X, Y, Z coordinate systems, fix the coordinate values of the X-axis and the Z-axis, that is, x = i, z = k. For T of the three-dimensional template image i,y,k (1 ≤ y ≤ n) and B of the three-dimensional brain image i,y,kk (1 ≤ y ≤ n) perform the dynamic programming comparison algorithm.
[0031] Repeat the operations in steps (2.3) to (2.7) to generate the complete configuration image Q i,y,k (1 ≤ i ≤ m, 1 ≤ y ≤ n, 1 ≤ k ≤ t).
[0032] (2.9) Based on the X, Y, Z coordinate systems, fix the coordinate values of the X-axis and the Y-axis, that is, x = i, y = j. For T of the three-dimensional template image i,j,z (1 ≤ z ≤ t) and B of the three-dimensional brain image i,j,z (1 ≤ z ≤ t) perform the dynamic programming comparison algorithm.
[0033] Repeat the operations in steps (2.3) to (2.7) to generate the complete configuration image R i,j,z (1 ≤ i ≤ m, 1 ≤ i ≤ n, 1 ≤ z ≤ t).
[0034] (2.10) Take the average of the three registered images, that is M i,j,k =(P i,j,k +Q i,j,k +R i,j,k ) / 3 Then M i,j,k (1 ≤ i ≤ m, 1 ≤ j ≤ n, 1 ≤ k ≤ t) is the finally generated registered image. Specific implementation mode
[0035] In order to further explain the present invention to the researchers in the technical field, the following describes the specific embodiments of the present invention in a complete and detailed manner in combination with the technical solutions of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments.
[0036] (1) Image acquisition and preprocessing process: The medical images used in the present invention include, but are not limited to, medical images obtained from public data sets, and preprocessing operations are performed on the obtained images. The images used in this embodiment are 3D human brain images in the IXI data set. Before specifically implementing the present invention, the medical image data needs to be preprocessed, including operations such as skull stripping, normalization, affine alignment, and subcortical segmentation, to obtain a brain MRI image with a size of 160*192*224. In addition, the pre-registered atlas image in the CycleMorph model is used as the template image.
[0037] (2) Model training process:
[0038] (2.1) Take the template image and denote it as T x,y,z , (1 ≤ x ≤ 160, 1 ≤ y ≤ 192, 1 ≤ z ≤ 224); Take a pre - processed image to be registered and denote it as B x,y,z , (1 ≤ x ≤ 160, 1 ≤ y ≤ 192, 1 ≤ z ≤ 224).
[0039] (2.2) Based on the X, Y, Z coordinate systems, first fix the coordinate values of the Y - axis and Z - axis, i.e., y = j, z = k. At this time, T x,j,k (1 ≤ x ≤ m) is a line in the three - dimensional image.
[0040] (2.3) According to the recursive formula Distance(u, v) of the dynamic programming algorithm, find the distance between the local part T x,j,k (1 ≤ x ≤ u) of the three - dimensional template image and the local part B x,j,k (1 ≤ x ≤ v) of the three - dimensional brain image in the algorithm, and this distance is denoted as Distance(u, v). Calculate S(u, v) according to the value of Distance(u, v).
[0041] (2.4) Based on the two - dimensional matrix Distance(u, v) and two - dimensional matrix S(u, v) calculated in (2.3), restore the registered image P x,j,k (1 ≤ x ≤ 160).
[0042] (2.5) For each pair (j, k) (1 ≤ j ≤ 192, 1 ≤ k ≤ 224), repeat the operation in (2.3) to generate the corresponding P x,j,k (1 ≤ x ≤ 160).
[0043] (2.6) Combine P x,j,k (1 ≤ x ≤ 160, 1 ≤ j ≤ 192, 1 ≤ k ≤ 224) together to form a complete three - dimensional registered image.
[0044] (2.7) Based on the X, Y, Z coordinate systems, fix the coordinate values of the X - axis and Z - axis, i.e., x = i, z = k. Perform the dynamic programming comparison algorithm on T i,y,k (1 ≤ y ≤ 192) of the three - dimensional template image and B i,y,k (1 ≤ y ≤ 192) of the three - dimensional brain image.
[0045] (2.8) Repeat the operations in (2.3) to (2.6) to generate a complete registered image Q i,y,k (1 ≤ x ≤ 160, 1 ≤ j ≤ 192, 1 ≤ k ≤ 224).
[0046] (2.9) Based on the X, Y, Z coordinate systems, fix the coordinate values of the X - axis and Y - axis, i.e., x = i, y = j. For T of the three - dimensional template imagei,j,z (1 ≤ z ≤ 224) and B of the three-dimensional brain image i,j,z (1 ≤ z ≤ 224) perform a dynamic programming comparison algorithm.
[0047] (2.10) Repeat the operations of (2.3) to (2.6) to generate the complete registered image R i,j,z (1 ≤ x ≤ 160, 1 ≤ j ≤ 192, 1 ≤ k ≤ 224).
[0048] (2.11) Take the average of the three registered images P i,j,k , Q i,j,k , R i,j,k That is M i,j,k = (P i,j,k + Q i,j,k + R i,j,k ) / 3 Then M i,j,k (1 ≤ x ≤ 160, 1 ≤ j ≤ 192, 1 ≤ k ≤ 224) is the finally generated registered image.
Claims
1. A three-dimensional brain image registration method based on a dynamic programming strategy, characterized in that The method includes the following unique steps: Step (1): The local T of the three-dimensional template image x,j,k (1 ≤ x ≤ m) and the local B of the three-dimensional brain image x,j,k (1 ≤ x ≤ m) for the recurrence formula of the dynamic programming algorithm: Distance(u, v) = max{Distance(u - 1, v - 1) + |T u,j,k - B v,j,k |, Distance(u - 2, v - 1) + |T u,j,k - B v,j,k | + |T u-1,j,k - B v,j,k |, Distance(u - 1, v - 2) + |T u,j,k - B v,j,k | + |T u,j,k - B v-1,j,k |} where Distance(u, v) is the distance in the algorithm between the local T of the three-dimensional template image x,j,k (1 ≤ x ≤ u) and the local B of the three-dimensional brain image x,j,k (1 ≤ x ≤ v). Step (2): Method for establishing an index matrix S of dynamic programming comparison results; obtaining the maximum value among three terms in the recurrence formula of Distance(u, v); if the maximum value is equal to the first term, then S(u, v) = 1; if the maximum value is equal to the second term, then S(u, v) = 2; if the maximum value is equal to the third term, then S(u, v) = 3; Step (3): Method for restoring the registered image based on Distance(u, v) (1 ≤ u ≤ m, 1 ≤ v ≤ m) and S(u, v) (1 ≤ u ≤ m, 1 ≤ v ≤ m); if S(u, v) = 1, add voxel B in front of the registered image P x,j,k (1 ≤ x ≤ m); v,j,k if S(u, v) = 2, add voxel B in front of the registered image P x,j,k (1 ≤ x ≤ m) twice, that is, add two identical voxels; if S(u, v) = 3, add one voxel in front of the registered image P v,j,k The value of the added voxel is equal to (B x,j,k (1 ≤ x ≤ m); starting from S(m, m), trace back to the upper left corner S(1, 1) of the matrix S to generate the complete P v,j,k + B v-1,j,k ) / 2; x,j,k (1 ≤ x ≤ m); Step (4): Method for generating an average registered image; that is, fixing the coordinate values of the Y-axis and the Z-axis and calculating P i,j,k ; fixing the coordinate values of the X-axis and the Z-axis and calculating Q i,j,k ; fixing the coordinate values of the X-axis and the Y-axis and calculating R i,j,k ; taking the average of the three registered images, that is M i,j,k = (P i,j,k + Q i,j,k + R i,j,k ) / 3 Then M i,j,k (1 ≤ i ≤ m, 1 ≤ j ≤ n, 1 ≤ k ≤ t) is the finally generated registered image.