Electrode contact calibration method and device for stereoelectroencephalography
By constructing a three-dimensional point cloud network topology and applying breadth-first search and principal axis analysis algorithms, the problems of large positioning errors and difficulty in automation of stereotactic EEG electrode contacts were solved, achieving high-precision and fully automated electrode contact calibration.
Patent Information
- Application Number
- CN202411799829.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-12-09
AI Technical Summary
Existing technologies cannot accurately identify the number of stereotactic electroencephalography (SEEG) electrode contacts, and it is difficult to accurately locate the contact coordinates when the image is curved or blurred. The operation is cumbersome and relies on manual annotation, resulting in large positioning errors and poor robustness.
An electrode contact calibration method based on 3D point cloud data is adopted. By constructing a 3D point cloud network topology map, the electrode contacts are automatically segmented and located using a breadth-first search algorithm and a principal axis analysis algorithm. Combined with morphological filtering and point cloud clustering technology, the fully automated labeling of the contacts is achieved.
Even with bent or deformed electrodes, the contact area can still be accurately located, reducing positioning errors, enabling high-precision automated labeling of contacts, avoiding information loss, and simplifying the operation process.
Smart Images

Figure CN119791684B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electroencephalogram data processing, and particularly relates to a stereotactic electroencephalogram electrode contact calibration method and device. BACKGROUND
[0002] An intracranial electrode is a multi-contact electrode of special material, which has the greatest advantage of directly recording the electrical activity of the cerebral cortex or deep brain and can be implanted intracranially for a short or long term. The electrode implanted in the brain of a subject can be used to record brain waves or emit electric current to stimulate the subject to make the brain of the subject change. Stereo-electroencephalography (SEEG) belongs to intracranial deep electrode and is a common invasive brain wave recording method in clinical practice, which can accurately record the electroencephalogram of subcortical structures and deep cortex, and is of great significance in the research and evaluation of the electrophysiological mechanism of epilepsy.
[0003] There are mainly two ways in the related art. The first way is to register the CT image to the standard template, take the CT image of the to-be-measured electrode and perform binaryzation processing, take the binaryzation image, and combine the binaryzation image by image superposition, calculate the two-dimensional coordinates of the starting point and the ending point of the to-be-measured electrode on the superposition image, restore the three-dimensional coordinates according to the projection transformation, determine the number of contacts of the to-be-measured electrode according to the number of layers of the coronal plane image crossed by the to-be-measured electrode, perform linear equidistant interpolation on the contacts of the to-be-measured electrode according to the starting point and the ending point of the to-be-measured electrode and the number of contacts, obtain the spatial coordinates of all the contacts of the to-be-measured electrode, and then obtain the position of each contact of the to-be-measured electrode in the brain region. The number of contacts determined by this way is the number of layers of the coronal plane image crossed by the electrode, but in actual situations, the same electrode contact may be captured by multiple layers, and for some electrodes with imaging angles, the imaging results in the CT image may be continuous image blocks that are stuck together and cannot be clearly distinguished from each other. Therefore, it is difficult to accurately determine the number of contacts, and the obtained contact coordinates have a large deviation. In addition, the linear interpolation using the line connecting the starting point and the ending point as the electrode axis cannot adapt to the bending situation, introduces systematic errors of the electrode contact coordinates, and the method of calibrating the starting point and the ending point one by one is very tedious and greatly affects the accuracy of subsequent contact positioning, and has poor robustness. The image superposition according to the coronal plane alone will cause information loss, and the final contact positioning error is large.
[0004] The second way is to manually mark the entry point and target point coordinates of each electrode and provide prior information of electrode parameters such as contact radius, spacing and number, and then the algorithm determines the search path along the electrode position and direction determined by the entry point and target point, and sequentially marks the coordinates of the electrode contact sequence by linear interpolation to calculate the position of each electrode contact. This way has a high operation threshold and low accuracy of contact coordinate positioning, and cannot adapt to non-ideal conditions such as curved electrodes. SUMMARY
[0005] Therefore, the present application provides a stereotactic electroencephalogram electrode contact calibration method and device to solve the problems of related technologies that cannot adapt to the curved electrode situation under non-ideal conditions, have large electrode contact positioning error, cannot completely automatically mark electrode contact coordinates, and are not easy to accurately identify the number of electrode contacts.
[0006] In a first aspect, the present application provides a stereotactic electroencephalogram electrode contact calibration method, which comprises:
[0007] Based on the three-dimensional point cloud data of the multiple SEEG electrodes of the patient's brain, a three-dimensional point cloud network topology graph is constructed;
[0008] An initial electrode tree set recording the contact coordinate information of the multiple SEEG electrodes is obtained by gradually searching the three-dimensional point cloud network topology graph using a breadth-first search algorithm, and a target electrode tree set is screened based on the initial electrode tree;
[0009] If the number of electrode trees in the target electrode tree set is greater than or equal to a first preset number, the contact prediction coordinates of each SEEG electrode in the target electrode tree set are estimated using a principal axis analysis algorithm;
[0010] Based on the contact prediction coordinates of each SEEG electrode, the contact envelope region of each SEEG electrode is drawn, and the target positioning region of each SEEG electrode is determined from the contact envelope region of each SEEG electrode;
[0011] The current coordinates of all contacts in the target positioning region of each SEEG electrode are optimized, and the optimal coordinates of all contacts in the target positioning region are output.
[0012] By executing the above-mentioned embodiments, the present application can clearly and accurately distinguish the discrete electrode contact coordinates, even in the case of severe bending or deformation of the implanted electrode, the center coordinates of the electrode contact area can still be accurately located, and for the case of imaging being more blurred and difficult to distinguish adjacent contacts, the accurate distinguishing ability is still possessed. In addition, by executing the above-mentioned embodiments, different electrodes can also be automatically segmented, the spatial axis and target point direction of each electrode are autonomously determined, and the marker path of the electrode contact is calculated, without manual marking of the position and direction of the electrode, the operation process is convenient, the complete spatial distribution of the electrode is obtained through the three-dimensional point cloud data, and the feature information loss problem can be avoided.
[0013] In some optional embodiments, before the step of constructing the three-dimensional point cloud network topology graph based on the three-dimensional point cloud data of the plurality of SEEG electrodes implanted in the brain of the patient, the method further comprises:
[0014] Obtaining postoperative CT image data of the plurality of SEEG electrodes implanted in the brain of the patient;
[0015] Constructing three-dimensional point cloud data of the plurality of SEEG electrodes based on the postoperative CT image data;
[0016] Performing cleaning actions on the three-dimensional point cloud data in sequence according to the coordinate screening mode, the point cloud clustering mode, and the morphological filtering mode;
[0017] Obtaining the three-dimensional point cloud data of the plurality of SEEG electrodes implanted in the brain of the patient after cleaning.
[0018] By executing the above-mentioned embodiments, advanced spatial point cloud detection technology is adopted, cleaning actions are performed on the three-dimensional point cloud data in sequence according to the coordinate screening mode, the point cloud clustering mode, and the morphological filtering mode, and morphological analysis is performed on the electrode contacts one by one, which is beneficial to complete and accurate determination of the electrode contact coordinates, and the morphological features of the key contacts of the electrodes in different directions can be obtained, thereby avoiding information loss.
[0019] In some optional embodiments, if the number of electrode trees of the target electrode tree set is less than the first preset number, the step of performing cleaning actions on the three-dimensional point cloud data in sequence according to the coordinate screening mode, the point cloud clustering mode, and the morphological filtering mode is returned.
[0020] By executing the above-mentioned embodiments, in order to prevent the morphological filtering from being not accurate enough, the three-dimensional point cloud data is further optimized, thereby ensuring the detection accuracy of the three-dimensional point cloud data.
[0021] In some optional embodiments, performing cleaning actions on the three-dimensional point cloud data in sequence according to the coordinate screening mode, the point cloud clustering mode, and the morphological filtering mode comprises:
[0022] The three-dimensional point cloud data greater than the preset coordinate threshold is filtered from the constructed three-dimensional point cloud data of the multiple SEEG electrodes, and a three-dimensional point cloud coordinate matrix is generated;
[0023] Based on the three-dimensional point cloud coordinate matrix, the three-dimensional point cloud coordinate matrix is clustered according to a preset radius and a preset density, and a three-dimensional point cloud clustering result is generated;
[0024] The three-dimensional point cloud clustering result is filtered according to a morphological filtering mode, and the cleaned three-dimensional point cloud data of the multiple SEEG electrodes of the patient's brain is obtained.
[0025] By executing the above embodiments, specific spatial point cloud detection technology is adopted, and the three-dimensional point cloud data is sequentially cleaned according to the coordinate filtering mode, the point cloud clustering mode, and the morphological filtering mode. The morphological analysis of the electrode contacts is performed one by one, which is beneficial to the complete and accurate determination of the electrode contact coordinates, and the morphological characteristics of the key contacts of the electrodes in different directions can be obtained, avoiding information loss.
[0026] In some optional embodiments, a breadth-first search algorithm is used to gradually search the three-dimensional point cloud network topology graph to obtain an initial electrode tree set recording the contact coordinate information of the multiple SEEG electrodes, and a target electrode tree set is screened based on the initial electrode tree, including:
[0027] An initial node is selected from the three-dimensional point cloud network topology graph, and a breadth-first search algorithm is used to gradually search each node in the three-dimensional point cloud network topology graph from the initial node, and an initial electrode tree set recording the contact coordinate information of the multiple SEEG electrodes is obtained;
[0028] The maximum two-point distance in each electrode tree in the initial electrode tree set is obtained;
[0029] If the maximum two-point distance in each electrode tree in the initial electrode tree set is greater than a preset threshold, the electrode tree is regarded as an electrode structure;
[0030] The electrode trees satisfying the electrode structure are counted from the initial electrode tree set, and the electrode trees satisfying the electrode structure are regarded as the target electrode tree set.
[0031] In some optional embodiments, if the number of electrode trees in the target electrode tree set is greater than or equal to a first preset number, a principal axis analysis algorithm is used to estimate the contact predicted coordinates of each SEEG electrode in the target electrode tree set, including:
[0032] If the number of electrode trees in the target electrode tree set is greater than or equal to a first preset number, a principal axis analysis algorithm is used to calculate the principal axis vector of each electrode tree in the target electrode tree set;
[0033] Based on the main axis vector of each electrode tree in the target electrode tree set, the main axis direction of each electrode tree in the target electrode tree set is calculated.
[0034] Based on the contact radius of each SEEG electrode, the preset interval between electrodes, and the main axis direction of each electrode tree in the target electrode tree set, the contact prediction coordinates of each SEEG electrode are estimated.
[0035] By executing the above-mentioned embodiments, the main axis analysis algorithm can automatically adapt to the situation of slight bending and compression of the electrode under non-ideal conditions, accurately positioning the center of the contact area, and even in the case of blurred imaging and difficult to distinguish adjacent contacts, still has accurate distinguishing ability.
[0036] In some optional embodiments, based on the contact prediction coordinates of each SEEG electrode, the contact envelope area of each SEEG electrode is drawn, and the target positioning area of each SEEG electrode is determined from the contact envelope area of each SEEG electrode, including:
[0037] The contact envelope area of each SEEG electrode is drawn with the contact prediction coordinates of each SEEG electrode as the center and according to the contact radius of each SEEG electrode;
[0038] The number of electrodes in the contact envelope area of each SEEG electrode is obtained;
[0039] If the number of electrodes in the contact envelope area of each SEEG electrode is less than or equal to the second preset number, the contact envelope area of the SEEG electrode is taken as the target positioning area.
[0040] By executing the above-mentioned embodiments, for the curved electrode under non-ideal conditions, the target positioning area of each SEEG electrode is selected from the contact envelope area, and then the accurate positioning of each SEEG electrode is realized.
[0041] In some optional embodiments, the current coordinates of all contacts in the contact positioning area of each SEEG electrode are optimized, and the optimal coordinates of all contacts in the target positioning area are output, including:
[0042] The mean coordinates of all contacts in the target positioning area are calculated;
[0043] The mean coordinates are taken as the optimized coordinates, and the current coordinates of all contacts in the target positioning area are optimized according to the optimized coordinates;
[0044] The optimal coordinates of all contacts in the target positioning area after optimization are output.
[0045] By implementing the above methods, the current coordinates of all contacts within the target positioning area are optimized, enabling high-precision fully automated labeling of electrode contacts and reducing the positioning error of electrode contact coordinates.
[0046] Secondly, embodiments of this disclosure provide an electrode contact calibration device for stereotactic electroencephalography (EEG), the device comprising:
[0047] The network topology construction module is used to construct a three-dimensional point cloud network topology based on three-dimensional point cloud data from multiple SEEG electrodes in the patient's brain.
[0048] The 3D point cloud search module is used to use a breadth-first search algorithm to gradually search the 3D point cloud network topology map, obtain an initial electrode tree set that records the contact coordinate information of multiple SEEG electrodes, and filter out the target electrode tree set based on the initial electrode tree.
[0049] The point cloud coordinate prediction module is used to estimate the contact coordinates of each SEEG electrode in the target electrode tree set if the number of electrode trees in the target electrode tree set is greater than or equal to a first preset number, using the main axis analysis algorithm.
[0050] The target area positioning module is used to determine the predicted contact coordinates based on each SEEG electrode, draw the contact envelope area of each SEEG electrode, and determine the target positioning area of each SEEG electrode from the contact envelope area of each SEEG electrode.
[0051] The optimal coordinate output module is used to optimize the current coordinates of all contacts in the target positioning area of each SEEG electrode and output the optimal coordinates of all contacts in the target positioning area.
[0052] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the electrode contact calibration method for stereotactic electroencephalography as described in the first aspect or any corresponding embodiment.
[0053] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the electrode contact calibration method for stereotactic electroencephalography according to the first aspect or any corresponding embodiment described above. Attached Figure Description
[0054] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the description of the specific embodiments or the prior art. Obviously, the drawings described below are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0055] Figure 1 is a SEEG epilepsy diagnosis and treatment schematic diagram according to an embodiment of the present application;
[0056] Figure 2 is a postoperative CT image electrode contact calibration schematic diagram according to an embodiment of the present application;
[0057] Figure 3 is a contrast schematic diagram of the coronal plane image before and after the electrode contact marking according to an embodiment of the present application;
[0058] Figure 4 is a flowchart of an electrode contact calibration method of stereotactic electroencephalogram according to an embodiment of the present application;
[0059] Figure 5 is a schematic diagram of the electrode point cloud segmented into an electrode tree by a node mapping method according to an embodiment of the present application;
[0060] Figure 6 is another flowchart of an electrode contact calibration method of stereotactic electroencephalogram according to an embodiment of the present application;
[0061] Figure 7 is still another flowchart of an electrode contact calibration method of stereotactic electroencephalogram according to an embodiment of the present application;
[0062] Figure 8 is a contrast schematic diagram of the electrode point cloud data clustering before and after the DBSCAN algorithm according to an embodiment of the present application;
[0063] Figure 9 is a schematic diagram of the electrode point cloud image after morphological filtering according to an embodiment of the present application;
[0064] Figure 10 is still another flowchart of an electrode contact calibration method of stereotactic electroencephalogram according to an embodiment of the present application;
[0065] Figure 11 is a schematic diagram of the electrode contact structured high-precision full-automatic recognition result according to an embodiment of the present application;
[0066] Figure 12 is a schematic diagram of the visualization image of the labeling result in the medical image software according to an embodiment of the present application;
[0067] Figure 13 is a schematic diagram of semi-automatic labeling results of the SEEGA open source tool according to an embodiment of the present application;
[0068] Figure 14 is an adaptive schematic diagram of a curved electrode according to an embodiment of the present application;
[0069] Figure 15 is an adaptive schematic diagram of an indistinguishable electrode according to an embodiment of the present application;
[0070] Figure 16 is a simple schematic diagram of an electrode contact labeling method execution process of stereotactic electroencephalogram according to an embodiment of the present application;
[0071] Figure 17 is a structural block diagram of an electrode contact labeling device of stereotactic electroencephalogram according to an embodiment of the present application;
[0072] Figure 18 is a hardware structure schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0073] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0074] An intracranial electrode is a multi-contact electrode of special material, which has the greatest advantage of directly recording the electrical activity of the cerebral cortex or deep brain and can be implanted intracranially for a short or long period of time. The electrode implanted in the brain of a subject can be used to record brain waves or emit electric current to stimulate the subject to make the subject's brain change. The SEEG electrode belongs to the intracranial deep electrode, and after the SEEG electrode implantation surgery is completed, the morphological characteristics of the implanted electrode can be clearly seen in the obtained intracranial CT image. By analyzing the image, the three-dimensional coordinates of the electrode contact in the intracranial space, i.e., the spatial position, can be obtained.
[0075] There are mainly two ways in the related art. The first way is to register the CT image to a standard template, take the CT image of the to-be-measured electrode and perform binaryzation processing, take the binaryzation image, merge the binaryzation image by image superposition, calculate the two-dimensional coordinates of the starting point and the ending point of the to-be-measured electrode on the superposition image, restore the three-dimensional coordinates according to the projection transformation, determine the number of contacts of the to-be-measured electrode according to the number of layers of the coronal plane image crossed by the to-be-measured electrode, perform linear equidistant interpolation on the to-be-measured electrode along the axis according to the starting point and the ending point of the to-be-measured electrode and the number of contacts, obtain the spatial coordinates of all the contacts of the to-be-measured electrode, and then obtain the position of each contact of the to-be-measured electrode in the brain region. The second way is to use semi-automatic operation, manually mark the entry point and target point coordinates of each electrode and provide prior information of the electrode parameters such as the contact radius, the spacing and the number, and then the algorithm determines the search path along the electrode position and direction determined by the entry point and the target point, and sequentially marks the coordinates of the electrode contact sequence by linear interpolation, and calculates the position of each electrode contact.
[0076] In the related art, the following technical problems mainly exist.
[0077] 1. Inaccurate number of contacts. The number of contacts determined by the above first scheme is the number of layers of the coronal plane crossed by the electrode, but in actual situations, the same electrode contact may be captured by multiple layers. Moreover, for some electrodes with imaging angles, the imaging results in the CT image may be continuous image blocks that are stuck together and cannot be clearly distinguished from each other. Therefore, it is difficult to determine the accurate number of contacts by relying on this method, and the obtained contact coordinates will have a large deviation.
[0078] 2. Limitation of linear interpolation. The above two schemes perform linear equidistant interpolation according to the three-dimensional coordinates of the starting point and the ending point of the electrode and the number of intermediate contacts to determine the spatial coordinates of all the contacts. However, in actual situations, the actual relative positions between the electrode contacts may drift due to environmental factors, and are not necessarily equidistantly distributed as in ideal conditions. In addition, in a few cases, the electrode may be slightly curved in three-dimensional space after being implanted in the skull, and linear interpolation using the line connecting the starting point and the ending point as the electrode axis cannot adapt to the curved situation, introducing systematic errors in the coordinates of the electrode contacts.
[0079] 3. No automatic calculation method for the starting point and the ending point of the electrode. The above two schemes do not introduce an automatic calculation method for obtaining the starting point and the ending point of the electrode after obtaining the two-dimensional superposition image of the electrode, and the starting point and the ending point of the electrode can only be determined by manual marking and calculation to provide a search path for subsequent contact coordinate calculation. For actual SEEG implementation, the number of electrodes implanted in the patient can be as high as more than ten, and the method of marking the starting point and the ending point of each electrode is very cumbersome, and greatly affects the accuracy of subsequent contact positioning, and has poor robustness.
[0080] 4. Simply superimposing the images according to the coronal plane will cause information loss. The first scheme above determines the electrode shape according to the superimposition of the coronal plane of the CT image, but in actual situations, the direction of electrode implantation is very diverse. When implanted in a direction relatively perpendicular to the coronal plane, this method will greatly lose the electrode shape information, causing a large error in the final contact positioning result.
[0081] 5. High operation threshold and low accuracy. The second scheme above adopts semi-automatic operation, which requires manual segmentation of the electrodes and determination of the target point and entry point of each electrode, and then inserts the electrode contacts one by one through linear interpolation, and further obtains the inferred contact position. This method has a high operation threshold and low contact accuracy, and cannot adapt to non-ideal conditions such as curved electrodes.
[0082] Therefore, the present embodiment provides an electrode contact calibration method for stereotactic electroencephalogram, which is applied to the field of SEEG epilepsy diagnosis and treatment. SEEG is a minimally invasive surgical procedure, which implants SEEG electrodes into the brain of a patient with epilepsy to analyze intracranial epileptic discharge and accurately explore the starting area of seizures in the brain. Before the operation, the patient needs to undergo a magnetic resonance examination to determine the structural details of the intracranial brain tissue; after the operation, the patient needs to undergo a CT imaging examination (metal electrode implantation cannot be subjected to a magnetic resonance examination), to determine the implantation position of the electrode, as shown in FIG. 1, and therefore, there are two key steps: 1. registering (aligning) the CT image containing the electrode position information with the magnetic resonance image containing the structural information of the intracranial brain tissue; 2. calibrating the spatial coordinates of each contact of each electrode on the CT image to determine its position in the intracranial brain, as shown in FIG. 2. Figure 1 Figure 2
[0083] Among them, the first key step (image registration) can be automatically completed with high quality by many mature algorithms. The second key step (postoperative CT image electrode contact calibration) still needs to rely on manual semi-automatic annotation with the help of certain tools, which is time-consuming and tedious, and the annotation accuracy also has a lot of room for improvement, often requiring complex and time-consuming manual post-processing operations to further correct the contact coordinates. The electrode contact calibration method for stereotactic electroencephalogram in the present embodiment mainly aims at the second key step, and automatically calibrates the electrode contacts on the postoperative CT image, as shown in FIG. 3, to accurately mark the spatial coordinates of each contact on each electrode, so that the specific brain tissue region in the intracranial brain where the epileptic lesion falls can be accurately known when analyzing the SEEG acquisition signal, providing an accurate position reference for subsequent radiofrequency coagulation treatment or microsurgical resection. Figure 3
[0084] According to the embodiment of the present application, a stereotactic electroencephalogram electrode contact calibration method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from here.
[0085] In this embodiment, a stereotactic electroencephalogram electrode contact calibration method is provided, which can be used in computer equipment, mobile terminals such as mobile phones, tablets and the like, Figure 4 The flowchart of the stereotactic electroencephalogram electrode contact calibration method according to the embodiment of the present application is shown in Figure 4 The flowchart includes the following steps:
[0086] Step S401, based on the three-dimensional point cloud data of the plurality of SEEG electrodes in the patient's brain, a three-dimensional point cloud network topology is constructed.
[0087] Specifically, SEEG is the English abbreviation of Stereo-electroencephalography, and the Chinese name is stereotactic electroencephalogram, which is an intracranial invasive diagnostic technique for epilepsy and is the clinical gold standard for epilepsy diagnosis. SEEG electrode is a special material multi-contact electrode, its biggest advantage is that it can directly record the electrical activity of the brain cortex or deep brain, and can be implanted intracranially for short or long term. A plurality of SEEG electrodes are implanted in the patient's brain, which can be used to record brain waves or emit current to stimulate the subject to make the brain change. Three-dimensional point cloud data refers to a set of points closely gathered in space, and the spatial coordinates of a point are a three-dimensional vector [x, y, z] in the coordinate system. The coordinates of all points form a [N, 3] matrix, and N is the number of points in the set.
[0088] Further, the three-dimensional point cloud data here is pre-cleaned to improve the accuracy of detecting the coordinates of the plurality of SEEG electrode contacts. The three-dimensional point cloud data before cleaning is further reconstructed based on the postoperative CT image data of the patient. The three-dimensional point cloud data used in the present disclosure can accurately obtain the complete spatial distribution of the electrode.
[0089] In a specific example, based on the three-dimensional point cloud data of the plurality of SEEG electrodes in the patient's brain, a three-dimensional point cloud network topology is constructed, which includes:
[0090] Step a1, define the attribute information of nodes and edges, and the attribute information includes the voxel coordinates of the three-dimensional point cloud data and the adjacency relationship between adjacent points.
[0091] Exemplarily, in step a1, a node class is defined, and a node class Node is defined, including the following attributes: a numerical value representing the voxel coordinates of the node; and a neighbor node list used for storing the voxel nodes adjacent to the current node, also representing the voxel coordinates of the three-dimensional point cloud data and the adjacency relationship between the adjacent three-dimensional point cloud data.
[0092] Step a2, based on the attribute information of the nodes and edges, a three-dimensional point cloud network topology graph is constructed.
[0093] Exemplarily, the node instances are initialized, for each voxel coordinate, a node instance is created, which is encapsulated as a Node class object. The neighbor nodes are collected, for each node, all voxels with a distance of 1 from the node are found as its neighbor nodes. The found neighbor nodes are added to the neighbor list of the current node. The isolated nodes are processed, for the nodes without neighbors, they are marked as isolated nodes. The nearest other nodes are found for these isolated nodes, the distance between them is calculated, and the nearest neighbor nodes are added to the neighbor list of the isolated node. After sequentially traversing each voxel coordinate of the point cloud, the network topology graph of the three-dimensional point cloud can be obtained.
[0094] The embodiment of the disclosure constructs a three-dimensional point cloud network topology graph by traversing the three-dimensional point cloud data of multiple SEEG electrodes of a patient's brain, thereby effectively segmenting the electrodes, and finally realizing automatic electrode contact structuring labeling.
[0095] Step S402, using a breadth-first search algorithm, the three-dimensional point cloud network topology graph is searched step by step to obtain an initial electrode tree set recording the contact coordinate information of the multiple SEEG electrodes, and a target electrode tree set is screened based on the initial electrode tree.
[0096] Specifically, the breadth-first search algorithm (Breadth-First Search, abbreviated as BFS) is a blind search method, which aims to systematically expand and check all nodes in the graph to find the result.
[0097] Exemplarily, the breadth-first search algorithm is mainly executed through the following process:
[0098] Step b1, initialize the visited node set.
[0099] Specifically, a visited set is created to store the nodes that have been visited.
[0100] Step b2, based on the three-dimensional point cloud network topology graph, BFS traversal is started from the unvisited nodes.
[0101] Specifically, in the three-dimensional point cloud network topology, an unvisited node is selected as the starting point to start the breadth-first search (BFS).
[0102] Step b3, traverse the neighbor nodes of the three-dimensional point cloud network topology.
[0103] Specifically, for each unvisited neighbor node of the current node, the distance between it and the current node is calculated. If the distance is less than a preset threshold, the neighbor node is added to the set of electrode voxels, and the neighbors of the neighbor node are continued to be traversed.
[0104] Step b4, set a stop condition.
[0105] Specifically, when the distance exceeds the threshold, the search of the current path is stopped. The nodes that have been collected are saved as all the voxel coordinates of the electrode.
[0106] Step b5, perform a plurality of repeated search actions.
[0107] Specifically, for each unvisited node, the above steps b2-b4 are repeated until all nodes are visited, ensuring that all electrode voxel coordinates are collected.
[0108] Step b6, output the result.
[0109] Specifically, the voxel coordinate set of each electrode is saved, and the coordinate set of all electrodes, i.e., the initial electrode tree set in the above, is output.
[0110] As shown in FIG. 1, the electrode point cloud is segmented into electrode trees by the node mapping method. Figure 5
[0111] Further, the electrode trees obtained in the initial electrode tree set are filtered using prior information about the electrode. The cleaning operation performed on the three-dimensional point cloud data before this step cannot completely remove impurities, and the initial electrode tree set still contains impurity structures. Therefore, it is necessary to further screen out the real electrode from the electrode tree according to the electrode prior information. Specifically, the maximum distance between two points of each electrode tree in the initial electrode tree set is calculated, and when the distance is less than a certain value, it is considered to be noise or impurities that have not been filtered clean; when the distance is greater than a certain value and the number of electrodes is in a certain empirical interval, it is considered to be an electrode structure. According to this rule, each electrode tree is traversed to obtain the filtered electrode tree. The upper and lower bounds of the empirical value interval depend on the specific electrode size information, which is adjusted and set in actual deployment and use.
[0112] Step S403, if the number of electrode trees in the target electrode tree set is greater than or equal to the first preset number, the main axis analysis algorithm is used to estimate the contact point prediction coordinates of each SEEG electrode in the target electrode tree set.
[0113] Step S404, based on the contact prediction coordinates of each SEEG electrode, drawing the contact envelope area of each SEEG electrode, and determining the target positioning area of each SEEG electrode from the contact envelope area of each SEEG electrode.
[0114] Step S405, optimizing the current coordinates of all contacts in the target positioning area of each SEEG electrode, and outputting the optimal coordinates of all contacts in the target positioning area.
[0115] Specifically, since the irregular SEEG electrode implanted in the brain of the patient in some mild bending and deformation cases, if the connection line between the starting point and the ending point is still used as the electrode axis to perform linear interpolation, it cannot adapt to the bending case, and it is easy to bring larger error to the calibration of the electrode contact. Moreover, this scheme is difficult to distinguish adjacent contacts for the case that the electrode is imaged more blurred in the CT, causing calibration failure.
[0116] Therefore, for each electrode tree, the main axis analysis algorithm is used to estimate the contact prediction coordinates of each SEEG electrode in the target electrode tree set, and then the coordinates of the contact and the surrounding point cloud are used to locally optimize and correct the contact coordinates, to realize flexible coordinate positioning, and to derive the contact space coordinate group classified according to the structure belonging to different electrodes.
[0117] In summary, the electrode contact calibration method of stereotactic electroencephalogram in the embodiment of the present disclosure, based on the three-dimensional point cloud data of multiple SEEG electrodes in the brain of the patient, constructs a three-dimensional point cloud network topology, further uses the breadth-first algorithm to gradually search the three-dimensional point cloud network topology, divides and extracts the structure of each SEEG electrode, and estimates the contact prediction coordinates of each SEEG electrode by using the main axis analysis algorithm, and then optimizes the current coordinates of all contacts in the target positioning area of each SEEG electrode. Finally, the present application can clearly and accurately distinguish the discrete electrode contact coordinates, even in the case of bending or deformation of the electrode, the positive center of the electrode contact area can still be accurately positioned, and for the case that the imaging is more blurred and the contact center is difficult to distinguish by manual operation, the present application still has accurate distinguishing ability. In addition, the present application can automatically complete the segmentation and electrode contact calibration task between electrodes in the whole process, and independently determines the position and direction of each electrode, without manually marking the coordinates of the electrode entry point and the target point to determine the electrode contact search path, and the operation process is convenient. In addition, by using three-dimensional point cloud data, the complete spatial distribution of the electrode is obtained, and the problem of feature information loss can be avoided.
[0118] In the embodiment, a stereotactic electroencephalogram electrode contact calibration method is provided, which can be used in computer equipment, mobile terminals such as mobile phones, tablet computers and the like, Figure 6 is a flowchart of the stereotactic electroencephalogram electrode contact calibration method according to the embodiment of the present application, asFigure 6 As shown, before the step 401 of constructing a three-dimensional point cloud network topology graph based on the three-dimensional point cloud data of the multiple SEEG electrodes implanted in the brain of the patient, the following steps are further included:
[0119] In step S601, postoperative CT image data of the multiple SEEG electrodes implanted in the brain of the patient is acquired.
[0120] Specifically, in analyzing the disease condition of the epilepsy patient, a magnetic resonance examination needs to be performed on the patient before the operation to determine the structural details of the intracranial brain tissue, and a CT imaging examination needs to be performed on the patient after the operation, and then the postoperative CT image data of the brain of the patient containing the multiple SEEG electrodes needs to be acquired.
[0121] In step S602, three-dimensional point cloud data of the multiple SEEG electrodes is constructed based on the postoperative CT image data.
[0122] Specifically, after the postoperative CT image data of the patient is read, three-dimensional point cloud data is reconstructed to obtain three-dimensional voxel data (coordinates are integers) of the CT image in the three-dimensional space. The coordinate system is the RAS coordinate system of the CT image, and the value of each coordinate voxel is a gray value. The brighter the voxel region in the CT image, the larger the gray value.
[0123] The three-dimensional point cloud reconstruction of the CT image data in the embodiment of the present disclosure obtains the complete spatial distribution of the electrodes, which is beneficial to accurately obtaining the electrode contact coordinates.
[0124] In step S603, the three-dimensional point cloud data is sequentially executed by cleaning actions according to the coordinate screening mode, the point cloud clustering mode, and the morphological filtering mode.
[0125] In step S604, the three-dimensional point cloud data of the multiple SEEG electrodes implanted in the brain of the patient after cleaning is acquired.
[0126] The advanced spatial point cloud detection technology is adopted in the embodiment of the present disclosure, and the three-dimensional point cloud data is sequentially executed by cleaning actions according to the coordinate screening mode, the point cloud clustering mode, and the morphological filtering mode, and the electrodes are analyzed one by one, which is beneficial to completely and accurately determining the electrode shape, direction, and position, and the morphological features of the key contacts of the electrodes in different directions can be obtained, and information loss is avoided.
[0127] In some optional embodiments, as shown in the following table: Figure 7 As shown, the step S603 of sequentially executing cleaning actions on the three-dimensional point cloud data according to the coordinate screening mode, the point cloud clustering mode, and the morphological filtering mode includes:
[0128] Step S6031, from the constructed three-dimensional point cloud data of the plurality of SEEG electrodes, three-dimensional point cloud data greater than a preset coordinate threshold is screened out, and a three-dimensional point cloud coordinate matrix is generated.
[0129] Specifically, first, an initial threshold (preset coordinate threshold) η = η0 is set, and the CT point cloud is screened according to the threshold, and only the coordinates of the pixels with a gray value higher than the threshold are retained All retained voxel coordinates are collected as an electrode three-dimensional point cloud coordinate matrix [N, 3], N being the number of coordinates. The preset coordinate threshold can be adjusted step by step according to the actual optimization result.
[0130] Step S6032, based on the three-dimensional point cloud coordinate matrix, the three-dimensional point cloud coordinate matrix is clustered according to a preset radius and a preset density, and a three-dimensional point cloud clustering result is generated.
[0131] Specifically, the DBSCAN algorithm is used to cluster the screened point cloud coordinates. DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based clustering algorithm, mainly used to discover clusters of arbitrary shape, and can effectively process noisy data. Its basic idea is to identify high-density regions by specifying the radius and density of points, and form clusters, while marking the data points in low-density regions as noise. The result of clustering is a cluster, each cluster contains several points, and after adjusting the parameters, most electrode structures are clustered into clusters, as shown in Figure 8 .
[0132] Exemplarily, first, the basic terms of the DBSCAN algorithm are defined, the core point, if the number of points (including itself) in the ε neighborhood of a point is greater than or equal to the specified minimum point threshold, the point is a core point. Boundary point, it does not meet the condition of core point, but is located in the ε neighborhood of a certain core point. Noise point, neither a core point nor in the ε neighborhood of any core point, such points will be marked as noise. The point cloud clustering process includes the following processes:
[0133] Step c1, initialize all points in the point cloud as unvisited;
[0134] Step c2, for each point P in the point cloud:
[0135] a. If P has been visited, skip
[0136] b. Mark P as visited
[0137] c. Find the ε neighborhood of P
[0138] d. If the number of points in the epsilon neighborhood of P < MinPts:
[0139] i. Mark P as noise
[0140] e. Otherwise, create a new cluster and add P and all points in its epsilon neighborhood to the cluster
[0141] f. For each point Q in the cluster:
[0142] i. If Q is not marked as visited, mark Q as visited and compute the epsilon neighborhood of Q
[0143] ii. If Q is a core point, add all points in the epsilon neighborhood of Q to the current cluster step c3, return all clusters and noise points.
[0144] At step S6033, the morphological filtering manner is used to filter the three-dimensional point cloud clustering result, and then the cleaned three-dimensional point cloud data of the multiple SEEG electrodes of the patient's brain is obtained.
[0145] Specifically, after the three-dimensional point cloud data is clustered into different clusters, the impurity components other than the SEEG electrodes are filtered. The filtering rule needs to introduce the morphological information of the electrodes. The number of coordinate points of a complete electrode is generally within a range interval, and the cluster with a smaller number of points is generally noise points, and the cluster with a larger number of points is generally impurities such as teeth and electrode wire devices. After filtering according to the volume (number of points) of the cluster, most of the impurities in the three-dimensional point cloud can be filtered out. The electrodes after filtering the impurities are as shown in FIG. 8. Figure 9
[0146] By performing the above steps S6031-S6033, the advanced spatial point cloud detection technology is adopted, the three-dimensional point cloud data is sequentially cleaned according to the coordinate screening manner, the point cloud clustering manner, and the morphological filtering manner, the electrodes are sequentially morphologically analyzed, the electrode morphology, direction, and position are beneficially determined completely and accurately, the morphological characteristics of the key contact points of the electrodes in different directions can be obtained, and information loss is avoided.
[0147] In some optional embodiments, in the step S602, Figure 6 if the number of electrode trees of the target electrode tree set is less than the first preset number, the step S603 of sequentially cleaning the three-dimensional point cloud data according to the coordinate screening manner, the point cloud clustering manner, and the morphological filtering manner is returned.
[0148] Specifically, the first preset number here is the number of implanted electrodes given in combination with prior information. If the number of electrode trees in the target electrode tree set after the first screening is less than the number of implanted electrodes K given by the first preset number (prior information), it is considered that the initial threshold (first preset number) is too high to cause partial electrode image distortion and not to be extracted. In this case, the preset coordinate threshold η in the above is automatically reduced by a certain step size, and the above step S604 is automatically returned to re-optimize the three-dimensional point cloud data, thereby ensuring the detection accuracy of the three-dimensional point cloud data.
[0149] In some optional embodiments, as shown in FIG. 4, the step S402 uses a breadth-first search algorithm to gradually search the three-dimensional point cloud network topology graph to obtain an initial electrode tree set recording the contact coordinate information of the plurality of SEEG electrodes, and screens a target electrode tree set based on the initial electrode tree, including: Figure 10
[0150] Step S4021 selects an initial node from the three-dimensional point cloud network topology graph, and uses a breadth-first search algorithm to gradually search each node in the three-dimensional point cloud network topology graph from the initial node, thereby obtaining an initial electrode tree set recording the contact coordinate information of the plurality of SEEG electrodes.
[0151] Specifically, an unvisited node in the three-dimensional point cloud network topology graph is selected as a starting point to start the breadth-first search action, and finally an initial electrode tree set recording the contact coordinate information of the plurality of SEEG electrodes is obtained. For specific process of the breadth-first search action, please refer to the above steps b1-b6, which will not be repeated here.
[0152] Step S4022 obtains the maximum two-point distance in each electrode tree in the initial electrode tree set.
[0153] Step S4023, if the maximum two-point distance in each electrode tree in the initial electrode tree set is greater than a preset threshold, the electrode tree is regarded as an electrode structure.
[0154] Step 4024, the electrode trees satisfying the electrode structure are counted from the initial electrode tree set, and the electrode trees satisfying the electrode structure are regarded as the target electrode tree set.
[0155] Specifically, the morphological filtering method in the above description cannot completely remove impurity components, and therefore, it is necessary to further screen out the real electrodes from the electrode trees according to electrode prior information. The maximum two-point distance of each electrode tree in the initial electrode tree set is calculated, and when the two-point distance is less than or equal to a preset threshold, it is considered to be noise or impurities that are not filtered clean; when the two-point distance is greater than the preset threshold and the number of electrodes is in a certain experience interval, it is considered to be an electrode structure. According to the rule, each electrode tree is traversed to obtain the electrode tree that satisfies the electrode structure, and then a target electrode tree set is formed.
[0156] The embodiment of the present disclosure performs the above steps S4021-S4024 in order to accurately screen the contact coordinates of the plurality of SEEG electrodes.
[0157] In some optional embodiments, in Figure 10 In the above step S403, if the number of electrode trees in the target electrode tree set is greater than or equal to a first preset number, the principal axis analysis algorithm is used to estimate the contact prediction coordinates of each SEEG electrode in the target electrode tree set, including:
[0158] In step S4031, if the number of electrode trees in the target electrode tree set is greater than or equal to a first preset number, the principal axis analysis algorithm is used to calculate the principal axis vector of each electrode tree in the target electrode tree set.
[0159] Exemplarily, the coordinates of the electrode tree can be represented as a data matrix Each row represents the spatial voxel coordinates of a point in the electrode tree, and n is the total number of points in the electrode tree. First, the average coordinates of the electrode tree are calculated, and the data matrix is centered;
[0160]
[0161]
[0162] Then, the covariance matrix of the centered data matrix is calculated;
[0163]
[0164] The eigenvalues and eigenvectors of the covariance matrix are calculated;
[0165] Cv i = λ i v i , i = 1, 2,..., p
[0166] The eigenvector v1 corresponding to the maximum eigenvalue λ1 is taken, that is, the principal axis direction of the electrode tree, and the unit vector v e is calculated as the principal axis vector:
[0167]
[0168] Step S4032, based on the principal axis vector of each electrode tree in the target electrode tree set, calculating the principal axis direction of each electrode tree in the target electrode tree set.
[0169] Step S4033, based on the contact radius of each SEEG electrode, the preset interval between electrodes and the principal axis direction of each electrode tree in the target electrode tree set, estimating the contact prediction coordinates of each SEEG electrode.
[0170] Specifically, the contact radius of each SEEG electrode is r, and the preset interval between electrodes is d, which is prior information of the electrode.
[0171] On the principal axis, starting from the electrode end, the principal axis coordinates of the contact are determined according to the prior knowledge (contact interval);
[0172] The principal axis is calculated on the electrode end point x n (close to the target point), and the initial point x1 of the electrode (close to the electrode handle), and the sign function s of the principal axis direction is calculated
[0173] s = sign ((x n -x1) · v e )
[0174] According to the prior information of the electrode: the electrode contact radius r and the electrode contact interval d, the contact prediction coordinates of each SEEG electrode are back calculated from the target point along the principal axis direction:
[0175] p i = x n -s·[(i-1)·d+r]·v e , i = 1, 2,..., P
[0176] The number of inferred contact prediction coordinates of each SEEG electrode can be taken as an empirical maximum value P, which ensures that the maximum value is greater than the maximum value of all electrode contact points, such as 15 or 20.
[0177] By performing the above steps S4031-S4033, the principal axis analysis algorithm can automatically adapt to the situation of slight bending and deformation of the electrode under non-ideal conditions, and accurately locate the center of the contact area. Even in the case of imaging being more blurred and difficult to distinguish the center of each contact of the electrode area, it still has accurate resolution ability.
[0178] In some optional embodiments, in Figure 10 , the above step S404, based on the contact prediction coordinates of each SEEG electrode, drawing the contact envelope region of each SEEG electrode, and determining the target positioning region of each SEEG electrode from the contact envelope region of each SEEG electrode, comprises:
[0179] Step S4041, an envelope area of each SEEG electrode contact is drawn according to the contact radius of each SEEG electrode contact, with the predicted coordinates of each SEEG electrode contact as the center.
[0180] Step S4042, the number of electrodes in the envelope area of each SEEG electrode contact is obtained.
[0181] Step S4043, if the number of electrodes in the envelope area of each SEEG electrode contact is less than or equal to the second preset number, the envelope area of the SEEG electrode contact is taken as the target positioning area.
[0182] Specifically, according to the inferred contact coordinates on the principal axis, the contact verification and local optimization are performed according to the prior knowledge (contact radius) to determine the coordinates of the actual contact.
[0183] First, for each predicted contact p i , find all points x j in the envelope area with a radius of r, obtain the number of electrodes in the envelope area of each SEEG electrode contact, if the number of electrodes in the envelope area of each SEEG electrode contact is less than or equal to the second preset number, the envelope area of the SEEG electrode contact is taken as the target positioning area, the second preset number belongs to an experience value range, and the experience value is determined through experiments. In this way, the target positioning area of each SEEG electrode is screened from the envelope area, and then the accurate positioning of each SEEG electrode is realized.
[0184] In some optional embodiments, in Figure 10 , the above step S405, the current coordinates of all contacts in the contact positioning area of each SEEG electrode are optimized, and the optimal coordinates of all contacts in the target positioning area are output, including:
[0185] Step S4051, the mean coordinates of all contacts in the target positioning area are calculated.
[0186] Step S4052, the mean coordinates are taken as the optimized coordinates, and the current coordinates of all contacts in the target positioning area are optimized according to the optimized coordinates.
[0187] Step S4053, the optimal coordinates of all contacts in the target positioning area after optimization are output.
[0188] Exemplarily, for each remaining contact in the target positioning area, the mean coordinates of all points x j in the envelope surface with a radius of r are calculated as the optimized coordinates of the contact
[0189]
[0190] n * the number of points x j targeted positioning area.
[0191] Finally, the optimized coordinates of the obtained contact points are output as the algorithm output coordinates in units of each electrode. For example, two electrodes A and B are output according to the contact coordinates of each electrode respectively:
[0192]
[0193] By performing steps S4051-S4052 described above, the embodiment of the present disclosure optimizes the current coordinates of all contact points in the target positioning area, and can achieve high-precision automatic labeling of electrode contact points, as shown in FIG. 5, which realizes the labeling of electrode contact coordinates in three-dimensional space and outputs the electrode contact coordinates in a structured manner belonging to different electrodes. The derived electrode contact coordinates can be visualized in commonly used medical image analysis software, as shown in FIG. 6. Figure 11 Figure 12
[0194] Exemplarily, according to the experiment of five clinical data, the accurate recognition rate of the contact points of multiple SEEG electrodes reaches 98.2% by using the electrode contact labeling method of stereotactic electroencephalogram in the embodiment of the present disclosure. As shown in Table 1 below.
[0195] Table 1
[0196]
[0197] Using the labeling results of the related semi-automatic operation mode, the positioning accuracy of the contact point coordinates is poor, and cannot adapt to non-ideal conditions such as curved electrode trajectories. As shown in FIG. 7, compared with the related art, the electrode contact labeling method of stereotactic electroencephalogram in the embodiment of the present disclosure can adapt to curved electrodes, as shown in FIG. 8. Moreover, for electrodes that are difficult to distinguish on the image, the scheme has higher recognition accuracy than human experts, as shown in FIG. 9. As shown in FIG. 10, it is a simple schematic diagram of the execution process of the electrode contact labeling method of stereotactic electroencephalogram in the embodiment of the present disclosure. Figure 13 Figure 14 Figure 15 Figure 16
[0198] In the embodiment, a stereotactic electroencephalogram electrode contact labeling device is also provided, which is used to realize the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the device described in the following embodiments is preferably realized in software, hardware, or a combination of software and hardware is also possible and is conceived.
[0199] This embodiment provides an electrode contact calibration device for stereotactic electroencephalography, such as... Figure 17 As shown, it includes:
[0200] Network topology construction module 1701 is used to construct a three-dimensional point cloud network topology based on three-dimensional point cloud data of multiple SEEG electrodes in the patient's brain.
[0201] The 3D point cloud search module 1702 is used to use a breadth-first search algorithm to gradually search the 3D point cloud network topology map, obtain an initial electrode tree set that records the contact coordinate information of multiple SEEG electrodes, and filter out the target electrode tree set based on the initial electrode tree.
[0202] The point cloud coordinate prediction module 1703 is used to estimate the contact prediction coordinates of each SEEG electrode in the target electrode tree set if the number of electrode trees in the target electrode tree set is greater than or equal to a first preset number, using the main axis analysis algorithm.
[0203] The target area positioning module 1704 is used to determine the contact prediction coordinates based on each SEEG electrode, draw the contact envelope area of each SEEG electrode, and determine the target positioning area of each SEEG electrode from the contact envelope area of each SEEG electrode.
[0204] The optimal coordinate output module 1705 is used to optimize the current coordinates of all contacts in the target positioning area of each SEEG electrode and output the optimal coordinates of all contacts in the target positioning area.
[0205] In some optional embodiments, the electrode contact calibration device for stereotactic electroencephalography in this disclosure further includes:
[0206] The CT data acquisition module is used to acquire postoperative CT image data of multiple SEEG electrodes implanted in the patient's brain;
[0207] The 3D point cloud acquisition module is used to construct 3D point cloud data for multiple SEEG electrodes based on postoperative CT image data.
[0208] The 3D point cloud cleaning module is used to perform cleaning actions on 3D point cloud data in sequence according to coordinate filtering, point cloud clustering, and morphological filtering.
[0209] The cleaning result acquisition module is used to acquire three-dimensional point cloud data of multiple SEEG electrodes in the patient's brain after cleaning.
[0210] In some alternative embodiments, the electrode contact calibration device for stereoelectroencephalogram in the embodiments of the present disclosure further comprises: a data returning module configured to return the steps of sequentially performing cleaning actions on the three-dimensional point cloud data in the coordinate screening mode, the point cloud clustering mode, and the morphological filtering mode, if the number of electrode trees in the target electrode tree set is less than the first preset number.
[0211] In some alternative embodiments, the three-dimensional point cloud cleaning module comprises:
[0212] A point cloud screening submodule is configured to screen three-dimensional point cloud data greater than a preset coordinate threshold from the three-dimensional point cloud data of the plurality of SEEG electrodes constructed, and to generate a three-dimensional point cloud coordinate matrix;
[0213] A point cloud clustering submodule is configured to perform point cloud clustering on the three-dimensional point cloud coordinate matrix according to a preset radius and a preset density based on the three-dimensional point cloud coordinate matrix, and to generate a three-dimensional point cloud clustering result;
[0214] The point cloud clustering submodule is configured to filter the three-dimensional point cloud clustering result according to a morphological filtering mode, and to obtain the three-dimensional point cloud data of the plurality of SEEG electrodes of the patient after cleaning.
[0215] In some alternative embodiments, the three-dimensional point cloud searching module comprises:
[0216] A data searching submodule is configured to select an initial node from the three-dimensional point cloud network topology graph, and to use a breadth-first search algorithm to gradually search each node in the three-dimensional point cloud network topology graph from the initial node, and to obtain an initial electrode tree set recording contact coordinate information of the plurality of SEEG electrodes;
[0217] A data acquisition submodule is configured to acquire a maximum two-point distance in each electrode tree in the initial electrode tree set;
[0218] An electrode determination submodule is configured to, if the maximum two-point distance in each electrode tree in the initial electrode tree set is greater than a preset threshold, take the electrode tree as an electrode structure;
[0219] An electrode tree determination submodule is configured to count the electrode trees satisfying the electrode structure from the initial electrode tree set, and to take the electrode trees satisfying the electrode structure as a target electrode tree set.
[0220] In some alternative embodiments, the point cloud coordinate prediction module comprises:
[0221] A data analysis submodule is configured to, if the number of electrode trees in the target electrode tree set is greater than or equal to the first preset number, calculate a principal axis vector of each electrode tree in the target electrode tree set using a principal axis analysis algorithm;
[0222] The data calculating submodule is configured to calculate a main axis direction of each electrode tree in the target electrode tree set based on a main axis vector of each electrode tree in the target electrode tree set.
[0223] The data estimating submodule is configured to estimate a contact predicted coordinate of each SEEG electrode based on a contact radius of each SEEG electrode, a preset interval between electrodes, and the main axis direction of each electrode tree in the target electrode tree set.
[0224] In some optional embodiments, the target region positioning module comprises:
[0225] The envelope region drawing submodule is configured to draw a contact envelope region of each SEEG electrode according to the contact predicted coordinate of each SEEG electrode as a center and the contact radius of each SEEG electrode.
[0226] The electrode number obtaining submodule is configured to obtain an electrode number in the contact envelope region of each SEEG electrode.
[0227] The target region positioning submodule is configured to take the contact envelope region of each SEEG electrode as a target positioning region if the electrode number in the contact envelope region of each SEEG electrode is less than or equal to the second preset number.
[0228] In some optional embodiments, the optimal coordinate output module comprises:
[0229] The mean coordinate calculating submodule is configured to calculate a mean coordinate of all contacts in the target positioning region.
[0230] The current coordinate optimizing submodule is configured to take the mean coordinate as an optimized coordinate and optimize the current coordinate of all contacts in the target positioning region according to the optimized coordinate.
[0231] The optimal coordinate output submodule is configured to output the optimal coordinate of all contacts in the target positioning region after optimization.
[0232] Further function descriptions of the above-mentioned modules and units are the same as those of the corresponding embodiments, and will not be described here.
[0233] The stereotactic electroencephalogram electrode contact calibration device in the embodiment is in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit, Application Specific Integrated Circuit) circuit, a processor and a memory executing one or more software or fixed programs, and / or other devices that can provide the above functions.
[0234] The embodiment of the application further provides a computer device with the above-mentioned stereotactic electroencephalogram electrode contact calibration device.
[0235] Referring to Figure 18 , Figure 18 is a structural schematic diagram of a computer device provided by an optional embodiment of the present application, as Figure 18 shown, the computer device includes one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are communicatively connected through different buses, and can be installed on a common mainboard or in other manners as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device, such as a display device coupled to the interface. In some optional embodiments, multiple processors and / or buses can be used with multiple memories and multiple memory, if needed. Also, multiple computer devices can be connected, each providing part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 18 In the following description, the processor 10 is taken as an example.
[0236] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic device, a general array logic, or any combination thereof.
[0237] The memory 20 stores instructions executable by the at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0238] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory remotely arranged with respect to the processor 10, which can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0239] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid state disk; the memory 20 can also include a combination of the above kinds of memories.
[0240] The computer device also comprises a communication interface 30 for the computer device to communicate with other devices or communication networks.
[0241] The embodiments of the present application also provide a computer readable storage medium, the method according to the embodiments of the present application can be implemented in hardware, firmware, or be implemented as computer code recorded in a storage medium, or be implemented through network downloading and originally stored in a remote storage medium or a non-transitory machine readable storage medium and to be stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor or programmable or special purpose hardware. Wherein, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor or the hardware, the method shown in the above embodiments is implemented.
[0242] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A method for electrode contact calibration in stereotactic electroencephalography, characterized in that, The method includes: A three-dimensional point cloud network topology was constructed based on three-dimensional point cloud data of multiple SEEG electrodes in the patient's brain. Using a breadth-first search algorithm, the three-dimensional point cloud network topology is searched step by step to obtain an initial electrode tree set that records the contact coordinate information of the multiple SEEG electrodes, and a target electrode tree set is selected based on the initial electrode tree set. If the number of electrode trees in the target electrode tree set is greater than or equal to the first preset number, the contact prediction coordinates of each SEEG electrode in the target electrode tree set are estimated using the spindle analysis algorithm. Based on the predicted contact coordinates of each SEEG electrode, the contact envelope region of each SEEG electrode is plotted, and the target positioning region of each SEEG electrode is determined from the contact envelope region of each SEEG electrode. The current coordinates of all contacts in the target positioning area of each SEEG electrode are optimized, and the optimal coordinates of all contacts in the target positioning area are output. Using a breadth-first search algorithm, the 3D point cloud network topology is searched step by step to obtain an initial electrode tree set that records the contact coordinate information of the multiple SEEG electrodes. Based on this initial electrode tree set, a target electrode tree set is selected, including: An initial node is selected from the three-dimensional point cloud network topology graph, and a breadth-first search algorithm is used to search each node in the three-dimensional point cloud network topology graph starting from the initial node, thereby obtaining an initial electrode tree set that records the contact coordinate information of the multiple SEEG electrodes. Obtain the maximum two-point distance in each electrode tree of the initial electrode tree set; If the maximum distance between two points in each electrode tree in the initial electrode tree set is greater than a preset threshold, the electrode tree with the maximum distance between two points greater than the preset threshold is taken as the electrode structure. From the initial electrode tree set, count the electrode trees that satisfy the electrode structure, and use the electrode trees that satisfy the electrode structure as the target electrode tree set; If the number of electrode trees in the target electrode tree set is greater than or equal to a first preset number, the contact prediction coordinates of each SEEG electrode in the target electrode tree set are estimated using the principal axis analysis algorithm, including: If the number of electrode trees in the target electrode tree set is greater than or equal to the first preset number, the principal axis vector of each electrode tree in the target electrode tree set is calculated using the principal axis analysis algorithm. Based on the principal axis vector of each electrode tree in the target electrode tree set, calculate the principal axis direction of each electrode tree in the target electrode tree set; Based on the contact radius of each SEEG electrode, the preset spacing between electrodes, and the main axis direction of each electrode tree in the target electrode tree set, the predicted contact coordinates of each SEEG electrode are estimated. Based on the predicted contact coordinates of each SEEG electrode, a contact envelope region of each SEEG electrode is plotted, and a target positioning region of each SEEG electrode is determined from the contact envelope region of each SEEG electrode, including: Centered on the predicted contact coordinates of each SEEG electrode, the contact envelope region of each SEEG electrode is drawn according to the contact radius of each SEEG electrode. Obtain the number of electrodes within the contact envelope area of each SEEG electrode; If the number of electrodes in the contact envelope area of each SEEG electrode is less than or equal to the second preset number, the contact envelope area of the SEEG electrode is taken as the target positioning area. The current coordinates of all contacts within the contact positioning area of each SEEG electrode are optimized, and the optimal coordinates of all contacts within the target positioning area are output, including: Calculate the mean coordinates of all touch points within the target positioning area; The mean coordinates are used as optimized coordinates, and the current coordinates of all touch points within the target positioning area are optimized according to the optimized coordinates; Output the optimized coordinates of all touch points within the target positioning area.
2. The method according to claim 1, characterized in that, Before the step of constructing a 3D point cloud network topology based on 3D point cloud data from multiple SEEG electrodes in the patient's brain, the following steps are also included: Obtain postoperative CT imaging data of multiple SEEG electrodes implanted in the patient's brain; Based on the postoperative CT image data, three-dimensional point cloud data of the multiple SEEG electrodes were constructed; The 3D point cloud data is cleaned sequentially according to coordinate filtering, point cloud clustering, and morphological filtering methods. Three-dimensional point cloud data of multiple SEEG electrodes in the patient's brain after cleaning were obtained.
3. The method according to claim 2, characterized in that, If the number of electrode trees in the target electrode tree set is less than the first preset number, return to the step of performing cleaning actions on the three-dimensional point cloud data in sequence according to the coordinate filtering method, point cloud clustering method, and morphological filtering method.
4. The method according to claim 2 or 3, characterized in that, The cleaning process for the 3D point cloud data is performed sequentially according to coordinate filtering, point cloud clustering, and morphological filtering methods, including: From the constructed three-dimensional point cloud data of the multiple SEEG electrodes, three-dimensional point cloud data with values greater than a preset coordinate threshold are selected, and then a three-dimensional point cloud coordinate matrix is generated. Based on the three-dimensional point cloud coordinate matrix, point cloud clustering is performed on the three-dimensional point cloud coordinate matrix according to a preset radius and a preset density, thereby generating a three-dimensional point cloud clustering result; The three-dimensional point cloud clustering results are filtered according to morphological filtering methods to obtain the cleaned three-dimensional point cloud data of multiple SEEG electrodes in the patient's brain.
5. An electrode contact calibration device for stereotactic electroencephalography, characterized in that, The device includes: The network topology construction module is used to construct a three-dimensional point cloud network topology based on three-dimensional point cloud data from multiple SEEG electrodes in the patient's brain. The three-dimensional point cloud search module is used to use a breadth-first search algorithm to gradually search the three-dimensional point cloud network topology map, obtain an initial electrode tree set that records the contact coordinate information of the multiple SEEG electrodes, and filter out the target electrode tree set based on the initial electrode tree. The point cloud coordinate prediction module is used to estimate the contact prediction coordinates of each SEEG electrode in the target electrode tree set by using the main axis analysis algorithm if the number of electrode trees in the target electrode tree set is greater than or equal to a first preset number. The target area positioning module is used to determine the predicted contact coordinates based on each SEEG electrode, draw the contact envelope area of each SEEG electrode, and determine the target positioning area of each SEEG electrode from the contact envelope area of each SEEG electrode. The optimal coordinate output module is used to optimize the current coordinates of all contacts in the target positioning area of each SEEG electrode and output the optimal coordinates of all contacts in the target positioning area. The 3D point cloud search module includes: The data search submodule is used to select an initial node from the 3D point cloud network topology graph and use a breadth-first search algorithm to search each node in the 3D point cloud network topology graph starting from the initial node, thereby obtaining an initial electrode tree set that records the contact coordinate information of multiple SEEG electrodes. The data acquisition submodule is used to obtain the maximum distance between two points in each electrode tree in the initial electrode tree set. The electrode determination submodule is used to determine the electrode structure if the maximum distance between two points in each electrode tree in the initial electrode tree set is greater than a preset threshold. The electrode tree determination submodule is used to count the electrode trees that satisfy the electrode structure from the initial electrode tree set, and to use the electrode trees that satisfy the electrode structure as the target electrode tree set. The point cloud coordinate prediction module includes: The data analysis submodule is used to calculate the principal axis vector of each electrode tree in the target electrode tree set if the number of electrode trees in the target electrode tree set is greater than or equal to a first preset number. The data calculation submodule is used to calculate the main axis direction of each electrode tree in the target electrode tree set based on the main axis vector of each electrode tree in the target electrode tree set; The data estimation submodule is used to estimate the predicted coordinates of the contact of each SEEG electrode based on the contact radius of each SEEG electrode, the preset spacing between electrodes, and the main axis direction of each electrode tree in the target electrode tree set. The target area positioning module includes: The envelope region drawing submodule is used to draw the contact envelope region of each SEEG electrode, centered on the predicted contact coordinates of each SEEG electrode and according to the contact radius of each SEEG electrode. The electrode number acquisition submodule is used to acquire the number of electrodes within the contact envelope area of each SEEG electrode. The target area positioning submodule is used to take the contact envelope area of the SEEG electrode as the target positioning area if the number of electrodes in the contact envelope area of each SEEG electrode is less than or equal to a second preset number. The optimal coordinate output module includes: The mean coordinate calculation submodule is used to calculate the mean coordinates of all touch points within the target positioning area; The current coordinate optimization submodule is used to use the mean coordinates as the optimization coordinates and optimize the current coordinates of all touch points within the target positioning area according to the optimization coordinates; The optimal coordinate output submodule is used to output the optimized coordinates of all touch points within the target positioning area.
6. A computer device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform the electrode contact calibration method for stereotactic electroencephalography as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the electrode contact calibration method for stereotactic electroencephalography according to any one of claims 1 to 4.
Citation Information
Patent Citations
Three-dimensional electroencephalogram electrode positioning method
CN112465900A
Electroencephalogram-based epileptic region positioning device and method, electronic equipment and storage medium
CN114869300A