Method and apparatus for determining the orientation of implanted electrodes in MR images
By binarizing, performing principal component analysis, and weighting on MR images, the skeleton image is extracted, solving the problem of difficult electrode orientation identification in existing technologies, achieving accurate electrode orientation positioning, and ensuring the precision of postoperative programming.
Patent Information
- Application Number
- CN202410219117.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-02-28
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-02-28
AI Technical Summary
Existing technologies make it difficult to accurately identify the location of implanted electrodes from MR images, leading to difficulties in postoperative programming and affecting treatment outcomes.
By performing binarization, principal component analysis, and weighted processing on the MR image, the skeleton image is extracted, the straight line where the electrode is located is determined, and the maximum connected region of the electrode is determined by dilation and overlap calculations, thereby determining the electrode orientation.
This improved the accuracy of electrode orientation identification, reduced interference from other tissues, ensured the precision of postoperative programming, and improved treatment outcomes.
Smart Images

Figure CN117994343B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of medical image recognition, in particular to a method and device for determining the orientation of an implanted electrode in an MR image. BACKGROUND
[0002] Brain pacemaker implantation therapy is an effective means for treating neurophysiological diseases such as Parkinson's disease. In order to ensure the ideal postoperative effect, postoperative programming is needed after the brain pacemaker is implanted, and parameter adjustment means such as contact selection, amplitude, pulse width and frequency selection are needed.
[0003] The ideal postoperative programming is that the doctor can determine the implantation position of the electrode in the brain of the patient and the position of the neural nucleus, and based on the implantation position and the parameters to be used, the expected therapeutic effect and side effects are calculated. One possible way is to use postoperative nuclear magnetic (MR) images to identify the electrode position, and to give the position of the target nucleus of the patient at the same time by combining neural image processing technology, so that the doctor can use this information for postoperative programming.
[0004] As shown in Figure 2 The MR image of the patient's head after the electrode is implanted has brain tissue and electrodes, and human vision can distinguish the electrode, but manual work cannot quantify the orientation information of the electrode, and can only observe the approximate position. Since the electrode image in the image is similar to the brain tissue image, the machine vision algorithm cannot accurately identify the electrode from the original MR image, and thus cannot calculate the orientation information of the electrode in the patient's body. SUMMARY
[0005] Therefore, the present application provides a method for determining the orientation of an implanted electrode in an MR image, comprising: obtaining an MR image of a human body after an electrode is implanted; performing binaryzation processing on the MR image to obtain a binary image; extracting the coordinates of voxels with a value of 1 in the binary image to obtain dot matrix data, performing principal component analysis on the dot matrix data to obtain principal component values of multiple dimensions; performing weighting on principal component images of multiple dimensions composed of the principal component values of multiple dimensions to obtain a weighted image; extracting a skeleton image from the weighted image; determining a straight line where the electrode is located from the skeleton image; performing dilation on the straight line, and performing coincidence calculation with the binary image or the weighted image, and determining a maximum connected region according to the calculation result; and determining the orientation of the electrode based on the end points of the maximum connected region.
[0006] Correspondingly, the present application also provides a device for determining the orientation of an implanted electrode in an MR image, comprising: a processor and a memory connected to the processor; wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to make the processor execute the above-mentioned method for determining the orientation of an implanted electrode in an MR image.
[0007] The method and device for determining the position of the implanted electrode according to the embodiment of the present application can effectively highlight the low-amplitude region of the implanted site by performing binaryzation, principal component analysis and weighting on the MR image, and the electrode artifact can be more prominently displayed in the processed weighted image, and the interference of other factors on the identification of the position of the electrode can be reduced; the skeleton is extracted from the weighted image to determine the straight line in the skeleton, and the straight line where the implanted electrode is located is determined, and the straight line is further expanded outwardly with the straight line as the central axis, and the maximum connected region obtained by the overlapping calculation of the binary image or the weighted image is regarded as the outline of the implanted electrode, and the end points of the outline are the end points of the implanted electrode, so that the position information of the electrode can be accurately obtained. BRIEF DESCRIPTION OF DRAWINGS
[0008] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the specific embodiments or the prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0009] Figure 1 The flow chart of the method for determining the position of the implanted electrode in the MR image in the embodiment of the present application;
[0010] Figure 2 The original MR image of the head after the implanted electrode in the embodiment of the present application;
[0011] Figure 3 The principal component images and the weighted images thereof in the embodiment of the present application;
[0012] Figure 4 The skeleton image in the embodiment of the present application;
[0013] Figure 5 The schematic diagram of the straight line where the electrode is located in the embodiment of the present application;
[0014] Figure 6 The schematic diagram of the identification result of the end points of the maximum connected region in the embodiment of the present application. DETAILED DESCRIPTION
[0015] The technical solutions of the present application will be described in detail below with reference to the drawings. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0016] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0017] In addition, the technical features involved in the different embodiments of the application described below can be combined with each other as long as there is no conflict between them.
[0018] The embodiment of the present application provides a method for determining the position of an implanted electrode in an MR image, which can be executed by a computer or a server and the like electronic device, as shown in the figure, the method comprises the following operations: Figure 1
[0019] S1, obtaining an MR image of a human body after an electrode is implanted. The MR image in this step can be an original MR image of a patient after an electrode is implanted, as shown in the figure, or a processed MR image obtained by using a standard brain template, a preoperative MR image for registration transformation. Figure 2
[0020] In this embodiment, the implantation site is the head, and the MR image includes electrode artifacts, brain tissue and skull, etc. In order to facilitate subsequent identification and processing, at least the image of the skull can be removed from the MR image in this step. In addition, in order to process in the subsequent step, the image can also be preprocessed, such as registration with the preoperative image, registration with the standard brain template image, etc.
[0021] The MR image processed by the present scheme is three-dimensional data, and the intermediate image obtained in the subsequent step is also three-dimensional data unless otherwise specified.
[0022] S2, performing binaryzation processing on the MR image to obtain a binary image. There are many binaryzation processing algorithms for images, and this step can use an existing method, or a specific way such as a local binaryzation method and a global binaryzation method, etc.
[0023] S3, extracting the coordinates of the voxels with a value of 1 in the binary image to obtain point array data, and performing principal component analysis on the point array data to obtain principal component values in multiple dimensions. The coordinates in this step are the positions of the voxels with an index value of 1 in the entire three-dimensional binary image, which are three-dimensional coordinate values. The principal component analysis on this point array can obtain principal component values in three dimensions.
[0024] S4 involves weighting the multi-dimensional principal component image, which is composed of principal component values from multiple dimensions, to obtain a weighted image. For each voxel, three principal component values are obtained after step S3. Traversing the entire space, we can obtain... Figure 3 The image shows a 3D plot of the three principal component values. There are several ways to perform weighted calculations on the three-dimensional plots of the three principal components; one can use principal component images of all three dimensions, or only some of the dimensions, thus obtaining the following... Figure 3 The weighted image shown.
[0025] S5, extract the skeleton image from the weighted image. Weighted images typically contain multiple connected regions; extracting the voxel set at the central axis position of these connected regions yields the skeleton image. Figure 4 The image shown contains a skeleton image with several line segments, including segments corresponding to electrodes and other segments corresponding to the background.
[0026] S6. Determine the line containing the electrode from the skeleton image. In this step, a registration template can be used to perform 6-DOF linear registration on the skeleton image, and the line containing the electrode can be obtained using the position of maximum correlation. Alternatively, since the implanted electrode is elongated (actually cylindrical), a Hough transform-like method can be used to detect lines in the image, and the line containing the electrode can be selected from all lines based on the characteristics of the implanted electrode. These characteristics include, for example, length, relative angles between multiple electrodes, etc. For instance, the n longest lines among all lines can be considered as the lines containing the electrode (n is the number of implanted electrodes; in this embodiment, n = 2).
[0027] like Figure 5 As shown, two straight lines running from top to bottom through the image are displayed, representing the two electrodes.
[0028] S7, dilate the straight line and calculate its overlap with the binary or weighted image, then determine the largest connected region based on the calculation result. Specifically, after finding the straight line where the electrode is located, ... Figure 5 The straight lines in the image are expanded and compared with the binary image obtained in step S2 or... Figure 3 The weighted image shown is used to calculate the overlap, resulting in an overlapping point cloud. Furthermore, a closing operation reconstruction calculation can be added to handle interruption situations; that is, the distance between two adjacent connected regions is judged, and if the distance is less than a threshold, it is considered a single connected region, thereby improving robustness.
[0029] The lower boundary position of the largest connected region in the coincidence result, which exceeds the set threshold, is regarded as the end point position of the implanted electrode. In this embodiment, according to the imaging orientation of the MR image, the farthest end of the implanted electrode is located at the lower side of the image, and thus the lower boundary is regarded as the electrode end point. In other embodiments, if the imaging orientation is different, the position of the electrode end point is determined according to the actual orientation.
[0030] S8, determining the electrode orientation based on the end point of the largest connected region. As shown in FIG. 8, the end point position of the largest connected region is the position of the electrode end point, and the angle of the straight line is the angle of the electrode. In addition, the electrode artifact region can be intercepted according to the orientation of the electrode end point, the center coordinates of the contact region can be calculated by the neural network according to the electrode artifact, and the positions of the individual contacts can be determined based on the center coordinates of the contact region and the known distances between the individual contacts on the electrode and the center of the contact region. Figure 6
[0031] According to the implanted electrode orientation determination method provided by the embodiment of the present application, the low-amplitude region of the implanted site can be effectively highlighted by performing the binarization processing, principal component analysis and weighted processing on the MR image, the electrode artifact can be more prominently displayed in the processed weighted image, and the interference of other factors on the identification of the electrode position can be reduced; the skeleton is extracted in the weighted image to determine the straight line in the skeleton, and thus the straight line where the implanted electrode is located is determined, the straight line is further expanded outwardly with the straight line as the central axis, and the coincidence calculation is performed on the binarized image or the weighted image obtained before, the outline of the largest connected region obtained by the coincidence calculation is regarded as the outline of the implanted electrode, and the end points of the outline are regarded as the end points of the implanted electrode, so that the electrode orientation information can be accurately obtained.
[0032] In one embodiment, the step S2 adopts the local binarization processing, and specifically includes the following operations:
[0033] S21, calculating the mean value or the median value of the gray scale for each voxel and its neighborhood. Preferably, the mean value or the median value of the gray scale in the 3*3*3 neighborhood of each voxel is calculated. In other embodiments, the range of the neighborhood can be larger, for example, 5*5*5 neighborhood or 7*7*7 neighborhood.
[0034] S22, performing the binarization on the voxels in the neighborhood by using the mean value or the median value of the gray scale. The mean value or the median value of the gray scale in the neighborhood is used as the threshold value to perform the binarization on the voxel values in each corresponding neighborhood to obtain the binarized data. Preferably, the mean value of the gray scale in the 3*3*3 neighborhood of each voxel is used as the threshold value.
[0035] The embodiment adopts local binary processing for each neighborhood, which can more accurately remove human tissues in the image while avoiding false removal of electrode artifacts, thereby improving the efficiency and accuracy of subsequent operations.
[0036] In one embodiment, step S3 includes the following operations:
[0037] S31, obtain a binary matrix of a unit region in units of each voxel and its neighborhood. Each unit region has 3*3*3 binary voxels, and the binary matrix is a matrix composed of 0 and 1 corresponding to the unit region.
[0038] S32, extract the coordinates of voxels with a value of 1 in each binary matrix to obtain lattice data corresponding to each unit region.
[0039] S33, perform principal component analysis on each lattice data to obtain principal component values of multiple dimensions of each lattice data. By calculating the principal components of the lattice, three principal component values and three principal component vectors can be obtained.
[0040] There are various implementations of obtaining a weighted image in step S4. In one embodiment, step S4 includes the following operations:
[0041] S41A, obtain a first-dimensional principal component image and a second-dimensional principal component image using two-dimensional principal component values corresponding to each voxel. In this embodiment, only the principal component images corresponding to the two-dimensional principal component values are used.
[0042] S42A, multiply the square root value of the first-dimensional principal component image with the second-dimensional principal component image and obtain a binary weighted image according to a preset threshold. In specific embodiments, the threshold value ranges from 2 to 5, preferably from 3 to 4, which can make the electrode artifact trajectory clear and better separate the brain ventricle region.
[0043] In another embodiment, step S4 includes the following operations:
[0044] S41B, obtain a first-dimensional principal component image, a second-dimensional principal component image, and a third-dimensional principal component image using three-dimensional principal component values corresponding to each voxel. In this embodiment, principal component images corresponding to three-dimensional principal component values are used.
[0045] S42B, multiply the 2nd power of the first-dimensional principal component image, the -1st power of the second-dimensional principal component image, and the 0.5th power of the third-dimensional principal component image, and obtain a binary weighted image according to a preset threshold. In specific embodiments, the threshold value ranges from 2 to 5, which can make the electrode artifact trajectory clear and better separate the brain ventricle region.
[0046] According to the principal component analysis scheme, some isolated low-amplitude noise points can be removed, and low-amplitude continuous regions can be extracted so as not to be wiped out in subsequent processing.
[0047] In one embodiment, step S5 includes the following operations:
[0048] S51, extracting a weighted image region in a preset size range from the weighted image with the ACPC as the central axis. The ACPC is a line connecting the midpoint of the anterior edge of the anterior joint (AC) to the midpoint of the posterior edge of the posterior joint (PC). In a specific embodiment, the line is taken as the central axis, the preset size range is set to 100*80*80mm to 140*120*120mm, and the image in the range is extracted, and the voxels outside the range are set to 0.
[0049] S52, extracting a skeleton image from the weighted image region in the preset size range.
[0050] The embodiment is aimed at the implantation position feature that the electrode must pass through the region. The image in the predetermined range is extracted from the entire weighted image, and the skeleton in the region is extracted, so as to reduce the calculation amount and improve the accuracy of identifying the electrode.
[0051] There are various implementation manners of determining the straight line where the electrode is located in step S6. In one embodiment, a suitable registration template is made according to the skull size, the value of a spherical region in the template is 0, the value of a straight line in the spherical interior is 1, and the values of the remaining regions are NaN; the straight line in the template is used for 6-DOF linear registration of the skeleton image, and the maximum correlation position is used to give the possible lead point cloud result in the brain tissue. Step S6 specifically includes the following operations:
[0052] S61A, linearly registering the skeleton image by using the registration template. The registration template is generated in advance according to the implantation site size, and includes a region for indicating an implantation target point and a straight line passing through the region. Specifically, taking the electrode implanted in the head as an example, a suitable registration template is made in advance according to the skull size, and the template includes at least one sphere indicating a nuclear group. The points in the sphere can all be regarded as implantation target points, the value of the sphere region is 0, and there is a straight line in the sphere interior, which is used to indicate the electrode and has a value of 1 at the location. The remaining regions of the registration template are assigned with NaN, so as to obtain a preset template reflecting the position relationship between the electrode and the nuclear group. The straight line in the above registration template is used for 6-DOF linear registration of the skeleton image.
[0053] S62A, determining the straight line where the electrode is located in the skeleton image according to the registration result. Specifically, the maximum correlation position is used to give the possible lead point cloud result in the brain tissue, that is, the straight line where the electrode is located is obtained.
[0054] The embodiment adopts the registration template to search the straight line where the electrode is located. Since the registration template is generated according to the individual information of the patient and the expected implantation position of the electrode, the template is used to search the straight line matching the straight line in the template in the skeleton image, so that the straight line searching efficiency can be improved and the accuracy of searching the straight line where the electrode is located can be improved.
[0055] As a preferred solution, the original MR image can be processed in step S1 to determine the position of the neural nucleus of the individual implantation object, i.e., to determine the position of the implantation target of the patient, and then the straight line passing through the individual implantation target can be searched in step S6. In an embodiment, step S1 specifically includes the following processing:
[0056] S11A, obtaining the preoperative MR image of the human body before implanting the electrode, the postoperative original MR image of the human body after implanting the electrode, and the standard brain template image. The electrode does not exist in the preoperative MR image and the standard brain template image, wherein the preoperative MR image is the image of the patient, the standard brain template image includes the standard brain structure matching the general human brain structure, and can also include the nucleus structure image, or at least the position relationship between the standard brain structure and the nucleus is known.
[0057] S12A, registering the preoperative MR image and the standard brain template image to obtain transformation data. Specifically, linear registration is first performed to obtain a registration result image and reserve a transformation matrix, and then nonlinear registration is performed on the registration result image to obtain a registration result and reserve a transformation field, so as to obtain the transformation matrix and the transformation field.
[0058] S13A, registering the postoperative original MR image and the preoperative MR image to obtain a postoperative-preoperative registration MR image. Linear and nonlinear registration processes can also be used to obtain a registration result.
[0059] S14A, transforming the postoperative-preoperative registration MR image using the transformation data to obtain an MR image. The postoperative-preoperative registration MR image obtained in step S3A is deformed using the transformation matrix and the transformation field reserved in step S2A, so as to register the postoperative original MR image with respect to the standard brain template. If the standard brain template includes the nucleus image, the processed MR image includes the nucleus image, so that the position of the nucleus can be directly determined in the MR image; if the standard brain template does not include the nucleus, but the position relationship between the brain tissue and the nucleus is known, the position of the nucleus in the brain of the patient can be indirectly deduced according to the position of the brain tissue of the processed MR image and the known position relationship.
[0060] Another processing mode of step S1 includes:
[0061] S11B, obtaining the postoperative original MR image after the human body implanting the electrode and the standard brain template image, the standard brain template image including the nucleus template image. Different from the previous mode, the standard brain template image of the embodiment includes the brain tissue and the nucleus, and the preoperative MR image is not used in the embodiment.
[0062] S12B, registering the postoperative original MR image and the standard brain template image to obtain the transformation data. Specifically, linear registration is performed first to obtain a registration result image and reserve a transformation matrix, and then nonlinear registration is performed on the registration result image to obtain a registration result and reserve a transformation field, thereby obtaining the transformation matrix and the transformation field.
[0063] S13B, deforming the nucleus template image into the postoperative original MR image by using the transformation data to obtain the MR image. The standard brain is registered to the patient individual space in the embodiment, and the processed MR image includes the nucleus image, and the position of the nucleus can be directly determined in the MR image.
[0064] According to the above embodiment, the position of the nucleus of the implanted object can be obtained, and after obtaining the position of the implanted electrode according to the scheme, the user can intuitively understand the relative position of the electrode and the nucleus; at the same time, the points in the nucleus range can be taken as target points in step S6, and the straight line passing through the target point is searched, so that the search efficiency is improved.
[0065] Further, on the basis of the processing in step S1, a method of Hough transform is used to detect the straight line in the skeleton image, and step S6 specifically includes the following operations:
[0066] S61B, obtaining the limiting factor for searching the straight line where the electrode is located, the limiting factor including the constraint condition of the spatial parameter value of the straight line and the straight line passing through the target target point, wherein the spatial parameter includes the pitch angle θ, the inclination angle φ, the deflection angle α and the intercept d.
[0067] Regarding the spatial parameter, any straight line can be regarded as the normal line of a plane passing through the origin, and the two Euler angles of the plane are taken as the pitch angle θ and the inclination angle φ. The distance and the direction angle of the vertical point of the straight line in the plane from the origin are taken as the intercept and the deflection angle α. The four dimensions constitute four parameters for describing the straight line, as a four-dimensional straight line parameter space.
[0068] The target target point is a point in the nucleus region in the MR image, and the position of the nucleus is obtained in step S1. The target target point can be any point in the nucleus, and the constraint condition can be understood as that a segment of the straight line is located in the nucleus region, that is, the straight line passes through the target target point.
[0069] The limiting factor can also include other contents, such as requiring the signs of the deflection angles of two straight lines to be opposite, and more limiting factors can be prepared in advance according to the actual implantation situation to make the search result more accurate.
[0070] S62B, search the straight line where the electrode is located in the skeleton image based on the limiting factor. Based on the above limiting factor, multiple straight lines can be searched in the image, and here n straight lines that coincide with the part with a value of 1 in the skeleton image the most and pass through the target point can be counted as the search result, and n is the number of implanted electrodes.
[0071] In one embodiment, the neural network model is used in step S8 to identify the contact region center coordinates of the electrode artifact. For the construction of the neural network model, MR images containing electrode artifacts obtained by real patient labeling images or simulation methods, phantom experiments are used as sample images (more noise data can be superimposed), and the electrode contact coordinates are labeled. The normalized images and labeling information of these samples are used to train the neural network (convolutional neural network, recurrent neural network or support vector machine, transformer neural network, etc.), so that it has the performance of identifying the electrode contact region center coordinates according to the electrode artifact image.
[0072] Based on the trained neural network model, step S8 specifically includes the following operations:
[0073] S81, cut the electrode artifact region near the end point of the largest connected region in the MR image to obtain the electrode artifact image block, and normalize the data. When cutting the electrode artifact region, the end point of the largest connected region can be used as the center position of the switching region, and the width of the cutting region is set to 15-40 times the diameter of the contact, and the length is set to 5-10 times the length of the contact region. In addition, according to the end point position of the largest connected region, a distance of, for example, 1 / 2 to 3 / 4 of the length of the contact region can be lifted along the length direction of the electrode, and this can be used as a rough estimate of the center position of the electrode contact region. Then, the electrode artifact data is cut according to the above size range with the center position as the center. The contact region refers to the volume range formed by all the contacts of the electrode stimulation end.
[0074] S82, use the neural network model to identify the electrode artifact image block to obtain the coordinates of each contact of the electrode and the angle of the electrode. The electrode orientation output by the neural network can include two types of information: coordinates and angles. The coordinates can be the coordinates of the electrode end points, the coordinates of the electrode contact region center, etc. The position relationship between the electrode contact region center and each contact on the electrode is known, so the coordinates of each contact can be calculated based on the coordinates output by the neural network model.
[0075] Due to the electrode artifact in the MR image, and the artifact size is larger than the actual electrode size and the two are not concentric, if the orientation is directly calculated according to the above electrode end point, the result still has an error, and the embodiment adopts the trained neural network model to recognize the image block in a certain range where the electrode end point is located, and the feature of the electrode artifact can be utilized to improve the accuracy of the electrode orientation recognition result.
[0076] Those skilled in the art will appreciate that embodiments of the application can be supplied as a method, a system, or a computer program product. Thus, the application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer-readable program code.
[0077] The application is described in reference to the flowcharts and / or block diagrams of the method, apparatus (system) and computer program product according to the embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices produce a device that implements the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the function specified by one or more blocks
[0078] These computer program instructions can also be stored in a computer-readable memory capable of guiding the computer or other programmable data processing devices to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including instruction means, which implements the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 one or more blocks
[0079] These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide a process for implementing the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 one or more blocks
[0080] Obviously, the above embodiments are merely example for clearly illustrating but not limitation to the embodiments. Based on the above description, other different forms of changes or variations can be made by those skilled in the art. Here, all the embodiments need not and can not be enumerated. The obvious changes or variations derived from the above description are still within the protection scope of the present application.
Claims
1. A method of determining the orientation of an implanted electrode in an MR image, characterized by, The method comprises the following steps: obtaining a postoperative original MR image after a human body implantation electrode and a standard brain template image, wherein the standard brain template image comprises a nucleus template image; aligning the postoperative original MR image and the standard brain template image to obtain transformation data; deforming the nucleus template image into the postoperative original MR image by using the transformation data to obtain an MR image; performing binaryzation processing on the MR image to obtain a binary image; extracting coordinates of voxels with a value of 1 in the binary image to obtain lattice data, and performing principal component analysis on the lattice data to obtain principal component values in multiple dimensions; performing weighting on principal component images in multiple dimensions composed of the principal component values in multiple dimensions to obtain a weighted image; extracting a skeleton image from the weighted image; searching for a straight line where the electrode is located in the skeleton image based on a limiting factor, wherein the limiting factor comprises a constraint condition of a spatial parameter value of the straight line and a target point through which the straight line passes, wherein the spatial parameter comprises a pitch angle θ, a tilt angle φ, a yaw angle α and an intercept d, and the target point is a point in a nucleus region in the MR image; performing dilation on the straight line and performing coincidence calculation with the binary image or the weighted image, and determining a maximum connected region according to a calculation result; determining an electrode orientation based on end points of the maximum connected region.
2. The method of claim 1, wherein, The method comprises the following steps: calculating a gray mean value or a gray median value for each voxel and its neighborhood; performing binaryzation on voxels in the neighborhood by using the gray mean value or the gray median value.
3. The method of claim 1, wherein, The method comprises the following steps: taking each voxel and its neighborhood as a unit region, obtaining a binaryzation matrix of the unit region; extracting coordinates of voxels with a value of 1 in each binaryzation matrix to obtain lattice data corresponding to each unit region; performing principal component analysis on each lattice data to obtain principal component values in multiple dimensions of each lattice data.
4. The method of claim 1, wherein, The method comprises the following steps: obtaining a first-dimensional principal component image and a second-dimensional principal component image by using two-dimensional principal component values corresponding to each voxel; multiplying a square root value of the first-dimensional principal component image with the second-dimensional principal component image and obtaining a binaryzation weighted image according to a preset threshold value; or The method comprises the following steps: obtaining a first-dimensional principal component image, a second-dimensional principal component image and a third-dimensional principal component image by using three-dimensional principal component values corresponding to each voxel; multiplying 2th power of the first-dimensional principal component image, -1th power of the second-dimensional principal component image and 0.5th power of the third-dimensional principal component image and obtaining a binaryzation weighted image according to a preset threshold value. The method comprises the following steps:
5. The method of claim 1, wherein, extracting a weighted image region in a preset size range from the weighted image with ACPC as a central axis; extracting a skeleton image from the weighted image region.
6. The method of claim 1, wherein, determining an electrode orientation based on the end points of the largest connected region, comprising: patching an electrode artifact region near the end points in the MR image to obtain an electrode artifact image patch; identifying the electrode artifact image patch using a neural network model to obtain coordinates of each contact of the electrode and an electrode angle.
7. An apparatus for determining the position of an implanted electrode in an MR image, characterized by comprising: a processor and a memory connected to the processor; wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to perform the method for determining an orientation of an implanted electrode in an MR image according to any one of claims 1-6.
Citation Information
Patent Citations
Brain tumor image segmentation method and device and storage medium
CN111354001A
Image recognition method, device and system and computer readable storage medium
CN114862859A