Epilepsy lesion positioning method and system based on magnetoencephalogram and medium
By employing a magnetoencephalography (MEG)-based method for locating epileptogenic foci, and utilizing structural image preprocessing, registration, and magnetic dipole algorithms, the location of epileptogenic foci is automatically determined. This method addresses the accuracy and cost issues of traditional methods, improves the diagnostic efficiency of physicians and the flexibility of report generation, and produces highly efficient diagnostic reports.
Patent Information
- Application Number
- CN202511500667.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-10-21
AI Technical Summary
Traditional methods for locating epileptogenic foci based on electroencephalography (EEG) and stereotactic EEG suffer from insufficient accuracy and high cost, and require a high level of physician experience, leading to significant differences in diagnostic results and a high error rate.
A magnetoencephalography (MEG)-based method for locating epileptogenic foci is employed. This method involves preprocessing the patient's structural images and registering them with MEG to divide the cerebral cortex into grids. The magnetic dipole algorithm is used to calculate the source coordinates and orientation of spike time points, and a clustering algorithm is combined to generate a clinical report, thereby achieving automated and rapid localization of epileptogenic foci.
It shortens the time for epileptogenic focus localization, reduces diagnostic differences caused by variations in physician experience, improves diagnostic efficiency and accuracy, supports physicians in flexibly adjusting each step of the result, and generates high-quality clinical reports.
Smart Images

