Medical image registration method and device, computer equipment and storage medium
By training an initial registration model based on deformation field, the problem of degradation of registration accuracy of marking points and areas of interest caused by elastic registration is solved, and high-precision medical image registration and improvement of surgical success rate is achieved.
Patent Information
- Application Number
- CN202311315942.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-11
- Publication Date
- 2025-04-11
AI Technical Summary
Elastic registration causes a decrease in the registration accuracy of marking points during the medical image registration process, reducing the registration accuracy of the region of interest.
By using the deformation field obtained based on the moving images, fixed images, and registration models, the initial registration model is trained to improve the registration accuracy of the region of interest. The method includes acquiring a rigid registration matrix, elastic registration using deformation field and initial image, ensuring high-precision registration of marking points and regions of interest.
It improves the accuracy of medical image registration, ensures high-precision positioning of the area of interest, enhances the success rate of surgery, and meets the clinical time requirements.
Smart Images

Figure CN119810162A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical technology, and in particular to a medical image registration method, apparatus, computer equipment and storage medium. Background Art
[0002] By registering the region of interest of the moving image to the fixed image, a registered image can be obtained. Based on the registered image, lesions can be more sensitively detected and the characteristics of lesions can be displayed to facilitate doctors to conduct diagnostic analysis. For example, deep brain stimulation is an effective means of treating neurological diseases such as Parkinson's disease, dystonia, depression, and epilepsy. The target nucleus is used as the region of interest. By registering the target nucleus of the moving image to the fixed image, the segmentation of the target nucleus can be achieved, which can improve the positioning accuracy of the target nucleus and thus improve the success rate of the operation.
[0003] When registering the region of interest, firstly, the marking points near the region of interest in the moving image and the marking points near the region of interest in the fixed image are rigidly registered. After the rigid registration is completed, the area near the marking points in the moving image and the area near the marking points in the fixed image are elastically registered to achieve the registration of the region of interest.
[0004] However, elastic registration causes a performance regression in the registration accuracy of the markers, thereby reducing the registration accuracy of the region of interest. Summary of the invention
[0005] Based on this, it is necessary to provide a medical image registration method, apparatus, computer equipment and storage medium that can improve the accuracy of medical image registration in response to the above technical problems.
[0006] In a first aspect, the present application provides a medical image registration method, the method comprising:
[0007] A deformation field is obtained according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest;
[0008] According to the deformation field, the initial moving image and the initial fixed image, the region of interest of the initial moving image is registered to the initial fixed image to obtain a target image.
[0009] In one embodiment, the step of registering the region of interest of the initial moving image to the initial fixed image to obtain the target image according to the deformation field, the initial moving image and the initial fixed image comprises:
[0010] Acquire a rigid registration matrix between the initial moving image and the initial fixed image;
[0011] According to the deformation field, the rigid registration matrix and the mask image of the region of interest in the initial moving image, the region of interest in the initial moving image is registered to the initial fixed image to obtain a target image.
[0012] In one embodiment, obtaining the deformation field according to the moving image, the fixed image and the registration model includes:
[0013] Inputting the moving image, the fixed image, the preset initial position of the first marking point in the moving image, and the preset initial position of the second marking point in the fixed image into the registration model to obtain an initial deformation field;
[0014] The deformation field is obtained by performing a size transformation process on the initial deformation field based on the size of the region of interest in the initial moving image.
[0015] In one embodiment, before obtaining the deformation field according to the moving image, the fixed image and the registration model, the method further includes:
[0016] Acquire a rigid registration matrix between the initial moving image and the initial fixed image;
[0017] Deforming the initial moving image and the mask image of the region of interest in the initial moving image by using the rigid registration matrix to obtain a first image corresponding to the initial moving image and a target mask image corresponding to the mask image;
[0018] The moving image is determined according to the target mask image and the first image, and the fixed image is determined according to the target mask image and the initial fixed image.
[0019] In one embodiment, the determining the moving image according to the target mask image and the first image, and determining the fixed image according to the target mask image and the initial fixed image, comprises:
[0020] Using the target mask image to segment the first image to obtain a second image;
[0021] Using the target mask image to segment the initial fixed image to obtain a third image;
[0022] The moving image is determined based on the second image, and the fixed image is determined based on the third image.
[0023] In one embodiment, the method further comprises:
[0024] The moving image sample, the fixed image sample, the first position and the second position are input into the initial registration model to obtain an initial deformation field sample; the moving image sample is determined based on the initial moving image sample, and the fixed image sample is determined based on the initial fixed image sample; the initial moving image sample and the initial fixed image sample both include a region of interest;
[0025] determining a position difference between the first marking point and the second marking point according to the initial deformation field sample, the first position, and the second position;
[0026] The initial registration model is trained according to the position difference, the similarity measure between the moving image sample and the fixed image sample, and the deformation field sample constraint condition to obtain the registration model.
[0027] In one embodiment, determining the position difference between the first marking point and the second marking point according to the initial deformation field sample, the first position and the second position includes:
[0028] Using the initial deformation field sample to adjust the first position to obtain a new position of the first marking point;
[0029] A position difference between the first marking point and the second marking point is determined according to the new position and the second position.
[0030] In one embodiment, before inputting the moving image sample, the fixed image sample, the first position and the second position into the initial registration model to obtain the initial deformation field sample, the method further includes:
[0031] Obtaining a rigid registration matrix sample between the initial moving image sample and the initial fixed image sample;
[0032] Deforming the initial moving image sample and the mask image sample of the region of interest in the initial moving image sample by using the rigid registration matrix sample to obtain a first image sample corresponding to the initial moving image sample and a target mask image sample corresponding to the mask image sample;
[0033] The moving image samples are determined according to the target mask image samples and the first image samples, and the fixed image samples are determined according to the target mask image samples and the initial fixed image samples.
[0034] In one embodiment, the determining the moving image sample according to the target mask image sample and the first image sample, and determining the fixed image sample according to the target mask image sample and the initial fixed image sample, comprises:
[0035] Using the target mask image sample to segment the first image sample to obtain a second image sample of the region of interest;
[0036] Using the target mask image sample to segment the initial fixed image sample to obtain a third image sample of the region of interest;
[0037] The moving image samples are determined based on the second image samples, and the fixed image samples are determined based on the third image samples.
[0038] In a second aspect, the present application further provides a medical image registration device, the device comprising:
[0039] A first determination module is used to obtain a deformation field according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest;
[0040] A registration module is used to register the region of interest of the initial moving image to the initial fixed image to obtain a target image according to the deformation field, the initial moving image and the initial fixed image.
[0041] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:
[0042] A deformation field is obtained according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest;
[0043] According to the deformation field, the initial moving image and the initial fixed image, the region of interest of the initial moving image is registered to the initial fixed image to obtain a target image.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0045] A deformation field is obtained according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest;
[0046] According to the deformation field, the initial moving image and the initial fixed image, the region of interest of the initial moving image is registered to the initial fixed image to obtain a target image.
[0047] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, which implements the following steps when executed by a processor:
[0048] A deformation field is obtained according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest;
[0049] According to the deformation field, the initial moving image and the initial fixed image, the region of interest of the initial moving image is registered to the initial fixed image to obtain a target image.
[0050] The medical image registration method, apparatus, computer device and storage medium obtain a deformation field based on a moving image, a fixed image and a registration model, and register the region of interest of the initial moving image to the initial fixed image to obtain a target image based on the deformation field, the initial moving image and the initial fixed image. The registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marker in the moving image sample and a second position of a second marker in the fixed image sample; the moving image is determined based on the initial moving image, and the fixed image is determined based on the initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest. Since the registration model in the present application is based on the moving image samples, the fixed image samples, the first position of the first marking point in the moving image samples and the second position of the second marking point in the fixed image samples, the initial registration model is trained, which takes into account both the registration between the moving image samples and the fixed image samples and the registration between the first marking point and the second marking point, so that the first marking point and the second marking point can still guarantee a high registration accuracy after the elastic registration of the registration model, thereby improving the registration accuracy of the region of interest and improving the positioning accuracy of the region of interest. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A diagram of an application environment of a medical image registration method in one embodiment;
[0052] Figure 2 is a schematic diagram of a process of a medical image registration method in one embodiment;
[0053] Figure 3 is a schematic flow chart of a method for determining a target image in one embodiment;
[0054] Figure 4 is a schematic flow chart of a method for determining a deformation field in one embodiment;
[0055] Figure 5 A schematic diagram of a flow chart of a registration model determination method in one embodiment;
[0056] Figure 6 is a flow chart of a method for determining a position difference between a first marking point and a second marking point in one embodiment;
[0057] Figure 7 A schematic diagram of a flow chart of a method for determining a moving image sample and a fixed image sample in one embodiment;
[0058] Figure 8 is a flow chart of a method for determining moving image samples and fixed image samples in another embodiment;
[0059] Fig. 9 is a schematic flow chart of a target image determination method in another embodiment;
[0060] Fig.10 A schematic flow chart of a registration model determination method in another embodiment;
[0061] Fig.11 is a structural block diagram of a medical image registration device in one embodiment;
[0062] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0064] By registering the region of interest of the moving image to the fixed image, a registered image can be obtained. Based on the registered image, lesions can be more sensitively detected and the characteristics of lesions can be displayed to facilitate doctors to conduct diagnostic analysis. For example, deep brain stimulation is an effective means of treating neurological diseases such as Parkinson's disease, dystonia, depression, and epilepsy. The target nucleus is used as the region of interest. By registering the target nucleus of the moving image to the fixed image, the segmentation of the target nucleus can be achieved, which can improve the positioning accuracy of the target nucleus and thus improve the success rate of the operation.
[0065] When registering the region of interest, firstly, rigid registration is performed on the marker points near the region of interest in the moving image and the marker points near the region of interest in the fixed image. After the rigid registration is completed, elastic registration is performed on the region near the marker points in the moving image and the region near the marker points in the fixed image, thereby achieving registration of the region of interest. For example, in the elastic registration process, a supervised registration method based on deep learning is used. Most of the supervised information is the label information of certain anatomical structures. The granularity of the label information is coarse and the constraint on the registration is small.
[0066] However, after the elastic registration, the registration accuracy of the corresponding markers is lower than that of the rigid registration, that is, the elastic registration makes the registration accuracy of the markers degrade, thereby reducing the registration accuracy of the region of interest, thus affecting the segmentation of the region of interest, and ultimately leading to a decrease in the positioning accuracy of the region of interest, affecting the success rate of the surgery. In addition, the algorithm takes a long time and does not meet the clinical time requirements.
[0067] In order to solve the above problems, the present application proposes a medical image registration method, apparatus, computer device and storage medium. The medical image registration method provided in the embodiments of the present application can be applied to Figure 1 The application environment includes a computer device, which may be a server, and its internal structure diagram may be as shown in FIG. Figure 1 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store relevant data for medical image registration. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a medical image registration method is implemented. The server can be implemented as an independent server or a server cluster consisting of multiple servers.
[0068] In one embodiment, Figure 2 As shown, a medical image registration method is provided, which is applied to Figure 1 The computer device in the example is used to illustrate, including the following steps:
[0069] S201, obtaining a deformation field according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on moving image samples, fixed image samples, a first position of a first marking point in the moving image samples and a second position of a second marking point in the fixed image samples; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image samples, the fixed image samples, the initial moving image and the initial fixed image all include a region of interest.
[0070] The initial moving image and the initial fixed image may be medical images such as computed tomography images, nuclear magnetic resonance images, or positron emission tomography images. The initial moving image and the initial fixed image may be medical images of the same modality or medical images of different modalities. The initial moving image and the initial fixed image may be medical images of the same user or medical images of different users. Optionally, the initial moving image and the initial fixed image are nuclear magnetic resonance images, the field strength of the initial moving image is greater than the field strength of the initial fixed image, and the field strength of the initial moving image may also be not greater than the field strength of the initial fixed image.
[0071] Among them, a mask image of the area of interest can be segmented from the initial moving image, and the initial moving image and the initial fixed image can be registered to obtain a rigid registration matrix. The rigid registration matrix is used to deform the initial moving image and the mask image to obtain a deformed initial moving image and a deformed mask image respectively, and then the deformed initial moving image and the initial fixed image are sheared using the deformed mask image to obtain a moving image and a fixed image.
[0072] Taking the initial moving image and the initial fixed image as brain images as an example, the region of interest may be a nucleus region, the first marker point and the second marker point may be ACPC marker points, the ACPC marker points refer to the anterior commissure (AC) and the posterior commissure (PC), the ACPC marker point located in the moving image is called the first marker point, and the ACPC marker point located in the fixed image is called the second marker point.
[0073] Optionally, the registration model may be a network model having a network structure similar to Unet.
[0074] In this embodiment, the moving image, the fixed image, the preset initial position of the first marker point in the moving image, and the preset initial position of the second marker point in the fixed image are input into the registration model. The registration model determines the deformation field that can maximize the similarity measure between the moving image and the fixed image and minimize the position difference between the first marker point and the second marker point as the initial deformation field. The initial deformation field is resized based on the size of the region of interest in the initial moving image to obtain the deformation field.
[0075] Optionally, the preset initial positions of the first marking point and the second marking point may be set to 0. That is, the coordinate values of the first marking point and the second marking point are set to 0, and the positions of the first marking point and the second marking point do not need to be extracted.
[0076] In one possible implementation, the registration model determines the deformation field that can maximize the similarity measure between the moving image and the fixed image, minimize the position difference between the first marker point and the second marker point, and minimize the loss value corresponding to the deformation field sample constraint as the initial deformation field, and the initial deformation field is resized based on the size of the region of interest in the initial moving image to obtain the deformation field. Optionally, the deformation field sample constraint includes deformation field smoothness constraint information or deformation field reversible constraint information. If the deformation field sample constraint is deformation field reversible constraint information, it can ensure that the topological structure of the moving image and the fixed image does not change.
[0077] S202: According to the deformation field, the initial moving image and the initial fixed image, the region of interest of the initial moving image is registered onto the initial fixed image to obtain a target image.
[0078] In this embodiment, the region of interest of the initial moving image is segmented to obtain a mask image of the region of interest of the initial moving image. The initial moving image and the initial fixed image are registered to obtain a rigid registration matrix, and the region of interest of the initial moving image is mapped to the initial fixed image according to the rigid registration matrix, the deformation field and the mask image of the region of interest in the initial moving image, that is, the region of interest of the initial moving image is registered to the initial fixed image to obtain the target image.
[0079] In the medical image registration method, a deformation field is obtained according to a moving image, a fixed image and a registration model, and a region of interest of the initial moving image is registered to the initial fixed image according to the deformation field, the initial moving image and the initial fixed image to obtain a target image. The registration model is obtained by training an initial registration model based on moving image samples, fixed image samples, a first position of a first marking point in the moving image samples and a second position of a second marking point in the fixed image samples; the moving image is determined based on the initial moving image, and the fixed image is determined based on the initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest. Since the registration model in the present application is based on the moving image samples, the fixed image samples, the first position of the first marking point in the moving image samples and the second position of the second marking point in the fixed image samples, the initial registration model is trained, which takes into account both the registration between the moving image samples and the fixed image samples and the registration between the first marking point and the second marking point, so that the first marking point and the second marking point can still guarantee a high registration accuracy after the elastic registration of the registration model, thereby improving the registration accuracy of the region of interest and improving the positioning accuracy of the region of interest.
[0080] Figure 3 FIG. 1 is a flow chart of a method for determining a target image in an embodiment. Figure 3 As shown, the embodiment of the present application relates to a possible implementation method of how to align the region of interest of the initial moving image to the initial fixed image to obtain the target image according to the deformation field, the initial moving image and the initial fixed image, including the following steps:
[0081] S301, obtaining a rigid registration matrix between an initial moving image and an initial fixed image.
[0082] In this embodiment, the marked points on the initial moving image and the marked points on the initial fixed image can be rigidly registered based on translation transformation to obtain a rigid registration matrix; the marked points on the initial moving image and the marked points on the initial fixed image can be rigidly registered based on rotation transformation to obtain a rigid registration matrix; the marked points on the initial moving image and the marked points on the initial fixed image can be rigidly registered based on translation transformation and rotation transformation to obtain a rigid registration matrix; or the marked points on the initial moving image and the marked points on the initial fixed image can be rigidly registered based on interaction to obtain a rigid registration matrix.
[0083] S302, according to the deformation field, the rigid registration matrix and the mask image of the region of interest in the initial moving image, register the region of interest in the initial moving image to the initial fixed image to obtain a target image.
[0084] In this embodiment, the rigid registration matrix is used to rigidly deform the mask image to obtain a rigidly deformed mask image, and the boundary of the region of interest in the rigidly deformed mask image is determined according to the grayscale value of the pixels in the rigidly deformed mask image. The rigidly deformed mask image is sheared according to the boundary of the region of interest in the rigidly deformed mask image to obtain a sheared mask image. The sheared mask image is elastically deformed according to the deformation field to obtain an elastically deformed mask image, and the boundary of the region of interest in the elastically deformed mask image is determined according to the grayscale value of the pixels in the elastically deformed mask image. The elastically deformed mask image is filled according to the boundary of the region of interest in the elastically deformed mask image and the size of the initial fixed image to obtain a mask image of the same size as the initial fixed image, that is, the target image.
[0085] In the embodiment of the present application, by obtaining the rigid registration matrix between the initial moving image and the initial fixed image, the region of interest of the initial moving image is registered to the initial fixed image according to the deformation field, the rigid registration matrix and the mask image of the region of interest in the initial moving image to obtain the target image. The deformation field in the embodiment of the present application is an elastic deformation field obtained based on the registration model. The deformation field takes into account the registration of the marker points and the image registration, which makes up for the problem in the traditional technology that the region of interest of the initial moving image is registered to the initial fixed image to obtain the target image using the deformation field and the rigid registration matrix, and the registration performance is degraded due to insufficient prior constraint information, so that the registration accuracy of the obtained target image is higher.
[0086] Figure 4 FIG. 1 is a flow chart of a method for determining a deformation field in an embodiment. Figure 4 As shown, the embodiment of the present application relates to a possible implementation method of how to obtain a deformation field according to a moving image, a fixed image and a registration model, including the following steps:
[0087] S401, inputting a moving image, a fixed image, a preset initial position of a first marking point in the moving image, and a preset initial position of a second marking point in the fixed image into a registration model to obtain an initial deformation field.
[0088] In this embodiment, the moving image, the fixed image, the preset initial position of the first marker in the moving image, and the preset initial position of the second marker in the fixed image are input into the registration model, and the registration model determines the deformation field that can maximize the similarity measure between the moving image and the fixed image and minimize the position difference between the first marker and the second marker as the initial deformation field. Optionally, the preset initial position of the first marker and the second marker can be set to 0. That is, the coordinate values of the first marker and the second marker are set to 0, and there is no need to extract the positions of the first marker and the second marker.
[0089] S402, performing size transformation processing on the initial deformation field based on the size of the region of interest in the initial moving image to obtain a deformation field.
[0090] In this embodiment, according to the size of the region of interest in the initial moving image, an interpolation algorithm may be used to transform the size of the initial deformation field to be consistent with the size of the region of interest in the initial moving image.
[0091] In an embodiment of the present application, an initial deformation field is obtained based on a moving image, a fixed image and a registration model, and the initial deformation field is subjected to a size transformation process based on the size of the region of interest in the initial moving image to obtain the deformation field. In an embodiment of the present application, an initial deformation field is obtained based on a registration model, and a size transformation process is performed on the initial deformation field based on the size of the region of interest in the initial moving image to obtain the deformation field, so that the elastic registration can focus more on the registration of the region of interest.
[0092] In one embodiment, before obtaining the deformation field based on the moving image, the fixed image and the registration model, the method also includes: obtaining a rigid registration matrix between the initial moving image and the initial fixed image; using the rigid registration matrix to deform the initial moving image and the mask image of the area of interest in the initial moving image to obtain a first image corresponding to the initial moving image and a target mask image corresponding to the mask image; determining the moving image based on the target mask image and the first image, and determining the fixed image based on the target mask image and the initial fixed image.
[0093] In this embodiment, a rigid registration matrix is obtained according to the method provided in the above embodiment, the initial moving image is deformed using the rigid registration matrix to obtain a first image corresponding to the initial moving image sample, and the mask image sample of the area of interest of the initial moving image is deformed using the rigid registration matrix sample to obtain a target mask image corresponding to the mask image.
[0094] The target mask image can be used to segment the first image to obtain a second image corresponding to the region of interest, and the target mask image sample can be used to segment the initial fixed image sample to obtain a third image corresponding to the region of interest. The second image is used as a moving image, and the third image is used as a fixed image.
[0095] In a possible implementation, the pixel values of the second image may be weighted to obtain a moving image, and the pixel values of the third image may be weighted to obtain a fixed image. Exemplarily, the pixel values in the second image are multiplied by a first preset weight coefficient to obtain a moving image, and the pixel values in the third image are multiplied by a second preset weight coefficient to obtain a fixed image.
[0096] In an embodiment of the present application, a rigid registration matrix is obtained between an initial moving image and an initial fixed image; the initial moving image and a mask image of an area of interest in the initial moving image are deformed using the rigid registration matrix to obtain a first image corresponding to the initial moving image and a target mask image corresponding to the mask image; the moving image is determined based on the target mask image and the first image, and the fixed image is determined based on the target mask image and the initial fixed image. In an embodiment of the present application, the moving image and the fixed image are determined using the target mask image, so that the moving image and the fixed image can pay more attention to the area of interest, thereby laying a foundation for obtaining the initial deformation field based on the moving image, the fixed image and the registration model.
[0097] The embodiment of the present application relates to a possible implementation method of "determining a moving image based on a target mask image and a first image, and determining a fixed image based on a target mask image and an initial fixed image", including: using the target mask image to segment the first image to obtain a second image; using the target mask image to segment the initial fixed image to obtain a third image; determining the moving image based on the second image, and determining the fixed image based on the third image.
[0098] In this embodiment, the first image is segmented using the target mask image to obtain a second image corresponding to the region of interest, and the initial fixed image is segmented using the target mask image to obtain a third image corresponding to the region of interest. Exemplarily, the target mask image includes multiple regions of interest, and the pixel values corresponding to different regions of interest are inconsistent. The pixel value of the non-interested region is 0. The starting coordinates and the ending coordinates of the region with a pixel value greater than 0 in the target mask image can be determined to obtain the boundary information of the region of interest, and the first image is sheared according to the boundary information to obtain the second image, and the initial fixed image is sheared according to the boundary information to obtain the third image.
[0099] If the second image and the third image are consistent with the input size of the registration model, the second image can be directly used as the moving image, and the third image can be directly used as the fixed image.
[0100] In one possible implementation, if the second image and the third image are inconsistent with the input size of the registration model, the second image is resized to obtain a moving image, and the third image is resized to obtain a fixed image, so that the sizes of the obtained moving image samples and fixed image samples conform to the unified input size of the registration model.
[0101] In the embodiment of the present application, the first image is segmented using the target mask image to obtain the second image, the initial fixed image is segmented using the target mask image to obtain the third image, the moving image is determined based on the second image, and the fixed image is determined based on the third image. In the embodiment of the present application, the second image and the third image are obtained using the target mask image, so that the moving image determined based on the second image and the fixed image determined based on the third image pay more attention to the region of interest, thereby improving the registration accuracy of the region of interest.
[0102] Figure 5 FIG. 1 is a flow chart of a registration model determination method in one embodiment. Figure 5 As shown, the following steps are included:
[0103] S501, input the moving image samples, the fixed image samples, the first position and the second position into the initial registration model to obtain the initial deformation field samples; the moving image samples are determined based on the initial moving image samples, and the fixed image samples are determined based on the initial fixed image samples; the initial moving image samples and the initial fixed image samples both include the region of interest.
[0104] The moving image sample may be a medical image sample with a higher field strength, and the fixed image sample may be a medical image sample with a lower field strength. Optionally, the moving image sample is a 7T MRI image, on which the target nucleus has a clear boundary, and a mask image sample of the target nucleus can be extracted. The fixed image sample may be an MRI image of a patient in an actual scene, generally a 1.5T MRI image, on which the target nucleus is not visible.
[0105] It should be noted that the first position refers to the actual position of the first marker point in the moving image sample, and the second position refers to the actual position of the second marker point in the fixed image sample. The first marker point and the second marker point can be ACPC marker points, and the ACPC marker points refer to the anterior commissure (AC) and the posterior commissure (PC). The ACPC marker point located in the moving image sample is called the first marker point, and the ACPC marker point located in the fixed image sample is called the second marker point.
[0106] In this embodiment, the moving image sample, the fixed image sample, the first position and the second position are input into the initial registration model, and the initial registration model determines the similarity between the moving image sample and the fixed image sample, and the position difference between the first position and the second position to obtain the initial deformation field sample.
[0107] S502: Determine a position difference between a first marking point and a second marking point according to the initial deformation field sample, the first position, and the second position.
[0108] In this embodiment, the first position may be deformed according to the initial deformation field sample to obtain a first new position of the first marking point, and the position difference between the first marking point and the second marking point may be determined according to the first new position and the second position.
[0109] In a possible implementation, the initial deformation field may be used to deform the second position to obtain a second new position of the second marking point, and the position difference between the first marking point and the second marking point may be determined based on the second new position and the first position.
[0110] S503, training the initial registration model according to the position difference, the similarity measure between the moving image sample and the fixed image sample, and the deformation field sample constraint condition to obtain the registration model.
[0111] Optionally, the similarity measure between the moving image sample and the fixed image sample may be the mutual information between the moving image sample and the fixed image sample or the normalized cross-correlation between the moving image sample and the fixed image sample. The larger the similarity measure, the greater the similarity between the moving image sample and the fixed image sample.
[0112] In this embodiment, the moving image samples are deformed using the initial deformation field samples to obtain the deformed moving image samples, and the similarity measure between the moving image samples and the fixed image samples is determined based on the deformed moving image samples and the fixed image samples.
[0113] According to the position difference, the similarity measure between the moving image sample and the fixed image sample and the deformation field sample constraint condition, the total loss function is determined, and the network parameters in the initial registration model are optimized by minimizing the total loss function and calculating the gradient to obtain the registration model. For example, the total loss function can be Among them, L similarity is the similarity measure, L smoth is the sample constraint condition of the deformation field, L landmark is the position difference, φ(x) is the initial deformation field sample, F is the fixed image sample, M is the moving image sample, and F point is the position of the second marking point, M point is the position of the first marker point; O represents deformation.
[0114] Optionally, other loss functions can be used for position difference, such as logarithmic loss function, absolute value loss function or square loss function.
[0115] In an embodiment of the present application, a moving image sample, a fixed image sample, a first position and a second position are input into an initial registration model to obtain an initial deformation field sample. According to the initial deformation field sample, the first position and the second position, the position difference between the first marking point and the second marking point is determined. According to the position difference, the similarity measure between the moving image sample and the fixed image sample and the deformation field sample constraint condition, the initial registration model is trained to obtain a registration model. In an embodiment of the present application, the initial registration model is trained by the similarity between the moving image sample and the fixed image sample, the position difference between the first position and the second position, and the deformation field sample constraint condition to obtain a more accurate registration model. The registration model is used to guide the marking point and the surrounding anatomical structure to move in the right direction, solve the problem that the elastic registration in the traditional technology makes the registration accuracy of some marking points have performance regression, and improve the registration accuracy of the region of interest. Moreover, the registration model can improve the efficiency of the registration. Compared with the traditional iterative registration method based on the marking point, it can achieve the advantage of one-time forward reasoning and meet the clinical requirements for time performance.
[0116] Figure 6 FIG. 1 is a flow chart of a method for determining a position difference between a first marking point and a second marking point in one embodiment. Figure 6As shown, the embodiment of the present application relates to a possible implementation method of how to determine the position difference between the first marking point and the second marking point according to the initial deformation field sample, the first position and the second position, including the following steps:
[0117] S601: Use the initial deformation field sample to adjust the first position to obtain a new position of the first marking point.
[0118] In this embodiment, the first position of the first marking point is deformed (ie, adjusted) using the initial deformation field sample to obtain a new position of the first marking point.
[0119] S602: Determine a position difference between the first marking point and the second marking point according to the new position and the second position.
[0120] In this embodiment, the difference between each new position and the corresponding second position can be calculated, and the position difference between the first marking point and the second marking point can be determined based on the difference; the ratio of each new position and the corresponding second position can also be calculated, and the position difference between the first marking point and the second marking point can be determined based on the ratio.
[0121] In the embodiment of the present application, the first position is adjusted using the initial deformation field sample to obtain a new position of the first marking point, and the position difference between the first marking point and the second marking point is determined based on the new position and the second position. In the embodiment of the present application, the first position is adjusted using the initial deformation field sample to compensate for the misalignment between the first marking point and the second marking point caused by the elastic alignment process.
[0122] Figure 7 FIG. 1 is a flow chart of a method for determining a moving image sample and a fixed image sample in one embodiment. Figure 7 As shown, the following steps are included:
[0123] S701, obtaining a rigid registration matrix sample between an initial moving image sample and an initial fixed image sample.
[0124] In this embodiment, the marked points on the initial moving image sample and the marked points on the initial fixed image sample can be rigidly registered based on translation transformation to obtain a rigid registration matrix sample; the marked points on the initial moving image sample and the marked points on the initial fixed image sample can be rigidly registered based on rotation transformation to obtain a rigid registration matrix sample; the marked points on the initial moving image sample and the marked points on the initial fixed image sample can be rigidly registered based on translation transformation and rotation transformation to obtain a rigid registration matrix sample; or the marked points on the initial moving image sample and the marked points on the initial fixed image sample can be rigidly registered based on interaction to obtain a rigid registration matrix sample.
[0125] S702, deforming the initial moving image sample and the mask image sample of the region of interest in the initial moving image sample using the rigid registration matrix sample to obtain a first image sample corresponding to the initial moving image sample and a target mask image sample corresponding to the mask image sample.
[0126] In this embodiment, the initial moving image sample is deformed using the rigid registration matrix sample to obtain a first image sample corresponding to the initial moving image sample, and the mask image sample of the area of interest of the initial moving image sample is deformed using the rigid registration matrix sample to obtain a target mask image sample corresponding to the mask image sample.
[0127] S703, determining a moving image sample according to the target mask image sample and the first image sample, and determining a fixed image sample according to the target mask image sample and the initial fixed image sample.
[0128] In this embodiment, the first image sample can be segmented using the target mask image sample to obtain a second image sample corresponding to the region of interest, and the initial fixed image sample can be segmented using the target mask image sample to obtain a third image sample corresponding to the region of interest, and the second image sample is used as a moving image sample, and the third image sample is used as a fixed image sample.
[0129] In a possible implementation, the pixel values of the second image samples may be weighted to obtain moving image samples, and the pixel values of the third image samples may be weighted to obtain fixed image samples. Exemplarily, the pixel values in the second image samples are multiplied by the first preset weight coefficient to obtain the moving image samples, and the pixel values in the third image samples are multiplied by the second preset weight coefficient to obtain the fixed image samples.
[0130] In an embodiment of the present application, a rigid registration matrix sample of an initial moving image sample and an initial fixed image sample is obtained, and the mask image sample of the region of interest of the initial moving image sample and the initial moving image sample is deformed using the rigid registration matrix sample to obtain a first image sample corresponding to the initial moving image sample and a target mask image sample corresponding to the mask image sample, and the moving image sample and the fixed image sample are determined based on the target mask image sample, the first image sample and the initial fixed image sample. In an embodiment of the present application, the moving image sample and the fixed image sample are determined using the target mask image sample, so that the moving image sample and the fixed image sample can pay more attention to the region of interest, thereby laying a foundation for subsequently determining a registration model based on the moving image sample and the fixed image sample.
[0131] Figure 8 FIG. 1 is a flow chart of a method for determining a moving image sample and a fixed image sample in another embodiment. Figure 8 As shown, the embodiment of the present application relates to a possible implementation method of how to determine a moving image sample according to a target mask image sample and a first image sample, and determine a fixed image sample according to a target mask image sample and an initial fixed image sample, including the following steps:
[0132] S801, using a target mask image sample to segment a first image sample to obtain a second image sample of an area of interest.
[0133] S802, using the target mask image sample to segment the initial fixed image sample to obtain a third image sample of the region of interest.
[0134] In this embodiment, the first image sample is segmented using the target mask image sample to obtain the second image sample of the region of interest; and the initial fixed image sample is segmented using the target mask image sample to obtain the third image sample of the region of interest. Exemplarily, the target mask image sample includes multiple regions of interest, and the pixel values corresponding to different regions of interest are inconsistent. The pixel value of the non-interested region is 0. The starting coordinates and the ending coordinates of the region with a pixel value greater than 0 in the target mask image sample can be determined to obtain the boundary information of the region of interest. The first image sample is sheared according to the boundary information to obtain the second image sample, and the initial fixed image sample is sheared according to the boundary information to obtain the third image sample.
[0135] S803, determining a moving image sample according to the second image sample, and determining a fixed image sample according to the third image sample.
[0136] In this embodiment, if the second image sample and the third image sample are consistent with the input size of the registration model, the second image sample can be directly used as the moving image sample, and the third image sample can be directly used as the fixed image sample. If the second image and the third image are inconsistent with the input size of the registration model, the second image sample is resized to obtain the moving image sample, and the third image sample is resized to obtain the fixed image sample, so that the sizes of the obtained moving image sample and the fixed image sample meet the unified input size of the registration model.
[0137] In the embodiment of the present application, the first image sample is segmented using the target mask image sample to obtain the second image sample of the region of interest, the initial fixed image sample is segmented using the target mask image sample to obtain the third image sample of the region of interest, the moving image sample is determined based on the second image sample, and the fixed image sample is determined based on the third image sample. In the embodiment of the present application, the second image sample and the third image sample are obtained using the target mask image sample, so that the moving image sample determined based on the second image sample and the fixed image sample determined based on the third image sample pay more attention to the region of interest, thereby improving the registration accuracy of the region of interest.
[0138] Fig. 9 FIG. 1 is a flow chart of a target image determination method in another embodiment. Fig. 9 As shown, the following steps are included:
[0139] S901, obtaining a rigid registration matrix of an initial moving image and an initial fixed image;
[0140] S902, deforming the initial moving image and the mask image of the region of interest in the initial moving image using a rigid registration matrix to obtain a first image corresponding to the initial moving image and a target mask image corresponding to the mask image; executing S903 or S904;
[0141] S903, using the target mask image to segment the first image to obtain a second image; executing S905;
[0142] S904, using the target mask image to segment the initial fixed image to obtain a third image; executing S906;
[0143] S905, performing a size conversion process on the second image to obtain a moving image;
[0144] S906, performing a size conversion process on the third image to obtain a fixed image;
[0145] S907, inputting the moving image, the fixed image, the preset initial position of the first marking point in the moving image, and the preset initial position of the second marking point in the fixed image into the registration model to obtain an initial deformation field;
[0146] S908, performing size transformation processing on the initial deformation field based on the size of the region of interest in the initial moving image to obtain a deformation field;
[0147] S909, registering the region of interest in the initial moving image to the initial fixed image according to the deformation field, the rigid registration matrix and the mask image of the region of interest in the initial moving image to obtain a target image.
[0148] Fig.10 FIG. 1 is a flow chart of a registration model determination method in another embodiment. Fig.10 As shown, the following steps are included:
[0149] S1001, obtaining a rigid registration matrix sample between an initial moving image sample and an initial fixed image sample;
[0150] S1002, deforming the initial moving image sample and the mask image sample of the region of interest in the initial moving image sample using the rigid registration matrix sample to obtain a first image sample corresponding to the initial moving image sample and a target mask image sample corresponding to the mask image sample; executing step S1003 or S1004;
[0151] S1003, using the target mask image sample to segment the first image sample to obtain a second image sample of the region of interest; executing step S1005;
[0152] S1004, using the target mask image sample to segment the initial fixed image sample to obtain a third image sample of the region of interest; executing step S1006;
[0153] S1005, performing a size transformation process on the second image sample to obtain a moving image sample;
[0154] S1006, performing a size transformation process on the third image sample to obtain a fixed image sample;
[0155] S1007, inputting the moving image sample, the fixed image sample, the first position of the first marking point in the moving image sample, and the second position of the second marking point in the fixed image sample into an initial registration model to obtain an initial deformation field sample;
[0156] S1008, adjusting the first position using the initial deformation field sample to obtain a new position of the first marking point;
[0157] S1009, determining a position difference between the first marking point and the second marking point according to the new position and the second position;
[0158] S1010, training an initial registration model according to the position difference, the similarity measure between the moving image sample and the fixed image sample, and the deformation field sample constraint condition to obtain a registration model.
[0159] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0160] Based on the same inventive concept, the embodiment of the present application also provides a medical image registration device for implementing the medical image registration method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more medical image registration device embodiments provided below can refer to the limitations of the medical image registration method above, and will not be repeated here.
[0161] In one embodiment, Fig.11 As shown, a medical image registration device is provided, comprising: a first determination module 11 and a registration module 12, wherein:
[0162] The first determination module 11 is used to obtain a deformation field according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest;
[0163] The registration module 12 is used to register the region of interest of the initial moving image to the initial fixed image to obtain a target image according to the deformation field, the initial moving image and the initial fixed image.
[0164] In one embodiment, the registration module includes:
[0165] An acquisition unit, used for acquiring a rigid registration matrix between an initial moving image and an initial fixed image;
[0166] The registration unit is used to register the region of interest of the initial moving image to the initial fixed image to obtain the target image according to the deformation field, the rigid registration matrix and the mask image of the region of interest in the initial moving image.
[0167] In one embodiment, the first determining module includes:
[0168] A first determining unit is used to input the moving image, the fixed image, the preset initial position of the first marking point in the moving image, and the preset initial position of the second marking point in the fixed image into the registration model to obtain an initial deformation field;
[0169] The second determining unit is configured to perform a size transformation process on the initial deformation field based on the size of the region of interest in the initial moving image to obtain the deformation field.
[0170] In one embodiment, the medical image registration apparatus further comprises:
[0171] An acquisition module, used for acquiring a rigid registration matrix between an initial moving image and an initial fixed image;
[0172] A first deformation module, used for deforming the initial moving image and the mask image of the region of interest in the initial moving image by using a rigid registration matrix to obtain a first image corresponding to the initial moving image and a target mask image corresponding to the mask image;
[0173] The second determining module is used to determine the moving image according to the target mask image and the first image, and to determine the fixed image according to the target mask image and the initial fixed image.
[0174] In one embodiment, the second determining module includes:
[0175] A first segmentation unit is used to segment the first image using the target mask image to obtain a second image;
[0176] A second segmentation unit is used to segment the initial fixed image using the target mask image to obtain a third image;
[0177] The third determining unit is used to determine the moving image according to the second image, and to determine the fixed image according to the third image.
[0178] In one embodiment, the medical image registration apparatus further comprises:
[0179] A third determination module is used to input the moving image sample, the fixed image sample, the first position and the second position into the initial registration model to obtain an initial deformation field sample; the moving image sample is determined based on the initial moving image sample, and the fixed image sample is determined based on the initial fixed image sample; the initial moving image sample and the initial fixed image sample both include a region of interest;
[0180] a fourth determination module, configured to determine a position difference between the first marking point and the second marking point according to the initial deformation field sample, the first position and the second position;
[0181] The training module is used to train the initial registration model according to the position difference, the similarity measure between the moving image samples and the fixed image samples and the deformation field sample constraint condition to obtain the registration model.
[0182] In one embodiment, the fourth determining module includes:
[0183] An adjustment unit, configured to adjust the first position using the initial deformation field sample to obtain a new position of the first marking point;
[0184] The fourth determining unit is used to determine the position difference between the first marking point and the second marking point according to the new position and the second position.
[0185] In one embodiment, the medical image registration apparatus further comprises:
[0186] a fifth determination module, configured to obtain a rigid registration matrix sample between the initial moving image sample and the initial fixed image sample;
[0187] A second deformation module is used to deform the initial moving image sample and the mask image sample of the region of interest in the initial moving image sample by using the rigid registration matrix sample to obtain a first image sample corresponding to the initial moving image sample and a target mask image sample corresponding to the mask image sample;
[0188] The sixth determination module is used to determine the moving image samples according to the target mask image samples and the first image samples, and to determine the fixed image samples according to the target mask image samples and the initial fixed image samples.
[0189] In one embodiment, the sixth determination module includes:
[0190] A third segmentation unit is used to segment the first image sample using the target mask image sample to obtain a second image sample of the region of interest;
[0191] a fourth segmentation unit, configured to segment the initial fixed image samples using the target mask image samples to obtain third image samples of the region of interest;
[0192] The fifth determining unit is used to determine the moving image sample according to the second image sample, and to determine the fixed image sample according to the third image sample.
[0193] Each module in the above-mentioned medical image registration device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0194] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.12 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a medical image registration method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0195] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0196] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0197] A deformation field is obtained according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest;
[0198] According to the deformation field, the initial moving image and the initial fixed image, the region of interest of the initial moving image is registered to the initial fixed image to obtain the target image.
[0199] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0200] obtaining a rigid registration matrix between the initial moving image and the initial fixed image;
[0201] According to the deformation field, the rigid registration matrix and the mask image of the region of interest in the initial moving image, the region of interest in the initial moving image is registered to the initial fixed image to obtain the target image.
[0202] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0203] Inputting the moving image, the fixed image, the preset initial position of the first marking point in the moving image, and the preset initial position of the second marking point in the fixed image into the registration model to obtain an initial deformation field;
[0204] The initial deformation field is resized based on the size of the region of interest in the initial moving image to obtain the deformation field.
[0205] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0206] obtaining a rigid registration matrix between the initial moving image and the initial fixed image;
[0207] Deforming the initial moving image and the mask image of the region of interest in the initial moving image by using a rigid registration matrix to obtain a first image corresponding to the initial moving image and a target mask image corresponding to the mask image;
[0208] A moving image is determined according to the target mask image and the first image, and a fixed image is determined according to the target mask image and the initial fixed image.
[0209] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0210] Using the target mask image to segment the first image to obtain a second image;
[0211] The initial fixed image is segmented using the target mask image to obtain a third image;
[0212] A moving image is determined based on the second image, and a fixed image is determined based on the third image.
[0213] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0214] Inputting the moving image sample, the fixed image sample, the first position and the second position into the initial registration model to obtain the initial deformation field sample; the moving image sample is determined based on the initial moving image sample, and the fixed image sample is determined based on the initial fixed image sample; the initial moving image sample and the initial fixed image sample both include the region of interest;
[0215] Determine a position difference between the first marking point and the second marking point according to the initial deformation field sample, the first position, and the second position;
[0216] According to the position difference, the similarity measure between the moving image samples and the fixed image samples, and the constraint condition of the deformation field samples, the initial registration model is trained to obtain the registration model.
[0217] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0218] Using the initial deformation field sample to adjust the first position to obtain a new position of the first marking point;
[0219] A position difference between the first marking point and the second marking point is determined based on the new position and the second position.
[0220] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0221] obtaining a rigid registration matrix sample between an initial moving image sample and an initial fixed image sample;
[0222] Deforming the initial moving image sample and the mask image sample of the region of interest in the initial moving image sample using the rigid registration matrix sample to obtain a first image sample corresponding to the initial moving image sample and a target mask image sample corresponding to the mask image sample;
[0223] The moving image samples are determined according to the target mask image samples and the first image samples, and the fixed image samples are determined according to the target mask image samples and the initial fixed image samples.
[0224] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0225] Using the target mask image sample to segment the first image sample to obtain a second image sample of the region of interest;
[0226] Using the target mask image sample to segment the initial fixed image sample, to obtain a third image sample of the region of interest;
[0227] The moving image samples are determined based on the second image samples, and the fixed image samples are determined based on the third image samples.
[0228] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0229] A deformation field is obtained according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest;
[0230] According to the deformation field, the initial moving image and the initial fixed image, the region of interest of the initial moving image is registered to the initial fixed image to obtain the target image.
[0231] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0232] obtaining a rigid registration matrix between the initial moving image and the initial fixed image;
[0233] According to the deformation field, the rigid registration matrix and the mask image of the region of interest in the initial moving image, the region of interest in the initial moving image is registered to the initial fixed image to obtain the target image.
[0234] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0235] Inputting the moving image, the fixed image, the preset initial position of the first marking point in the moving image, and the preset initial position of the second marking point in the fixed image into the registration model to obtain an initial deformation field;
[0236] The initial deformation field is resized based on the size of the region of interest in the initial moving image to obtain the deformation field.
[0237] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0238] obtaining a rigid registration matrix between the initial moving image and the initial fixed image;
[0239] Deforming the initial moving image and the mask image of the region of interest in the initial moving image by using a rigid registration matrix to obtain a first image corresponding to the initial moving image and a target mask image corresponding to the mask image;
[0240] A moving image is determined according to the target mask image and the first image, and a fixed image is determined according to the target mask image and the initial fixed image.
[0241] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0242] Using the target mask image to segment the first image to obtain a second image;
[0243] The initial fixed image is segmented using the target mask image to obtain a third image;
[0244] A moving image is determined based on the second image, and a fixed image is determined based on the third image.
[0245] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0246] Inputting the moving image sample, the fixed image sample, the first position and the second position into the initial registration model to obtain the initial deformation field sample; the moving image sample is determined based on the initial moving image sample, and the fixed image sample is determined based on the initial fixed image sample; the initial moving image sample and the initial fixed image sample both include the region of interest;
[0247] Determine a position difference between the first marking point and the second marking point according to the initial deformation field sample, the first position, and the second position;
[0248] According to the position difference, the similarity measure between the moving image samples and the fixed image samples and the deformation field sample constraint condition, the initial registration model is trained to obtain the registration model.
[0249] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0250] Using the initial deformation field sample to adjust the first position to obtain a new position of the first marking point;
[0251] A position difference between the first marking point and the second marking point is determined based on the new position and the second position.
[0252] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0253] obtaining a rigid registration matrix sample between an initial moving image sample and an initial fixed image sample;
[0254] Deforming the initial moving image sample and the mask image sample of the region of interest in the initial moving image sample using the rigid registration matrix sample to obtain a first image sample corresponding to the initial moving image sample and a target mask image sample corresponding to the mask image sample;
[0255] The moving image samples are determined according to the target mask image samples and the first image samples, and the fixed image samples are determined according to the target mask image samples and the initial fixed image samples.
[0256] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0257] Using the target mask image sample to segment the first image sample to obtain a second image sample of the region of interest;
[0258] Using the target mask image sample to segment the initial fixed image sample, to obtain a third image sample of the region of interest;
[0259] The moving image samples are determined based on the second image samples, and the fixed image samples are determined based on the third image samples.
[0260] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0261] A deformation field is obtained according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest;
[0262] According to the deformation field, the initial moving image and the initial fixed image, the region of interest of the initial moving image is registered to the initial fixed image to obtain the target image.
[0263] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0264] obtaining a rigid registration matrix between the initial moving image and the initial fixed image;
[0265] According to the deformation field, the rigid registration matrix and the mask image of the region of interest in the initial moving image, the region of interest in the initial moving image is registered to the initial fixed image to obtain the target image.
[0266] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0267] Inputting the moving image, the fixed image, the preset initial position of the first marking point in the moving image, and the preset initial position of the second marking point in the fixed image into the registration model to obtain an initial deformation field;
[0268] The initial deformation field is resized based on the size of the region of interest in the initial moving image to obtain the deformation field.
[0269] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0270] obtaining a rigid registration matrix between the initial moving image and the initial fixed image;
[0271] Deforming the initial moving image and the mask image of the region of interest in the initial moving image by using a rigid registration matrix to obtain a first image corresponding to the initial moving image and a target mask image corresponding to the mask image;
[0272] A moving image is determined according to the target mask image and the first image, and a fixed image is determined according to the target mask image and the initial fixed image.
[0273] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0274] Using the target mask image to segment the first image to obtain a second image;
[0275] The initial fixed image is segmented using the target mask image to obtain a third image;
[0276] A moving image is determined based on the second image, and a fixed image is determined based on the third image.
[0277] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0278] Inputting the moving image sample, the fixed image sample, the first position and the second position into the initial registration model to obtain the initial deformation field sample; the moving image sample is determined based on the initial moving image sample, and the fixed image sample is determined based on the initial fixed image sample; the initial moving image sample and the initial fixed image sample both include the region of interest;
[0279] Determine a position difference between the first marking point and the second marking point according to the initial deformation field sample, the first position, and the second position;
[0280] According to the position difference, the similarity measure between the moving image samples and the fixed image samples and the deformation field sample constraint condition, the initial registration model is trained to obtain the registration model.
[0281] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0282] Using the initial deformation field sample to adjust the first position to obtain a new position of the first marking point;
[0283] A position difference between the first marking point and the second marking point is determined based on the new position and the second position.
[0284] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0285] obtaining a rigid registration matrix sample between an initial moving image sample and an initial fixed image sample;
[0286] Deforming the initial moving image sample and the mask image sample of the region of interest in the initial moving image sample using the rigid registration matrix sample to obtain a first image sample corresponding to the initial moving image sample and a target mask image sample corresponding to the mask image sample;
[0287] The moving image samples are determined according to the target mask image samples and the first image samples, and the fixed image samples are determined according to the target mask image samples and the initial fixed image samples.
[0288] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0289] Using the target mask image sample to segment the first image sample to obtain a second image sample of the region of interest;
[0290] Using the target mask image sample to segment the initial fixed image sample, to obtain a third image sample of the region of interest;
[0291] The moving image samples are determined based on the second image samples, and the fixed image samples are determined based on the third image samples.
[0292] It should be noted that the 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.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0293] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0294] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0295] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A medical image registration method, characterized in that: The method comprises: A deformation field is obtained according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest; According to the deformation field, the initial moving image and the initial fixed image, the region of interest of the initial moving image is registered to the initial fixed image to obtain a target image.
2. The method according to claim 1, characterized in that The step of registering the region of interest of the initial moving image to the initial fixed image to obtain a target image according to the deformation field, the initial moving image and the initial fixed image comprises: Acquire a rigid registration matrix between the initial moving image and the initial fixed image; According to the deformation field, the rigid registration matrix and the mask image of the region of interest in the initial moving image, the region of interest in the initial moving image is registered to the initial fixed image to obtain a target image.
3. The method according to claim 1, characterized in that The deformation field is obtained according to the moving image, the fixed image and the registration model, including: Inputting the moving image, the fixed image, the preset initial position of the first marking point in the moving image, and the preset initial position of the second marking point in the fixed image into the registration model to obtain an initial deformation field; The deformation field is obtained by performing a size transformation process on the initial deformation field based on the size of the region of interest in the initial moving image.
4. The method according to claim 1, characterized in that: Before obtaining the deformation field according to the moving image, the fixed image and the registration model, the method further includes: Acquire a rigid registration matrix between the initial moving image and the initial fixed image; Deforming the initial moving image and the mask image of the region of interest in the initial moving image by using the rigid registration matrix to obtain a first image corresponding to the initial moving image and a target mask image corresponding to the mask image; The moving image is determined according to the target mask image and the first image, and the fixed image is determined according to the target mask image and the initial fixed image.
5. The method according to claim 4, characterized in that The step of determining the moving image according to the target mask image and the first image, and determining the fixed image according to the target mask image and the initial fixed image, comprises: Using the target mask image to segment the first image to obtain a second image; Using the target mask image to segment the initial fixed image to obtain a third image; The moving image is determined based on the second image, and the fixed image is determined based on the third image.
6. The method according to claim 1, characterized in that The method further comprises: The moving image sample, the fixed image sample, the first position and the second position are input into the initial registration model to obtain an initial deformation field sample; the moving image sample is determined based on the initial moving image sample, and the fixed image sample is determined based on the initial fixed image sample; the initial moving image sample and the initial fixed image sample both include a region of interest; determining a position difference between the first marking point and the second marking point according to the initial deformation field sample, the first position, and the second position; The initial registration model is trained according to the position difference, the similarity measure between the moving image sample and the fixed image sample, and the deformation field sample constraint condition to obtain the registration model.
7. The method according to claim 6, characterized in that The determining, according to the initial deformation field sample, the first position and the second position, a position difference between the first marking point and the second marking point comprises: Using the initial deformation field sample to adjust the first position to obtain a new position of the first marking point; A position difference between the first marking point and the second marking point is determined according to the new position and the second position.
8. The method according to claim 6, characterized in that Before inputting the moving image sample, the fixed image sample, the first position and the second position into the initial registration model to obtain the initial deformation field sample, the method further includes: Obtaining a rigid registration matrix sample between the initial moving image sample and the initial fixed image sample; Deforming the initial moving image sample and the mask image sample of the region of interest in the initial moving image sample by using the rigid registration matrix sample to obtain a first image sample corresponding to the initial moving image sample and a target mask image sample corresponding to the mask image sample; The moving image samples are determined according to the target mask image samples and the first image samples, and the fixed image samples are determined according to the target mask image samples and the initial fixed image samples.
9. The method according to claim 8, characterized in that The step of determining the moving image sample according to the target mask image sample and the first image sample, and determining the fixed image sample according to the target mask image sample and the initial fixed image sample, comprises: Using the target mask image sample to segment the first image sample to obtain a second image sample; Using the target mask image sample to segment the initial fixed image sample to obtain a third image sample; The moving image samples are determined based on the second image samples, and the fixed image samples are determined based on the third image samples.
10. A medical image registration device, characterized in that: The device comprises: A first determination module is used to obtain a deformation field according to a moving image, a fixed image and a registration model; the registration model is obtained by training an initial registration model based on a moving image sample, a fixed image sample, a first position of a first marking point in the moving image sample and a second position of a second marking point in the fixed image sample; the moving image is determined based on an initial moving image, and the fixed image is determined based on an initial fixed image; the moving image, the fixed image, the moving image sample, the fixed image sample, the initial moving image and the initial fixed image all include a region of interest; A registration module is used to register the region of interest of the initial moving image to the initial fixed image to obtain a target image according to the deformation field, the initial moving image and the initial fixed image.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.