Image registration method, device, storage medium and electronic device
By identifying and updating the displacement of abnormal pixels in the deformation registration algorithm, the problem of holes in floating images is solved and the accuracy of 3D medical image registration is improved.
Patent Information
- Application Number
- CN202410783994.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-06-18
AI Technical Summary
In 3D medical image processing using existing deformation registration algorithms, the calculated deformation field will cause holes to appear in the floating image, affecting the accuracy of the registration results.
By obtaining the reference image and floating image, inputting the preset deformation registration model, the initial deformation field is obtained, and its three-dimensional displacement is divided according to three displacement directions, abnormal pixels are determined, and their displacement is updated to form an updated deformation field. Used for deformation registration of floating images.
This avoids the occurrence of holes in the deformed image, improves the accuracy of the registered image, and ensures the integrity of the deformed registration result.
Smart Images

Figure CN118350987B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image registration method, device, storage medium and electronic device. Background Art
[0002] Since the image deformation registration operation has more degrees of freedom and can achieve nonlinear free deformation, the deformation registration algorithm of 3D medical images is widely used in radiotherapy planning, tumor diagnosis, surgical guidance and treatment tracking.
[0003] When deforming the image to be registered using a deformable registration algorithm, the reference image is the image that is considered to be "correct" and is used to compare and register other images. The floating image is the image that needs to be registered to the reference image, usually after deformation or movement. The goal of deformable registration is to match the floating image with the reference image for subsequent analysis or processing.
[0004] The deformable registration algorithm for 3D medical images calculates a deformation field based on the input reference image and floating image. The deformation field stores the deformation displacement of each pixel in three directions. The floating image can be deformed through the deformation field.
[0005] However, in some cases, the deformation field calculated using the existing deformation registration algorithm will have the phenomenon that the actual sampling points corresponding to some pixels are beyond the range of the floating image, resulting in holes in the deformed floating image when the deformation field is used to perform deformation registration on the floating image, which seriously affects the accuracy of the deformation registration results.
[0006] In the related art, when a deformation field obtained by a deformation registration algorithm is used to perform a deformation registration operation on a floating image, a hole may be generated in the obtained deformable registration image. Currently, no effective solution has been proposed. Summary of the invention
[0007] The present application provides an image registration method, device, storage medium and electronic device to solve the problem in the related art that when a deformation field obtained by a deformation registration algorithm is used to perform a deformation registration operation on a floating image, a hole is generated in the obtained deformable registration image.
[0008] According to one aspect of the present application, an image registration method is provided. The method includes: obtaining a reference image and a floating image in an image to be registered, and inputting the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is located in a three-dimensional coordinate system, and the initial deformation field contains multiple pixels, and each pixel carries a three-dimensional displacement; dividing the three-dimensional displacement of the pixels in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set contains multiple pixels and the displacement of each pixel in the corresponding displacement direction; determining abnormal pixels in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updating the abnormal pixels to obtain three updated displacement sets; combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing deformation registration operation on the floating image through the updated deformation field to obtain a registered image.
[0009] Optionally, abnormal pixel points in each displacement amount set are determined according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and the abnormal pixel points are updated to obtain three updated displacement amount sets, including: determining the abnormal pixel points in each displacement amount set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and obtaining abnormal pixel point sets in three displacement directions; in each displacement amount set, changing the displacement of the abnormal pixel points in the corresponding abnormal pixel point set to a preset value, and obtaining updated displacement amount sets in three displacement directions.
[0010] Optionally, the target displacement direction is any one of the three displacement directions. For the target displacement direction, the abnormal pixel points in each displacement amount set are determined according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and the abnormal pixel point sets in the three displacement directions are obtained, including: obtaining the voxel spacing value of the floating image in the target displacement direction, obtaining the target voxel spacing value, and obtaining the target displacement amount set in the target displacement direction; determining the number of layers of the initial deformation field in the target displacement direction, obtaining the target number of layers, and determining the number of layers where each pixel point is located; calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel spacing value, the target displacement amount set, and the number of layers of each pixel point, to obtain multiple sampling point sets, wherein each sampling point set contains the coordinate values of the sampling points of the pixel points located in the same layer; obtaining the sampling point interval in the target displacement direction, and obtaining the sampling points whose coordinate values are not located in the sampling point interval, to obtain multiple abnormal sampling points, and determining the pixel point corresponding to each abnormal sampling point as an abnormal pixel point, to obtain the abnormal pixel point set in the target displacement direction.
[0011] Optionally, calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel spacing value, the target displacement amount set and the number of layers of each pixel point to obtain multiple sampling point sets includes: calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer in an ascending order of the number of layers until there is no sampling point beyond the sampling point interval in the sampling point set corresponding to the pixel point in the first target layer, thereby obtaining multiple first sampling point sets; when there is no sampling point beyond the sampling point interval in the sampling point set corresponding to the pixel point in the first target layer, calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer in an ascending order of the number of layers until there is no sampling point beyond the sampling point interval in the sampling point set corresponding to the pixel point in the second target layer, thereby obtaining multiple second sampling point sets; and merging the multiple first sampling point sets and the multiple second sampling point sets to obtain multiple sampling point sets.
[0012] Optionally, calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel spacing value, the target displacement set and the number of layers of each pixel point includes: for each target pixel point, multiplying the number of layers of the target pixel point and the target voxel spacing value to obtain a target parameter, wherein the target pixel point is any pixel point in the initial deformation field; obtaining the displacement of the target pixel point in the target displacement direction from the target displacement set, adding the target parameter to the displacement of the target pixel point, and obtaining the coordinate value of the sampling point corresponding to the target pixel point.
[0013] Optionally, obtaining the sampling point interval in the target displacement direction includes: calculating an upper limit value of the sampling point interval according to the target number of layers and the target voxel spacing value; and combining a preset lower limit value and an upper limit value into the sampling point interval.
[0014] Optionally, in each displacement amount set, the displacement amount of the abnormal pixel point in the corresponding abnormal pixel point set is changed to a preset value, and the updated displacement amount set in the three displacement directions is obtained, including: for the initial displacement amount set, the abnormal pixel point set corresponding to the initial displacement amount set is obtained, and according to the correspondence between the pixel points in the abnormal pixel point set and the pixel points in the initial displacement amount set, the displacement amount of the pixel point corresponding to the pixel point in the abnormal pixel point set is changed to a preset value in the initial displacement amount set, and the displacement amount of other pixel points is kept unchanged, so as to obtain an updated initial displacement amount set, wherein the initial displacement amount set is any one of the three displacement amount sets.
[0015] According to another aspect of the present application, an image registration device is provided. The device includes: an acquisition unit, used to acquire a reference image and a floating image in an image to be registered, and input the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is located in a three-dimensional coordinate system, and the initial deformation field contains multiple pixels, and each pixel carries a three-dimensional displacement; a division unit, used to divide the three-dimensional displacement of the pixels in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set contains multiple pixels and the displacement of each pixel in the corresponding displacement direction; an update unit, used to determine the abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and update the abnormal pixel points to obtain three updated displacement sets; a registration unit, used to combine the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and perform deformation registration operation on the floating image through the updated deformation field to obtain a registered image.
[0016] According to another aspect of the present invention, a computer storage medium is provided. The computer storage medium is used to store a program. When the program is executed, the device where the computer storage medium is located is controlled to execute an image registration method.
[0017] According to another aspect of the present invention, an electronic device is provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein an image registration method is executed when the computer-readable instructions are executed.
[0018] Through the present application, the following steps are adopted: obtaining a reference image and a floating image in the image to be registered, and inputting the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is located in a three-dimensional coordinate system, and the initial deformation field contains multiple pixels, each pixel carrying a three-dimensional displacement; dividing the three-dimensional displacement of the pixels in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set contains multiple pixels and the displacement of each pixel in the corresponding displacement direction; determining the abnormal pixels in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updating the abnormal pixels to obtain three updated displacement sets; combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing deformation registration operation on the floating image through the updated deformation field to obtain a registered image. The problem of holes in the obtained deformation registration image is solved in the related art when the deformation field obtained by the deformation registration algorithm is used to perform deformation registration operation on the floating image. By determining the abnormal pixel points in the initial deformation field and changing the displacement of the abnormal pixel points, the updated deformation field will not register the pixel points outside the floating image to the image when performing deformation registration operation on the floating image, so that no holes will appear in the obtained registered image, thereby achieving the effect of improving the accuracy of the registered image. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 is a flowchart of an image registration method provided according to an embodiment of the present application;
[0021] Figure 2 is a flowchart of an optional image registration method provided according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of an image registration device provided according to an embodiment of the present application;
[0023] Figure 4 It is a schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] It should be noted that the image registration method, device, storage medium and electronic device determined in the present disclosure can be used in the field of image processing technology, and can also be used in any field outside the field of image processing technology. The application field of the image registration method, device, storage medium and electronic device determined in the present disclosure is not limited.
[0028] It should be noted that the collected information, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) used in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated. Corresponding operation portals are provided for users to choose to authorize or refuse to use. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0029] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0030] Deformable registration: Deformable registration refers to the operation of matching and aligning the shapes, sizes or positions between different images or data sets. This operation is often used in fields such as medical imaging, cartography, computer vision and remote sensing image processing.
[0031] Voxel spacing value: Usually used to describe the distance between voxels (volume pixels) in 3D images or volume data.
[0032] According to an embodiment of the present application, an image registration method is provided.
[0033] Figure 1 is a flow chart of an image registration method provided according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0034] Step S101, obtain a reference image and a floating image in the image to be registered, and input the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is located in a three-dimensional coordinate system, and the initial deformation field contains multiple pixel points, each pixel point carries a three-dimensional displacement.
[0035] It should be noted that the image to be registered can be a group of images that the user needs to register, including a reference image and a floating image, wherein the reference image is a base image and the floating image is an image that needs to be registered. The reference image and the floating image can be two-dimensional images or three-dimensional images, but the dimensions and image sizes of the reference image and the floating image need to be consistent.
[0036] It should be noted that, of the two images included in the images to be registered, one of the images is designated as the reference image and the other image is designated as the floating image. When selecting the reference image and the floating image, it is possible to determine which image is the reference image and which image is the floating image according to the registration requirements. The purpose of the registration operation is to deform the floating image so that the similarity between the registered floating image and the reference image is greater than the preset similarity. In addition, the two images included in the images to be registered can be medical images taken by two different medical imaging devices, for example, images taken by a CT (Computer Tomography) device and images taken by an OCT (Optical Coherence Tomography) medical imaging device.
[0037] Specifically, when registering the floating image according to the reference image, the existing deformable registration model may be used to determine the deformation field, ie, the initial deformation field, so that the initial deformation field may be used to subsequently perform registration operations on the floating image.
[0038] It should be noted that the initial deformation field can be a three-dimensional deformation field, which is composed of multiple pixel points. Each pixel point contains 6 elements of information, namely the position information (x, y, z) of each pixel point in the initial deformation field, and the displacement (a, b, c) corresponding to each pixel point (the displacement amount can also be called the deformation amount). Therefore, the floating image can be deformed and registered according to the displacement amount of each pixel point in the initial deformation field to obtain the registered floating image.
[0039] It should be noted that in order to improve the accuracy of the image registration operation, after obtaining the floating image in the image to be registered, the floating image can be subjected to a rigid registration operation to obtain an updated floating image, and the updated floating image and the reference image are used to determine the initial deformation field, wherein the rigid registration operation is an operation that transforms and aligns two or more images so that they have the same rotation, translation and scale transformation in space, so that they can be aligned and matched under specific tasks.
[0040] Step S102, dividing the three-dimensional displacement of the pixel points in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set includes a plurality of pixel points and the displacement of each pixel point in the corresponding displacement direction.
[0041] Specifically, since both the reference image and the floating image are three-dimensional images, the initial deformation field is also a three-dimensional deformation field. At this time, in order to optimize the initial deformation field, it is necessary to optimize the displacement of the pixel points in the deformation field in each direction respectively. Therefore, it is necessary to divide the three-dimensional displacement of the pixel points in the initial deformation field according to the three displacement directions to obtain three displacement sets.
[0042] For example, the three-dimensional displacements of any three pixels in the initial deformation field are (1, 2, 3), (2, 3, 4), and (5, 3, 8), respectively. When the three-dimensional displacements correspond to the x-axis, y-axis, and z-axis directions, respectively, the three displacement sets obtained are: the x-axis displacement set (1, 2, 5), the y-axis displacement set (2, 3, 3), and the z-axis displacement set (3, 4, 8).
[0043] Step S103, determining the abnormal pixel points in each displacement amount set according to the 3D voxel spacing value and the 3D layer number of the floating image, and updating the abnormal pixel points to obtain three updated displacement amount sets.
[0044] Specifically, after obtaining three displacement sets, it is necessary to identify the displacement in each displacement set in turn, so as to determine the abnormal pixel points in each displacement set. The abnormal pixel points can be determined by determining the real sampling point coordinates corresponding to each pixel point in the initial deformation field, and judging whether the real sampling point coordinates are within the range of the floating image, so as to determine whether there is an abnormal displacement, that is, whether there is an abnormal pixel point.
[0045] It should be noted that when determining the coordinates of the real sampling point, it is necessary to obtain the voxel spacing value of the floating image in the corresponding direction and the number of layers of the deformation field in the corresponding direction, and calculate the coordinates of the real sampling point based on the voxel spacing value and the number of layers, where the number of layers of the deformation field in the corresponding direction is consistent with the number of layers of the floating image.
[0046] Furthermore, after obtaining the abnormal pixel point, it is necessary to update the displacement of the abnormal pixel point in the displacement set, so as to update the displacement set. Since the pixel point corresponding to each displacement in the initial deformation field is known when generating the displacement set, the parameters of the initial deformation field can be updated by updating the displacement in the displacement set, thereby completing the update operation of the initial deformation field.
[0047] Step S104: combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing a deformation registration operation on the floating image through the updated deformation field to obtain a registered image.
[0048] Specifically, after obtaining the updated displacement set, the displacements in the three displacement sets can be combined according to the pixel points to which the displacements in each displacement set belong, to obtain the updated displacement of each pixel point in the deformation field, thereby obtaining the updated deformation field, and then the updated deformation field can be used to perform deformation registration operations on the floating image to obtain a registered image without holes, thereby achieving the technical effect of improving the accuracy of the registered image.
[0049] The image registration method provided by the embodiment of the present application obtains a reference image and a floating image in the image to be registered, and inputs the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is located in a three-dimensional coordinate system, and the initial deformation field contains multiple pixels, each pixel carrying a three-dimensional displacement; the three-dimensional displacement of the pixels in the initial deformation field is divided according to three displacement directions to obtain three displacement sets, wherein each displacement set contains multiple pixels and the displacement of each pixel in the corresponding displacement direction; the abnormal pixels in each displacement set are determined according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and the abnormal pixels are updated to obtain three updated displacement sets; the three updated displacement sets are combined according to the three displacement directions to obtain an updated deformation field, and the deformation registration operation is performed on the floating image through the updated deformation field to obtain a registered image. The problem that holes will be generated in the deformation registration image obtained in the related art when the deformation field obtained by the deformation registration algorithm is used to perform deformation registration operation on the floating image is solved. By determining the abnormal pixel points in the initial deformation field and changing the displacement of the abnormal pixel points, the updated deformation field will not register the pixel points outside the floating image to the image when performing deformation registration operation on the floating image, so that no holes will appear in the obtained registered image, thereby achieving the effect of improving the accuracy of the registered image.
[0050] In order to accurately determine the abnormal pixels and change the abnormal pixels to normal pixels, optionally, in the image registration method provided in the embodiment of the present application, the abnormal pixels in each displacement set are determined according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and the abnormal pixels are updated to obtain three updated displacement sets, including: determining the abnormal pixels in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and obtaining abnormal pixel sets in three displacement directions; in each displacement set, changing the displacement of the abnormal pixels in the corresponding abnormal pixel set to a preset value, and obtaining updated displacement sets in three displacement directions.
[0051] Specifically, when determining abnormal pixel points, the coordinates of the real sampling points corresponding to each pixel point in the floating image can be determined based on the three-dimensional voxel spacing value and the number of three-dimensional layers of the floating image and the displacement of each pixel point in the deformation field. Therefore, the abnormal pixel points in the deformation field can be determined by judging whether the coordinates of the real sampling points are outside the floating image.
[0052] It should be noted that since each abnormal pixel has displacements in three directions, but not all displacements in the three directions are abnormal, when determining the abnormal pixel, it is necessary to determine the abnormal pixel in each direction separately, so as to obtain a set of abnormal pixels in the three displacement directions.
[0053] For example, in the x-axis direction, the abnormal pixel point set can be "pixel 1, pixel 2, pixel 3", in the y-axis direction, the abnormal pixel point set can be "pixel 2, pixel 4, pixel 5", and in the z-axis direction, the abnormal pixel point set can be "pixel 6, pixel 7, pixel 8", thereby obtaining abnormal pixel point sets in three displacement directions.
[0054] Furthermore, after determining the set of abnormal pixel points in the three displacement directions, the displacement amount of the abnormal similar points in each displacement direction in the displacement amount set in the corresponding displacement direction can be changed to a preset value, wherein the preset value can be 0, thereby completing the update of the displacement amount set in the three displacement directions and obtaining the updated displacement amount set in the three displacement directions.
[0055] For example, in the x-axis direction, the displacements corresponding to pixel 1, pixel 2, and pixel 3 are 10, 20, and 30, respectively. After the displacements are changed, the displacements corresponding to pixel 1, pixel 2, and pixel 3 are 0, 0, and 0, respectively.
[0056] In order to accurately determine the abnormal pixel points, optionally, in the image registration method provided in the embodiment of the present application, the target displacement direction is any one of the three displacement directions. For the target displacement direction, the abnormal pixel points in each displacement amount set are determined according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and the abnormal pixel point sets in the three displacement directions are obtained, including: obtaining the voxel spacing value of the floating image in the target displacement direction, obtaining the target voxel spacing value, and obtaining the target displacement amount set in the target displacement direction; determining the number of layers of the initial deformation field in the target displacement direction, obtaining the target number of layers, and determining the number of layers where each pixel point is located; calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel spacing value, the target displacement amount set, and the number of layers of each pixel point, to obtain multiple sampling point sets, wherein each sampling point set contains the coordinate values of the sampling points of the pixel points located in the same layer; obtaining the sampling point interval in the target displacement direction, and obtaining the sampling points whose coordinate values are not located in the sampling point interval, to obtain multiple abnormal sampling points, and determining the pixel point corresponding to each abnormal sampling point as the abnormal pixel point, to obtain the abnormal pixel point set in the target displacement direction.
[0057] It should be noted that since each pixel point has a displacement in three displacement directions, and the method for determining abnormal pixel points in each displacement direction is the same, the present application adopts the method of obtaining any one of the three displacement directions as the target displacement direction to describe how to determine the abnormal pixel points in the target displacement direction. The methods for determining abnormal pixel points in the other two displacement directions are the same.
[0058] Specifically, when determining the abnormal pixel points in the target displacement direction, it is first necessary to obtain the voxel spacing value of the floating image in the target displacement direction, obtain the target voxel spacing value, and obtain the target displacement amount set in the target displacement direction and the number of layers of the floating image in the target displacement direction, so as to calculate the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image layer by layer through the target voxel spacing value, the target displacement amount set and the number of layers of each pixel point, obtain the coordinate of the real sampling point corresponding to each pixel point in the floating image, and compare the coordinate of each real sampling point with the sampling point interval of the floating image in the target displacement direction in turn, determine the real sampling point that is not located in the sampling point interval as the abnormal sampling point, and determine the pixel point corresponding to the abnormal sampling point as the abnormal pixel point in the target displacement direction, thereby completing the operation of determining the abnormal pixel point in the target displacement direction.
[0059] In order to improve the efficiency of identifying abnormal pixels, optionally, in the image registration method provided in the embodiment of the present application, the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image is calculated layer by layer according to the target voxel spacing value, the target displacement amount set and the number of layers of each pixel point to obtain multiple sampling point sets, including: calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer in the order of the number of layers from small to large, until there is no sampling point exceeding the sampling point interval in the sampling point set corresponding to the pixel point in the first target layer, so as to obtain multiple first sampling point sets; when there is no sampling point exceeding the sampling point interval in the sampling point set corresponding to the pixel point in the first target layer, calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer in the order of the number of layers from large to small, until there is no sampling point exceeding the sampling point interval in the sampling point set corresponding to the pixel point in the second target layer, so as to obtain multiple second sampling point sets; and merging the multiple first sampling point sets and the multiple second sampling point sets to obtain multiple sampling point sets.
[0060] It should be noted that, under normal circumstances, abnormal pixel points are located at the edge of the deformation field. Therefore, the sampling point set can be obtained from both sides to the center by standardizing the deformation field from the head and the tail, and then judging whether there are sampling points that exceed the sampling point interval in each layer of sampling points in turn, until there are no sampling points that exceed the sampling point interval, thereby completing the acquisition operation of the sampling point set.
[0061] For example, the coordinate values of the sampling points of the pixel points with layer number 0 in the initial deformation field in the target direction are calculated to obtain 100 sampling point coordinates, and there are 50 sampling points exceeding the sampling point interval, then the 100 sampling point coordinates are determined as a first sampling point set, until there are no sampling points exceeding the sampling point interval in the sampling point coordinates corresponding to the nth layer, then n first sampling point sets are obtained.
[0062] Similarly, for the initial deformation field with M layers D The coordinate values of the sampling points of the pixel points in the target direction are calculated to obtain 100 sampling point coordinates, and there are 40 sampling points that exceed the sampling point interval. Then the coordinates of these 100 sampling points are determined as a second sampling point set, until there are no sampling points that exceed the sampling point interval in the sampling point coordinates corresponding to the m-th layer, then (M D -m) first sampling point sets, where M D It can be the total number of layers of the initial deformation field, and the number of layers of the deformation field is consistent with the number of layers of the floating image.
[0063] By acquiring the sampling point set from the head and tail to the center in the above manner, the number of sampling points that need to be checked can be effectively reduced, thereby increasing the workload of determining whether the sampling point exceeds the sampling point interval, thereby improving the efficiency of acquiring abnormal sampling points.
[0064] Optionally, in the image registration method provided in the embodiment of the present application, the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image is calculated layer by layer according to the target voxel spacing value, the target displacement set and the number of layers of each pixel point, including: for each target pixel point, multiplying the number of layers of the target pixel point and the target voxel spacing value to obtain a target parameter, wherein the target pixel point is any pixel point in the initial deformation field; obtaining the displacement of the target pixel point in the target displacement direction from the target displacement set, adding the target parameter to the displacement of the target pixel point, and obtaining the coordinate value of the sampling point corresponding to the target pixel point.
[0065] Specifically, when calculating the sampling point coordinates corresponding to each pixel point, Formula 1 can be used for calculation, and Formula 1 is as follows:
[0066] (1)
[0067] in, Indicates the total number of layers of deformation field in the target displacement direction D, It is represented as the voxel spacing value of the floating image in the D direction. Represents the displacement of each pixel in the i-th layer in the deformation field in the D direction, and the initial value of i is 0.
[0068] By using Formula 1, the sampling point coordinates corresponding to each pixel can be calculated, and then the calculated sampling point coordinates can be compared with the sampling point interval to determine which sampling points are not in the sampling point interval, and the pixel points corresponding to the sampling points that are not in the sampling point interval are determined as abnormal pixels.
[0069] Optionally, in the image registration method provided in an embodiment of the present application, obtaining the sampling point interval in the target displacement direction includes: calculating the upper limit value of the sampling point interval according to the target layer number and the target voxel spacing value; and combining the preset lower limit value and the upper limit value into the sampling point interval.
[0070] Specifically, when determining the sampling point interval of each displacement direction, since the sampling point interval consists of an upper limit value and a lower limit value, the lower limit value needs to be determined first. Since the sampling point interval is the range interval of the floating image, the lower limit value can be the minimum coordinate of the sampling point allowed by the floating image. , because the displacement is checked and standardized from the i-th layer of the deformation field to the last layer of the deformation field, the minimum allowed range is Can be 0.
[0071] Furthermore, when determining the upper limit, the floating image Voxel spacing in the D direction and the number of deformation field layers in the D direction , determine the maximum coordinates of the sampling points allowed , and Determined as the upper limit value, because it is derived from the deformation field The last layer starts to check and normalize the displacement layer by layer towards the first layer deformation field, so the maximum range allowed is It can be calculated as formula 2:
[0072] (2)
[0073] in, is the upper limit value, is the number of deformation field layers, It is expressed as the voxel spacing value of the floating image in the D direction.
[0074] That is, the range interval [ , ] is determined as the sampling point interval in the target displacement direction, thereby achieving the technical effect of accurately determining the sampling point interval, ensuring that the pixel points corresponding to the real sampling points within the sampling point interval are valid pixel points.
[0075] Optionally, in the image registration method provided in an embodiment of the present application, in each displacement amount set, the displacement amount of the abnormal pixel point in the corresponding abnormal pixel point set is changed to a preset value, and the updated displacement amount set in three displacement directions is obtained, including: for the initial displacement amount set, the abnormal pixel point set corresponding to the initial displacement amount set is obtained, and according to the correspondence between the pixel points in the abnormal pixel point set and the pixel points in the initial displacement amount set, the displacement amount of the pixel point corresponding to the pixel point in the abnormal pixel point set is changed to a preset value in the initial displacement amount set, and the displacement amount of other pixel points is kept unchanged, so as to obtain an updated initial displacement amount set, wherein the initial displacement amount set is any one of the three displacement amount sets.
[0076] Specifically, after determining the set of abnormal pixel points, it is necessary to determine the corresponding displacement of the abnormal pixel points in the set of abnormal pixel points in each displacement direction in the displacement amount set in that displacement direction, and change the above displacement amount to a preset value, while keeping other displacement amounts unchanged, thereby obtaining an updated displacement amount set under three displacement directions.
[0077] Furthermore, since each updated displacement set contains the displacement of each pixel in one direction, the displacement of each pixel in each updated displacement set is obtained in turn, thereby obtaining the updated displacement coordinates of each pixel in three directions, and then obtaining the updated deformation field.
[0078] Figure 2 is a flowchart of an optional image registration method provided according to an embodiment of the present application, such as Figure 2 As shown, when registering the image to be registered, the following steps can be used for the registration operation:
[0079] First, obtain the three-dimensional reference image F and the floating image M, and perform rigid registration on the floating image M based on the reference image F to obtain the floating image after rigid registration .
[0080] Furthermore, the reference image F and the floating image Input into the preset deformation registration model to obtain the corresponding deformation field ;
[0081] Secondly, the deformation field The displacement in the X direction is normalized to obtain the deformation field after normalization in the X direction. , deformation field The displacement in the Y direction is normalized to obtain the normalized deformation field in the Y direction. , deformation field The displacement in the Z direction is normalized to obtain the normalized deformation field in the Z direction. , deformation field After the displacement in the x, y, and z directions is standardized, the omnidirectional standardized deformation field is obtained. .
[0082] The standard method is shown in Formula 3, where D represents the direction of the deformation field, H and T represent the standardization from the head and tail, respectively:
[0083] (3)
[0084] Finally, using the full range of canonical deformation fields For floating images Perform deformation and obtain the floating image after deformation registration.
[0085] Among them, in the deformation field When standardizing, first, from the deformation field Get the deformation displacement in the specified direction D , and secondly, the deformation field Normalize the deformation field layer by layer starting from the head to obtain the deformation field after the head direction is normalized , the head direction canonical deformation field is shown in Formula 4:
[0086] (4)
[0087] Then, the deformation field Normalize the deformation field layer by layer starting from the tail to obtain the deformation field normalized in the tail direction , the canonical deformation field in the tail direction is shown in Formula 5:
[0088] (5)
[0089] Finally, the normalized deformation field Replace deformation field The original deformation displacement in the D direction is obtained, and the normalized deformation field in the D direction is obtained. , and the deformation fields in the three directions are regulated by the above method to obtain the omnidirectional regulated deformation field .
[0090] It should be noted that when standardizing, the real sampling point coordinates of each pixel point in each deformation field in each direction can be calculated, and the real sampling point coordinates can be compared with the sampling point range in the corresponding direction, so that the pixel points whose real sampling point coordinates are outside the sampling point range are determined as abnormal pixel points, and their displacement in the corresponding direction is changed to 0, thereby completing the standardization of the deformation field.
[0091] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0092] The embodiment of the present application also provides an image registration device. It should be noted that the image registration device of the embodiment of the present application can be used to execute the image registration method provided in the embodiment of the present application. The image registration device provided in the embodiment of the present application is introduced below.
[0093] Figure 3 Schematic diagram of an image registration device provided according to an embodiment of the present application. Figure 3 As shown, the device includes: an acquisition unit 31, a division unit 32, an update unit 33, and a registration unit 34.
[0094] The acquisition unit 31 is used to acquire the reference image and the floating image in the image to be registered, and input the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is located in a three-dimensional coordinate system, and the initial deformation field contains multiple pixel points, each pixel point carries a three-dimensional displacement.
[0095] The division unit 32 is used to divide the three-dimensional displacement of the pixel points in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set includes multiple pixel points and the displacement of each pixel point in the corresponding displacement direction.
[0096] The updating unit 33 is used to determine the abnormal pixel points in each displacement amount set according to the 3D voxel spacing value and the 3D layer number of the floating image, and update the abnormal pixel points to obtain three updated displacement amount sets.
[0097] The registration unit 34 is used to combine the three updated displacement sets according to three displacement directions to obtain an updated deformation field, and perform deformation registration operation on the floating image through the updated deformation field to obtain a registered image.
[0098] The image registration device provided by the embodiment of the present application obtains the reference image and the floating image in the image to be registered by the acquisition unit 31, and inputs the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is located in a three-dimensional coordinate system, and the initial deformation field contains multiple pixels, and each pixel carries a three-dimensional displacement; the division unit 32 divides the three-dimensional displacement of the pixels in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set contains multiple pixels and the displacement of each pixel in the corresponding displacement direction; the updating unit 33 determines the abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and updates the abnormal pixel points to obtain three updated displacement sets; the registration unit 34 combines the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performs deformation registration operation on the floating image through the updated deformation field to obtain a registered image. The invention solves the problem in the related art that when a deformation field obtained by a deformation registration algorithm is used to perform a deformation registration operation on a floating image, holes will be generated in the obtained deformation registration image. By determining the abnormal pixel points in the initial deformation field and changing the displacement of the abnormal pixel points, the updated deformation field will not register the pixel points outside the floating image to the image when the deformation registration operation is performed on the floating image, so that holes will not appear in the obtained registration image, thereby achieving the effect of improving the accuracy of the registration image.
[0099] Optionally, in the image registration device provided in the embodiment of the present application, the updating unit 33 includes: a determining subunit, used to determine the abnormal pixel points in each displacement amount set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and obtain the abnormal pixel point sets in three displacement directions; a changing subunit, used to change the displacement of the abnormal pixel points in the corresponding abnormal pixel point set in each displacement amount set to a preset value, and obtain the updated displacement amount set in the three displacement directions.
[0100] Optionally, in the image registration device provided in the embodiment of the present application, the target displacement direction is any one of the three displacement directions. For the target displacement direction, the determination subunit includes: an acquisition module, which is used to acquire the voxel spacing value of the floating image in the target displacement direction, obtain the target voxel spacing value, and obtain the target displacement amount set in the target displacement direction; a first determination module, which is used to determine the number of layers of the initial deformation field in the target displacement direction, obtain the target number of layers, and determine the number of layers where each pixel point is located; a calculation module, which is used to calculate the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel spacing value, the target displacement amount set and the number of layers of each pixel point, to obtain multiple sampling point sets, wherein each sampling point set contains the coordinate value of the sampling point of the pixel point located in the same layer; a second acquisition module, which is used to acquire the sampling point interval in the target displacement direction, and acquire the sampling point whose coordinate value is not located in the sampling point interval, to obtain multiple abnormal sampling points, and determine the pixel point corresponding to each abnormal sampling point as an abnormal pixel point, to obtain the abnormal pixel point set in the target displacement direction.
[0101] Optionally, in the image registration device provided in the embodiment of the present application, the first calculation module includes: a first calculation submodule, which is used to calculate the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer in the order of the number of layers from small to large, until there is no sampling point beyond the sampling point interval in the sampling point set corresponding to the pixel point in the first target layer, so as to obtain multiple first sampling point sets; a second calculation submodule, which is used to calculate the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer in the order of the number of layers from large to small, when there is no sampling point beyond the sampling point interval in the sampling point set corresponding to the pixel point in the first target layer, so as to obtain multiple second sampling point sets; and a merging submodule, which is used to merge the multiple first sampling point sets and the multiple second sampling point sets, so as to obtain multiple sampling point sets.
[0102] Optionally, in the image registration device provided in the embodiment of the present application, the first calculation module includes: a third calculation sub-module, used to multiply the number of layers of the target pixel point and the target voxel spacing value for each target pixel point to obtain a target parameter, wherein the target pixel point is any pixel point in the initial deformation field; a fourth calculation sub-module, used to obtain the displacement of the target pixel point in the target displacement direction from the target displacement set, add the target parameter to the displacement of the target pixel point, and obtain the coordinate value of the sampling point corresponding to the target pixel point.
[0103] Optionally, in the image registration device provided in the embodiment of the present application, the second acquisition module includes: a fifth calculation submodule, used to calculate the upper limit value of the sampling point interval according to the target number of layers and the target voxel spacing value; a combination submodule, used to combine the preset lower limit value and the upper limit value into a sampling point interval.
[0104] Optionally, in the image registration device provided in the embodiment of the present application, in each displacement set, the change subunit includes: a third acquisition module, which is used to obtain, for the initial displacement set, an abnormal pixel point set corresponding to the initial displacement set, and change the displacement of the pixel points corresponding to the pixel points in the abnormal pixel point set in the initial displacement set to a preset value according to the correspondence between the pixel points in the abnormal pixel point set and the pixel points in the initial displacement set, and keep the displacements of other pixel points unchanged, so as to obtain an updated initial displacement set, wherein the initial displacement set is any one of the three displacement sets.
[0105] The above-mentioned image registration device includes a processor and a memory. The above-mentioned acquisition unit 31, division unit 32, update unit 33, registration unit 34, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0106] The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of holes in the deformable registration image obtained when the deformation field obtained by the deformation registration algorithm is used to perform deformation registration operation on the floating image in the related art is solved by adjusting the kernel parameters.
[0107] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0108] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the image registration method is implemented.
[0109] An embodiment of the present invention provides a processor, which is used to run a program, wherein the image registration method is executed when the program is run.
[0110] Figure 4 is a schematic diagram of an electronic device provided according to an embodiment of the present application, such as Figure 4As shown, an embodiment of the present invention provides an electronic device, the electronic device 40 includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned image registration method when executing the program. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0111] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the steps of the above-mentioned image registration method.
[0112] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0113] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0114] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0116] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0117] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0118] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0119] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0120] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. An image registration method, characterized in that: include: Acquire a reference image and a floating image in the image to be registered, and input the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is located in a three-dimensional coordinate system, the initial deformation field contains a plurality of pixel points, and each pixel point carries a three-dimensional displacement; The three-dimensional displacement of the pixel points in the initial deformation field is divided according to three displacement directions to obtain three displacement sets, wherein each displacement set includes the plurality of pixel points and the displacement of each pixel point in the corresponding displacement direction; Determine abnormal pixel points in each displacement amount set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and update the abnormal pixel points to obtain three updated displacement amount sets; Combining the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and performing a deformation registration operation on the floating image through the updated deformation field to obtain a registered image; Among them, determining the abnormal pixel points in each displacement set according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image includes: determining the coordinates of the sampling point corresponding to each pixel point in the floating image according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image and the displacement of each pixel point in the initial deformation field, and determining the abnormal pixel points in the initial deformation field by judging whether the coordinates of the sampling point are located outside the floating image.
2. The method according to claim 1, characterized in that Determine the abnormal pixel points in each displacement amount set according to the 3D voxel spacing value and the 3D layer number of the floating image, and update the abnormal pixel points to obtain three updated displacement amount sets including: Determine the abnormal pixel points in each displacement amount set according to the 3D voxel spacing value and the 3D layer number of the floating image, and obtain the abnormal pixel point sets in three displacement directions; In each displacement amount set, the displacement amount of the abnormal pixel point in the corresponding abnormal pixel point set is changed to a preset value to obtain an updated displacement amount set in three displacement directions.
3. The method according to claim 2, characterized in that The target displacement direction is any one of the three displacement directions. For the target displacement direction, the abnormal pixel points in each displacement amount set are determined according to the three-dimensional voxel spacing value and the three-dimensional layer number of the floating image, and the abnormal pixel point sets in the three displacement directions are obtained, including: Acquire the voxel spacing value of the floating image in the target displacement direction, obtain the target voxel spacing value, and obtain the target displacement amount set in the target displacement direction; Determine the number of layers of the initial deformation field in the target displacement direction, obtain the target number of layers, and determine the number of layers where each pixel point is located; Calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel spacing value, the target displacement amount set and the number of layers of each pixel point, to obtain multiple sampling point sets, wherein each sampling point set contains the coordinate values of the sampling points of the pixel points located in the same layer; A sampling point interval under the target displacement direction is obtained, and sampling points whose coordinate values are not located in the sampling point interval are obtained to obtain multiple abnormal sampling points, and a pixel point corresponding to each abnormal sampling point is determined as an abnormal pixel point to obtain an abnormal pixel point set under the target displacement direction.
4. The method according to claim 3, characterized in that According to the target voxel spacing value, the target displacement amount set and the number of layers of each pixel point, the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image is calculated layer by layer, and multiple sampling point sets are obtained, including: Calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction layer by layer in the order of the number of layers from small to large, until there is no sampling point beyond the sampling point interval in the sampling point set corresponding to the pixel point in the first target layer, thereby obtaining a plurality of first sampling point sets; In the case that there is no sampling point beyond the sampling point interval in the sampling point set corresponding to the pixel points in the first target layer, the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image in the target displacement direction is calculated layer by layer in descending order of the number of layers until there is no sampling point beyond the sampling point interval in the sampling point set corresponding to the pixel points in the second target layer, thereby obtaining a plurality of second sampling point sets; The multiple first sampling point sets and the multiple second sampling point sets are combined to obtain the multiple sampling point sets.
5. The method according to claim 3, characterized in that: Calculating the coordinate value of the sampling point corresponding to each pixel point in the initial deformation field in the floating image layer by layer according to the target voxel spacing value, the target displacement amount set and the number of layers of each pixel point includes: For each target pixel point, multiply the layer number of the target pixel point and the target voxel spacing value to obtain a target parameter, wherein the target pixel point is any pixel point in the initial deformation field; The displacement of the target pixel point in the target displacement direction is obtained from the target displacement amount set, and the target parameter is added to the displacement of the target pixel point to obtain the coordinate value of the sampling point corresponding to the target pixel point.
6. The method according to claim 3, characterized in that Obtaining the sampling point interval in the target displacement direction includes: Calculating an upper limit value of the sampling point interval according to the target number of layers and the target voxel spacing value; The preset lower limit value and the upper limit value are combined into the sampling point interval.
7. The method according to claim 2, characterized in that In each displacement amount set, the displacement amount of the abnormal pixel point in the corresponding abnormal pixel point set is changed to a preset value, and the updated displacement amount sets in three displacement directions are obtained, including: For an initial displacement amount set, an abnormal pixel point set corresponding to the initial displacement amount set is obtained, and according to the correspondence between the pixel points in the abnormal pixel point set and the pixel points in the initial displacement amount set, the displacement amounts of the pixel points corresponding to the pixel points in the abnormal pixel point set in the initial displacement amount set are changed to preset values, and the displacement amounts of other pixel points are kept unchanged, so as to obtain an updated initial displacement amount set, wherein the initial displacement amount set is any one of the three displacement amount sets.
8. An image registration device, characterized in that: include: An acquisition unit is used to acquire a reference image and a floating image in the image to be registered, and input the reference image and the floating image into a preset deformation registration model to obtain an initial deformation field, wherein the initial deformation field is located in a three-dimensional coordinate system, the initial deformation field contains a plurality of pixel points, and each pixel point carries a three-dimensional displacement; A division unit, used for dividing the three-dimensional displacement of the pixel points in the initial deformation field according to three displacement directions to obtain three displacement sets, wherein each displacement set includes the plurality of pixel points and the displacement of each pixel point in the corresponding displacement direction; An updating unit, configured to determine abnormal pixel points in each displacement amount set according to the three-dimensional voxel spacing value and the number of three-dimensional layers of the floating image, and update the abnormal pixel points to obtain three updated displacement amount sets; A registration unit, configured to combine the three updated displacement sets according to the three displacement directions to obtain an updated deformation field, and perform a deformation registration operation on the floating image through the updated deformation field to obtain a registered image; The updating unit is also used to determine the coordinates of the sampling points corresponding to each pixel point in the floating image according to the three-dimensional voxel spacing value and the number of three-dimensional layers of the floating image and the displacement of each pixel point in the initial deformation field, and to determine the abnormal pixel points in the initial deformation field by judging whether the coordinates of the sampling points are located outside the floating image.
9. A computer storage medium, characterized in that The computer storage medium is used to store a program, wherein when the program is executed, the device where the computer storage medium is located is controlled to execute the image registration method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the image registration method described in any one of claims 1 to 7.
