Transcranial magnetic stimulation head target point pose determination method and device and medium
By establishing a three-dimensional head model and dividing the space into partitions, multiple candidate rotation angles are generated. By combining inverse kinematics to solve the joint angle solutions, the problems of pose inaccessibility and interference in the transcranial magnetic stimulation system are solved, and the accuracy and feasibility of the treatment target location and stimulation direction are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-13
- Publication Date
- 2026-05-15
AI Technical Summary
Existing transcranial magnetic stimulation (TMS) systems are prone to problems such as unreachable robotic arms, unstable posture, or interference with the surrounding environment when determining a unique target pose, which affects the safety and success rate of treatment.
A 3D model is built by acquiring 3D information of the head, a spherical coordinate system is constructed and the space is divided into partitions, multiple candidate rotation angles are generated, and joint angle solutions are obtained by combining inverse kinematics and constraint conditions are screened to determine the final executable pose.
Ensuring the accuracy of the treatment target location and stimulation direction solves the problem of unreachable poses caused by patient positioning and robotic arm workspace limitations, significantly improving the feasibility of pose execution.
Smart Images

Figure CN122031931A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of magnetic stimulation therapy equipment, and in particular to a method, device and medium for determining the head target pose of transcranial magnetic stimulation. Background Technology
[0002] Transcranial magnetic stimulation (TMS) is a non-invasive treatment that stimulates brain activity by generating a changing magnetic field through a treatment device placed on a specific target location on the patient's head. To ensure the accuracy and repeatability of the stimulation effect, existing TMS systems typically require precise control over the position and orientation of the treatment device within the patient's head space.
[0003] Currently, most transcranial magnetic stimulation navigation systems acquire patient head models through visual or electromagnetic means, calculate the three-dimensional spatial coordinates and corresponding normal direction of the target point, and then directly construct a unique target pose in space based on the target point coordinates and normal direction, and control a six-axis robotic arm to move to that pose to implement stimulation therapy.
[0004] However, in actual treatment, due to factors such as the patient's sitting posture, the limitations of the seat and headrest structure, the limited workspace of the robotic arm, and the singular position distribution of the robotic arm, the above-mentioned unique posture scheme is prone to problems such as the robotic arm being unreachable, the posture being unstable, or interference with the surrounding environment, which in turn affects the safety and success rate of the treatment.
[0005] Therefore, it is evident that there is an urgent need to provide a solution that can achieve multi-dimensional adaptive adjustment of the therapeutic posture while ensuring the accuracy of the target location and stimulation direction. This is a technical problem that needs to be solved by those in the field. Summary of the Invention
[0006] The purpose of this application is to provide a method, device and medium for determining the head target pose during transcranial magnetic stimulation, which solves the problem that determining only one target pose during transcranial magnetic stimulation treatment can easily lead to problems such as the robotic arm being unable to reach the target, unstable posture or interference with the surrounding environment.
[0007] To address the aforementioned technical problems, this application provides a method for determining the head target pose during transcranial magnetic stimulation, comprising: Acquire three-dimensional information of the head and establish a three-dimensional model of the head, determine the target stimulation point, and obtain the three-dimensional coordinates and corresponding unit normal vector of the target stimulation point; Based on the three-dimensional head model, a spherical head model is constructed, a spherical coordinate system is established based on the spherical head model, and the head surface is divided into multiple non-overlapping spatial partitions. Based on the three-dimensional coordinates and the corresponding unit normal vector, determine the target spherical coordinates of the target stimulus point in the spherical coordinate system. The spatial partition to which the target stimulation target belongs is determined based on the spherical coordinates of the target point; Multiple candidate rotation angles are generated based on the rotation angle mapping strategy corresponding to the spatial partition to which the target stimulus point belongs; For each candidate rotation angle, a target pose matrix of the treatment device in the base coordinate system is constructed by combining the three-dimensional coordinates of the target point and the normal vector. The joint angle solutions corresponding to each target pose matrix are solved by inverse kinematics, and the joint angle solutions are filtered by constraint conditions to determine the final executable pose.
[0008] Optionally, in the above method for determining the pose of the head target point during transcranial magnetic stimulation, acquiring three-dimensional head information and establishing a three-dimensional head model, determining the target stimulation point, and obtaining the three-dimensional coordinates and corresponding unit normal vector of the target stimulation point include: The three-dimensional information of the head is acquired through a visual acquisition system, and a three-dimensional model of the head is reconstructed based on the three-dimensional information. According to the preset plan, target stimulation points are calibrated on the three-dimensional head model; The three-dimensional coordinates of the target stimulus point in the world coordinate system are calculated using a coordinate extraction algorithm. The unit normal vector of the head surface at the target stimulation point is obtained by the surface normal solution algorithm.
[0009] Optionally, in the above method for determining the pose of the head target point during transcranial magnetic stimulation, a spherical head model is constructed based on the three-dimensional head model, a spherical coordinate system is established based on the spherical head model, and the head surface is divided into multiple non-overlapping spatial partitions, including: The point cloud data of the head 3D model is fitted and calculated to obtain the center coordinates and equivalent radius of the head spherical model. The equivalent radius is the straight-line distance from the target stimulus point to the center coordinates of the sphere. A spherical coordinate system for the head is established with the center of the sphere as the origin. The directions of the coordinate axes of the coordinate system are determined and the coordinate transformation rules are defined. The partition boundaries and number of partitions are determined based on the preset treatment conditions and the workspace of the robotic arm. The angle range of each spatial partition is obtained based on the partition boundary and the head spherical coordinate system. The head surface is divided into multiple non-overlapping spatial partitions based on the angle range, and the boundaries of each partition do not intersect or overlap.
[0010] Optionally, in the above method for determining the head target pose of transcranial magnetic stimulation, determining the target spherical coordinates of the target stimulation target in the spherical coordinate system based on the three-dimensional coordinates and the corresponding unit normal vector includes: The three-dimensional coordinates of the target stimulation point are transformed to a spherical coordinate system to obtain spherical rectangular coordinates; According to the spherical coordinate transformation formula, the spherical rectangular coordinates are converted into target point spherical coordinates characterized by polar angle and azimuth angle.
[0011] Optionally, in the above method for determining the pose of the transcranial magnetic stimulation head target, multiple candidate rotation angles are generated based on a rotation angle mapping strategy corresponding to the spatial partition to which the target stimulation target belongs, including: Retrieve the rotation angle mapping strategy pre-established for each spatial partition, wherein the rotation angle mapping strategy is a spatial partition identifier and a set of candidate rotation angles or a rotation angle generation rule; Based on the spatial partition identifier of the target stimulus point, extract the corresponding candidate rotation angle set or rotation angle generation rule from the rotation angle mapping strategy; All candidate rotation angles within the candidate rotation angle set are obtained, or multiple candidate rotation angles are calculated according to the rotation angle generation rule; wherein, the rotation angle is the rotation angle of the unit normal vector of the treatment tap around the target stimulation point.
[0012] Optionally, in the above method for determining the head target pose during transcranial magnetic stimulation, for each candidate rotation angle, a target pose matrix of the treatment pulse in the base coordinate system is constructed by combining the three-dimensional coordinates of the target point and the normal vector, including: For each candidate rotation angle, determine the rotation transformation matrix of the unit normal vector of the treatment pulse around the target stimulation point; The translation vector of the treatment pulse is determined based on the three-dimensional coordinates of the target stimulation point; A 4×4 homogeneous transformation matrix is obtained based on the rotation transformation matrix and the translation vector. The homogeneous transformation matrix serves as the target pose matrix of the therapeutic device in the base coordinate system.
[0013] Optionally, in the above method for determining the head target pose during transcranial magnetic stimulation, the joint angle solutions corresponding to each target pose matrix are solved by inverse kinematics, and the joint angle solutions are screened for constraints to determine the final executable pose, including: Import the kinematic model of the robotic arm, input the target pose matrix into the inverse kinematics solution algorithm of the robotic arm, and obtain one or more sets of robotic arm joint angle solutions corresponding to each set of target pose matrices; By performing multi-dimensional constraint verification on each set of joint angle solutions, joint angle solutions that do not meet the constraints are removed, and feasible solutions are retained; wherein, the constraints include: joint limit constraints, singularity avoidance constraints, and collision interference constraints. All feasible solutions are comprehensively evaluated according to the preset evaluation function to determine the optimal feasible solution, and the final executable pose of the treatment pulse is determined based on the optimal feasible solution.
[0014] To address the aforementioned technical problems, this application also provides a transcranial magnetic stimulation head target pose determination device, comprising: The acquisition module is used to acquire three-dimensional information of the head and establish a three-dimensional model of the head, determine the target stimulation point, and obtain the three-dimensional coordinates and corresponding unit normal vector of the target stimulation point. The modeling module is used to construct a spherical head model based on the three-dimensional head model, establish a spherical coordinate system based on the spherical head model, and divide the head surface into multiple non-overlapping spatial partitions. The analysis module is used to determine the target spherical coordinates of the target stimulus point in the spherical coordinate system based on the three-dimensional coordinates and the corresponding unit normal vector. A partitioning module is used to determine the spatial partition to which the target stimulus point belongs based on the spherical coordinates of the target point. The rotation angle mapping module is used to generate multiple candidate rotation angles based on the rotation angle mapping strategy corresponding to the spatial partition to which the target stimulus point belongs; The pose multi-dimensional calculation module is used to construct a target pose matrix of the treatment device in the base coordinate system for each candidate rotation angle by combining the three-dimensional coordinates of the target point and the normal vector. The filtering module is used to solve the joint angle solutions corresponding to each target pose matrix through inverse kinematics, and to filter the joint angle solutions under constraints to determine the final executable pose.
[0015] To address the aforementioned technical problems, this application also provides a transcranial magnetic stimulation head target pose determination device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the above-described method for determining the pose of the transcranial magnetic stimulation head target.
[0016] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for determining the pose of a transcranial magnetic stimulation head target.
[0017] The transcranial magnetic stimulation (TMS) head target pose determination method provided in this application first reconstructs a model using three-dimensional head information to determine the target point and obtain its three-dimensional coordinates and unit normal vector, ensuring that the target point position and stimulation direction remain unchanged to guarantee the accuracy of the treatment pose. The three-dimensional head model is then converted into a spherical model, and a dedicated spherical coordinate system is established, while multiple non-overlapping spatial partitions are defined. Based on the spatial partition to which the target point belongs, a corresponding rotation angle mapping strategy is invoked to generate multiple candidate rotation angles. A dedicated target pose matrix is constructed for each candidate rotation angle. After solving the joint angle solutions through inverse kinematics, constraint conditions are used for screening, and finally, an executable pose is determined. This application utilizes the rotational degrees of freedom of the treatment tap around the target normal to generate multiple candidate poses. Pose adjustment is performed using only the rotational degrees of freedom of the treatment tap around the target normal, providing the robotic arm with multiple pose selection spaces without changing the core target point position and stimulation direction of the TMS, ensuring the accuracy of the treatment pose. This effectively solves the problem of pose inaccessibility caused by patient position and robotic arm workspace limitations, significantly improving the executability rate of the pose.
[0018] In addition, this application also provides a transcranial magnetic stimulation head target pose determination device, which corresponds to the above-mentioned transcranial magnetic stimulation head target pose determination method and has the same effect. Attached Figure Description
[0019] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This application provides a flowchart of a method for determining the pose of a transcranial magnetic stimulation head target. Figure 2 A schematic diagram illustrating the determination of head target pose for transcranial magnetic stimulation, provided as an embodiment of this application; Figure 3 A structural diagram of a transcranial magnetic stimulation head target pose determination device provided in an embodiment of this application; Figure 4 This is a structural diagram of another transcranial magnetic stimulation head target pose determination device provided in an embodiment of this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0022] The core of this application is to provide a method, device, and medium for determining the head target pose during transcranial magnetic stimulation.
[0023] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] This application provides a method for determining the head target pose during transcranial magnetic stimulation, such as... Figure 1 As shown, it includes: S11: Acquire three-dimensional information of the head and establish a three-dimensional model of the head, determine the target stimulation point, and obtain the three-dimensional coordinates of the target stimulation point and the corresponding unit normal vector; S12: Construct a spherical head model based on the 3D head model, establish a spherical coordinate system based on the spherical head model, and divide the head surface into multiple non-overlapping spatial partitions; S13: Determine the spherical coordinates of the target stimulus point in the spherical coordinate system based on the three-dimensional coordinates and the corresponding unit normal vector; S14: Determine the spatial region to which the target stimulus point belongs based on the spherical coordinates of the target point; S15: Generate multiple candidate rotation angles based on the rotation angle mapping strategy corresponding to the spatial partition to which the target stimulus point belongs; S16: For each candidate rotation angle, construct a target pose matrix of the treatment pulse in the base coordinate system by combining the three-dimensional coordinates of the target point and the normal vector. S17: Solve the joint angle solutions corresponding to each target pose matrix through inverse kinematics, and filter the joint angle solutions by constraint conditions to determine the final executable pose.
[0025] The method for determining the head target pose of transcranial magnetic stimulation disclosed in this application is applicable to the operation scenario of medical robots in clinical transcranial magnetic stimulation (TMS) treatment. The specific implementation environment is a TMS navigation treatment platform equipped with visual acquisition equipment (such as binocular depth camera, structured light scanner), six-axis robotic arm, TMS treatment camera, and host computer computing system. The host computer has built-in algorithm modules such as head modeling, coordinate calculation, inverse kinematics solution, and constraint screening. The visual acquisition equipment is used to acquire the three-dimensional information of the patient's head, and the six-axis robotic arm is used to drive the treatment camera to move to the target pose.
[0026] Step S11 involves acquiring three-dimensional head information and establishing a three-dimensional head model, determining the target stimulation point, and obtaining the three-dimensional coordinates and corresponding unit normal vector of the target stimulation point. This refers to the acquisition and extraction of the core parameters of the target point before TMS treatment, which is the basic step of the entire pose determination method and provides accurate core constraints for all subsequent pose calculations.
[0027] The three-dimensional information of the head refers to the spatial geometric information of the patient's head. For example, it can be acquired through visual acquisition devices as a three-dimensional point cloud or depth image of the head, which is the raw data for reconstructing the three-dimensional model of the head. The three-dimensional model of the head is a digital reconstruction model of the spatial morphology of the patient's head, which can intuitively reflect the surface features and spatial position of the head. The target stimulation point is a specific location on the patient's head that needs to be magnetically stimulated, selected by the clinician according to the treatment needs. It can be determined by neurologists based on clinical diagnostic results such as magnetic resonance imaging (MRI) navigation. The three-dimensional coordinates are the spatial position parameters of the target stimulation point in the world coordinate system. For example, the three-dimensional coordinates are Pt=(xt, yt, zt), where xt, yt, and zt are the coordinates of the x, y, and z axes, respectively. The unit normal vector is the normal direction vector of the head surface at the target stimulation point. For example, the unit normal vector is nt=(nx, ny, nz), ||nt||=1, where nx, ny, and nz represent the projection of the vector in the x, y, and z axes in three-dimensional space, and their directions define the stimulation direction of the treatment coil plane at the target point.
[0028] Step S12: Construct a spherical head model based on the 3D head model, establish a spherical coordinate system based on the spherical head model, divide the head surface into multiple non-overlapping spatial partitions, process the 3D head model, transform the complex head surface into a regular spherical model and perform spatial partitioning.
[0029] The head spherical model obtains the center and equivalent radius of the sphere through point cloud fitting, transforming the irregular head surface into a regular sphere, simplifying subsequent spatial coordinate calculations and partitioning operations. The spherical coordinate system is a dedicated spatial coordinate system established with the center of the head spherical model as the origin, describing the relative position of the target point on the head sphere, which is different from the world coordinate system in step S11. Multiple non-overlapping spatial partitions are several spatial regions into which the head sphere is divided according to preset angle intervals. The boundaries of each partition do not intersect or overlap. For example, they can be divided into the forehead region, top region, occipital region, left temporal region, right temporal region, etc. The number of partitions and boundaries can be flexibly configured according to clinical experience and the workspace of the robotic arm.
[0030] Step S13 determines the spherical coordinates of the target stimulus point in the spherical coordinate system based on the three-dimensional coordinates and the corresponding unit normal vector, and transforms the three-dimensional coordinates of the target point in the world coordinate system into spherical coordinates in the head spherical coordinate system.
[0031] The target spherical coordinates are the positional parameters of the target stimulus point in the head spherical coordinate system, including the polar angle θ and the azimuth angle Φ, where the polar angle range is [0,π] and the azimuth angle range is (-π,π).
[0032] Step S14 determines the spatial region to which the target stimulus target belongs based on the spherical coordinates of the target point. The spherical coordinates of the target point (polar angle θ, azimuth angle Φ) obtained in step S13 are compared one by one with the angle intervals of each spatial region preset in step S12. If the polar angle and azimuth angle of the target point are within the angle interval of a certain region, the target point is determined to belong to that region.
[0033] Step S15 generates multiple candidate rotation angles based on the rotation angle mapping strategy corresponding to the spatial partition to which the target stimulation point belongs. The rotation angle mapping strategy is a pre-established association rule between the rotation angle and the partition for each head spatial partition. It can be a set of candidate rotation angles or a rotation angle generation rule. Its establishment is based on multi-dimensional constraints such as robotic arm kinematics, environmental interference, and treatment safety, and is pre-stored in the host computer computing system. The candidate rotation angle is the rotation angle of the treatment paddle around the unit normal vector of the target point. The value range is generally 0°~360°. Each candidate rotation angle corresponds to a different rotation posture of the treatment paddle.
[0034] Robotic arm kinematic analysis: Ensure joint angles are within limits to avoid unusual configurations and wrist retraction.
[0035] Environmental interference analysis: Combining 3D models of patient seats, headrests, vision cameras, etc., to screen for rotation angle ranges with no collision risk.
[0036] Treatment safety analysis: Ensure that the treatment device handle and cable do not come into contact with sensitive areas such as the patient's face and neck.
[0037] By transforming complex spatial constraints into a regularized mapping table directly related to the head region, the efficiency of generating multiple candidate rotation angles during application can be improved.
[0038] This application involves changing the angle of the treatment paddle around its axis while maintaining the same stimulation direction. Since the structure of the treatment paddle, the direction of the handle, the direction of the robotic arm flange connection, and the direction of the cable exit will change with this rotation angle, although the target position and stimulation direction remain constant, the corresponding end effector posture, joint configuration, interference risk, and singularity risk will be significantly different for the robotic arm.
[0039] Step S16: For each candidate rotation angle, construct a target pose matrix of the treatment device in the base coordinate system by combining the three-dimensional coordinates of the target point and the normal vector. Transform the candidate rotation angle into the spatial pose parameters of the treatment device, providing standardized pose input for subsequent inverse kinematics solution of the robotic arm.
[0040] The base coordinate system is the fundamental coordinate system of the six-axis robotic arm, fixed at the base of the robotic arm, and is a reference system describing the spatial position of the treatment device relative to the robotic arm. The target pose matrix is a standardized matrix that characterizes the spatial position and orientation of the treatment device in the base coordinate system. An example is a 4×4 homogeneous transformation matrix, and each candidate rotation angle uniquely corresponds to a target pose matrix.
[0041] By constructing a target pose matrix, abstract parameters such as rotation angle, target coordinates, and normal vector are transformed into standardized pose parameters that can be recognized by the robotic arm.
[0042] Step S17 involves solving the joint angle solutions corresponding to each target pose matrix using inverse kinematics, and then filtering the joint angle solutions based on constraints to determine the final executable pose. Inverse kinematics is the process of solving the angle parameters that each joint of the robotic arm needs to rotate based on the target pose matrix of the treatment device. For a six-axis robotic arm, one target pose matrix can yield one or more sets of joint angle solutions, which represent different joint rotation methods for the robotic arm to achieve that pose. Constraint filtering is the process of performing multi-dimensional feasibility checks on all the joint angle solutions obtained, eliminating solutions that do not meet the constraints, and retaining feasible solutions. This embodiment does not impose strict restrictions on the constraints, but exemplary constraints may include joint limit constraints, singularity avoidance constraints, collision interference constraints, etc.
[0043] The final executable pose is the optimal pose selected from all feasible solutions. Its corresponding joint angle solution satisfies all constraints and is adapted to the motion characteristics of the robotic arm and clinical treatment requirements.
[0044] In summary, the transcranial magnetic stimulation (TMS) head target pose determination method provided in this application first reconstructs a model using three-dimensional head information to determine the target point and obtain its three-dimensional coordinates and unit normal vector, ensuring that the target point position and stimulation direction remain unchanged to guarantee the accuracy of the treatment pose. The three-dimensional head model is then converted into a spherical model, and a dedicated spherical coordinate system is established, while multiple non-overlapping spatial partitions are defined. Based on the spatial partition to which the target point belongs, a corresponding rotation angle mapping strategy is invoked to generate multiple candidate rotation angles. A dedicated target pose matrix is constructed for each candidate rotation angle. After solving the joint angle solutions through inverse kinematics, constraint conditions are used for screening, and finally, an executable pose is determined. This application utilizes the rotational degrees of freedom of the treatment tap around the target normal to generate multiple candidate poses. Pose adjustment is performed using only the rotational degrees of freedom of the treatment tap around the target normal, providing the robotic arm with multiple pose selection spaces without changing the core target point position and stimulation direction of the TMS, ensuring the treatment effect. This effectively solves the problem of pose inaccessibility caused by patient position and robotic arm workspace limitations, significantly improving the executability rate of the pose.
[0045] According to the above embodiments, in one specific embodiment, acquiring three-dimensional head information and establishing a three-dimensional head model, determining the target stimulation point, and obtaining the three-dimensional coordinates and corresponding unit normal vector of the target stimulation point, including: The three-dimensional information of the head is collected by a vision acquisition system, and a three-dimensional model of the head is reconstructed based on the three-dimensional information. According to the pre-set plan, the target stimulation points are marked on the three-dimensional head model; A coordinate extraction algorithm was used to calculate the three-dimensional coordinates of the target stimulus point in the world coordinate system. The unit normal vector of the head surface at the target stimulus point is obtained by solving the surface normal algorithm.
[0046] This specific embodiment involves the precise acquisition and quantitative extraction of core parameters such as the target location and stimulation direction of transcranial magnetic stimulation.
[0047] First, three-dimensional information of the head is acquired through a visual acquisition system, and a three-dimensional head model reflecting the spatial morphology of the head is reconstructed based on this information. Then, according to the pre-set clinical plan, the target stimulation point is accurately calibrated on the three-dimensional model to pinpoint the core location for clinical treatment. Subsequently, a coordinate extraction algorithm is used to calculate the three-dimensional coordinates of the target point in the world coordinate system, quantifying and determining the absolute spatial position of the target point. Finally, a surface normal vector solution algorithm is used to obtain the unit normal vector of the head surface at the target point, quantifying and defining the stimulation direction of the treatment pulse.
[0048] It should be noted that this embodiment only limits the core implementation means and does not strictly limit the specific type of visual acquisition system, coordinate extraction, and surface normal solution. Those skilled in the art can flexibly choose according to the actual hardware configuration and clinical needs, and this does not mean that this application can only be implemented by a certain device or algorithm. The visual acquisition system is a binocular depth camera or a structured light scanner.
[0049] According to the above embodiments, in one specific embodiment, a spherical head model is constructed based on a three-dimensional head model, a spherical coordinate system is established based on the spherical head model, and the head surface is divided into multiple non-overlapping spatial partitions, including: The point cloud data of the three-dimensional head model is fitted and calculated to obtain the center coordinates and equivalent radius of the spherical head model. The equivalent radius is the straight-line distance from the target stimulus point to the center coordinates of the sphere. Establish a spherical coordinate system for the head with the center of the sphere as the origin, determine the direction of the coordinate axes of the coordinate system, and determine the coordinate transformation rules; The partition boundaries and number of partitions are determined based on the preset treatment conditions and the workspace of the robotic arm. The angle ranges of each spatial partition are obtained based on the partition boundaries and the head spherical coordinate system. The head surface is divided into multiple non-overlapping spatial partitions based on the angle range, and the boundaries of each partition do not intersect or overlap.
[0050] First, the point cloud data of the 3D head model is fitted and calculated to obtain the coordinates of the head spherical model center, with the straight-line distance from the target point to the center of the sphere as the equivalent radius, simplifying the complex head shape into a regular sphere. Then, a head spherical coordinate system is established with the center of the sphere as the origin, clarifying the coordinate axis direction and coordinate transformation rules, providing a unified spatial reference system for subsequent partitioning. Next, combined with preset treatment conditions (such as clinical treatment safety areas) and the robotic arm workspace, the partition boundaries and number of partitions are determined to ensure that the partitions adapt to the actual treatment and mechanical operation needs. Subsequently, based on the partition boundaries and the spherical coordinate system, the angle intervals corresponding to each spatial partition are calculated, transforming the physical partitions into quantifiable coordinate intervals. Finally, based on these angle intervals, the head surface is divided into multiple non-intersecting and non-overlapping spatial partitions, completing the structured partitioning of the head.
[0051] The center Ch and equivalent radius R of the above-mentioned spherical head model can be obtained by fitting the head point cloud.
[0052] Center of the sphere: Ch = (xh, yh, zh); xh, yh, and zh are the coordinates of the center of the sphere on the x, y, and z axes, respectively; Equivalent radius: , which is the distance from Pt to Ch.
[0053] Establish a head spherical coordinate system with the center Ch as the origin.
[0054] Specifically, determining the spherical coordinates of the target stimulus point in the spherical coordinate system based on the three-dimensional coordinates and the corresponding unit normal vector includes: The three-dimensional coordinates of the target stimulus point are transformed into a spherical coordinate system to obtain spherical rectangular coordinates; Based on the spherical coordinate transformation formula, the spherical rectangular coordinates are converted into target point spherical coordinates characterized by polar angle and azimuth angle.
[0055] For any target stimulus point Pt, its position on the sphere can be described by the polar angle θt and the azimuth angle Φt: The polar angle θt = arccos((zt-zh) / R) has a range of [0,π]. The azimuth Φt = arctan2((yt-yh), (xt-xh)), and its range is (-π, π).
[0056] Based on a preset angle range of (θ, Φ), the entire spherical surface of the head is divided into N non-overlapping spatial partitions {Ω1, Ω2...ΩN}, each corresponding to a different anatomical region of the head. Exemplary partitions include: the frontal region (ΩF), the parietal region (ΩT), the occipital region (ΩO), the left temporal region (ΩLT), and the right temporal region (ΩRT). The number and boundaries of the partitions can be configured based on clinical experience and the workspace of the robotic arm.
[0057] According to the above embodiments, in one specific embodiment, multiple candidate rotation angles are generated based on a rotation angle mapping strategy corresponding to the spatial partition to which the target stimulus point belongs, including: Retrieve the rotation angle mapping strategy pre-established for each spatial partition. The rotation angle mapping strategy is the spatial partition identifier and the candidate rotation angle set or rotation angle generation rule. Based on the spatial partition identifier of the target stimulus point, extract the corresponding candidate rotation angle set or rotation angle generation rule from the rotation angle mapping strategy; All candidate rotation angles within the candidate rotation angle set can be obtained, or multiple candidate rotation angles can be calculated according to the rotation angle generation rule; where the rotation angle is the rotation angle of the unit normal vector of the treatment pulse around the target stimulation point.
[0058] This embodiment generates multiple sets of rotation angles based on preset rules of the target area. First, it retrieves the rotation angle mapping strategy pre-established for each head spatial area (this strategy associates the candidate rotation angle set or rotation angle generation rule with the spatial area identifier) to provide a preset basis for the generation of candidate rotation angles. Then, it matches the spatial area identifier of the target stimulation target and accurately extracts the candidate rotation angle set or generation rule corresponding to the area from the mapping strategy. Finally, it directly obtains all candidate rotation angles in the set, or calculates multiple candidate rotation angles according to the generation rule (the rotation angle specifically refers to the rotation angle of the unit normal vector of the treatment tap around the target point) to complete the generation of multiple candidate rotation angles.
[0059] It should be noted that this embodiment only limits the core generation logic and does not strictly limit the specific basis for the formulation of the rotation angle mapping strategy, the specific form of the rotation angle generation rule, or the range of rotation angle values (usually 0°~360°). It does not mean that this application can only be implemented in a certain rule or set form.
[0060] Different head regions exhibit significant differences in terms of robotic arm accessibility, interference risk, and stability; therefore, the appropriate rotation angle strategy for the treatment patting normal axis also varies.
[0061] In the top of the head, the robotic arm may be more prone to wrist retraction, excessive elbow elevation, or near-singular positions; in the back of the head, it is easily constrained by structures such as seat backs and headrests; in the left and right temporal regions, the orientation of the treatment device handle and robotic arm linkage may more easily conflict with the shoulders, camera supports, etc. Therefore, this application does not use a fixed rotation angle uniformly for all target points, but first determines which head region the target point is located in, and then calls the candidate rotation angle set or generation rule corresponding to that region.
[0062] The essence of the rotation angle mapping strategy is to regularize and parameterize the different posture optimization experiences and safety constraints corresponding to different head regions, thereby improving the executability and safety of the final pose. It solidifies the habit of different treatment orientations suitable for different regions into rules, facilitating automatic calculation.
[0063] According to the above embodiments, in a specific embodiment, for each candidate rotation angle, a target pose matrix of the therapeutic pulse in the base coordinate system is constructed by combining the three-dimensional coordinates of the target point and the normal vector, including: For each candidate rotation angle, determine the rotation transformation matrix of the unit normal vector of the treatment pulse around the target stimulation point; The translation vector of the treatment pulse is determined based on the three-dimensional coordinates of the target stimulation point; Based on the rotation transformation matrix and translation vector, a 4×4 homogeneous transformation matrix is obtained, which serves as the target pose matrix of the treatment device in the base coordinate system.
[0064] First, for each candidate rotation angle, the rotation transformation matrix corresponding to the rotation of the treatment device around the unit normal vector of the target point is calculated; then, the translation vector of the treatment device in the base coordinate system is determined based on the three-dimensional coordinates of the target point; finally, the rotation transformation matrix and the translation vector are fused to generate a 4×4 homogeneous transformation matrix, and this matrix is used as the target pose matrix of the treatment device in the base coordinate system, thus completing the standardized construction of the pose parameters.
[0065] Furthermore, in this embodiment, discrete parameters such as rotation angle, target coordinates, and normal vector are transformed into a unified homogeneous transformation matrix. Each candidate rotation angle is used to construct a target pose matrix separately, ensuring that each rotation posture corresponds to a unique pose parameter.
[0066] According to the above embodiments, in one specific embodiment, the joint angle solutions corresponding to each target pose matrix are solved by inverse kinematics, and the joint angle solutions are screened for constraints to determine the final executable pose, including: Import the kinematic model of the robotic arm, input the target pose matrix into the inverse kinematics solution algorithm of the robotic arm, and obtain one or more sets of robotic arm joint angle solutions corresponding to each set of target pose matrices; Based on the multi-dimensional constraint verification of each set of joint angle solutions, joint angle solutions that do not meet the constraints are removed, and feasible solutions are retained; the constraints include: joint limit constraints, singularity avoidance constraints, and collision interference constraints. All feasible solutions are comprehensively evaluated based on the preset evaluation function to determine the optimal feasible solution, and the final executable pose of the treatment pulse is determined based on the optimal feasible solution.
[0067] First, the kinematic model of the robotic arm is imported, and the pose matrices of each target are input into the inverse kinematics (IK) algorithm to obtain one or more sets of robotic arm joint angle solutions q_ik corresponding to each pose. Then, each set of joint angle solutions is checked for three types of constraints: joint limitation, singularity avoidance, and collision interference. Solutions that do not meet the requirements are eliminated, and only feasible solutions that satisfy all constraints are retained. Finally, all feasible solutions are comprehensively evaluated according to the preset evaluation function, the optimal feasible solution is selected, and the final executable pose of the treatment device is determined accordingly.
[0068] Joint limit constraint: Determine whether each joint angle of q_ik is within its physical limit [q_min, q_max].
[0069] Singularity avoidance constraints: Calculate indicators such as the condition number of the Jacobian matrix to avoid robot configurations with high singularity.
[0070] Collision interference constraint: Rapid collision detection is performed using a geometric model to ensure that the robotic arm, treatment device, patient, and environment do not interfere with each other.
[0071] Motion stability constraint (optional): Prefer solutions with gradual changes in joint angles and far from extreme positions.
[0072] From the feasible solutions that satisfy all constraints, an optimal joint angle solution q is selected according to the preset evaluation function (such as minimum joint motion, most stable robotic arm posture, maximum safety margin, etc.), and the corresponding treatment pose is the final selected executable pose T_tool.
[0073] If the optimal solution q and the corresponding pose T_tool are successfully selected, the system will generate motion commands to control the six-axis robotic arm to move smoothly and accurately to the pose and perform transcranial magnetic stimulation.
[0074] If there is no feasible solution that satisfies all constraints, the system determines that the target point is unreachable or poses a safety hazard under the current constraints, and issues an alarm to the operator, suggesting adjustments to the patient's position, the type of treatment device, or a redesign of the target point.
[0075] Figure 2 This is a schematic diagram illustrating the determination of head target pose for transcranial magnetic stimulation, as provided in an embodiment of this application. Figure 2As shown, after determining the target coordinates, normal vector, and partition, the corresponding set of rotation angles is determined. A pose matrix is constructed for each candidate rotation angle, and multi-constraint evaluation and screening are performed to obtain all feasible solutions. Each feasible solution is analyzed according to the preset evaluation function until an optimal joint angle solution is selected and output.
[0076] In the above embodiments, the method for determining the head target pose during transcranial magnetic stimulation (TMS) has been described in detail. This application also provides embodiments corresponding to the TMS head target pose determination device. It should be noted that this application describes the device embodiments from two perspectives: one based on functional modules and the other based on hardware.
[0077] From the perspective of functional modules Figure 3 A structural diagram of a transcranial magnetic stimulation head target pose determination device provided in this application embodiment is shown below. Figure 3 As shown, a transcranial magnetic stimulation head target pose determination device includes: The acquisition module 21 is used to acquire three-dimensional information of the head and establish a three-dimensional model of the head, determine the target stimulation point, and obtain the three-dimensional coordinates of the target stimulation point and the corresponding unit normal vector. Modeling module 22 is used to construct a spherical head model based on the 3D head model, establish a spherical coordinate system based on the spherical head model, and divide the head surface into multiple non-overlapping spatial partitions. Analysis module 23 is used to determine the spherical coordinates of the target stimulus point in the spherical coordinate system based on the three-dimensional coordinates and the corresponding unit normal vector. Partitioning module 24 is used to determine the spatial partition to which the target stimulus point belongs based on the spherical coordinates of the target point; Rotation angle mapping module 25 is used to generate multiple candidate rotation angles based on the rotation angle mapping strategy corresponding to the spatial partition to which the target stimulus point belongs; The pose multi-dimensional calculation module 26 is used to construct a target pose matrix of the treatment shot in the base coordinate system for each candidate rotation angle by combining the three-dimensional coordinates of the target point and the normal vector. The filtering module 27 is used to solve the joint angle solution corresponding to each target pose matrix through inverse kinematics, and to filter the joint angle solution by constraint conditions to determine the final executable pose.
[0078] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.
[0079] Figure 4 A structural diagram of another transcranial magnetic stimulation head target pose determination device provided in the embodiments of this application is shown below. Figure 4As shown, the transcranial magnetic stimulation head target pose determination device includes: a memory 30 for storing computer programs; The processor 31 is used to execute a computer program to implement the steps of the method for obtaining user operation habit information as described in the above embodiment (method for determining the pose of a head target point during transcranial magnetic stimulation).
[0080] The transcranial magnetic stimulation head target pose determination device provided in this embodiment may include, but is not limited to, mobile terminals, personal computers, workstations, etc.
[0081] The processor 31 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 31 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 31 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 31 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 31 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.
[0082] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 30 is used to store at least the following computer program 301, which, after being loaded and executed by the processor 31, is capable of implementing the relevant steps of the transcranial magnetic stimulation head target pose determination method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 30 may also include an operating system 302 and data 303, and the storage method may be temporary or permanent storage. The operating system 302 may include Windows, Unix, Linux, etc. The data 303 may include, but is not limited to, data involved in implementing the transcranial magnetic stimulation head target pose determination method.
[0083] In some embodiments, the transcranial magnetic stimulation head target pose determination device may further include a display screen 32, an input / output interface 33, a communication interface 34, a power supply 35, and a communication bus 36.
[0084] Those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the transcranial magnetic stimulation head target pose determination device and may include more or fewer components than shown.
[0085] The transcranial magnetic stimulation head target pose determination device provided in this application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: transcranial magnetic stimulation head target pose determination method.
[0086] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above embodiment of the transcranial magnetic stimulation head target pose determination method.
[0087] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0088] The computer-readable storage medium provided in this embodiment stores a computer program thereon. When the processor executes the program, the following method can be implemented: a method for determining the pose of a head target point under transcranial magnetic stimulation.
[0089] The foregoing provides a detailed description of the transcranial magnetic stimulation head target pose determination method, apparatus, and medium provided in this application. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.
[0090] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for determining the pose of a head target point during transcranial magnetic stimulation, characterized in that, include: Acquire three-dimensional information of the head and establish a three-dimensional model of the head, determine the target stimulation point, and obtain the three-dimensional coordinates and corresponding unit normal vector of the target stimulation point; Based on the three-dimensional head model, a spherical head model is constructed, a spherical coordinate system is established based on the spherical head model, and the head surface is divided into multiple non-overlapping spatial partitions. Based on the three-dimensional coordinates and the corresponding unit normal vector, determine the target spherical coordinates of the target stimulus point in the spherical coordinate system. The spatial partition to which the target stimulation target belongs is determined based on the spherical coordinates of the target point; Multiple candidate rotation angles are generated based on the rotation angle mapping strategy corresponding to the spatial partition to which the target stimulus point belongs; For each candidate rotation angle, a target pose matrix of the treatment device in the base coordinate system is constructed by combining the three-dimensional coordinates of the target point and the normal vector. The joint angle solutions corresponding to each target pose matrix are solved by inverse kinematics, and the joint angle solutions are filtered by constraint conditions to determine the final executable pose.
2. The method for determining the head target pose during transcranial magnetic stimulation according to claim 1, characterized in that, Acquire three-dimensional information of the head and establish a three-dimensional model of the head, determine the target stimulation point, and obtain the three-dimensional coordinates and corresponding unit normal vector of the target stimulation point, including: The three-dimensional information of the head is acquired through a visual acquisition system, and a three-dimensional model of the head is reconstructed based on the three-dimensional information. According to the preset plan, target stimulation points are calibrated on the three-dimensional head model; The three-dimensional coordinates of the target stimulus point in the world coordinate system are calculated using a coordinate extraction algorithm. The unit normal vector of the head surface at the target stimulation point is obtained by the surface normal solution algorithm.
3. The method for determining the head target pose during transcranial magnetic stimulation according to claim 1, characterized in that, Based on the aforementioned 3D head model, a spherical head model is constructed. A spherical coordinate system is established based on the head spherical model, and the head surface is divided into multiple non-overlapping spatial partitions, including: The point cloud data of the head 3D model is fitted and calculated to obtain the center coordinates and equivalent radius of the head spherical model. The equivalent radius is the straight-line distance from the target stimulus point to the center coordinates of the sphere. A spherical coordinate system for the head is established with the center of the sphere as the origin. The directions of the coordinate axes of the coordinate system are determined and the coordinate transformation rules are defined. The partition boundaries and number of partitions are determined based on the preset treatment conditions and the workspace of the robotic arm. The angle range of each spatial partition is obtained based on the partition boundary and the head spherical coordinate system. The head surface is divided into multiple non-overlapping spatial partitions based on the angle range, and the boundaries of each partition do not intersect or overlap.
4. The method for determining the head target pose during transcranial magnetic stimulation according to claim 1, characterized in that, Determining the spherical coordinates of the target stimulus point in the spherical coordinate system based on the three-dimensional coordinates and the corresponding unit normal vector includes: The three-dimensional coordinates of the target stimulation point are transformed to a spherical coordinate system to obtain spherical rectangular coordinates; According to the spherical coordinate transformation formula, the spherical rectangular coordinates are converted into target point spherical coordinates characterized by polar angle and azimuth angle.
5. The method for determining the head target pose during transcranial magnetic stimulation according to claim 1, characterized in that, Multiple candidate rotation angles are generated based on the rotation angle mapping strategy corresponding to the spatial partition to which the target stimulus point belongs, including: Retrieve the rotation angle mapping strategy pre-established for each spatial partition, wherein the rotation angle mapping strategy is a spatial partition identifier and a set of candidate rotation angles or a rotation angle generation rule; Based on the spatial partition identifier of the target stimulus point, extract the corresponding candidate rotation angle set or rotation angle generation rule from the rotation angle mapping strategy; All candidate rotation angles within the candidate rotation angle set are obtained, or multiple candidate rotation angles are calculated according to the rotation angle generation rule; wherein, the rotation angle is the rotation angle of the unit normal vector of the treatment tap around the target stimulation point.
6. The method for determining the head target pose during transcranial magnetic stimulation according to claim 5, characterized in that, For each candidate rotation angle, a target pose matrix of the treatment device in the base coordinate system is constructed by combining the three-dimensional coordinates of the target point and the normal vector, including: For each candidate rotation angle, determine the rotation transformation matrix of the unit normal vector of the treatment pulse around the target stimulation point; The translation vector of the treatment pulse is determined based on the three-dimensional coordinates of the target stimulation point; A 4×4 homogeneous transformation matrix is obtained based on the rotation transformation matrix and the translation vector. The homogeneous transformation matrix serves as the target pose matrix of the therapeutic device in the base coordinate system.
7. The method for determining the head target pose during transcranial magnetic stimulation according to claim 6, characterized in that, The joint angle solutions corresponding to each target pose matrix are obtained by inverse kinematics, and the joint angle solutions are filtered by constraint conditions to determine the final executable pose, including: Import the kinematic model of the robotic arm, input the target pose matrix into the inverse kinematics solution algorithm of the robotic arm, and obtain one or more sets of robotic arm joint angle solutions corresponding to each set of target pose matrices; By performing multi-dimensional constraint verification on each set of joint angle solutions, joint angle solutions that do not meet the constraints are removed, and feasible solutions are retained; wherein, the constraints include: joint limit constraints, singularity avoidance constraints, and collision interference constraints. All feasible solutions are comprehensively evaluated according to the preset evaluation function to determine the optimal feasible solution, and the final executable pose of the treatment pulse is determined based on the optimal feasible solution.
8. A transcranial magnetic stimulation head target pose determination device, characterized in that, include: The acquisition module is used to acquire three-dimensional information of the head and establish a three-dimensional model of the head, determine the target stimulation point, and obtain the three-dimensional coordinates and corresponding unit normal vector of the target stimulation point. The modeling module is used to construct a spherical head model based on the three-dimensional head model, establish a spherical coordinate system based on the spherical head model, and divide the head surface into multiple non-overlapping spatial partitions. The analysis module is used to determine the target spherical coordinates of the target stimulus point in the spherical coordinate system based on the three-dimensional coordinates and the corresponding unit normal vector. A partitioning module is used to determine the spatial partition to which the target stimulus point belongs based on the spherical coordinates of the target point. The rotation angle mapping module is used to generate multiple candidate rotation angles based on the rotation angle mapping strategy corresponding to the spatial partition to which the target stimulus point belongs; The pose multi-dimensional calculation module is used to construct a target pose matrix of the treatment device in the base coordinate system for each candidate rotation angle by combining the three-dimensional coordinates of the target point and the normal vector. The filtering module is used to solve the joint angle solutions corresponding to each target pose matrix through inverse kinematics, and to filter the joint angle solutions under constraints to determine the final executable pose.
9. A transcranial magnetic stimulation head target pose determination device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the transcranial magnetic stimulation head target pose determination method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the transcranial magnetic stimulation head target pose determination method as described in any one of claims 1 to 7.