Brain electric field forward and reverse calculation method and system based on custom channels
By customizing the three-dimensional head model display and electrode position editing of the electrode channel, combined with magnetic resonance imaging and affine transformation matrix calculation, the problem of the inability of existing technologies to accurately adapt to individual brain structures is solved, and personalized electrode placement and risk reduction are achieved.
Patent Information
- Application Number
- CN202510166657.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-02-14
AI Technical Summary
Existing transcranial electrical stimulation technology relies on a standard lead system and cannot accurately adapt to individual brain structure differences, resulting in uncertainty in treatment effects and increased stimulation risks, especially for patients with special diseases, making it difficult to avoid sensitive areas.
Through the forward and inverse calculation method of the brain electric field based on custom channels, the three-dimensional head model is displayed and responds to the electrode channel editing instructions, the electrode channel position is customized, and the lead field matrix is recalculated by combining magnetic resonance brain images and affine transformation matrix to generate personalized electrode positions and current parameters.
Precise electrode placement is achieved to adapt to individual brain structure differences, reduce stimulation to sensitive areas, and minimize side effects and risks.
Smart Images

Figure CN120242317B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cognitive neuroscience technology, and in particular to a method and system for forward and inverse calculation of brain electric fields based on custom channels. Background Art
[0002] In the fields of neuroscience and psychiatric treatment, transcranial electrical stimulation (tES) has garnered widespread attention due to its non-invasive nature and potential therapeutic benefits. This technology, which involves placing electrodes on the scalp and applying weak electrical currents to specific brain regions, modulates neural activity and treats conditions such as depression, anxiety, and Parkinson's disease. However, achieving precise therapeutic effects requires precise control of electrode placement and current parameters.
[0003] Currently, the selection of electrode positions for transcranial electrical stimulation (TES) primarily relies on the 10-20 international standard lead system, which provides a standardized electrode placement scheme. Existing TES simulation navigation software systems, while capable of performing forward and reverse calculations of the brain's electric field, rely on the electrode placement method of the standard lead system and are unable to accurately adapt to individual differences in brain structure, leading to uncertainty in the stimulation effect. Furthermore, for patients with special conditions (such as cerebral hemorrhage or brain tissue loss), existing technologies make it difficult to effectively avoid stimulation risk areas, increasing treatment risks. Summary of the Invention
[0004] The present application provides a method and system for forward and inverse calculation of brain electric fields based on custom channels. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is provided below. This summary is not intended to be a comprehensive review, identify key or important elements, or delineate the scope of protection for these embodiments. Its sole purpose is to present some concepts in a simplified form, serving as a prelude to the detailed description that follows.
[0005] In a first aspect, embodiments of the present application provide a method for forward and reverse calculation of brain electric fields based on custom channels, which is applied to a transcranial electrical stimulation device. The method includes:
[0006] Display a 3D head model of the subject to be stimulated. The 3D head model is modeled based on the magnetic resonance imaging of the subject's brain.
[0007] In response to an electrode channel editing instruction for the displayed three-dimensional head model, determining a coordinate list of electrode channels currently enabled on the three-dimensional head model; the electrode channel editing instruction includes an electrode channel disabling instruction, an electrode channel enabling instruction, and an electrode channel adding instruction;
[0008] By using a preset affine transformation matrix, each electrode channel coordinate in the electrode channel coordinate list is converted into a magnetic resonance imaging coordinate;
[0009] When the preset known lead field matrix contains electrode channel coordinates in the electrode channel coordinate list that have not been subjected to finite element calculation, the lead field matrix is recalculated according to the magnetic resonance brain image coordinates to obtain the target lead field matrix corresponding to the electrode channel coordinate list;
[0010] In response to the reverse positioning navigation instruction, the target lead field matrix is used as the calculation parameter of the MOVEA algorithm to generate and output the electrode position and current parameters of the target brain area.
[0011] Optionally, the surface of the three-dimensional head model is provided with 74 electrode channel coordinates based on a preset standard 10-10 lead system, each electrode channel coordinate is arranged in the shape of a small cube, and each small cube carries a labeled identification name;
[0012] In response to an electrode channel editing instruction for the displayed three-dimensional head model, a coordinate list of electrode channels currently enabled on the three-dimensional head model is determined, comprising:
[0013] receiving an electrode channel editing instruction for the displayed three-dimensional head model;
[0014] In the case where a small cube exists at the position indicated by the electrode channel editing instruction, determining a target small cube to be edited by the electrode channel editing instruction;
[0015] When the state of the target small cube is enabled, the electrode channel editing instruction is determined to be an electrode channel disabling instruction;
[0016] In response to an electrode channel disable instruction, displaying a disable option of the target cube;
[0017] In response to a trigger instruction for a disable option, switching the state of the target cube to a disable state, and switching the color of the target cube from a first color of an enabled state to a second color of a disabled state;
[0018] When the electrode channel editing is completed, the electrode channel coordinates corresponding to all small cubes in the enabled state are traversed as a list of electrode channel coordinates currently enabled on the three-dimensional head model.
[0019] Optionally, the method further includes:
[0020] When the state of the target small cube is disabled, the electrode channel editing instruction is determined to be an electrode channel enabling instruction;
[0021] In response to an electrode channel activation instruction, displaying an activation option of a target cube;
[0022] In response to a trigger instruction for the enable option, the state of the target cube is switched to the enable state, and the color of the target cube is switched from the second color of the disable state to the first color of the enable state.
[0023] Optionally, the method further includes:
[0024] In the case that there is no small cube at the position indicated by the electrode channel editing instruction, determining that the electrode channel editing instruction is an electrode channel adding instruction;
[0025] In response to the electrode channel adding instruction, creating custom electrode channel coordinates in the area indicated by the electrode channel editing instruction;
[0026] Receive a custom identification name for custom electrode channel coordinate input;
[0027] Calculate the normal vector of the custom electrode channel coordinates based on the scalp section at the custom electrode channel coordinates;
[0028] Create a small cube with custom electrode channel coordinates;
[0029] The direction of the normal vector is used as the orientation of the small cube of the custom electrode channel coordinates and the custom identification name;
[0030] Renders a small cube of custom electrode channel coordinates in the third color used to represent the custom electrode channel.
[0031] Optionally, the method further includes:
[0032] When the electrode channel coordinates that have not been subjected to finite element calculation do not exist in the preset known lead field matrix in the electrode channel coordinate list, in response to the reverse positioning navigation instruction, the preset lead field matrix is used as the calculation parameter of the MOVEA algorithm to generate and output the electrode position and current parameters of the target brain area.
[0033] Optionally, the method further includes:
[0034] In response to the forward electric field visualization instruction, the brain electric field is calculated and rendered according to the electrode positions and current parameters of the target brain area to obtain a three-dimensional model and cross-sectional diagram of the brain electric field;
[0035] Outputs a 3D model and cross-sectional diagram of the brain's electrical field.
[0036] Optionally, before displaying the three-dimensional head model of the object to be stimulated, the method further includes:
[0037] receiving a magnetic resonance brain image of a subject to be stimulated as input from a transcranial electrical stimulation device;
[0038] Using the advanced normalization tool ants, the MRI brain image is aligned with the template in the preset MNI coordinate space to obtain the affine transformation matrix and the registered MRI brain image;
[0039] Perform brain tissue segmentation on the registered magnetic resonance brain image to obtain segmented brain tissue data;
[0040] The segmented brain tissue data is modeled to obtain a three-dimensional head model of the object to be stimulated.
[0041] Optionally, the lead field matrix is recalculated based on the MRI coordinates to obtain a target lead field matrix corresponding to the electrode channel coordinate list, including:
[0042] The coordinates of the MRI brain images were converted into grid numbers to obtain the contact surface between the dipole and the three-dimensional head model;
[0043] Through the contact surface, a stiffness matrix is constructed as the target lead field matrix corresponding to the electrode channel coordinate list.
[0044] Optionally, the stiffness matrix is calculated as:
[0045]
[0046] Among them, S ij is the stiffness matrix, a h is the unit potential in h space, which is used to be specified as a specific value in the later MOVEA algorithm calculation or user input, v h is a finite-dimensional space, {ψ i (x)}i=1 N is the basis function, N is the number of dimensions, each v h is the basis function ψ i (x) is the spanned subspace, V is the three-dimensional head model, Ω is the computational space, σ is the conductivity, φ is the potential caused by external stimulation, and Γ is the contact surface between the dipole and the head model, which is also the original coordinate C ORIGIB The converted grid number.
[0047] In a second aspect, an embodiment of the present application provides a brain electric field forward and reverse calculation system based on a custom channel, the system comprising:
[0048] A display module is used to display a three-dimensional head model of the subject to be stimulated, where the three-dimensional head model is obtained based on the magnetic resonance imaging of the subject to be stimulated;
[0049] a determination module, configured to determine a coordinate list of currently enabled electrode channels on the three-dimensional head model in response to an electrode channel editing instruction for the displayed three-dimensional head model; the electrode channel editing instruction includes an electrode channel disabling instruction, an electrode channel enabling instruction, and an electrode channel adding instruction;
[0050] A conversion module, configured to convert each electrode channel coordinate in the electrode channel coordinate list into a magnetic resonance imaging coordinate using a preset affine transformation matrix;
[0051] a calculation module for recalculating the lead field matrix according to the magnetic resonance brain image coordinates when there are electrode channel coordinates in the electrode channel coordinate list that have not been subjected to finite element calculation in the preset lead field matrix, so as to obtain a target lead field matrix corresponding to the electrode channel coordinate list;
[0052] The generation module is used to respond to the reverse positioning navigation instruction, use the target lead field matrix as the calculation parameter of the MOVEA algorithm, and generate and output the electrode position and current parameters of the target brain area.
[0053] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0054] In an embodiment of the present application, electrode channels can be customized by displaying a 3D head model of the subject to be stimulated and responding to electrode channel editing instructions for the displayed 3D head model. Customized electrode channels allow for personalized electrode placement based on the individual's brain anatomy. Personalized electrode placement can more accurately stimulate specific brain regions of the patient, precisely adapting to individual brain structural differences. Customized electrode channels recalculate the lead field matrix. This approach can avoid stimulating sensitive areas by precisely controlling electrode position and current parameters, reducing side effects and risks.
[0055] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0057] Figure 1 This is a flowchart of a method for forward and reverse calculation of brain electric fields based on custom channels provided in an embodiment of the present application;
[0058] Figure 2 This is a schematic block diagram of a process for forward and reverse calculation of brain electric fields based on a custom channel provided in an embodiment of the present application;
[0059] Figure 3 This is a schematic diagram of the structure of a brain electric field forward and reverse calculation system based on custom channels provided by this application;
[0060] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] The following description and the drawings sufficiently illustrate specific embodiments of the application to enable those skilled in the art to practice them.
[0062] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0063] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of systems and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0064] In the description of this application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0065] The present application provides a method and system for forward and inverse calculation of brain electric fields based on custom channels to solve the problems existing in the above-mentioned related technical issues. In an embodiment of the present application, the electrode channel can be customized by displaying a three-dimensional head model of the object to be stimulated and responding to the electrode channel editing instructions for the displayed three-dimensional head model. The customized electrode channel allows for personalized arrangement of electrodes according to the individual's brain anatomical structure. The personalized electrode placement can more accurately stimulate the patient's specific brain area and accurately adapt to the individual's brain structure differences. The customized electrode channel recalculates the lead field matrix. This method can avoid stimulation of sensitive areas and reduce side effects and risks by precisely controlling the position and current parameters of the electrodes. An exemplary embodiment is used below to explain this in detail.
[0066] The following will be combined with the Figure 1-2This article details the forward and reverse calculation method for brain electric fields based on custom channels, as provided in an embodiment of this application. This method can be implemented using a computer program and run on a von Neumann-based forward and reverse calculation system for brain electric fields based on custom channels. This computer program can be integrated into an application or run as a standalone tool application.
[0067] See Figure 1 , provides a flow chart of a method for forward and reverse calculation of brain electric field based on a custom channel for an embodiment of the present application, which is applied to a transcranial electrical stimulation device. Figure 1 As shown, the method of the embodiment of the present application may include the following steps:
[0068] S101, displaying a three-dimensional head model of the subject to be stimulated, wherein the three-dimensional head model is obtained based on magnetic resonance imaging of the subject to be stimulated;
[0069] The subject to be stimulated refers to the individual who will receive transcranial electrical stimulation therapy. A three-dimensional head model is a digital model that simulates the subject's head structure, including the brain, skull, and scalp. This model is used to simulate electrode placement and current distribution on a computer. Magnetic resonance imaging (MRI) refers to detailed images of the subject's brain obtained using magnetic resonance imaging technology.
[0070] In some embodiments of the present application, the specific generation process of the three-dimensional head model includes: receiving the magnetic resonance brain image of the object to be stimulated input by the transcranial electrical stimulation device; using the advanced normalization tool ants to align the magnetic resonance brain image with the template in the preset MNI coordinate space to obtain an affine transformation matrix and the aligned magnetic resonance brain image; performing brain tissue segmentation on the aligned magnetic resonance brain image to obtain segmented brain tissue data; modeling the segmented brain tissue data to obtain a three-dimensional head model of the object to be stimulated.
[0071] Among them, the transcranial electrical stimulation device is a medical device used to apply weak electric current to the scalp to regulate brain neural activity and treat diseases such as depression, anxiety and Parkinson's disease. The Advanced Normalization Tool (ANTS) is a software tool for medical imaging that is used to perform spatial normalization and registration of magnetic resonance brain images. The MNI coordinate space is the Montreal Neurological Institute coordinate system, a standard brain coordinate system used to compare brain structure and function between different individuals. The affine transformation matrix is a matrix calculated during the ants registration process, which is used to describe the geometric transformation relationship between the original MRI image and the MNI coordinate space template.
[0072] For example, magnetic resonance imaging data is obtained from the subject to be stimulated. The acquired magnetic resonance imaging data is aligned with the template in the preset MNI coordinate space using the advanced normalization tool (ants). This process involves calculating the affine transformation matrix and converting the original MRI image to the MNI coordinate space. After the ants registration is completed, an affine transformation matrix is obtained, which includes operations such as rotation, scaling, shearing, and translation, and is used to convert the original MRI data into the standard MNI coordinate space. Brain tissue segmentation is performed on the registered magnetic resonance imaging to identify and distinguish different tissue types in the brain. Using the segmented brain tissue data, a three-dimensional model of the head of the subject to be stimulated is constructed through computer-aided design (CAD) or dedicated software. This model can show the internal structure of the brain in detail, providing a basis for subsequent electric field simulation and electrode position optimization.
[0073] In the embodiment of the present application, after obtaining the three-dimensional head model of the subject to be stimulated, the three-dimensional head model of the subject to be stimulated is displayed.
[0074] S102, in response to an electrode channel editing instruction for the displayed three-dimensional head model, determining a coordinate list of electrode channels currently enabled on the three-dimensional head model; the electrode channel editing instruction includes an electrode channel disabling instruction, an electrode channel enabling instruction, and an electrode channel adding instruction;
[0075] The surface of the three-dimensional head model is set with 74 electrode channel coordinates based on the preset standard 10-10 lead system. Each electrode channel coordinate is arranged in the shape of a small cube, and each small cube carries a marked identification name.
[0076] In some embodiments of the present application, in response to an electrode channel editing instruction for a displayed three-dimensional head model, a specific process of determining a list of electrode channel coordinates currently enabled on the three-dimensional head model includes: receiving an electrode channel editing instruction for the displayed three-dimensional head model; when a small cube exists at the position indicated by the electrode channel editing instruction, determining a target small cube edited by the electrode channel editing instruction; when the state of the target small cube is enabled, determining that the electrode channel editing instruction is an electrode channel disabling instruction; in response to the electrode channel disabling instruction, displaying a disabling option for the target small cube; in response to a trigger instruction for the disabling option, switching the state of the target small cube to a disabling state, and switching the color of the target small cube from the first color of the enabled state to the second color of the disabled state; when the electrode channel editing is completed, traversing the electrode channel coordinates corresponding to all small cubes in the enabled state as a list of electrode channel coordinates currently enabled on the three-dimensional head model.
[0077] In other embodiments of the present application, when the state of the target small cube is the disabled state, the electrode channel editing instruction is determined to be the electrode channel enabling instruction; in response to the electrode channel enabling instruction, the enabling option of the target small cube is displayed; in response to the trigger instruction for the enabling option, the state of the target small cube is switched to the enabled state, and the color of the target small cube is switched from the second color of the disabled state to the first color of the enabled state.
[0078] In other embodiments of the present application, when there is no small cube at the location indicated by the electrode channel editing instruction, the electrode channel editing instruction is determined to be an electrode channel adding instruction; in response to the electrode channel adding instruction, custom electrode channel coordinates are created in the area indicated by the electrode channel editing instruction; a custom identification name input for the custom electrode channel coordinates is received; a normal vector of the custom electrode channel coordinates is calculated based on a cross-section of the scalp at the custom electrode channel coordinates; a small cube of the custom electrode channel coordinates is created; the direction of the normal vector is used as the orientation of the small cube of the custom electrode channel coordinates and the custom identification name; and the small cube of the custom electrode channel coordinates is rendered as a third color for representing the custom electrode channel.
[0079] For example, the software offers a "Settings" option, which allows users to open the "Customize Electrode Channels" subwindow via a menu bar button. This window displays a 3D head model generated by 3D modeling based on brain tissue segmentation from user-imported MRI images. 74 coordinates based on the standard 10-10 lead system are pre-loaded onto the head model. These coordinates are arranged within the 3D head model as small red cubes and text labels. Right-clicking one of these small red cubes will bring up an option to enable or disable the electrode channel. If a red cube (an enabled electrode channel) is disabled, it will turn gray; if a gray cube (a disabled electrode channel) is enabled, it will return to red. Furthermore, users can right-click a non-cube area to customize an electrode channel. Once the user selects a custom channel at that location, they must manually enter the channel's label. The software calculates its normal vector based on the scalp section at that coordinate, using this as the orientation of the cube and the label. Cubes added through custom electrode channels are highlighted in orange, and the right-click menu provides an option to delete them. All operations provide the save function.
[0080] By right-clicking the 3D head model of the subject to be stimulated, the user will obtain a list of the currently enabled electrode channel coordinates on the outermost layer of the 3D head model of the subject to be stimulated. The tissues corresponding to the electrode channel coordinates in this list do not belong to non-scalp tissues such as the eyeball and muscles.
[0081] S103, converting each electrode channel coordinate in the electrode channel coordinate list into a magnetic resonance imaging coordinate using a preset affine transformation matrix;
[0082] In some embodiments of the present application, each electrode channel coordinate in the electrode channel coordinate list is converted from the standard coordinate system to the individual magnetic resonance imaging coordinate using a preset affine transformation matrix. The calculation formula is:
[0083] C ORIGIN =C MNI ×Am -1 ;
[0084] Among them C ORIGIN is the coordinate of MRI brain image, C MNI is the coordinate of each electrode channel in the electrode channel coordinate list, and Am is the affine transformation matrix.
[0085] S104, if the preset known lead field matrix contains electrode channel coordinates in the electrode channel coordinate list that have not been subjected to finite element calculation, recalculate the lead field matrix according to the magnetic resonance brain image coordinates to obtain a target lead field matrix corresponding to the electrode channel coordinate list;
[0086] Among them, in fields such as transcranial electrical stimulation and electroencephalography (EEG), the lead field matrix is a key mathematical tool used to describe the relationship between electrode positions and internal current sources in the brain (such as neuronal activity). It can predict the impact of internal current sources in the brain on signals recorded by scalp electrodes at specific electrode positions. Finite element method (FEM) is a numerical calculation method used to simulate and analyze physical phenomena such as electromagnetic fields, heat conduction, and fluid dynamics. In transcranial electrical stimulation, FEM is used to calculate the distribution of current in the brain.
[0087] In some embodiments of the present application, in the preset lead field matrix, it is checked whether there are electrode channel coordinates in the electrode channel coordinate list that have not been subjected to finite element calculation. This may occur when the electrode channel coordinate list is updated or a new electrode channel is added. If uncalculated electrode channel coordinates are found, the lead field matrix needs to be recalculated based on the magnetic resonance brain image coordinates. This involves using the finite element method, combined with the individual's brain structure and conductivity distribution, to simulate the propagation of current in the brain. Through finite element calculation, the target lead field matrix corresponding to the electrode channel coordinate list is obtained. This matrix contains the electric field distribution information of all electrode channels.
[0088] In other embodiments of the present application, when the electrode channel coordinates that have not been subjected to finite element calculation do not exist in the preset known lead field matrix in the electrode channel coordinate list, in response to the reverse positioning navigation instruction, the preset lead field matrix is used as the calculation parameter of the MOVEA algorithm to generate and output the electrode position and current parameters of the target brain area.
[0089] Specifically, the process of recalculating the lead field matrix based on the magnetic resonance brain image coordinates to obtain the target lead field matrix corresponding to the electrode channel coordinate list includes: converting the magnetic resonance brain image coordinates into grid numbers to obtain the contact surface between the dipole and the three-dimensional head model; and constructing a stiffness matrix through the contact surface as the target lead field matrix corresponding to the electrode channel coordinate list.
[0090] Specifically, the calculation formula of the stiffness matrix is:
[0091]
[0092] Among them, S ij is the stiffness matrix, a h is the unit potential in h space, which is used to be specified as a specific value in the later MOVEA algorithm calculation or user input, v h is a finite-dimensional space, {ψ i (x)}i=1 N is the basis function, N is the number of dimensions, each v h is the basis function ψ i (x) is the spanned subspace, V is the three-dimensional head model, Ω is the computational space, σ is the conductivity, φ is the potential caused by external stimulation, and Γ is the contact surface between the dipole and the head model, which is also the original coordinate C ORIGIN The converted grid number.
[0093] S105 , in response to the reverse positioning navigation instruction, the target lead field matrix is used as a calculation parameter of the MOVEA algorithm to generate and output the electrode position and current parameters of the target brain area.
[0094] Among them, the reverse positioning navigation instruction is a computational instruction used to determine the optimal position and current parameters of the electrode in transcranial electrical stimulation therapy in order to stimulate a specific brain area. MOVEA algorithm: The MOVEA (Multi-Objective Optimization via Evolutionary Algorithm) algorithm is a multi-objective optimization algorithm that uses an evolutionary algorithm to find the optimal stimulation parameters for a given target brain area. The MOVEA algorithm is able to simultaneously optimize multiple objectives, such as the intensity, focus, stimulation depth, and avoidance area of the target area, which are often mutually exclusive. Through Pareto optimization, MOVEA generates a Pareto front after a single run. This front consists of the best solutions that meet various requirements while respecting the trade-off relationship between conflicting objectives. MOVEA is applicable to transcranial alternating current stimulation (tACS) and transcranial time interference stimulation (tTIS) in high definition (HD) and two-pair systems, and can be easily expanded to more targets without manual weight adjustment.
[0095] In some embodiments of the present application, the software responds to the reverse positioning navigation instruction and uses the target lead field matrix as the input parameter of the MOVEA algorithm. The MOVEA algorithm starts running and searches for the optimal electrode position and current parameters through an evolutionary algorithm. The MOVEA algorithm generates a Pareto front, which contains multiple optimal solutions, each of which is calculated based on different objectives and constraints. The doctor or researcher selects an optimal solution from the Pareto front that balances all considered objectives, such as intensity, focus, and avoidance area. The software outputs the selected optimal solution as electrode position and current parameters, which can be directly used in a transcranial electrical stimulation device to achieve effective stimulation of the target brain area.
[0096] In other embodiments of the present application, in response to a forward electric field visualization instruction, the brain electric field is calculated and rendered based on the electrode position and current parameters of the target brain area to obtain a three-dimensional model and a cross-sectional diagram of the brain electric field; and the three-dimensional model and the cross-sectional diagram of the brain electric field are output.
[0097] For example Figure 2 As shown, Figure 2This application provides a schematic block diagram of the forward and reverse calculation process for the brain electric field based on custom channels. The user first imports the magnetic resonance imaging data of the subject to be stimulated. The imported MRI data is preprocessed, including denoising and contrast enhancement. Then, brain tissue segmentation is performed to distinguish different brain tissues such as gray matter, white matter, and cerebrospinal fluid. The user is asked to determine whether to use the standard 10-20 or 10-10 lead system. If "Yes" is selected, the lead field matrix is directly constructed. If "No" is selected, the user proceeds to the user-defined electrode channel step. The user defines the electrode arrangement in the software according to their needs. The lead field matrix is constructed. If the user selects the forward operation, the software inputs the electrode positions and current parameters, calculates, and renders a three-dimensional model and animated image of the brain electric field. If the user selects the reverse operation, the software requires the target coordinate information and runs the MOVEA algorithm to optimize the electrode positions and current parameters. In the reverse operation, the MOVEA algorithm is used to generate and output the electrode positions and current parameters for the target brain region. In forward operation, the user needs to input the electrode position and current parameters so that the software can calculate and visualize the electric field. Based on the electrode position and current parameters, the software calculates the brain electric field and outputs a three-dimensional model and animated diagram for the user to view and analyze.
[0098] In an embodiment of the present application, electrode channels can be customized by displaying a 3D head model of the subject to be stimulated and responding to electrode channel editing instructions for the displayed 3D head model. Customized electrode channels allow for personalized electrode placement based on the individual's brain anatomy. Personalized electrode placement can more accurately stimulate specific brain regions of the patient, precisely adapting to individual brain structural differences. Customized electrode channels recalculate the lead field matrix. This approach can avoid stimulating sensitive areas by precisely controlling electrode position and current parameters, reducing side effects and risks.
[0099] The following are system embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the system embodiments of the present application, please refer to the method embodiments of the present application.
[0100] See Figure 3 , which shows a schematic diagram of the system architecture for forward and inverse brain electric field calculation based on custom channels, provided by an exemplary embodiment of the present application. This system can be implemented as all or part of an electronic device through software, hardware, or a combination of both. The system 1 includes a display module 10, a determination module 20, a conversion module 30, a calculation module 40, and a generation module 50.
[0101] A display module 10 is used to display a three-dimensional head model of the subject to be stimulated, where the three-dimensional head model is modeled based on the magnetic resonance imaging of the subject to be stimulated;
[0102] a determination module 20 configured to determine a coordinate list of currently enabled electrode channels on the three-dimensional head model in response to an electrode channel editing instruction for the displayed three-dimensional head model; the electrode channel editing instruction includes an electrode channel disabling instruction, an electrode channel enabling instruction, and an electrode channel adding instruction;
[0103] A conversion module 30 is used to convert each electrode channel coordinate in the electrode channel coordinate list into a magnetic resonance imaging coordinate using a preset affine transformation matrix;
[0104] A calculation module 40 is configured to recalculate the lead field matrix based on the MRI coordinates when there are electrode channel coordinates in the preset lead field matrix that have not been subjected to finite element calculation in the electrode channel coordinate list, so as to obtain a target lead field matrix corresponding to the electrode channel coordinate list;
[0105] The generation module 50 is used to respond to the reverse positioning navigation instruction, use the target lead field matrix as the calculation parameter of the MOVEA algorithm, and generate and output the electrode position and current parameters of the target brain area.
[0106] It should be noted that the brain electric field forward and reverse calculation system based on custom channels provided in the above embodiment only uses the division of the above functional modules as an example when executing the brain electric field forward and reverse calculation method based on custom channels. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the brain electric field forward and reverse calculation system based on custom channels provided in the above embodiment and the brain electric field forward and reverse calculation method based on custom channels are of the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.
[0107] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0108] In an embodiment of the present application, electrode channels can be customized by displaying a 3D head model of the subject to be stimulated and responding to electrode channel editing instructions for the displayed 3D head model. Customized electrode channels allow for personalized electrode placement based on the individual's brain anatomy. Personalized electrode placement can more accurately stimulate specific brain regions of the patient, precisely adapting to individual brain structural differences. Customized electrode channels recalculate the lead field matrix. This approach can avoid stimulating sensitive areas by precisely controlling electrode position and current parameters, reducing side effects and risks.
[0109] The present application also provides a computer-readable medium having program instructions stored thereon, which, when executed by a processor, implement the forward and inverse calculation method of the brain electric field based on the custom channel provided by the above-mentioned various method embodiments.
[0110] The present application also provides a computer program product containing instructions, which, when executed on a computer, enables the computer to execute the forward and inverse calculation methods of the brain electric field based on custom channels in the above-mentioned various method embodiments.
[0111] See Figure 4 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .
[0112] The communication bus 1002 is used to implement the connection and communication between these components.
[0113] The user interface 1003 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0114] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0115] The processor 1001 may include one or more processing cores. The processor 1001 utilizes various interfaces and circuits to connect the various components within the entire electronic device 1000. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and calling data stored in the memory 1005, the processor 1001 performs various functions of the electronic device 1000 and processes data. Optionally, the processor 1001 may be implemented in the form of at least one hardware component selected from the group consisting of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 1001 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display; and the modem is responsible for handling wireless communications. It is understood that the modem may not be integrated into the processor 1001 and may be implemented separately on a single chip.
[0116] Among them, the memory 1005 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may also be optionally at least one storage system located away from the aforementioned processor 1001. As Figure 4 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a brain electric field forward and inverse calculation application based on a custom channel.
[0117] exist Figure 4 In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain user input data; and the processor 1001 can be used to call the brain electric field forward and inverse calculation application based on the custom channel stored in the memory 1005 and specifically perform the following operations:
[0118] Display a 3D head model of the subject to be stimulated. The 3D head model is modeled based on the magnetic resonance imaging of the subject's brain.
[0119] In response to an electrode channel editing instruction for the displayed three-dimensional head model, determining a coordinate list of electrode channels currently enabled on the three-dimensional head model; the electrode channel editing instruction includes an electrode channel disabling instruction, an electrode channel enabling instruction, and an electrode channel adding instruction;
[0120] By using a preset affine transformation matrix, each electrode channel coordinate in the electrode channel coordinate list is converted into a magnetic resonance imaging coordinate;
[0121] When the preset known lead field matrix contains electrode channel coordinates in the electrode channel coordinate list that have not been subjected to finite element calculation, the lead field matrix is recalculated according to the magnetic resonance brain image coordinates to obtain the target lead field matrix corresponding to the electrode channel coordinate list;
[0122] In response to the reverse positioning navigation instruction, the target lead field matrix is used as the calculation parameter of the MOVEA algorithm to generate and output the electrode position and current parameters of the target brain area.
[0123] In one embodiment, when the processor 1001 determines the coordinate list of the electrode channels currently enabled on the three-dimensional head model in response to the electrode channel editing instruction for the displayed three-dimensional head model, the processor 1001 specifically performs the following operations:
[0124] receiving an electrode channel editing instruction for the displayed three-dimensional head model;
[0125] In the case where a small cube exists at the position indicated by the electrode channel editing instruction, determining a target small cube to be edited by the electrode channel editing instruction;
[0126] When the state of the target small cube is enabled, the electrode channel editing instruction is determined to be an electrode channel disabling instruction;
[0127] In response to an electrode channel disable instruction, displaying a disable option of the target cube;
[0128] In response to a trigger instruction for a disable option, switching the state of the target cube to a disable state, and switching the color of the target cube from a first color of an enabled state to a second color of a disabled state;
[0129] When the electrode channel editing is completed, the electrode channel coordinates corresponding to all small cubes in the enabled state are traversed as a list of electrode channel coordinates currently enabled on the three-dimensional head model.
[0130] In one embodiment, the processor 1001 further performs the following operations:
[0131] When the state of the target small cube is disabled, the electrode channel editing instruction is determined to be an electrode channel enabling instruction;
[0132] In response to an electrode channel activation instruction, displaying an activation option of a target cube;
[0133] In response to a trigger instruction for the enable option, the state of the target cube is switched to the enable state, and the color of the target cube is switched from the second color of the disable state to the first color of the enable state.
[0134] In one embodiment, the processor 1001 further performs the following operations:
[0135] In the case that there is no small cube at the position indicated by the electrode channel editing instruction, determining that the electrode channel editing instruction is an electrode channel adding instruction;
[0136] In response to the electrode channel adding instruction, creating custom electrode channel coordinates in the area indicated by the electrode channel editing instruction;
[0137] Receive a custom identification name for custom electrode channel coordinate input;
[0138] Calculate the normal vector of the custom electrode channel coordinates based on the scalp section at the custom electrode channel coordinates;
[0139] Create a small cube with custom electrode channel coordinates;
[0140] The direction of the normal vector is used as the orientation of the small cube of the custom electrode channel coordinates and the custom identification name;
[0141] Renders a small cube of custom electrode channel coordinates in the third color used to represent the custom electrode channel.
[0142] In one embodiment, the processor 1001 further performs the following operations:
[0143] When the electrode channel coordinates that have not been subjected to finite element calculation do not exist in the preset known lead field matrix in the electrode channel coordinate list, in response to the reverse positioning navigation instruction, the preset lead field matrix is used as the calculation parameter of the MOVEA algorithm to generate and output the electrode position and current parameters of the target brain area.
[0144] In one embodiment, the processor 1001 further performs the following operations:
[0145] In response to the forward electric field visualization instruction, the brain electric field is calculated and rendered according to the electrode positions and current parameters of the target brain area to obtain a three-dimensional model and cross-sectional diagram of the brain electric field;
[0146] Outputs a 3D model and cross-sectional diagram of the brain's electrical field.
[0147] In one embodiment, before displaying the three-dimensional head model of the object to be stimulated, the processor 1001 further performs the following operations:
[0148] receiving a magnetic resonance brain image of a subject to be stimulated as input from a transcranial electrical stimulation device;
[0149] Using the advanced normalization tool ants, the MRI brain image is aligned with the template in the preset MNI coordinate space to obtain the affine transformation matrix and the registered MRI brain image;
[0150] Perform brain tissue segmentation on the registered magnetic resonance brain image to obtain segmented brain tissue data;
[0151] The segmented brain tissue data is modeled to obtain a three-dimensional head model of the object to be stimulated.
[0152] In one embodiment, when the processor 1001 recalculates the lead field matrix according to the MRI coordinates to obtain the target lead field matrix corresponding to the electrode channel coordinate list, the processor 1001 specifically performs the following operations:
[0153] The coordinates of the MRI brain images were converted into grid numbers to obtain the contact surface between the dipole and the three-dimensional head model;
[0154] Through the contact surface, a stiffness matrix is constructed as the target lead field matrix corresponding to the electrode channel coordinate list.
[0155] In an embodiment of the present application, electrode channels can be customized by displaying a 3D head model of the subject to be stimulated and responding to electrode channel editing instructions for the displayed 3D head model. Customized electrode channels allow for personalized electrode placement based on the individual's brain anatomy. Personalized electrode placement can more accurately stimulate specific brain regions of the patient, precisely adapting to individual brain structural differences. Customized electrode channels recalculate the lead field matrix. This approach can avoid stimulating sensitive areas by precisely controlling electrode position and current parameters, reducing side effects and risks.
[0156] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program for forward and reverse calculation of the brain electric field based on a custom channel can be stored in a computer-readable storage medium. When executed, the program can include the processes of the above-described method embodiments. The storage medium for the program for forward and reverse calculation of the brain electric field based on a custom channel can be a magnetic disk, an optical disk, a read-only memory, or a random access memory.
[0157] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for forward and inverse calculation of brain electric field based on custom channels, characterized in that: Applied to a transcranial electrical stimulation device, the method comprises: Displaying a three-dimensional head model of the subject to be stimulated, wherein the three-dimensional head model is obtained based on magnetic resonance imaging of the subject to be stimulated; In response to an electrode channel editing instruction for the displayed three-dimensional head model, determining a coordinate list of electrode channels currently enabled on the three-dimensional head model; the electrode channel editing instruction includes an electrode channel disabling instruction, an electrode channel enabling instruction, and an electrode channel adding instruction; Converting each electrode channel coordinate in the electrode channel coordinate list into a magnetic resonance imaging coordinate using a preset affine transformation matrix; When the preset known lead field matrix contains electrode channel coordinates in the electrode channel coordinate list that have not been subjected to finite element calculation, recalculating the lead field matrix according to the magnetic resonance brain image coordinates to obtain a target lead field matrix corresponding to the electrode channel coordinate list; In response to the reverse positioning navigation instruction, the target lead field matrix is used as a calculation parameter of the MOVEA algorithm to generate and output the electrode position and current parameters of the target brain area; The surface of the three-dimensional head model is provided with 74 electrode channel coordinates based on a preset standard 10-10 lead system, each electrode channel coordinate is arranged in the shape of a small cube, and each small cube carries a marked identification name; The step of determining a coordinate list of electrode channels currently enabled on the three-dimensional head model in response to an electrode channel editing instruction for the displayed three-dimensional head model comprises: receiving an electrode channel editing instruction for the displayed three-dimensional head model; In a case where a small cube exists at the position indicated by the electrode channel editing instruction, determining a target small cube to be edited by the electrode channel editing instruction; When the state of the target small cube is an enabled state, determining that the electrode channel editing instruction is an electrode channel disabling instruction; In response to the electrode channel disable instruction, displaying a disable option of the target cube; In response to a trigger instruction for the disable option, switching the state of the target cube to a disable state, and switching the color of the target cube from a first color of an enabled state to a second color of a disabled state; When the electrode channel editing is completed, the electrode channel coordinates corresponding to all small cubes in the enabled state are traversed as a list of electrode channel coordinates currently enabled on the three-dimensional head model.
2. The method according to claim 1, characterized in that The method further comprises: When the state of the target small cube is a disabled state, determining that the electrode channel editing instruction is an electrode channel enabling instruction; In response to the electrode channel activation instruction, displaying an activation option of the target cube; In response to a trigger instruction for the enabling option, the state of the target cube is switched to the enabling state, and the color of the target cube is switched from the second color of the disabling state to the first color of the enabling state.
3. The method according to claim 1, characterized in that The method further comprises: If there is no small cube at the position indicated by the electrode channel editing instruction, determining that the electrode channel editing instruction is an electrode channel adding instruction; In response to the electrode channel adding instruction, creating custom electrode channel coordinates in the area indicated by the electrode channel editing instruction; Receive a custom identification name for custom electrode channel coordinate input; Calculating the normal vector of the custom electrode channel coordinates based on the cross-section of the scalp at the custom electrode channel coordinates; Create a small cube of the custom electrode channel coordinates; The direction of the normal vector is used as the orientation of the small cube of the custom electrode channel coordinates and the custom identification name; The small cube of the custom electrode channel coordinates is rendered in a third color used to represent the custom electrode channel.
4. The method according to claim 1, wherein The method further comprises: When the electrode channel coordinates that have not been subjected to finite element calculation in the electrode channel coordinate list do not exist in the preset known lead field matrix, in response to the reverse positioning navigation instruction, the preset lead field matrix is used as the calculation parameter of the MOVEA algorithm to generate and output the electrode position and current parameters of the target brain area.
5. The method according to claim 1, characterized in that The method further comprises: In response to the forward electric field visualization instruction, the brain electric field is calculated and rendered according to the electrode positions and current parameters of the target brain area to obtain a three-dimensional model and a cross-sectional view of the brain electric field; Output the three-dimensional model and cross-sectional diagram of the brain electric field.
6. The method according to claim 1, wherein Before displaying the three-dimensional head model of the object to be stimulated, the method further includes: receiving a magnetic resonance brain image of a subject to be stimulated inputted by the transcranial electrical stimulation device; Using an advanced normalization tool, ants, to align the magnetic resonance brain image with a template in a preset MNI coordinate space to obtain an affine transformation matrix and the registered magnetic resonance brain image; Perform brain tissue segmentation on the registered magnetic resonance brain image to obtain segmented brain tissue data; The segmented brain tissue data is modeled to obtain a three-dimensional head model of the object to be stimulated.
7. The method according to claim 1, characterized in that The step of recalculating the lead field matrix according to the magnetic resonance brain image coordinates to obtain the target lead field matrix corresponding to the electrode channel coordinate list includes: Converting the magnetic resonance brain image coordinates into grid numbers to obtain a contact surface between the dipole and the three-dimensional head model; A stiffness matrix is constructed through the contact surface as a target lead field matrix corresponding to the electrode channel coordinate list.
8. The method according to claim 7, characterized in that The calculation formula of the stiffness matrix is: Among them, S ij is the stiffness matrix, a h is the unit potential in h space, which is used to be specified as a specific value in the later MOVEA algorithm calculation or user input, {ψ i (x)}i=1 N is the basis function, N is the number of dimensions, V is the three-dimensional head model, Ω is the calculation space, σ is the conductivity, Γ is the contact surface between the dipole and the head model, that is, the original coordinate C ORIGIN The converted grid number.
9. A brain electric field forward and reverse calculation system based on custom channels implemented using the method according to any one of claims 1 to 8, characterized in that: The system comprises: A display module, configured to display a three-dimensional head model of the subject to be stimulated, wherein the three-dimensional head model is obtained based on magnetic resonance imaging of the subject to be stimulated; a determination module, configured to determine a coordinate list of currently enabled electrode channels on the displayed three-dimensional head model in response to an electrode channel editing instruction for the displayed three-dimensional head model; the electrode channel editing instruction includes an electrode channel disabling instruction, an electrode channel enabling instruction, and an electrode channel adding instruction; A conversion module, configured to convert each electrode channel coordinate in the electrode channel coordinate list into a magnetic resonance imaging coordinate using a preset affine transformation matrix; a calculation module, configured to, when the preset lead field matrix contains electrode channel coordinates in the electrode channel coordinate list that have not been subjected to finite element calculation, recalculate the lead field matrix according to the magnetic resonance brain image coordinates, and obtain a target lead field matrix corresponding to the electrode channel coordinate list; The generation module is used to respond to the reverse positioning navigation instruction, use the target lead field matrix as the calculation parameter of the MOVEA algorithm, and generate and output the electrode position and current parameters of the target brain area.
Citation Information
Patent Citations
Electrode optimization method and device for transcranial electrical stimulation, electronic equipment and storage medium
CN116832326A