Electrode implantation path generation method and related device
By automatically registering and fusing multimodal images to generate a three-dimensional brain model, the electrode implantation path was optimized, solving the problem of inaccurate electrode implantation location, achieving higher precision electrode positioning and reducing the risk of postoperative bleeding.
Patent Information
- Application Number
- CN202511340591.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2025-11-18
AI Technical Summary
Existing electrode implantation pathway planning relies on physician experience, resulting in significant differences between electrode contact points and target cortical areas. This makes it difficult to accurately cover functional areas and increases the risk of accidentally touching non-target areas.
By automatically registering and fusing multimodal images, a three-dimensional brain model is generated, the boundary of the target region is adjusted, and a vascular risk penalty term is introduced to optimize the electrode implantation path to improve positioning accuracy and avoid vascular damage.
It improves the positioning accuracy of electrode implantation, reduces the possibility of incomplete coverage of functional areas or accidental contact with non-target areas, and lowers the risk of postoperative bleeding.
Smart Images

Figure CN120959888A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of path planning technology, and in particular to an electrode implantation path generation method and related apparatus. Background Technology
[0002] Cortical electrode implantation is primarily used for localizing epileptic foci, locating functional brain areas (such as language and motor areas), and implanting brain-computer interfaces. Current electrode implantation path planning largely relies on physicians marking electrode implantation locations and paths on brain images based on their experience, outputting the marked images as surgical navigation. However, manual marking depends on visual judgment, and there is a significant difference between the actual implanted electrode contact point and the target cortical area (such as the epileptogenic focus). This results in insufficient electrode localization accuracy, easily leading to incomplete coverage of functional areas or accidental contact with non-target areas. Summary of the Invention
[0003] In view of the above problems, this application provides an electrode implantation path generation method and related apparatus to improve electrode positioning accuracy. The specific solution is as follows:
[0004] The first aspect of this application provides a method for generating an electrode implantation path, comprising:
[0005] Acquire multimodal images, perform registration operations on the multimodal images to obtain registered images; wherein, the multimodal images include brain anatomical structure images, cerebral vascular images, and brain functional area images;
[0006] The registered image is segmented to obtain brain anatomical structure, cerebral blood vessels and brain functional areas, and the brain anatomical structure, cerebral blood vessels and brain functional areas are fused into the same three-dimensional brain model to obtain the fused three-dimensional brain model.
[0007] A target region is acquired, and the boundary of the target region is adjusted based on the fused three-dimensional brain model so that the boundary of the target region is within the functional association zone, and / or the distance between the boundary and the adjacent regions is not less than a safety threshold; wherein, the adjacent regions include cerebral blood vessels, sulci, and non-functional association zones adjacent to the target region, the non-functional association zones are brain functional regions that do not have a functional relationship with the target region, and the functional association zones are brain functional regions that are adjacent to the target region and have a functional relationship;
[0008] Based on a vascular risk penalty term, and with the objective that the path length from the needle insertion point to the target area is less than a preset length, an electrode implantation path is generated from the needle insertion point to the target area; wherein, the vascular risk penalty term is determined at least based on a vascular risk weight, and the vascular risk weight increases as the distance between the path and the cerebral blood vessels decreases.
[0009] In one possible implementation, adjusting the region boundary of the target region based on the fused 3D brain model includes:
[0010] Based on the target region, feature extraction is performed on the brain functional area images in the fused three-dimensional brain model to obtain functional features; wherein, the functional features characterize the distance between the target region and adjacent brain functional areas, and the adjacent brain functional areas include the functionally associated areas and the non-functionally associated areas;
[0011] Based on the target region, features are extracted from the brain anatomical structure images in the fused three-dimensional brain model to obtain anatomical features; wherein, the anatomical features characterize the position of the sulci adjacent to the target region and the distance of the cerebral blood vessels adjacent to the target region;
[0012] Based on the importance of the adjacent regions, the functional features and the anatomical features are weighted, and based on the weighting results, attention fusion is performed on the functional features and the anatomical features to obtain the fused features.
[0013] Based on the fused features, a boundary coordinate correction value for the target region is generated; wherein, the boundary coordinate correction value indicates the extent to which the boundary of the target region extends toward the functional association area, and / or, the value by which the boundary of the target region shifts away from the adjacent region;
[0014] The boundary of the target area is adjusted based on the boundary coordinate correction value.
[0015] In one possible implementation, the vascular risk penalty term is determined based on the vascular risk weight and the diameter of the cerebral blood vessels. When the vascular risk weight remains unchanged, the vascular risk penalty term increases as the diameter of the cerebral blood vessels increases.
[0016] The generation of an electrode implantation path from the needle insertion point to the target area, based on a vascular risk penalty factor and with the objective that the path length from the electrode implantation insertion point to the target area is less than a preset length, includes:
[0017] Obtain target parameters and determine target function; wherein, the target parameters include the position of the needle insertion point, and the target function is the sum of the product of the distance from the needle insertion point to the target region and the product of the vascular risk weight and the diameter of the cerebral blood vessels;
[0018] With the objective function as the minimum, path planning is performed based on the position of the needle insertion point and the target area to obtain an initial path from the needle insertion point to the target area;
[0019] When the initial path does not meet the preset conditions, the target parameters are adjusted, and then the path planning is performed based on the position of the needle insertion point and the target area with the objective function as the minimum as the objective function, until the initial path meets the preset conditions, and then the electrode implantation path is obtained.
[0020] The preset conditions include that the length of the initial path is less than the preset length, the distance from the initial path to the obstacle is not less than the safety threshold, the preset length is a target multiple of the diameter of the target region, the obstacle includes a target blood vessel and a target sulcus adjacent to the initial path, the diameter of the target blood vessel is greater than the preset diameter, and the depth of the target sulcus is greater than the preset depth.
[0021] In one possible implementation, the target parameter further includes an electrode implantation angle, which is the angle between the electrode and the direction perpendicular to the skull.
[0022] The step of minimizing the objective function, based on the position of the needle insertion point and the target area, performs path planning to obtain an initial path from the needle insertion point to the target area, including:
[0023] With the objective function as the minimum, path planning is performed based on the electrode implantation angle, the position of the needle insertion point, and the target region to obtain an initial path from the needle insertion point to the target region; wherein, the angle between the initial path and the perpendicular direction of the skull is the electrode implantation angle;
[0024] When the initial path does not meet the preset conditions, adjusting the target parameters includes:
[0025] When the distance from the initial path to the obstacle is less than the safety threshold, the electrode implantation angle is adjusted by a preset angle toward the normal direction of the obstacle to obtain the adjusted electrode implantation angle.
[0026] Determine whether the contact area between the electrode and the skin is greater than a preset area at the adjusted electrode implantation angle; wherein the contact area is the product of the electrode cross-sectional area and the sine of the adjusted electrode implantation angle;
[0027] If the contact area is not greater than the preset area, then the electrode implantation angle is adjusted towards the normal direction of the obstacle until the contact area is greater than the preset area. Then, the path planning is performed based on the electrode implantation angle, the position of the needle insertion point, and the target area, with the objective function being minimized.
[0028] In one possible implementation, after obtaining the target parameters, the following is also included:
[0029] Determine the skull thickness at the location of the needle insertion point;
[0030] The electrode implantation depth is obtained by adding the sum of the distance from the target area to the inner surface of the skull and the thickness of the skull, to the compression amount during electrode implantation.
[0031] When the electrode implantation depth is greater than the target thickness, and / or the distance from the electrode tip to the contralateral cortex is greater than the target length, adjust the position of the needle insertion point and / or the electrode implantation angle, and then return to the step "determine the skull thickness at the location of the needle insertion point" until the electrode implantation depth is not greater than the target thickness and the distance from the electrode tip to the contralateral cortex is not greater than the target length; wherein, the depth of the electrode tip is the electrode implantation depth.
[0032] In one possible implementation, after generating the electrode implantation path from the needle insertion point to the target region, the method further includes:
[0033] Acquire skull structure images and model construction parameters;
[0034] A three-dimensional finite element model is constructed based on the skull structure image, the model construction parameters, and the fused three-dimensional brain model.
[0035] Based on the aforementioned three-dimensional finite element model, finite element analysis was used to simulate the drilling process and the electrode implantation process to obtain the skull stress, contact pressure generated by the contact between the electrode and the cerebral cortex, and electrode displacement during the drilling process. The electrode displacement is the difference between the first position coordinate and the second position coordinate. The first position coordinate is the electrode position coordinate when the electrode is implanted by applying a displacement load, and the second position coordinate is the electrode position coordinate after the displacement load is removed.
[0036] When the skull stress is less than the strength threshold, the predicted feasibility of skull drilling is deemed acceptable.
[0037] When the contact pressure is within a preset pressure range and the electrode displacement is less than a preset displacement, the predicted result of the electrode contact stability is considered acceptable.
[0038] In one possible implementation, after generating the electrode implantation path from the needle insertion point to the target region, the method further includes:
[0039] The minimum distance from the electrode implantation path to the cerebral blood vessel adjacent to the electrode implantation path is determined to obtain a first distance. When the first distance is not less than the safety threshold, the verification result of the blood vessel safety distance is qualified.
[0040] The minimum distance from the electrode implantation path to the brain sulcus adjacent to the electrode implantation path is determined to obtain a second distance. When the second distance is not less than the safety threshold, the verification result of brain sulcus avoidance is qualified.
[0041] One or more of the following can be displayed: the fused 3D brain model, the target region, the electrode implantation path, the length of the electrode implantation path, the electrode implantation angle, the contact pressure, the electrode displacement, the prediction results of the feasibility of skull drilling, the prediction results of the electrode contact stability, the verification results of the vascular safety distance, and the verification results of brain sulcus avoidance.
[0042] In one possible implementation, the registration operation on the multimodal image to obtain the registered image includes:
[0043] Feature extraction is performed on the multimodal images to obtain image features of multiple modalities; wherein, the image features of multiple modalities include brain anatomical structure image features, cerebral vascular image features, and brain functional area image features;
[0044] Calculate the similarity between the image features of each modality, and obtain the spatial correspondence between the image features of each modality based on the similarity;
[0045] Based on the spatial correspondence, a spatial transformation operation is performed on the multimodal image to make the positions of cerebral blood vessels correspond to the positions of brain anatomical structures, and the positions of brain anatomical structures correspond to the positions of brain functional areas, thus obtaining the registered image.
[0046] In one possible implementation, the process of performing region segmentation on the registered image to obtain brain anatomy, cerebral blood vessels, and brain functional areas includes:
[0047] The registered image is encoded to obtain multi-scale features;
[0048] The multi-scale features are decoded to obtain the segmentation mask;
[0049] Region segmentation is performed based on the correspondence between pixel values of the segmentation mask and regions to obtain the brain anatomical structure, the brain blood vessels, and the brain functional areas.
[0050] A second aspect of this application provides an electrode implantation path generation system, comprising:
[0051] The registration module is used to acquire multimodal images and perform registration operations on the multimodal images to obtain registered images; wherein, the multimodal images include brain anatomical structure images, cerebral vascular images, and brain functional area images;
[0052] The fusion module is used to perform region segmentation on the registered image to obtain brain anatomical structure, cerebral blood vessels and brain functional areas, and to fuse the brain anatomical structure, the cerebral blood vessels and the brain functional areas into the same three-dimensional brain model to obtain the fused three-dimensional brain model.
[0053] The target region adjustment module is used to acquire a target region and adjust the region boundary of the target region based on the fused three-dimensional brain model, so that the boundary of the target region is within the functional association zone, and / or the distance between the boundary and the adjacent region is not less than a safety threshold; wherein, the adjacent region includes cerebral blood vessels, sulci, and non-functional association zones adjacent to the target region, the non-functional association zone is a brain functional region that has no functional relationship with the target region, and the functional association zone is a brain functional region that is adjacent to the target region and has a functional relationship;
[0054] The path generation module is used to generate an electrode implantation path from the needle insertion point to the target area based on a vascular risk penalty term and with the goal that the path length from the needle insertion point to the target area is less than a preset length; wherein the vascular risk penalty term is determined at least based on a vascular risk weight, and the vascular risk weight increases as the distance between the path and the cerebral blood vessels decreases.
[0055] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the electrode implantation path generation method of the first aspect or any implementation thereof.
[0056] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0057] The memory is used to store computer programs;
[0058] The processor is used to execute the computer program so that the electronic device can implement the electrode implantation path generation method of the first aspect or any implementation thereof.
[0059] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs that, when executed by an electronic device, enable the electronic device to perform the electrode implantation path generation method described in the first aspect or any implementation thereof.
[0060] By employing the above technical solutions, the electrode implantation path generation method and related apparatus provided in this application automatically register multimodal images and fuse brain anatomy, cerebral blood vessels, and brain functional areas into a single three-dimensional brain model, resulting in a fused three-dimensional brain model. This eliminates the need for manual matching of multimodal images, thus improving efficiency. By adjusting the boundary of the target region based on the fused three-dimensional brain model, the boundary of the target region is ensured to be within the functionally relevant area, with the distance between the boundary and adjacent regions not less than a safety threshold. This solves the problem of incomplete electrode coverage caused by large errors in target region boundary identification when using manual methods. By optimizing the target region boundary, the difference between the implanted electrode position and the actual target region can be minimized, thereby improving electrode positioning accuracy and reducing the possibility of incomplete functional area coverage or accidental contact with non-target regions. When generating the electrode implantation path from the needle insertion point to the target region, a vascular risk penalty term is applied to increase the probability of avoiding blood vessels during electrode implantation, helping to reduce the risk of postoperative bleeding. Attached Figure Description
[0061] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0062] Figure 1 A flowchart of an electrode implantation path generation method provided in this application;
[0063] Figure 2 This application provides a structural diagram of an electrode implantation path generation system;
[0064] Figure 3 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation
[0065] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0066] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0067] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0068] Reference Figure 1 , Figure 1 This is a flowchart illustrating an electrode implantation path generation method provided in an embodiment of this application, as shown below. Figure 1 As shown in the embodiment of this application, an electrode implantation path generation method may include steps 101 to 103, which are described in detail below.
[0069] Step 101: Acquire multimodal images and perform registration operations on the multimodal images to obtain registered images; wherein, the multimodal images include brain anatomical structure images, cerebral vascular images and brain functional area images.
[0070] Brain anatomical imaging can be MRI (Magnetic Resonance Imaging) images, which display brain anatomical structures, including the surface of the cerebral cortex, gyri and sulci, etc. Cerebral vascular imaging can be CTA (Computed Tomography Angiography) images, which display cerebral blood vessels. Brain functional area imaging can be fMRI (Functional Magnetic Resonance Imaging) or PET (Positron Emission Tomography) images, which display functional areas of the brain, including motor areas, language areas, etc. Optionally, during MRI scanning, the thickness of each image layer can be 1 mm to obtain MRI images. In CT angiography scanning, the thickness of each cross-sectional image layer can be 0.5 mm to obtain CTA images. During functional MRI, the thickness of each image layer can be 2 mm to obtain fMRI images.
[0071] Image registration is an image processing technique that matches and overlays two or more images acquired at different times, with different instruments, or under different conditions. Multimodal image registration refers to the spatial alignment of different medical images (including CTA, MRI, and fMRI) so that corresponding anatomical or functional points on the images are geometrically perfectly matched, ultimately resulting in a registered image.
[0072] In one possible implementation, a registration operation is performed on the multimodal images to obtain registered images, including:
[0073] Feature extraction was performed on multimodal images to obtain image features of multiple modalities; among them, the image features of multiple modalities include brain anatomical structure image features, cerebral vascular image features, and brain functional area image features;
[0074] Calculate the similarity between image features of each modality, and obtain the spatial correspondence between image features of each modality based on the similarity;
[0075] Based on spatial correspondence, spatial transformation operations are performed on multimodal images to make the positions of cerebral blood vessels correspond to the positions of brain anatomical structures, and the positions of brain anatomical structures correspond to the positions of brain functional areas, thus obtaining registered images.
[0076] Registration of multimodal images maps images of brain anatomy, blood vessels, and functional areas to the same spatial coordinate system, eliminating spatial positional deviations caused by differences in imaging equipment and patient positioning, and ensuring consistency in the spatial positions of corresponding anatomical structures across images. For example, it allows for precise alignment of the cortical contour in MRI with the cerebral blood vessels in CTA in three-dimensional space, ensuring that subsequent analyses are based on a unified spatial benchmark.
[0077] Currently, image registration is mostly done manually, where doctors manually overlay three images on an imaging workstation. This method is inefficient; manual overlaying of multimodal images requires repeated calibration, resulting in lengthy electrode implantation surgery planning times and making it unsuitable for batch surgeries. Therefore, this application proposes an automated multimodal image registration process to improve efficiency.
[0078] When extracting features from multimodal images to obtain image features of various modalities, brain anatomical structure images, cerebral vascular images, and brain functional area images can be input into a pre-trained U-Net model to extract features from each image, resulting in brain anatomical structure image features, cerebral vascular image features, and brain functional area image features. Brain anatomical structure image features can include gray matter and white matter boundary features, representing the sulcus and gyri texture of the brain. Cerebral vascular image features can include vascular gray-level gradient features, representing vascular morphology. Brain functional area image features can include the probability distribution features of functional activation areas, representing the contours of functional activation areas.
[0079] When calculating the similarity between image features of different modalities, Euclidean distance or mutual information can be used to obtain the spatial correspondence between image features of different modalities.
[0080] When performing spatial transformation operations on multimodal images based on spatial correspondence, spatial adjustments can be made to the images using linear and nonlinear transformations to ensure that the anatomical feature points of the three images coincide. Specifically, the surface features of the cerebral cortex in MRI images can be used as a reference to adjust the spatial positions of CTA and fMRI, achieving correspondence between the positions of cerebral blood vessels and brain anatomical structures (such as the adjacency relationship between the middle cerebral artery and the frontal cortex), and between the positions of brain anatomical structures and brain functional areas (such as the overlap between the motor cortex and the precentral gyrus), so that the registration error of the registered images is less than the preset error. Optionally, the linear transformation can be an affine transformation, the nonlinear transformation can be a thin-plate spline interpolation method, and the preset error can be 0.3 mm or other values.
[0081] Optionally, after acquiring multimodal images and before performing registration, the multimodal images can be denoised using Gaussian filtering and subjected to grayscale normalization. Since MRI images provide the clearest anatomical details, the coordinate system of the MRI images can be used as the reference coordinate system, and the CTA images and fMRI images can be mapped to the reference coordinate system using the above registration method.
[0082] Step 102: Perform region segmentation on the registered image to obtain brain anatomical structure, cerebral blood vessels and brain functional areas, and fuse brain anatomical structure, cerebral blood vessels and brain functional areas into the same three-dimensional brain model to obtain the fused three-dimensional brain model.
[0083] The brain anatomy includes the surface of the cerebral cortex and the sulci and gyri, which include sulci and gyri.
[0084] After registering the images, region segmentation can be performed. The registered images can be input into a pre-trained region segmentation model to obtain brain anatomical structures, cerebral blood vessels, and functional areas. Then, these brain anatomical structures, cerebral blood vessels, and functional areas are fused into a single 3D brain model to obtain a fused 3D brain model. The pre-trained region segmentation model can be obtained by inputting labeled multimodal images (manually labeled by the doctor as the surface of the cerebral cortex, cerebral blood vessels, functional areas, and sulci and gyri) into a U-Net model for training. The loss function can be the Dice coefficient, which measures the overlap between the segmentation result and the annotation.
[0085] In one possible implementation, the registered image is segmented to obtain brain anatomy, cerebral blood vessels, and functional brain regions, including:
[0086] The registered images are encoded to obtain multi-scale features;
[0087] Decode the multi-scale features to obtain the segmentation mask;
[0088] Region segmentation is performed based on the correspondence between pixel values of the segmentation mask and the region, resulting in brain anatomical structures, cerebral blood vessels, and brain functional areas.
[0089] When performing region segmentation on the registered image, the registered image can be input into the pre-trained U-Net model, i.e., the pre-trained region segmentation model. This model encodes the registered image through an encoder to extract multi-scale features, and decodes these features through a decoder to restore spatial resolution, outputting a segmentation mask of the same size as the input. Different pixel values in the segmentation mask correspond to different structures. Region segmentation can be performed based on the correspondence between pixel values in the segmentation mask and regions. For example, 0 corresponds to the background, 1 to the surface of the cerebral cortex, 2 to cerebral blood vessels, 3 to functional areas, and 4 to cerebral sulci and gyri, thus obtaining the brain anatomical structure, cerebral blood vessels, and brain functional areas. The brain anatomical structure includes the surface of the cerebral cortex and the cerebral sulci and gyri.
[0090] Optionally, after obtaining the segmentation results, morphological operations can be performed on the segmentation results. These morphological operations include erosion, dilation, and removal of small noise areas. Specifically, pseudo-vessels with a diameter < 0.5 mm can be removed, and boundary smoothing can be performed, such as curve optimization of brain sulci and gyri.
[0091] When integrating brain anatomy, blood vessels, and functional areas into a single 3D brain model, the segmented cortical surface, blood vessels (diameter ≥ 0.5 mm), functional areas (motor and language areas), and sulci can be merged into the same 3D model. In practical applications, an MRI 3D brain model can be used as a base. CTA-segmented blood vessels can be overlaid with red lines (e.g., thickness can be rendered by diameter, 0.5-1 mm as thin red lines, 1-2 mm as thick red lines), and fMRI-segmented functional areas can be overlaid with semi-transparent colored regions (e.g., blue for the motor area, green for the language area). Sulci can be marked with gray shading to indicate depth (dark gray can be used when the sulcus depth > 5 mm). The 3D coordinate information of each structure can then be stored in a unified 3D array, allowing cross-structure queries (e.g., querying the spatial distance between a blood vessel and a sulcus) via coordinate indexing.
[0092] Step 103: Obtain the target region and adjust the region boundary based on the fused 3D brain model so that the boundary of the target region is within the functionally related area, and / or the distance between the boundary and the adjacent region is not less than a safety threshold; wherein, the adjacent region includes cerebral blood vessels, sulci and non-functionally related areas adjacent to the target region. Non-functionally related areas are brain functional areas that do not have a functional relationship with the target region, and functionally related areas are brain functional areas that are adjacent to the target region and have a functional relationship.
[0093] The acquired target area can be the approximate region of the epileptogenic focus manually marked by the doctor based on images. However, due to significant differences in the marked areas among different doctors, and the large discrepancy between the area perceived by the doctor's eye and the actual target area, doctors may not have considered functionally related areas or anatomical limitations (such as potentially omitting surrounding related areas including sulci). This can lead to incomplete electrode coverage (e.g., not including necessary functionally related areas), failure to avoid sulci and blood vessels, requiring secondary adjustments to the electrode implantation position to correct these issues. Therefore, this application allows for adjustment of the target area's boundaries.
[0094] When adjusting the boundary of the target region, the boundary of the adjusted target region can be placed within a functionally related brain region that is adjacent to the target region (e.g., the functionally related region within 2 mm around the epileptogenic focus needs to be covered). If the target region does not include the functionally related region, the boundary of the target region can be expanded so that the boundary of the target region is within the functionally related region.
[0095] When adjusting the boundary of the target region, the distance between the adjusted boundary and adjacent cerebral blood vessels, sulci, and non-functional associated areas should not be less than a safe threshold. For example, if the boundary of the target region is expanded to touch the deep sulci (which may be deeper than 5 mm), the boundary should contract along the sulcus wall curve to prevent the electrode from falling into the sulcus. Similarly, if the boundary of the target region is close to a target blood vessel (which may have a diameter greater than 2 mm), it can be offset away from the vessel by a certain distance, such as 0.5 mm.
[0096] In practical applications, assuming that the doctor marks the epileptogenic focus as a spherical region with a diameter of 10mm, and the fused three-dimensional brain model shows that there is a motor correlative region within 2mm around the epileptogenic focus, and some of the boundaries are close to the sulcus (the depth of the sulcus is 6mm), then the boundary of the target region can be extended 2mm towards the motor correlative region, while contracting 1mm at the sulcus, ultimately forming an irregular ellipsoidal target region.
[0097] In one possible implementation, the target region's boundaries are adjusted based on the fused 3D brain model, including:
[0098] Based on the target region, feature extraction is performed on the brain functional area images in the fused 3D brain model to obtain functional features; among them, functional features represent the distance between the target region and adjacent brain functional areas, which include functionally related areas and non-functionally related areas.
[0099] Based on the target region, features are extracted from the brain anatomical structure images in the fused 3D brain model to obtain anatomical features; among them, the anatomical features represent the position of the sulci adjacent to the target region and the distance of the cerebral blood vessels adjacent to the target region.
[0100] Based on the importance of adjacent regions, functional features and anatomical features are weighted, and attention fusion is performed on the functional features and anatomical features based on the weighting results to obtain the fused features.
[0101] Based on the fused features, boundary coordinate correction values for the target region are generated; wherein, the boundary coordinate correction values indicate the extent to which the boundary of the target region extends into the functionally associated area, and / or, the value of the offset of the boundary of the target region away from the adjacent area;
[0102] The boundary of the target area is adjusted based on the boundary coordinate correction value.
[0103] When extracting features from brain functional area images in a fused 3D brain model based on a target region, the brain functional area images in the fused 3D brain model include the distribution information of functional areas surrounding the target region (such as the epileptogenic focus). This functional area distribution information includes whether it is adjacent to the motor and language areas, and the strength of functional connectivity. Functional feature extraction can be performed using a first convolutional neural network (CNN) model, specifically by performing convolution operations on fMRI images to extract functional features. These functional features characterize the distance between the target region and adjacent functionally associated areas, as well as the distance between the target region and adjacent non-functionally associated areas. This allows us to obtain the boundary threshold between the epileptogenic focus and surrounding normal functional areas, and also the diffusion range of the functionally abnormal area.
[0104] When extracting features from the fused 3D brain model images based on the target region, the fused 3D brain model images include anatomical morphological information surrounding the target region. This morphological information includes the depth of sulci and gyri, the thickness of the cerebral cortex, and the distance between the target region and cerebral blood vessels. Functional feature extraction can be performed using a second convolutional neural network model, specifically by performing convolution operations on MRI images to extract anatomical features. These anatomical features characterize the location of sulci adjacent to the target region and the distance to cerebral blood vessels adjacent to the target region, such as the location of deep sulci (sulcus depth > 5 mm) around the epileptogenic focus and the distance between the epileptogenic focus and blood vessels with a diameter ≥ 0.5 mm.
[0105] When assigning weights to functional and anatomical features based on the importance of adjacent regions, feature weights can be dynamically allocated according to clinical safety and target coverage integrity. If the target region is adjacent to important functional areas (such as the motor cortex), the weights of functional features extracted by the first convolutional neural network model can be increased, thereby preventing the optimized boundary from encroaching on functional areas. If there are deep sulci or small blood vessels around the target region, the weights of anatomical features extracted by the second convolutional neural network model can be increased, thereby ensuring that the optimized boundary avoids deep sulci or densely vascularized areas that could easily lead to electrode detachment.
[0106] When performing attentional fusion of functional and anatomical features based on the weighted allocation, the fused features can be obtained through weighted summation. Then, based on these fused features, boundary coordinate correction values for the target region are generated. These boundary coordinate correction values indicate the extent of the target region's expansion (e.g., from the epileptogenic focus initially labeled by the doctor to a 2mm surrounding functionally related area). They can also indicate the magnitude of the target region's boundary offset away from deep sulci and cerebral blood vessels, i.e., the fine-tuning amounts in the X, Y, and Z axis directions.
[0107] This application adjusts the boundary of the target region based on a fused 3D brain model to ensure that the boundary of the target region is within the functionally relevant area, and the distance between the boundary and adjacent regions is not less than a safety threshold. This solves the problem of incomplete electrode coverage caused by large errors in target region boundary identification when using manual methods. By optimizing the target region boundary, the difference between the implanted electrode position and the actual target region can be minimized, thereby improving electrode positioning accuracy and reducing the possibility of incomplete functional area coverage or accidental contact with non-target regions. By adjusting the initial target region to a more accurate target region, the error between the adjusted target region and the actual target region can be less than 1 mm, simultaneously meeting the dual requirements of covering the functionally relevant area and avoiding deep sulci and cerebral blood vessels.
[0108] Step 104: Based on the vascular risk penalty term, and with the goal of the path length from the needle insertion point of the electrode implantation to the target area being less than a preset length, generate the electrode implantation path from the needle insertion point to the target area; wherein, the vascular risk penalty term is determined at least based on the vascular risk weight, and the vascular risk weight increases as the distance between the path and the cerebral blood vessels decreases.
[0109] The vascular risk penalty term is determined at least based on the vascular risk weight. Specifically, the vascular risk penalty term can be determined directly based on the vascular risk weight. Alternatively, the vascular risk penalty term can be determined based on both the vascular risk weight and the diameter of the cerebral vessels. When the vascular risk weight remains constant, the vascular risk penalty term increases with the increase of the diameter of the cerebral vessels.
[0110] When generating the electrode implantation path from the needle insertion point to the target area, a path planning method can be used. This method is based on a vascular risk penalty and aims to ensure that the path length from the needle insertion point to the target area is less than a preset length. This path planning method can be algorithms such as A*, or fast probing random tree algorithms. A vascular risk weight is introduced during path planning; the closer the path is to a cerebral blood vessel, the higher the vascular risk weight, so that the planned path avoids blood vessels as much as possible. The preset length can be a multiple of the path length, such as 1.5 times, 2 times, or other multiples, to avoid excessively long paths increasing deflection errors during electrode implantation. This prevents the electrode from bending due to its own weight or brain tissue resistance, which could cause the actual implantation position to deviate from the target area. Of course, to avoid insufficient electrode implantation depth due to an excessively short path, which would prevent stable contact with the cortex (a reserved cortical contact segment of length, such as 5mm, needs to be left to prevent electrode detachment due to errors in skull drilling depth), the electrode implantation path can be no less than the sum of the skull thickness and the reserved length. For example, if the skull thickness is 5mm, the path length should be ≥10mm. In other words, the final electrode implantation path should be within a certain length range. If it exceeds the upper limit, the needle insertion point can be adjusted closer to the target area to shorten the electrode implantation path; if it is below the lower limit, the needle insertion point can be adjusted further away from the target area.
[0111] The initial electrode implantation point can be selected in areas where the skull curvature is less than a preset curvature, avoiding cranial sutures and depressions. Furthermore, the initial electrode implantation point should be positioned at a distance greater than a preset projection distance (e.g., 10mm or other values) from the functional areas (such as the language area or motor area) projected onto the skull, based on the three-dimensional projection of the functional areas from fMRI. The location of this initial electrode implantation point can be the midpoint projection of the line connecting the glabella and the external occipital protuberance, or other locations can be chosen.
[0112] This application addresses the problem that current surgical path planning does not fully consider cerebral vascular distribution information, which may cause vascular damage. When generating the electrode implantation path from the needle insertion point to the target area, it uses a vascular risk penalty term to increase the probability of avoiding blood vessels during electrode implantation, which helps reduce the risk of postoperative bleeding.
[0113] In one possible implementation, based on a vascular risk penalty term and with the objective that the path length from the needle insertion point to the target region is less than a preset length, an electrode implantation path from the needle insertion point to the target region is generated, including:
[0114] Obtain the target parameters and determine the objective function; where the target parameters include the location of the needle insertion point, and the objective function is the sum of the product of the distance from the needle insertion point to the target area, and the product is the product of the vascular risk weight and the diameter of the cerebral blood vessels;
[0115] With the objective function as the minimum, path planning is performed based on the position of the needle insertion point and the target area to obtain the initial path from the needle insertion point to the target area;
[0116] If the initial path does not meet the preset conditions, the target parameters are adjusted, and then the path planning is performed based on the position of the needle insertion point and the target area with the objective function as the goal, until the initial path meets the preset conditions, and then the electrode implantation path is obtained.
[0117] The preset conditions include that the length of the initial path is less than the preset length, the distance from the initial path to the obstacle is not less than the safety threshold, the preset length is a target multiple of the diameter of the target area, the obstacle includes the target blood vessel and the target sulcus adjacent to the initial path, the diameter of the target blood vessel is greater than the preset diameter, and the depth of the target sulcus is greater than the preset depth.
[0118] If the A* algorithm is used for path planning, a risk weight parameter for blood vessel distance is added to the traditional A* path algorithm. That is, the A* algorithm provided in this application takes the shortest path length as the basic objective and introduces a blood vessel risk penalty term. The objective function is f(n)=g(n)+h(n)+w(n)×v(n), where g(n) is the actual path length from the needle insertion point to the current node, h(n) is the Euclidean distance from the current node to the target area, w(n) is the blood vessel risk weight, and the closer to the blood vessel, the larger w(n) is. v(n) is the diameter of the cerebral blood vessel.
[0119] The A* algorithm uses the area from the starting point (i.e., the needle insertion point) to the target region as the search space, discretized into a three-dimensional mesh node. The neighborhood spacing of the mesh node can be 0.5 mm, and the three-dimensional mesh node covers the space from the skull to the cortex. First, the starting point is added to the open list, and the initial values are set as g(n) = 0, h(n) = Euclidean distance from the starting point to the target region, and w(n) × v(n) = 0. Then, the node with the smallest f(n) from the open list is selected and moved to the closed list. The g(n) of each neighboring node is calculated as the current node's g(n) plus the neighborhood spacing, and h(n) is the Euclidean distance from the neighboring node to the target region. If the distance between the neighboring node and the blood vessel is not greater than the safety threshold d (which can be 2 mm), then w(n) is the upper limit of the weight minus d / 0.2 (which can be 10 or other values). Otherwise, w(n) × v(n) = 0. If the neighboring node is not in the open or closed list, or if the newly calculated f(n) is better, then f(n) is updated, and the parent node is recorded. When any node in the target region is moved into the closed list, the parent node sequence is traced back to obtain the initial path from the starting point to the target region.
[0120] The process of generating the open list is as follows: An initial starting point is determined. Preliminary screening can be performed based on the three-dimensional coordinates of the target area, avoiding areas with weak skull structures and areas near large blood vessels. Initially, 1-3 candidate starting points are added to the open list. Then, for each starting point in the open list, neighboring nodes (potential path midpoints) within the three-dimensional space are searched according to the electrode implantation angle range (e.g., 0-30°) and a preset step size. The total cost is calculated for each neighboring node; the total cost is the path length cost plus the vascular risk weight cost. The closer the blood vessel and the higher the risk weight, the greater the total cost. Only neighboring nodes with a total cost below the safety threshold, not yet in the closed list, and avoiding deep sulci (e.g., sulcus depth > 5mm) are added to the open list. Then, the node with the lowest total cost is selected from the open list and moved to the closed list. This process is repeated until nodes reaching the cortical surface of the target area appear in the open list.
[0121] The final electrode implantation point is the skull drilling point optimized from the starting point through path planning, and must simultaneously satisfy two constraints: shortest path constraint and vessel avoidance constraint. The shortest path constraint requires that the path length from the implantation point to the target region (i.e., the spatial distance from the skull surface to the target cortical point) is no greater than 1.5 times, 2 times, or other multiples of the target region's diameter. The vessel avoidance constraint requires that there are no vessels with a diameter greater than the target length (e.g., 1 mm) within a safe threshold (e.g., 2 mm) below the implantation point. For example, if the starting point is selected at the midline of the skull, but the generated path needs to pass through the sagittal sinus (diameter > 3 mm), the implantation point can be shifted 5 mm towards the temporal side until the constraints of no large vessels below the implantation point and shortest path are satisfied.
[0122] Optionally, the target parameters may also include the electrode implantation angle, which is the angle between the electrode and the direction perpendicular to the skull.
[0123] In one possible implementation, with the objective function being minimized, path planning is performed based on the position of the needle insertion point and the target area to obtain an initial path from the needle insertion point to the target area, including:
[0124] With the objective function as the minimum, path planning is performed based on the electrode implantation angle, the position of the needle insertion point, and the target area to obtain the initial path from the needle insertion point to the target area; where the angle between the initial path and the perpendicular direction of the skull is the electrode implantation angle.
[0125] In one possible implementation, when the initial path does not meet the preset conditions, the target parameters are adjusted, including:
[0126] When the distance from the initial path to the obstacle is less than the safety threshold, the electrode implantation angle is adjusted by a preset angle towards the normal direction of the obstacle to obtain the adjusted electrode implantation angle.
[0127] Determine whether the contact area between the electrode and the skin is greater than the preset area under the adjusted electrode implantation angle; where the contact area is the product of the electrode cross-sectional area and the sine of the adjusted electrode implantation angle.
[0128] If the contact area is not greater than the preset area, the electrode implantation angle will be adjusted towards the normal direction of the obstacle until the contact area is greater than the preset area. Then, path planning will be performed based on the electrode implantation angle, the position of the needle insertion point, and the target area, with the objective function being minimized.
[0129] The initial path to the target area is a straight line. When the electrode implantation direction is perpendicular to the skull, the electrode implantation angle is 0°. Obstacles such as sulci and blood vessels can be detected along the path. When the distance from the initial path to an obstacle is less than a safety threshold, such as a section of the path being less than 1 mm from the sulcus wall, the electrode implantation angle is adjusted by a preset angle (e.g., 5°) towards the normal direction of the obstacle. The adjusted electrode implantation angle is then determined. It is judged whether the contact area between the electrode and the cortex is greater than a preset area (e.g., 2 mm² or 2.5 mm²) to prevent electrode detachment. If the contact area is greater than the preset area, the path length and risk weight are recalculated. If the contact area is not greater than the preset area, the electrode implantation angle is adjusted towards the normal direction of the obstacle until the contact area is greater than the preset area. Then, the path length and risk weight are recalculated to generate a new path. For example, if the path is close to the sulcus, calculate the normal direction of the sulcus (e.g., the depth direction of the sulcus is the Z-axis, and the normal is the XY plane direction), tilt the angle towards the normal direction, and adjust the step size by 5° each time, such as from 0°→5°→10°. When the adjusted angle avoids obstacles and meets the contact area constraint, the adjusted electrode implantation angle is obtained. Then, path planning is performed based on the electrode implantation angle, the position of the needle insertion point, and the target area.
[0130] Optionally, this application can also support manual fine-tuning by doctors during electrode implantation path generation, such as dragging path nodes to update avoidance results in real time. Path nodes are discrete coordinate points in three-dimensional space, representing key control points of the electrode path. The spacing between path nodes is determined by the path planning accuracy (e.g., 0.5mm). Doctors can manually drag nodes (e.g., dragging a path node from z=20mm to z=22mm, thereby triggering the system to recalculate).
[0131] Specifically, when node coordinates change, the spatial difference before and after the change is recorded (e.g., Δz = 2mm). Using the changed node as the new constraint, the neighborhood search of the A* algorithm is re-executed to update the affected path segments. For example, dragging a node may cause the parent nodes of five downstream nodes to change. Then, the vascular risk weights and sulcus avoidance of the new path are recalculated, generating an avoidance result report for the adjusted path. For example, if the original path avoidance rate was 90%, the avoidance rate drops to 80% after adjustment due to proximity to blood vessels, requiring further path optimization. Finally, the path color can be updated in real time in the 3D interface (e.g., safe paths are green, risky paths are yellow or red), and a pop-up prompt box shows that the blood vessel distance has changed from 2mm to 1mm, suggesting a fine-tuning of the electrode implantation angle, allowing doctors to choose whether to accept the adjustment.
[0132] In one possible implementation, after obtaining the target parameters, the following is also included:
[0133] Determine the skull thickness at the location of the needle insertion point;
[0134] The electrode implantation depth is obtained by adding the sum of the distance from the target area to the inner surface of the skull and the skull thickness to the compression amount during electrode implantation.
[0135] If the electrode implantation depth is greater than the target thickness, and / or the distance from the electrode tip to the contralateral cortex is greater than the target length, adjust the position of the needle insertion point and / or the electrode implantation angle, and then return to the step "Determine the skull thickness at the location of the needle insertion point" until the electrode implantation depth is not greater than the target thickness and the distance from the electrode tip to the contralateral cortex is not greater than the target length; wherein, the depth of the electrode tip is the electrode implantation depth.
[0136] The compression amount during electrode implantation refers to the deformation of the electrode itself caused by the mechanical interaction between the electrode and the brain tissue during the implantation process, which causes the electrode tip to deviate from the preset target position.
[0137] Electrode implantation depth refers to the effective implantation length of the electrode in the cortex after it penetrates the skull. The skull thickness T at the insertion point is calculated using skull CT scans. The initial depth value is the sum of the skull thickness and the distance to the inner surface of the skull. Considering brain tissue elasticity (which can be based on the elastic coefficient k fitted from MRI grayscale values, e.g., the elastic coefficient of gray matter is greater than that of white matter), the compression Δd during electrode implantation is simulated, where Δd = pressure × k. The pressure is estimated using finite element analysis. The depth is corrected by adding Δd to the initial depth value to ensure close contact between the electrode and the cortex. The electrode implantation depth must meet the following requirements: the distance from the electrode tip to the contralateral cortex must not exceed the target length (which can be 2 mm) to avoid penetrating the brain parenchyma. Furthermore, the distance from the electrode tip to the contralateral cortex must not exceed the target length (which can be 80% of the cortical thickness). Otherwise, the insertion point position and / or electrode implantation angle are adjusted, the skull thickness at the insertion point is re-determined, and the electrode implantation depth is obtained again to reassess whether the requirements are met.
[0138] In one possible implementation, after generating the electrode implantation path from the needle insertion point to the target region, the following is also included:
[0139] Acquire skull structure images and model construction parameters;
[0140] A three-dimensional finite element model is constructed based on skull structure images, model construction parameters, and the fused three-dimensional brain model.
[0141] Based on a three-dimensional finite element model, finite element analysis was used to simulate the drilling and electrode implantation processes to obtain the skull stress, contact pressure generated by the contact between the electrode and the cerebral cortex, and electrode displacement during the drilling process. Among them, the electrode displacement is the difference between the first position coordinate and the second position coordinate. The first position coordinate is the electrode position coordinate when the electrode is implanted by applying a displacement load, and the second position coordinate is the electrode position coordinate after the displacement load is removed.
[0142] When the skull stress is less than the strength threshold, the predicted feasibility of skull drilling is considered acceptable.
[0143] When the contact pressure is within the preset pressure range and the electrode displacement is less than the preset displacement, the predicted result of the electrode contact stability is qualified.
[0144] The model construction parameters include skull elastic parameters, brain tissue elastic parameters, and electrode material parameters. Among them, the Young's modulus of the skull elastic parameters can be 15 GPa and the Poisson's ratio can be 0.3; the brain tissue elastic parameters can be obtained based on MRI grayscale estimation, and the brain tissue elastic parameters include gray matter assignment and white matter assignment; the electrodes can be assigned rigid material parameters, with a Young's modulus of 200 GPa and a Poisson's ratio of 0.3.
[0145] When constructing a three-dimensional finite element model based on skull structure images, model construction parameters, and a fused three-dimensional brain model, a three-dimensional skull model, including skull thickness and curvature, can be extracted from skull structure images (such as skull CT images). The three-dimensional contours of the cerebral cortex, sulci and gyri, and blood vessels can be extracted from the fused three-dimensional brain model. Then, a three-dimensional finite element model of skull-brain tissue-electrode can be constructed. The electrode can be simplified to a cylinder with a diameter of 1.5 mm and the electrode length is determined according to the electrode implantation depth.
[0146] When simulating the drilling process using finite element analysis, a virtual drill bit can be defined in finite element software (such as ABAQUS or ANSYS). The diameter of the virtual drill bit matches the actual borehole, and can be 3mm. A displacement load is applied, pressing down on the skull surface at a speed of 2mm / s. The skull deformation and stress distribution are calculated to determine whether cracks occur at the borehole edge and whether the skull stress is less than the strength threshold. This strength threshold can be the skull's ultimate strength (e.g., skull compressive strength approximately 100 MPa, stress concentration < 80 MPa). If so, the predicted feasibility of skull drilling is considered acceptable. Alternatively, the morphological changes on the inner surface of the skull after drilling can be recorded, such as whether there are depressions or debris residue. If the skull stress is less than the strength threshold and no obvious cracks are generated, the predicted feasibility of skull drilling is considered acceptable; otherwise, a warning is issued.
[0147] When simulating electrode implantation using finite element analysis, a displacement load is applied along the electrode implantation path from the needle insertion point in the skull to the target cortical point in the target region. The electrode can be advanced at a speed of 1 mm / s to calculate brain tissue deformation, such as the degree of cortical compression, displacement of sulci and gyri, and contact stress between the electrode and the cortex. This contact pressure is the ratio of contact force to contact area. After the simulated electrode is fully implanted, the load is removed (equivalent to simulating release pressure), and the electrode displacement caused by the elastic rebound of brain tissue is calculated.
[0148] When predicting contact pressure, the contact force can be obtained by extracting the nodal forces in the contact area between the electrode surface and the skin layer through finite element analysis and summing them to obtain the total contact force F. The contact area can be obtained by extracting the unit areas of the electrode surface in contact with the skin layer and summing them to obtain the contact area A, or by multiplying the number of contact units by the unit area. The contact pressure is the ratio of the contact force to the contact area, which can be used to determine whether the contact pressure is within the preset pressure range (e.g., 20 kPa ≤ P ≤ 50 kPa). If so, the contact pressure is considered qualified.
[0149] When performing displacement prediction, the implantation displacement is the position coordinate when the electrode is fully implanted, and the rebound displacement is the position coordinate of the electrode due to the rebound of brain tissue after the load is removed. The absolute value of the rebound displacement minus the implantation displacement is taken as the electrode displacement. It is determined whether the electrode displacement is less than the preset displacement, which can be 0.5mm. If so, the electrode displacement is determined to be qualified.
[0150] If the contact pressure is 20kPa≤P≤50kPa and the total displacement Δd'<0.5mm, the contact is considered stable; otherwise, a warning is issued (for example, excessive pressure may cause skin damage, and excessive displacement may cause poor contact).
[0151] If the contact pressure and electrode displacement are both within acceptable limits, the predicted result of electrode contact stability is considered acceptable. Otherwise, an early warning is issued, indicating that excessive contact pressure may cause skin damage, and excessive displacement may cause poor electrode contact.
[0152] This application can solve the problem that current electrode implantation path planning does not consider the influence of skull drilling angle and brain tissue elastic deformation on electrode position, making it impossible to predict the possible displacement or poor contact risk after electrode implantation, resulting in a high postoperative electrode displacement rate. By adding preoperative simulation verification, including electrode contact stability verification and skull drilling feasibility verification, the postoperative electrode displacement rate can be reduced and controlled to below 5%.
[0153] In one possible implementation, after generating the electrode implantation path from the needle insertion point to the target region, the following is also included:
[0154] The minimum distance from the electrode implantation path to the cerebral blood vessel adjacent to the electrode implantation path is determined to obtain the first distance. When the first distance is not less than the safety threshold, the verification result of the blood vessel safety distance is qualified.
[0155] Determine the minimum distance from the electrode implantation path to the sulcus adjacent to the electrode implantation path, and obtain the second distance. When the second distance is not less than the safety threshold, the verification result of sulcus avoidance is qualified.
[0156] The system displays one or more of the following: the fused 3D brain model, the target region, the electrode implantation path, the length of the electrode implantation path, the electrode implantation angle, the contact pressure, the electrode displacement, the prediction results of the feasibility of skull drilling, the prediction results of electrode contact stability, the verification results of vascular safety distance, and the verification results of brain sulcus avoidance.
[0157] When verifying the safe distance of blood vessels, it can be determined whether the minimum distance from the electrode implantation path to the cerebral blood vessel adjacent to the electrode implantation path is not less than the safety threshold. The safety threshold is 2mm, 1mm or other values, which can be determined according to actual requirements. If it is, the verification result of the safe distance of blood vessels is qualified; otherwise, a warning is issued.
[0158] When verifying sulcus avoidance, it can be determined whether the minimum distance from the electrode implantation path to the adjacent sulcus (which can be a sulcus with a depth greater than 5mm) is not less than the safety threshold. The safety threshold is 2mm, 1mm or other values, which can be determined according to actual requirements. If it is, the verification result of sulcus avoidance is qualified; otherwise, a warning is issued.
[0159] It should be noted that for emergency surgeries, in order to further shorten the path planning time, finite element simulation can be omitted to verify the feasibility of skull drilling, electrode contact stability and brain sulcus avoidance. Only the path length and the safe distance to blood vessels need to be verified, which can further shorten the time.
[0160] Optionally, the system can calculate the target area positioning error, vascular avoidance rate, and implantation path length. It can also display one or more of the following: target area positioning error, vascular avoidance rate, implantation path length, fused 3D brain model, target area, electrode implantation path, electrode implantation angle, contact pressure, electrode displacement, prediction results of skull drilling feasibility, prediction results of electrode contact stability, verification results of vascular safety distance, and verification results of brain sulcus avoidance. This allows doctors to rotate, zoom, and view the cross-section. The system can also generate reports that include images, path parameters, predictions, and verification results, which can be used for surgical navigation.
[0161] The electrode implantation path generation method provided in this application achieves automatic multimodal image registration and structural segmentation through deep learning, solving the problems of low efficiency and large errors in manual registration. Registration time is significantly reduced, registration error is greatly minimized, and efficiency is improved, making it suitable for batch surgical scenarios. By combining the correlation between functional areas and anatomical structures, the target region boundary is automatically optimized, avoiding the subjectivity of manual annotation and improving target coverage consistency. Incorporating vascular avoidance into the path optimization objective and adapting to the brain sulci and gyri to adjust the implantation angle, the vascular avoidance rate is greatly improved, resulting in higher safety. It can avoid vessels with a diameter ≥0.5mm, reducing the risk of postoperative bleeding. Electrode displacement is predicted through finite element analysis, reducing the electrode displacement rate and proactively avoiding the risk of poor postoperative contact, thus reducing the probability of secondary surgery. The positioning accuracy is significantly improved, and the target region coverage error is reduced, meeting the requirements for high-precision implantation.
[0162] The above describes an electrode implantation path generation method provided by the embodiments of this application. The following will describe a system for performing the above-described electrode implantation path generation method.
[0163] Please see Figure 2 , Figure 2 This is a schematic diagram of an electrode implantation path generation system provided in an embodiment of this application. Figure 2As shown, the electrode implantation path generation system includes:
[0164] The registration module 201 is used to acquire multimodal images, perform registration operations on the multimodal images, and obtain registered images; wherein, the multimodal images include brain anatomical structure images, cerebral vascular images, and brain functional area images.
[0165] The fusion module 202 is used to perform region segmentation on the registered image to obtain brain anatomical structure, cerebral blood vessels and brain functional areas, and to fuse brain anatomical structure, cerebral blood vessels and brain functional areas into the same three-dimensional brain model to obtain the fused three-dimensional brain model; wherein, the brain anatomical structure includes the surface of the cerebral cortex and the sulci and gyri of the brain.
[0166] The target region adjustment module 203 is used to acquire the target region and adjust the region boundary of the target region based on the fused three-dimensional brain model so that the boundary of the target region is within the functional association zone, and / or the distance between the boundary and the adjacent region is not less than a safety threshold; wherein, the adjacent region includes cerebral blood vessels, sulci and non-functional association zones adjacent to the target region. The non-functional association zone is a brain functional area that does not have a functional relationship with the target region, and the functional association zone is a brain functional area that is adjacent to the target region and has a functional relationship.
[0167] The path generation module 204 is used to generate an electrode implantation path from the needle insertion point to the target area based on a vascular risk penalty term and with the goal that the path length from the needle insertion point to the target area is less than a preset length; wherein, the vascular risk penalty term is determined at least based on the vascular risk weight, and the vascular risk weight increases as the distance between the path and the cerebral blood vessels decreases.
[0168] In one possible implementation, the target region adjustment module 203 is specifically used for:
[0169] Based on the target region, feature extraction is performed on the brain functional area images in the fused 3D brain model to obtain functional features; among them, functional features represent the distance between the target region and adjacent brain functional areas, which include functionally related areas and non-functionally related areas.
[0170] Based on the target region, features are extracted from the brain anatomical structure images in the fused 3D brain model to obtain anatomical features; among them, the anatomical features represent the position of the sulci adjacent to the target region and the distance of the cerebral blood vessels adjacent to the target region.
[0171] Based on the importance of adjacent regions, functional features and anatomical features are weighted, and attention fusion is performed on the functional features and anatomical features based on the weighting results to obtain the fused features.
[0172] Based on the fused features, boundary coordinate correction values for the target region are generated; wherein, the boundary coordinate correction values indicate the extent to which the boundary of the target region extends into the functionally associated area, and / or, the value of the offset of the boundary of the target region away from the adjacent area;
[0173] The boundary of the target area is adjusted based on the boundary coordinate correction value.
[0174] Optionally, the vascular risk penalty term is determined based on the vascular risk weight and the diameter of the cerebral blood vessels. When the vascular risk weight remains unchanged, the vascular risk penalty term increases as the diameter of the cerebral blood vessels increases.
[0175] In one possible implementation, the path generation module 204 is specifically used for:
[0176] Obtain the target parameters and determine the objective function; where the target parameters include the location of the needle insertion point, and the objective function is the sum of the product of the distance from the needle insertion point to the target area, and the product is the product of the vascular risk weight and the diameter of the cerebral blood vessels;
[0177] With the objective function as the minimum, path planning is performed based on the position of the needle insertion point and the target area to obtain the initial path from the needle insertion point to the target area;
[0178] If the initial path does not meet the preset conditions, the target parameters are adjusted, and then the path planning is performed based on the position of the needle insertion point and the target area with the objective function as the goal, until the initial path meets the preset conditions, and then the electrode implantation path is obtained.
[0179] The preset conditions include that the length of the initial path is less than the preset length, the distance from the initial path to the obstacle is not less than the safety threshold, the preset length is a target multiple of the diameter of the target area, the obstacle includes the target blood vessel and the target sulcus adjacent to the initial path, the diameter of the target blood vessel is greater than the preset diameter, and the depth of the target sulcus is greater than the preset depth.
[0180] Optionally, the target parameters may also include the electrode implantation angle, which is the angle between the electrode and the direction perpendicular to the skull.
[0181] In one possible implementation, the path generation module 204 is also used for:
[0182] With the objective function as the minimum, path planning is performed based on the electrode implantation angle, the position of the needle insertion point, and the target area to obtain the initial path from the needle insertion point to the target area; where the angle between the initial path and the perpendicular direction of the skull is the electrode implantation angle.
[0183] In one possible implementation, the path generation module 204 is also used for:
[0184] When the distance from the initial path to the obstacle is less than the safety threshold, the electrode implantation angle is adjusted by a preset angle towards the normal direction of the obstacle to obtain the adjusted electrode implantation angle.
[0185] Determine whether the contact area between the electrode and the skin is greater than the preset area under the adjusted electrode implantation angle; where the contact area is the product of the electrode cross-sectional area and the sine of the adjusted electrode implantation angle.
[0186] If the contact area is not greater than the preset area, the electrode implantation angle will be adjusted towards the normal direction of the obstacle until the contact area is greater than the preset area. Then, path planning will be performed based on the electrode implantation angle, the position of the needle insertion point, and the target area, with the objective function being minimized.
[0187] In one possible implementation, the electrode implantation path generation system provided in this application further includes:
[0188] The depth determination module is used to determine the skull thickness at the needle insertion point after acquiring the target parameters; the sum of the distance from the target area to the inner surface of the skull and the skull thickness is added to the compression amount during electrode implantation to obtain the electrode implantation depth; when the electrode implantation depth is greater than the target thickness, and / or the distance from the electrode tip to the contralateral cortex is greater than the target length, the position of the needle insertion point and / or the electrode implantation angle are adjusted, and then the process returns to the step "determine the skull thickness at the needle insertion point" until the electrode implantation depth is not greater than the target thickness and the distance from the electrode tip to the contralateral cortex is not greater than the target length; wherein, the depth of the electrode tip is the electrode implantation depth.
[0189] In one possible implementation, the electrode implantation path generation system provided in this application further includes:
[0190] The prediction module is used to acquire skull structure images and model construction parameters after generating the electrode implantation path from the needle insertion point to the target area; based on the skull structure images, model construction parameters, and the fused 3D brain model, a 3D finite element model is constructed; based on the 3D finite element model, finite element analysis is used to simulate the drilling process and the electrode implantation process to obtain the skull stress, contact pressure generated by the electrode contacting the cerebral cortex, and electrode displacement during the drilling process; wherein, the electrode displacement is the difference between the first position coordinate and the second position coordinate, the first position coordinate is the electrode position coordinate when the electrode is implanted by applying a displacement load, and the second position coordinate is the electrode position coordinate after the displacement load is removed; when the skull stress is less than the strength threshold, the prediction result of skull drilling feasibility is qualified; when the contact pressure is within the preset pressure range and the electrode displacement is less than the preset displacement, the prediction result of electrode contact stability is qualified.
[0191] In one possible implementation, the electrode implantation path generation system provided in this application further includes:
[0192] The verification module is used to determine the minimum distance from the electrode implantation path to the cerebral blood vessel adjacent to the electrode implantation path, obtain a first distance, and when the first distance is not less than a safety threshold, the verification result of the blood vessel safety distance is qualified; and to determine the minimum distance from the electrode implantation path to the cerebral sulcus adjacent to the electrode implantation path, obtain a second distance, and when the second distance is not less than a safety threshold, the verification result of cerebral sulcus avoidance is qualified.
[0193] The display module is used to display one or more of the following: the fused 3D brain model, the target region, the electrode implantation path, the length of the electrode implantation path, the electrode implantation angle, the contact pressure, the electrode displacement, the prediction results of the feasibility of skull drilling, the prediction results of electrode contact stability, the verification results of vascular safety distance, and the verification results of brain sulcus avoidance.
[0194] In one possible implementation, the registration module 201 is used for:
[0195] Feature extraction was performed on multimodal images to obtain image features of multiple modalities; among them, the image features of multiple modalities include brain anatomical structure image features, cerebral vascular image features, and brain functional area image features;
[0196] Calculate the similarity between image features of each modality, and obtain the spatial correspondence between image features of each modality based on the similarity;
[0197] Based on spatial correspondence, spatial transformation operations are performed on multimodal images to make the positions of cerebral blood vessels correspond to the positions of brain anatomical structures, and the positions of brain anatomical structures correspond to the positions of brain functional areas, thus obtaining registered images.
[0198] In one possible implementation, the fusion module 202 is used for:
[0199] The registered images are encoded to obtain multi-scale features;
[0200] Decode the multi-scale features to obtain the segmentation mask;
[0201] Region segmentation is performed based on the correspondence between pixel values of the segmentation mask and the region, resulting in brain anatomical structures, cerebral blood vessels, and brain functional areas.
[0202] This application also provides an electronic device in its embodiments. (See reference...) Figure 3 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 3The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0203] like Figure 3 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. When the electronic device is powered on, the RAM 303 also stores various programs and data required for the operation of the electronic device. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0204] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 308 including, for example, memory cards, hard drives, etc.; and communication devices 309. Communication device 309 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have instead.
[0205] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the electrode implantation path generation methods provided in this application.
[0206] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the electrode implantation path generation methods provided in this application.
[0207] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0208] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0209] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0210] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A method for generating an electrode implantation path, characterized in that, include: Acquire multimodal images, perform registration operations on the multimodal images to obtain registered images; wherein, the multimodal images include brain anatomical structure images, cerebral vascular images, and brain functional area images; The registered image is segmented to obtain brain anatomical structure, cerebral blood vessels and brain functional areas, and the brain anatomical structure, cerebral blood vessels and brain functional areas are fused into the same three-dimensional brain model to obtain the fused three-dimensional brain model. A target region is acquired, and the boundary of the target region is adjusted based on the fused three-dimensional brain model so that the boundary of the target region is within the functional association zone, and / or the distance between the boundary and the adjacent regions is not less than a safety threshold; wherein, the adjacent regions include cerebral blood vessels, sulci, and non-functional association zones adjacent to the target region, the non-functional association zones are brain functional regions that do not have a functional relationship with the target region, and the functional association zones are brain functional regions that are adjacent to the target region and have a functional relationship; Based on a vascular risk penalty term, and with the objective that the path length from the needle insertion point to the target area is less than a preset length, an electrode implantation path is generated from the needle insertion point to the target area; wherein, the vascular risk penalty term is determined at least based on a vascular risk weight, and the vascular risk weight increases as the distance between the path and the cerebral blood vessels decreases.
2. The electrode implantation path generation method according to claim 1, characterized in that, The adjustment of the target region boundary based on the fused 3D brain model includes: Based on the target region, feature extraction is performed on the brain functional area images in the fused three-dimensional brain model to obtain functional features; wherein, the functional features characterize the distance between the target region and adjacent brain functional areas, and the adjacent brain functional areas include the functionally associated areas and the non-functionally associated areas; Based on the target region, features are extracted from the brain anatomical structure images in the fused three-dimensional brain model to obtain anatomical features; wherein, the anatomical features characterize the position of the sulci adjacent to the target region and the distance of the cerebral blood vessels adjacent to the target region; Based on the importance of the adjacent regions, the functional features and the anatomical features are weighted, and based on the weighting results, attention fusion is performed on the functional features and the anatomical features to obtain the fused features. Based on the fused features, a boundary coordinate correction value for the target region is generated; wherein, the boundary coordinate correction value indicates the extent to which the boundary of the target region extends toward the functional association area, and / or, the value by which the boundary of the target region shifts away from the adjacent region; The boundary of the target area is adjusted based on the boundary coordinate correction value.
3. The electrode implantation path generation method according to claim 1, characterized in that, The vascular risk penalty term is determined based on the vascular risk weight and the diameter of the cerebral blood vessels. When the vascular risk weight remains unchanged, the vascular risk penalty term increases as the diameter of the cerebral blood vessels increases. The generation of an electrode implantation path from the needle insertion point to the target area, based on a vascular risk penalty factor and with the objective that the path length from the electrode implantation insertion point to the target area is less than a preset length, includes: Obtain target parameters and determine target function; wherein, the target parameters include the position of the needle insertion point, and the target function is the sum of the product of the distance from the needle insertion point to the target region and the product of the vascular risk weight and the diameter of the cerebral blood vessels; With the objective function as the minimum, path planning is performed based on the position of the needle insertion point and the target area to obtain an initial path from the needle insertion point to the target area; When the initial path does not meet the preset conditions, the target parameters are adjusted, and then the path planning is performed based on the position of the needle insertion point and the target area with the objective function as the minimum as the objective function, until the initial path meets the preset conditions, and then the electrode implantation path is obtained. The preset conditions include that the length of the initial path is less than the preset length, the distance from the initial path to the obstacle is not less than the safety threshold, the preset length is a target multiple of the diameter of the target region, the obstacle includes a target blood vessel and a target sulcus adjacent to the initial path, the diameter of the target blood vessel is greater than the preset diameter, and the depth of the target sulcus is greater than the preset depth.
4. The electrode implantation path generation method according to claim 3, characterized in that, The target parameters also include the electrode implantation angle, which is the angle between the electrode and the direction perpendicular to the skull; The step of minimizing the objective function, based on the position of the needle insertion point and the target area, performs path planning to obtain an initial path from the needle insertion point to the target area, including: With the objective function as the minimum, path planning is performed based on the electrode implantation angle, the position of the needle insertion point, and the target region to obtain an initial path from the needle insertion point to the target region; wherein, the angle between the initial path and the perpendicular direction of the skull is the electrode implantation angle; When the initial path does not meet the preset conditions, adjusting the target parameters includes: When the distance from the initial path to the obstacle is less than the safety threshold, the electrode implantation angle is adjusted by a preset angle toward the normal direction of the obstacle to obtain the adjusted electrode implantation angle. Determine whether the contact area between the electrode and the skin is greater than a preset area at the adjusted electrode implantation angle; wherein the contact area is the product of the electrode cross-sectional area and the sine of the adjusted electrode implantation angle; If the contact area is not greater than the preset area, then the electrode implantation angle is adjusted towards the normal direction of the obstacle until the contact area is greater than the preset area. Then, the path planning is performed based on the electrode implantation angle, the position of the needle insertion point, and the target area, with the objective function being minimized.
5. The electrode implantation path generation method according to claim 4, characterized in that, After obtaining the target parameters, the following is also included: Determine the skull thickness at the location of the needle insertion point; The electrode implantation depth is obtained by adding the sum of the distance from the target area to the inner surface of the skull and the thickness of the skull, to the compression amount during electrode implantation. When the electrode implantation depth is greater than the target thickness, and / or the distance from the electrode tip to the contralateral cortex is greater than the target length, adjust the position of the needle insertion point and / or the electrode implantation angle, and then return to the step "determine the skull thickness at the location of the needle insertion point" until the electrode implantation depth is not greater than the target thickness and the distance from the electrode tip to the contralateral cortex is not greater than the target length; wherein, the depth of the electrode tip is the electrode implantation depth.
6. The electrode implantation path generation method according to any one of claims 1 to 5, characterized in that, After generating the electrode implantation path from the needle insertion point to the target region, the method further includes: Acquire skull structure images and model construction parameters; A three-dimensional finite element model is constructed based on the skull structure image, the model construction parameters, and the fused three-dimensional brain model. Based on the aforementioned three-dimensional finite element model, finite element analysis was used to simulate the drilling process and the electrode implantation process to obtain the skull stress, contact pressure generated by the contact between the electrode and the cerebral cortex, and electrode displacement during the drilling process. The electrode displacement is the difference between the first position coordinate and the second position coordinate. The first position coordinate is the electrode position coordinate when the electrode is implanted by applying a displacement load, and the second position coordinate is the electrode position coordinate after the displacement load is removed. When the skull stress is less than the strength threshold, the predicted feasibility of skull drilling is deemed acceptable. When the contact pressure is within a preset pressure range and the electrode displacement is less than a preset displacement, the predicted result of the electrode contact stability is considered acceptable.
7. The electrode implantation path generation method according to claim 6, characterized in that, After generating the electrode implantation path from the needle insertion point to the target region, the method further includes: The minimum distance from the electrode implantation path to the cerebral blood vessel adjacent to the electrode implantation path is determined to obtain a first distance. When the first distance is not less than the safety threshold, the verification result of the blood vessel safety distance is qualified. The minimum distance from the electrode implantation path to the brain sulcus adjacent to the electrode implantation path is determined to obtain a second distance. When the second distance is not less than the safety threshold, the verification result of brain sulcus avoidance is qualified. One or more of the following can be displayed: the fused 3D brain model, the target region, the electrode implantation path, the length of the electrode implantation path, the electrode implantation angle, the contact pressure, the electrode displacement, the prediction results of the feasibility of skull drilling, the prediction results of the electrode contact stability, the verification results of the vascular safety distance, and the verification results of brain sulcus avoidance.
8. The electrode implantation path generation method according to any one of claims 1 to 5, characterized in that, The registration operation on the multimodal images to obtain the registered images includes: Feature extraction is performed on the multimodal images to obtain image features of multiple modalities; wherein, the image features of multiple modalities include brain anatomical structure image features, cerebral vascular image features, and brain functional area image features; Calculate the similarity between the image features of each modality, and obtain the spatial correspondence between the image features of each modality based on the similarity; Based on the spatial correspondence, a spatial transformation operation is performed on the multimodal image to make the positions of cerebral blood vessels correspond to the positions of brain anatomical structures, and the positions of brain anatomical structures correspond to the positions of brain functional areas, thus obtaining the registered image.
9. The electrode implantation path generation method according to any one of claims 1 to 5, characterized in that, The registered image is segmented to obtain brain anatomy, cerebral blood vessels, and brain functional areas, including: The registered image is encoded to obtain multi-scale features; The multi-scale features are decoded to obtain the segmentation mask; Region segmentation is performed based on the correspondence between pixel values of the segmentation mask and regions to obtain the brain anatomical structure, the brain blood vessels, and the brain functional areas.
10. An electrode implantation path generation system, characterized in that, include: The registration module is used to acquire multimodal images and perform registration operations on the multimodal images to obtain registered images; wherein, the multimodal images include brain anatomical structure images, cerebral vascular images, and brain functional area images; The fusion module is used to perform region segmentation on the registered image to obtain brain anatomical structure, cerebral blood vessels and brain functional areas, and to fuse the brain anatomical structure, the cerebral blood vessels and the brain functional areas into the same three-dimensional brain model to obtain the fused three-dimensional brain model. The target region adjustment module is used to acquire a target region and adjust the region boundary of the target region based on the fused three-dimensional brain model, so that the boundary of the target region is within the functional association zone, and / or the distance between the boundary and the adjacent region is not less than a safety threshold; wherein, the adjacent region includes cerebral blood vessels, sulci, and non-functional association zones adjacent to the target region, the non-functional association zone is a brain functional region that has no functional relationship with the target region, and the functional association zone is a brain functional region that is adjacent to the target region and has a functional relationship; The path generation module is used to generate an electrode implantation path from the needle insertion point to the target area based on a vascular risk penalty term and with the goal that the path length from the needle insertion point to the target area is less than a preset length; wherein the vascular risk penalty term is determined at least based on a vascular risk weight, and the vascular risk weight increases as the distance between the path and the cerebral blood vessels decreases.