Figure CN120959749A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of artificial intelligence, in particular to a magnetoencephalography (MEG)-based epileptogenic focus positioning method and system and a medium. BACKGROUND
[0002] Currently, for drug-refractory epilepsy, there are mainly two types of solutions, namely precision medicine and neural regulation. Precision medicine includes targeted treatment of some genetic epilepsy patients through gene therapy or stereotactic electroencephalogram (EEG)-guided radiofrequency thermocoagulation, which is superior to traditional resection and can reduce cognitive impairment. Vagus nerve stimulation and deep brain stimulation in neural regulation can reduce the frequency of seizures to a certain extent. The above treatment methods all require knowing the position of the epileptogenic focus of the patient in order to carry out effective treatment. The traditional solution of positioning the position of the epileptogenic focus of the patient based on EEG will seriously attenuate and blur the EEG signal due to the high electrical resistance of the skull, and the positioning position is not accurate. Stereotactic EEG is a minimally invasive treatment method that requires drilling holes in the skull of the patient, and the treatment cost is high, which is not conducive to popularization. With the development of MEG technology, a technical solution for determining the position of the epileptogenic focus based on MEG has emerged, because MEG has higher spatial resolution than EEG, and the positioning is more accurate.
[0003] Currently, when doctors use MEG and magnetic resonance imaging (MRI) in combination with a magnetic dipole algorithm to determine the abnormal wave time point sequence and the epileptogenic focus of a patient, they need to carefully review the MEG of the patient, which usually takes 2-3 hours, consuming a lot of time and effort of the doctors. In addition, the doctors need to have rich experience to determine the position of the epileptogenic focus, which requires high quality of the doctors and also limits the effective treatment of epilepsy. SUMMARY
[0004] Based on the technical problems existing in the background technology, the application provides a MEG-based epileptogenic focus positioning method, system and medium, which can quickly determine the position of the epileptogenic focus.
[0005] The MEG-based epileptogenic focus positioning method provided by the application comprises the following steps: After preprocessing the structural image of the patient, the structural image is registered with the MEG of the patient, the cerebral cortex region is divided into grids based on the preprocessed structural image and the registration result, and a forward model of the patient is obtained; The MEG is preprocessed and spike wave detection is performed to obtain a spike wave time point sequence; Based on the forward model and the spike wave time point sequence, a magnetic dipole algorithm is used to calculate the source coordinates and source direction of the spike wave time point, based on which the spike wave time point sequence is classified to obtain a clustering result; calculating the source coordinates and source directions of each class center in the clustering result using a magnetic dipole algorithm; generating a clinical report of the patient, including an IED distribution map, a waveform diagram of a typical spike, a full brain region channel layout diagram, a 3D topology diagram, a source localization result diagram, and an interictal dipole overview diagram.
[0006] Further, the structural image of the patient is registered with the magnetoencephalogram after preprocessing, specifically: performing preprocessing operations on the structural image of the patient, including coordinate system conversion, noise reduction, artifact removal, skull stripping, and cerebral cortex reconstruction; registering the fiducial points of the magnetoencephalogram with the fiducial points of the preprocessed structural image, so as to convert the coordinate system of the magnetoencephalogram fiducial points to the coordinate system of the structural image fiducial points; mapping the coordinates of the magnetoencephalogram scalp points to the processed structural image scalp based on a nearest point search matching algorithm, so as to obtain a registration matrix for registering the structural image and the magnetoencephalogram. During the registration process, the weights of the magnetoencephalogram scalp points and the structural image scalp in the registration process can be set, so as to adjust the registration fit.
[0007] Further, the cerebral cortex region is divided into a grid based on the preprocessed structural image and the registration result, to obtain a forward model of the patient, specifically: dividing the cerebral cortex region into a surface grid after preprocessing the structural image of the patient, to obtain the spatial coordinates of the grid vertices; converting the spatial coordinates of the grid vertices and the positions of the magnetoencephalogram scalp points to the same coordinate system based on the registration matrix, so as to obtain the forward model.
[0008] Further, the magnetoencephalogram is preprocessed, specifically: performing band-pass filtering noise reduction, notch filtering, removing power frequency noise, removing electrocardiogram artifacts, resampling dimension reduction, and data normalization processing on the magnetoencephalogram in sequence.
[0009] Further, the source coordinates and source directions of the spike time point are calculated using a magnetic dipole algorithm based on the forward model and the spike time point sequence, specifically: taking the magnetoencephalogram data in the time neighborhood of the spike time point, calculating the brain magnetic channels involved in source localization and removing bad channels; taking the data on the brain magnetic channels after removing bad channels in the time neighborhood of the spike time point, and using a magnetic dipole algorithm to calculate the source coordinates and source directions of the spike time point.
[0010] Further, a clustering algorithm is used to classify all the spike time points to obtain a clustering result, and the parameters set by the clustering algorithm include: The gof threshold value called by the clustering algorithm, the time neighborhood range for averaging the waveform amplitude of the spike point, the influence weight of the magnetometer of the spike point on the clustering effect, the influence weight of the gradiometer of the spike point on the clustering effect, the influence weight of the magnetometer of the spike point in the set time neighborhood on the clustering effect, the influence weight of the spherical source dipole position of the spike point on the clustering effect, the influence weight of the spherical source dipole direction of the spike point on the clustering effect, whether to normalize the distance matrix of each feature, the set number threshold value of the cluster generated by the clustering algorithm, and the class number in the clustering result less than the set cluster number will be completely removed.
[0011] Further, the source coordinates and source direction of the class center in each class in the clustering result are calculated by using the magnetic dipole algorithm, specifically: The magnetoencephalogram data of the time neighborhood of each spike point is added, and the average value of the number of spike points is taken by traversing all the spike points in each class; The source coordinates and source direction of the class center are calculated by applying the average value data to the magnetic dipole algorithm.
[0012] Further, the clinical report of the patient is generated, including an IED distribution map, a waveform graph of a typical spike, a whole brain region channel layout graph, a 3D topology graph, a source positioning result graph, and an interictal dipole overview graph, specifically: The IED distribution map is a distribution map drawn according to the brain region and time of the spike point sequence; The waveform graph of a typical spike, the whole brain region channel layout graph, the 3D topology graph, and the source positioning result graph are graphs drawn according to the most typical time point in the waveform of the spike point sequence, wherein the most typical time point is the time point with the highest confidence obtained in the spike detection algorithm; The interictal dipole overview graph refers to selecting a most representative cluster of spike points from the clustering result, and cutting a plurality of pictures from the coronal plane, the sagittal plane, and the horizontal plane, respectively, to indicate the location of the epileptogenic focus of the patient, wherein the most representative cluster of spike points represents the set with the most time points in the clustering algorithm classification.
[0013] A computer system includes a memory, a processor, and a computer program stored on the memory, and the processor executes the computer program to implement the method as described above.
[0014] A computer readable storage medium has a plurality of classification programs stored thereon, and the plurality of classification programs are used to be called by a processor and to execute the method as described above.
[0015] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, the aforementioned program can be stored in a computer readable storage medium, and the program executes the steps of the above-mentioned method embodiments when executed; and the aforementioned storage medium includes ROM, RAM, magnetic disc or optical disc and various storage medium capable of storing program codes.
[0016] The epilepsy epileptogenic focus positioning method, system and medium based on magnetoencephalogram provided by the application have the advantages that the process of manually determining the position of the epilepsy epileptogenic focus is automated based on MEG-MRI images, the time required for determining the position of the epilepsy epileptogenic focus is reduced, and the problem of large differences in epilepsy diagnosis and easy errors caused by differences in the levels of different doctors is solved; in addition, the positioning method can complete all steps in one key and directly generate a final clinical report, or can execute each step separately, support doctors to adjust the results of each step, and finally generate a clinical report, and has strong flexibility. Compared with traditional software, the method also effectively improves the work efficiency and diagnosis quality of doctors, and can solve the problem of large differences in diagnosis results and easy errors caused by uneven diagnosis levels of doctors in various epilepsy centers. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 FIG. 1 is a flowchart of the epilepsy epileptogenic focus positioning method; Figure 2 FIG. 2 is a registration result diagram of the registration module, A, B and C respectively provide registration result diagrams in three directions of coronal plane, sagittal plane and horizontal plane, and D provides a 3D effect registration result display, which fully assists doctors to judge whether the registration between the magnetoencephalogram and the structural image is accurate; Figure 3 FIG. 3 is an IED distribution diagram; Figure 4 FIG. 4 is a trace positioning result diagram, row A represents coronal plane trace positioning results, row B represents sagittal plane trace positioning results, and row C represents horizontal plane trace positioning results; Figure 5 FIG. 5 is a flowchart of the epilepsy epileptogenic focus positioning system; Figure 6 FIG. 6 is a structural diagram of the electronic terminal. DETAILED DESCRIPTION
[0018] Hereinafter, the technical solutions of the application will be described in detail through specific embodiments. In the following description, many specific details are set forth in order to provide a thorough understanding of the application. However, the application can be implemented in many different ways from those described herein, and those skilled in the art can make similar improvements without departing from the scope of the application, so the application is not limited to the specific implementation disclosed below.
[0019] Before further elaborating on the present invention, the nouns and terms involved in the present invention will be described in detail below. Magnetoencephalography (MEG): MEG is a technique that detects the weak magnetic fields generated by the electrical activity of neurons. MEG (Metal-Oriented Electroencephalography) is a non-invasive neuroimaging technique used to study brain function (on the order of Tesla). Its core principle is based on the electromagnetic induction law of bioelectric currents: when neurons fire synchronously, the magnetic field generated by the intracellular current can be captured by a superconducting quantum interference device (SQUID) array. MEG has millisecond-level temporal resolution, directly reflecting the dynamic process of neural electrical activity, with spatial accuracy reaching 3-5 millimeters, and is particularly sensitive to tangential current sources (such as the sulci cortex). Compared to EEG, which is easily affected by the ambiguity of electrical signals due to the skull, MEG is more sensitive to abnormal discharges in deep epilepsy, and in some cases, more accurately locates the epileptogenic focus.
[0020] Magnetic Resonance Imaging (MRI): MRI is a non-invasive imaging technique based on the spin properties of atomic nuclei. By applying a strong magnetic field (1.5-7 Tesla) and radio frequency pulses, hydrogen protons in the human body are excited (…). 1 H) Magnetic resonance imaging (MRI) is performed, and the electromagnetic signals released during relaxation are then detected. Anatomical images are reconstructed through spatial coding. MRI has the advantages of multi-parameter and multi-contrast capabilities, and can clearly distinguish soft tissues, making it the gold standard imaging modality for preoperative assessment of epilepsy. MRI is divided into T1-weighted images and T2-weighted images. T1-weighted images display anatomical structures, and the registration described in step one of the examples uses T1-weighted images.
[0021] The nearest-point search matching algorithm is a matching method based on spatial distance metrics. It calculates the distances between a target point and multiple candidate points, selecting the closest one or more points as the optimal matching result. This algorithm is efficient and stable in handling spatial registration, point cloud fusion, or point mapping in bioelectromagnetic maps, and can quickly determine correspondences in complex structures. In this application, it can be used to achieve spatial matching between sensors or feature points in MEG and MRI data, thereby improving the accuracy and automation of multimodal image fusion.
[0022] Watershed algorithm: Watershed algorithm is an image segmentation method based on the idea of topological deformation, which is often used to divide the boundaries of different regions in the image according to the gray gradient. This algorithm regards the image as a topographic map, and the gray value represents the height. By simulating the process of water flowing from high to low, the dividing line is constructed at the confluence of different "basins", and the structure edge is accurately extracted. In this application, the watershed algorithm can be used for the segmentation of brain regions or abnormal tissue regions in MRI images, improving the clarity of the lesion boundary and the accuracy of the segmentation result, and providing a reliable structural basis for subsequent epileptogenic focus localization and three-dimensional reconstruction.
[0023] Magnetic dipole algorithm: Magnetic dipole algorithm is a classical model method for source localization of magnetoencephalography (MEG) data. Its principle is to assume that neural activity at a certain time point can be equivalent to a magnetic dipole, and by fitting the observed magnetic field distribution, the spatial position and direction of the dipole are inversely deduced. This algorithm has the advantages of high computational efficiency and good positioning accuracy, and is widely used in the analysis of epileptogenic focus of epilepsy and other neurological diseases. In this embodiment, the magnetic dipole algorithm is used to estimate the position of the neural activity source from the MEG data, to provide an initial candidate region for the spatial localization of the epileptogenic focus, and to improve the accuracy and reliability of the overall positioning system.
[0024] As shown in Figures 1 to 6 The epileptogenic focus localization method based on magnetoencephalogram provided by the present application includes: Step one, after preprocessing the structural image of the patient, register it with the magnetoencephalogram of the patient, divide the cerebral cortex region based on the preprocessed structural image and the registration result, and obtain the forward model of the patient; Step two, pre-process and detect the spiky wave of the magnetoencephalogram, and obtain the sequence of spiky wave time points; Based on the forward model and the sequence of spiky wave time points, use the magnetic dipole algorithm to calculate the source coordinates and source direction of the spiky wave time points, and classify the sequence of spiky wave time points to obtain the clustering result; Step three, use the magnetic dipole algorithm to calculate the source coordinates and source direction of the class center of each class in the clustering result; Step four, generate the clinical report of the patient, including IED distribution map, waveform diagram of typical spiky wave, whole brain region channel layout diagram, 3D topological diagram, source localization result diagram and interictal dipole overview diagram.
[0025] As shown in Figure 5As shown, the embodiment is implemented by the system 100, specifically: the structural image of the patient is preprocessed by the structural image preprocessing module 110; the head coordinate system of the magnetoencephalogram is registered with the MRI coordinate system of the preprocessed structural image by the registration module 120; the forward model required by the source localization algorithm is calculated by the forward task module 130; the spike time point in the magnetoencephalogram is automatically detected by the spike detection module 140 to obtain the intracranial spike time point sequence of the patient; the spike time point is located by the spike time point source localization module 150 to obtain the epileptogenic focus position (i.e., the source coordinates and source direction of the spike time point); the spike time point sequence detected by the spike detection module 140 is classified by the clustering module 160, which can eliminate some false positive points; the average value of the classification result of the clustering is source localized by the clustering result source localization module 170, and the localization result can better represent the epileptogenic focus position; and the clinical report is automatically generated by the report generation module 180 to provide a basis for the clinician to determine the treatment method.
[0026] The embodiment uses an artificial intelligence algorithm to automatically analyze the magnetoencephalogram, shortens the analysis time of a 60-minute magnetoencephalogram to less than 2 minutes, and at the same time, an automatic registration technology based on the reference points of MEG and MRI is realized in the process, which can replace the manual registration of doctors; the process realizes a source localization technology based on the magnetic dipole algorithm, which can quickly determine the position of the epileptogenic focus. The process shortens the time-consuming 2-3 hours of the original epileptogenic focus localization work to less than 10 minutes, and at the same time, it performs well on the data sets of multiple hospitals and can accurately predict the position of the epileptogenic focus The embodiment automates the process of manually determining the position of the epileptogenic focus based on MEG-MRI images, reduces the time required to determine the position of the epileptogenic focus, and solves the problem of large differences in epilepsy diagnosis and easy errors caused by differences in the levels of different doctors.
[0027] In the embodiment, the structural image preprocessing module 110, the registration module 120, the forward task module 130, the spike detection module 140, and the clustering module 160 are all packaged into Docker images for application program calls, the Docker images and the application program communicate through the message queue Rabbitmq (message queue middleware), the consumer in the application program processes the results of the Docker image algorithm execution and saves them; in addition, the Docker image shares the physical machine disk by mounting the server data directory and the application program to realize data sharing.
[0028] The embodiment subdivides the structural image preprocessing, registration and forward task into three modules (a structural image preprocessing module 110, a registration module 120 and a forward task module 130), which are more flexible in use. The structural image preprocessing is added with noise reduction processing, which can adapt to structural image data collected by different devices of various hospitals. The forward task is relatively time-consuming, and the forward model calculation is performed after the registration result is adjusted and verified to be accurate, so that an accurate forward model can be obtained more easily, thereby saving a lot of time for the user.
[0029] In addition, the embodiment separates the forward task module 130 and the spike time point source localization module 150, so that the forward task does not need to be performed every time the source localization is performed. In addition, the forward task module 130 and the spike detection module 140 can be performed in parallel, thereby saving the execution time. The single source localization can be completed within 100 milliseconds. The spike detection module 140 can set whether to perform the bad segment processing, whether the spike returns multiple time point parameters, adapt to various magnetoencephalogram data and meet different needs of the user. When the spike time point is subjected to the source localization, the associated channel is automatically selected for the source localization, and the obtained localization result is more accurate.
[0030] I. The structural image preprocessing module 110; The application encapsulates parameters to an environment variable, and then calls the structural image preprocessing Docker image. The structural image preprocessing Docker image performs the coordinate direction correction on the structural image of a patient, so that the structural image coordinate systems of patients in different hospitals are unified. The noise and artifacts of the coordinate-unified structural image are corrected. The skull of the denoised structural image is stripped, the white matter, the gray matter and the cerebrospinal fluid are separated, and the cerebral cortex is reconstructed.
[0031] It should be noted that the FreeSurfer toolbox can be used to preprocess the structural image in the embodiment. The FreeSurfer is a powerful MRI data automatic processing and quantitative analysis software. It can generate the gray matter, white matter boundary surface through voxel segmentation, construct a three-dimensional cortical model (including pial / white surface), support topology correction and eliminate holes or self-intersection caused by segmentation errors.
[0032] II. The registration module 120; The application encapsulates parameters to an environment variable, and then calls the registration Docker image to calculate the registration matrix between the magnetoencephalogram scalp points and the structural image based on the preprocessed structural image (i.e., the normalized structural image) obtained by the structural image preprocessing module 110, automatically performs the registration and obtains the registration result as shown in FIG. 11. Figure 2 Figure 2 A, B, C three figures in the middle of the three directions of the registration results of the coronal, sagittal and horizontal plane, D provides the registration results of the 3D effect display, full- range of auxiliary doctors to judge whether the registration between the magnetoencephalogram and the structure image is accurate; detect whether the structure image is tilted, automatically interpolate and rotate the tilted structure image and save.
[0033] Specifically, in this embodiment, the system first registers the reference points of the magnetoencephalogram and the reference points of the preprocessed structure image, and then converts the coordinate system of the magnetoencephalogram reference point to the coordinate system of the structure image reference point. Based on the nearest point search matching algorithm, the coordinates of the scalp points of the magnetoencephalogram are mapped to the processed structure image scalp to realize the registration of the structure image and the magnetoencephalogram, and obtain the registration matrix. In addition, during the registration process, the weights of the magnetoencephalogram scalp points and the structure image scalp in the registration process can be set, so that the fitting degree of certain parts is higher.
[0034] III. Forward task module 130; The forward task module 130 is connected with the registration module 120, and the application encapsulates parameters to the environment variable, and calls the forward task Docker image to obtain the spatial coordinates of the grid vertices of the brain cortex region division surface grid obtained by the structure image preprocessing module 110. Based on the registration matrix obtained by the registration module 12, the spatial coordinates of the grid vertices and the positions of the scalp points of the magnetoencephalogram are converted to the same coordinate system.
[0035] It should be noted that in this embodiment, when the application calls the forward task Docker image, the environment variable of the brain cortex region division surface grid density can be set, and after balancing the computing power and efficiency, the appropriate density is set to achieve the desired effect.
[0036] IV. Spiking detection module 140; The application encapsulates environment variables, and the application calls the spiking detection Docker image to preprocess the magnetoencephalogram of the patient and perform spiking detection on the magnetoencephalogram file to obtain a sequence of spiking time points.
[0037] It should be noted that in this embodiment, the preprocessing of the magnetoencephalogram includes: band-pass filter noise reduction (3~40Hz), notch filter (50Hz), removal of power frequency noise, removal of electrocardiogram artifacts, resampling dimension reduction and data normalization. In this embodiment, the spiking detection Docker image supports setting whether to perform bad channel processing to solve the problem of a large number of bad channels in some magnetoencephalogram files. In addition, the spiking detection Docker image supports setting whether to return multiple time points for each spiking to meet different scene requirements.
[0038] V. Spiking time point tracing and positioning module 150; The application program uses the magnetic dipole algorithm to calculate the source coordinates and source direction of each spike point of time based on the forward model of the forward task module 130 and the spike point of time sequence of the spike detection module 140, and saves the source coordinates and source direction of each spike point of time as the epileptogenic focus position.
[0039] It should be noted that when the application program calculates the source coordinates and source direction of a spike point of time in this embodiment, the magnetoencephalogram data in the time neighborhood of the spike point of time is first taken, the brain magnetic channels participating in the source localization are calculated and the bad channels are removed, the data on the brain magnetic channels in the time neighborhood of the spike point of time after removing the bad channels is taken, and the source coordinates and source direction of the spike point of time are calculated using the magnetic dipole algorithm.
[0040] Six, the clustering module 160; The clustering module 160 is connected with the spike point of time source localization module 150, the application program encapsulates the environment variable, and then calls the clustering Docker image; the clustering Docker image combines the spike point of time sequence of the spike detection module 140 and the magnetoencephalographic source result of the spike point of time source localization module 150 to obtain the clustering result of the spike point of time sequence.
[0041] It should be noted that when the application program calculates the source coordinates and source direction of a spike point of time in this embodiment, the Docker image can set multiple parameters, including: the gof threshold value called by the clustering algorithm, the time neighborhood range for averaging the spike point of time waveform amplitude, the influence weight of the magnetometer of the spike point of time on the clustering effect, the influence weight of the gradiometer of the spike point of time on the clustering effect, the influence weight of the magnetometer of the spike point of time in the set time neighborhood on the clustering effect, the influence weight of the spherical source dipole position of the spike point of time on the clustering effect, the influence weight of the spherical source dipole direction of the spike point of time on the clustering effect, whether to normalize the distance matrix of each feature, the set number threshold value of the cluster generated by the clustering algorithm, and the class number in the clustering result is less than the set cluster number and will be completely removed. By adjusting the above parameters, the clustering result meeting the requirements can be obtained.
[0042] The clustering module 160 in this embodiment not only supports the classification of the spike points of time detected by the algorithm, but also supports the classification of the manually labeled points of time and the externally imported points of time, which is more flexible. In addition, different source localization algorithms can be selected for classification during clustering to obtain different classifications, different class center source coordinates and source directions, mutual reference, and help users obtain more representative epileptogenic focus source coordinates and source directions.
[0043] Seven, the clustering result source localization module 170; The clustering result tracing and positioning module 170 is connected with the clustering module 160, and the application program uses the forward model and the magnetic dipole algorithm to respectively calculate the source coordinates and the source direction of the class center of each cluster classification of the clustering module 160.
[0044] It should be noted that in the present embodiment, the application program calculates the source coordinates and the source direction of the class center of each cluster of the clustering result, which needs to traverse all the spike points in each classification first, add the magnetoencephalogram data of the time neighborhood of each spike point, and then take the average value of the number of spike points. The average value data is applied to the magnetic dipole algorithm to calculate the source coordinates and the source direction of the class center.
[0045] Eight, the report generation module 180; The report generation module 180 is connected with the clustering result tracing and positioning module 170, and is used to generate the final clinical report.
[0046] The clinical report includes an IED distribution map, a waveform graph of a typical spike, a whole brain region channel layout map, a 3D topological map, a tracing and positioning result map, and an interictal dipole overview map. The IED distribution map is a distribution map drawn according to the brain region and time of the spike point sequence, which can directly reflect the brain region where the spike point frequently appears, such as Figure 3 As shown in the figure, the English abbreviations of the brain regions in the figure correspond to the Chinese names of the brain regions respectively: RF (right frontal lobe), LF (left frontal lobe), RO (right occipital lobe), LO (left occipital lobe), RP (right parietal lobe), LP (left parietal lobe), RT (right temporal lobe), and LT (left temporal lobe). The waveform graph of a typical spike, the whole brain region channel layout map, and the 3D topological map are drawn according to the most typical time point in the spike point sequence, which has a strong guiding role in determining the position of the epileptogenic focus. The most typical time point is the time point with the highest confidence in the spike detection algorithm, and the most representative cluster of spike points represents the set with the most time points in the clustering algorithm classification. The interictal dipole overview map refers to selecting a most representative cluster of spike points from the clustering result, and cutting a plurality of pictures from the coronal plane, the sagittal plane, and the horizontal plane respectively, so as to indicate the position of the epileptogenic focus of the patient.
[0047] In the report generation module 180, Figure 4As shown, the system can automatically generate a tracing result graph containing four slices of each of the three sections of the patient's coronal plane, sagittal plane and horizontal plane, where row A represents the coronal plane tracing result, row B represents the sagittal plane tracing result, and row C represents the horizontal plane tracing result, clearly showing the position and direction distribution of the interictal dipole tracing. The user can flexibly adjust the number, position and number of dipole displays of each section slice layer, and update the report content. In addition, the report generation module 180 also supports user manual modification of the typical spike time point, and corresponding update of its corresponding waveform graph, whole brain channel layout graph, 3D topology graph and source positioning result graph. The user can also edit the report text part, and save or export the final modified report. The design, on the basis of efficient automatic generation, significantly enhances the user's autonomous control ability in the report generation process, and balances the automation efficiency and operation flexibility.
[0048] It should be understood that the embodiment pre-processes the structural image of the patient to register the magnetoencephalogram and the structural image; then divides the grid points of the cerebral cortex according to the pre-processed structural image in the forward module, and converts the grid point vertex coordinates using the registration matrix; pre-processes the magnetoencephalogram file, and uses the trained model to infer the spike time point sequence of the magnetoencephalogram file; uses the magnetic dipole algorithm to perform source positioning on the spike time point to obtain the source coordinates and source direction of the spike time point; clusters the spike time points according to the positioning results to obtain different cluster classifications; uses the magnetic dipole algorithm to perform source positioning on the cluster classification results to obtain the source coordinates and source direction of the cluster classification center; and generates a clinical report of the patient according to the above obtained results. The system can provide an efficient method for positioning the epileptogenic zone of epilepsy, and solve the problem of large differences in diagnosis results and easy errors caused by uneven doctor levels in various epilepsy centers.
[0049] To achieve the above object and other related objects, the present application provides a computer system, comprising a memory, a processor and a computer program stored in the memory, characterized in that the processor executes the computer program to implement the method.
[0050] To achieve the above object and other related objects, the present application provides a computer system, comprising a memory, a processor and a computer program stored in the memory, characterized in that the processor executes the computer program to implement the method. Figure 6 As shown, the present application provides an electronic terminal, comprising: a memory, a graphics card, a processor, the memory is used for storing a computer program; the graphics card is used for accelerating data operation and algorithm inference; the processor is used for executing the computer program stored in the memory, realizing the epilepsy epileptogenic zone positioning system method based on magnetoencephalogram.
[0051] The memory can be a non-volatile storage device, such as a solid state disk (SSD), a flash memory, a hard disk drive (HDD), or other forms of computer readable storage medium. The memory is used to store an operating system, a basic driver, a third-party library file, and computer program instructions for implementing the technical solutions of the present application. The above computer program can include a structure preprocessing module, a registration module, a spike detection module, a spike time point tracing and positioning module, etc.
[0052] The graphics card (also known as a graphics processing unit, GPU) can be an integrated graphics card or a separate graphics card, and is preferably a high-performance GPU supporting general-purpose computing, such as a GPU supporting CUDA, OpenCL, etc. parallel computing framework. The graphics card is used for spike detection inference, spike time point tracing and positioning calculation, etc.
[0053] The processor (Processor) can be a central processing unit (CPU), which can be a multi-core structure, used to control and schedule the operation flow of the entire electronic terminal. The processor is used to load and execute the computer program stored in the memory, coordinate the data transmission and logical judgment between modules, and complete the processing of input image data and the positioning analysis of epileptogenic focus location in cooperation with the graphics card.
[0054] To achieve the above object and other related objects, the embodiment provides a computer readable storage medium, wherein a plurality of classification programs are stored on the computer readable storage medium, and the plurality of classification programs are used to be called and executed by a processor to perform the method.
[0055] The epilepsy epileptogenic focus positioning method provided by the embodiment can complete all steps in one key and directly generate a final clinical report, or can execute each step individually, support doctors to adjust the result of each step, and finally generate a clinical report, which has strong flexibility. Compared with traditional software, the method can effectively improve the work efficiency and diagnosis quality of doctors, and can solve the problem that the diagnosis level of doctors in various epilepsy centers is uneven, resulting in large differences in diagnosis results and easy errors.
[0056] The above description is only a preferred embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can make equivalent replacements or changes to the technical solutions and inventive concepts of the present application within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for locating epileptogenic zone of epilepsy based on magnetoencephalography, comprising: registering a structural image of a patient with a magnetoencephalography of the patient after preprocessing the structural image, dividing a cerebral cortex region into a grid based on the preprocessed structural image and a registration result, and obtaining a forward model of the patient; preprocessing and spike detection of the magnetoencephalography to obtain a sequence of spike time points; calculating source coordinates and source directions of the spike time points using a magnetic dipole algorithm based on the forward model and the sequence of spike time points, classifying the sequence of spike time points based on the source coordinates and the source directions to obtain a clustering result; calculating source coordinates and source directions of a class center of each class in the clustering result using the magnetic dipole algorithm; generating a clinical report of the patient, including an IED distribution map, a waveform graph of a typical spike, a whole brain region channel layout map, a 3D topology map, a source localization result map, and an interictal dipole overview map.
2. The positioning method according to claim 1, characterized in that, The registration of the structural image of the patient with the magnetoencephalography of the patient after preprocessing the structural image comprises: performing preprocessing operations of coordinate system conversion, noise reduction, artifact removal, skull stripping, and cerebral cortex reconstruction on the structural image of the patient; registering a reference point of the magnetoencephalography with a reference point of the preprocessed structural image to convert a coordinate system of the reference point of the magnetoencephalography to the reference point coordinate system of the structural image; mapping coordinates of scalp points of the magnetoencephalography to the scalp of the preprocessed structural image based on a nearest point search matching algorithm to obtain a registration matrix of the registration between the structural image and the magnetoencephalography; In the registration process, the weights of the magnetoencephalography scalp points and the structural image scalp in the registration process can be set to adjust the registration fit.
3. The positioning method according to claim 2, characterized in that, The division of the cerebral cortex region into a grid based on the preprocessed structural image and the registration result to obtain the forward model of the patient comprises: dividing the cerebral cortex region of the structural image after preprocessing into a surface grid to obtain spatial coordinates of grid vertices; converting the spatial coordinates of the grid vertices and the positions of the scalp points of the magnetoencephalography to the same coordinate system based on the registration matrix to obtain the forward model.
4. The positioning method of claim 1, wherein, The preprocessing of the magnetoencephalography comprises: performing band-pass filtering noise reduction, notch filtering, removing power frequency noise, removing electrocardiogram artifacts, resampling dimension reduction, and data normalization processing on the magnetoencephalography in sequence.
5. The positioning method of claim 1, wherein, The calculation of source coordinates and source directions of the spike time points using a magnetic dipole algorithm based on the forward model and the sequence of spike time points comprises: taking magnetoencephalography data in a time neighborhood of the spike time point, calculating brain magnetic channels involved in source localization and removing bad channels; taking data on the brain magnetic channels after removing bad channels in the time neighborhood of the spike time point, and calculating source coordinates and source directions of the spike time point using a magnetic dipole algorithm.
6. The positioning method of claim 1, wherein, Classifying all the spike time points using a clustering algorithm to obtain a clustering result, and the parameters set by the clustering algorithm include: The gof threshold value called by the clustering algorithm, the time neighborhood range for averaging the waveform amplitude of the spike point, the influence weight of the magnetometer of the spike point on the clustering effect, the influence weight of the gradiometer of the spike point on the clustering effect, the influence weight of the magnetometer of the spike point in the time neighborhood on the clustering effect, the influence weight of the spherical source dipole position of the spike point on the clustering effect, the influence weight of the spherical source dipole direction of the spike point on the clustering effect, whether to normalize the distance matrix of each feature, the set number threshold value of the cluster generated by the clustering algorithm, and the class number less than the set cluster number in the clustering result will be completely removed.
7. The positioning method of claim 1, wherein, The source coordinates and source direction of the class center in each class in the clustering result are calculated by using the magnetic dipole algorithm, specifically: All spike points in each class are traversed, the magnetoencephalogram data of the time neighborhood of each spike point is added, and the average value of the number of spike points is taken; The average value data is applied to the magnetic dipole algorithm to calculate the source coordinates and source direction of the class center.
8. The positioning method of claim 1, wherein, The clinical report of the patient is generated, including an IED distribution map, a waveform graph of a typical spike, a whole brain region channel layout graph, a 3D topology graph, a source positioning result graph, and an interictal dipole overview graph, specifically: The IED distribution map is a distribution map drawn according to the brain region and time of the spike point sequence; The waveform graph of the typical spike, the whole brain region channel layout graph, the 3D topology graph, and the source positioning result graph are graphs drawn according to the most typical time point in the waveform of the spike point sequence, wherein the most typical time point is the time point with the highest confidence obtained in the spike detection algorithm; The interictal dipole overview graph refers to selecting a most representative cluster of spike points from the clustering result, and cutting a plurality of pictures from the coronal plane, the sagittal plane, and the horizontal plane, respectively, to indicate the location of the epileptogenic focus of the patient, wherein the most representative cluster of spike points represents the set with the most time points in the clustering algorithm classification.
9. A computer system comprising a memory, a processor and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the method of any one of claims 1-8.
10. A computer readable storage medium, characterized in that, The computer readable storage medium stores a plurality of classification programs, and the plurality of classification programs are used to be called and executed by the processor to implement the method of any one of claims 1-8.
Citation Information
Patent Citations
High-frequency oscillation rhythm detection method intelligent algorithm optimized fuzzy clustering
CN110584600A
Flexible brain magnetic helmet and sensor array space positioning method thereof
CN116392132A
Epilepsy spine wave clustering analysis method based on magnetoencephalogram topographic map coding
CN116628415A
Magnetoencephalogram spine wave feature clustering method based on comparative learning
CN118298204A
Method and system for generating magnetoencephalogram diagnostic report of epilepsy lesion
CN118711742A
Cited By
Electromagnetic synchronous stimulation control device, method, equipment, medium and program product
CN121987946A
