A coil deviation early warning and control device and a transcranial magnetic stimulation instrument
Patent Information
- Application Number
- CN202611311633.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-10-30
AI Technical Summary
然而,现有方案通常仅能够显示线圈当前位置,或者基于首次治疗位置记录进行重复定位,往往不会将当前治疗靶点、目标线圈三维模型以及实时线圈三维模型进行比较
[0074]本申请提供了一种线圈偏差预警及控制的装置及经颅磁刺激仪,涉及经颅磁刺激领域,包括:在个体影像坐标系中建立与靶点绑定的目标线圈模型,并根据实时线圈标志物位姿生成实时线圈模型,实现了目标状态与实际状态之间的自动模型化比较,提高了线圈偏差判断的客观性,减少了依赖操作者经验进行人工判断的情况;通过计算目标线圈模型与实时线圈模型之间的模型偏差,并根据模型偏差生成偏差等级,使系统能够自动识别线圈偏离程度;进一步根据偏差等级确定准入控制状态并控制线圈工作,使偏差检测结果能够参与治疗流程控制,在偏差异常情况下能够限制或暂停治疗操作,提高了经颅磁刺激治疗过程的安全性和可靠性。
Smart Images

Figure CN122998616A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of transcranial magnetic stimulation, and in particular to a device for coil deviation warning and control, and a transcranial magnetic stimulator. Background Technology
[0002] In existing technologies, transcranial magnetic stimulation (TMS) therapy typically requires positioning the stimulation coil at the target brain region on the subject's head and maintaining the coil in a suitable position and orientation. Current TMS navigation systems usually utilize medical images such as MRI and CT scans to create a head model, and combine this with optical tracking, robotic arms, and visual positioning to obtain the coil's real-time pose to assist the operator in coil positioning. However, existing solutions typically only display the current coil position or repeat positioning based on the initial treatment position record, often without comparing the current treatment target point, the target coil's 3D model, and the real-time coil's 3D model. Furthermore, the effectiveness of coil therapy is affected not only by the coil position but also by multiple factors such as the stimulation focus position, the coil's center position, the coil's orientation, and the coil's plane rotation. A single distance or angle parameter is insufficient to accurately reflect the actual degree of coil deviation. In addition, some systems only use deviation results to alert the operator without further linking them to treatment initiation, treatment pause, treatment continuation, and treatment access control processes. This means that treatment commands may continue to be executed even when coil deviation is excessive, tracking fails, or registration is abnormal, reducing the safety of the treatment process. Summary of the Invention
[0003] The purpose of this invention is to provide a device for coil deviation early warning and control, and a transcranial magnetic stimulator, which can output different status levels according to the actual degree of coil deviation, realize the graded identification of treatment risks; determine the access control state according to the deviation level, control the coil operation, and limit the coil operation when the deviation is abnormal, thereby improving treatment safety.
[0004] To solve the above-mentioned technical problems, the present invention provides a device for coil deviation early warning and control, comprising:
[0005] Memory, used to store computer programs;
[0006] A processor, configured to perform the following steps when executing the computer program:
[0007] Acquire individual image data of the object, and establish an individual image coordinate system based on the individual image data of the object;
[0008] The target location of the object is determined, and a target coil model bound to the target location is generated in the individual image coordinate system based on the target location, the coil model and the coil model parameters. The coil is used to perform transcranial magnetic stimulation on the object.
[0009] The real-time pose of the coil's marker is obtained, and a real-time coil model in the individual image coordinate system is generated based on the real-time pose of the coil's marker.
[0010] Calculate the model deviation based on the target coil model and the real-time coil model;
[0011] A deviation level is generated based on the model deviation;
[0012] The admission control state is determined based on the deviation level, and the control coil is operated based on the admission control state.
[0013] On the other hand, determining the target location of the object includes:
[0014] The target region is obtained based on the individual image data of the object;
[0015] The location of the target point is determined based on the target area;
[0016] The position of the target point is transformed into the individual image coordinate system to obtain the three-dimensional coordinates corresponding to the target point.
[0017] On the other hand, generating a target coil model bound to the target location based on the target location, the coil type, and the coil model parameters includes:
[0018] Obtain the 3D model file of the coil corresponding to the coil model;
[0019] Determine the coil stimulation focus, coil center, coil normal, and coil plane reference direction based on the coil model.
[0020] The target pose of the target coil model is determined based on the position of the target point.
[0021] Based on the target pose, the coil 3D model file is converted to the individual image coordinate system;
[0022] The target coil model is generated based on the converted 3D coil model file.
[0023] On the other hand, acquiring the real-time pose of the coil's markers and generating a real-time coil model in the individual image coordinate system based on the real-time pose of the coil's markers includes:
[0024] Acquire the real-time pose of the marker on the coil collected by the tracking device;
[0025] The registration transformation between the tracking coordinate system and the individual image coordinate system, and the calibration transformation between the coil marker coordinate system and the coil model coordinate system are obtained. The tracking coordinate system is the coordinate system in which the real-time pose acquired by the tracking device is located.
[0026] Based on the real-time pose of the coil's markers, the registration transformation, and the calibration transformation, the pose of the real-time coil model in the individual image coordinate system is determined.
[0027] The real-time coil model is generated based on its pose in the individual image coordinate system.
[0028] On the other hand, determining the pose of the real-time coil model in the individual image coordinate system based on the real-time pose of the coil's markers, the registration transformation, and the calibration transformation includes:
[0029] The transformation relationship from the real-time coil model to the individual image coordinate system is determined according to the following formula:
[0030] ;
[0031] in, This represents the transformation from the real-time coil model coordinate system to the individual image coordinate system at time t. This indicates the registration transformation from the tracking coordinate system to the individual image coordinate system. This represents the coil marker pose output by the tracking device at time t. This indicates the calibration transformation from the coordinate system of the coil marker to the coordinate system of the coil model.
[0032] On the other hand, the model deviation is calculated based on the target coil model and the real-time coil model, including:
[0033] Determine the distance deviation from the stimulus focus to the target point, the distance deviation between the real-time stimulus focus and the target stimulus focus, the coil center distance deviation, the coil normal angle deviation, and the coil plane rotation deviation;
[0034] The distance deviation from the stimulus focus to the target point, the distance deviation between the real-time stimulus focus and the target stimulus focus, the distance deviation from the coil center, the deviation of the coil normal angle, and the deviation of the coil plane rotation are normalized respectively to obtain the corresponding sub-scores;
[0035] A comprehensive deviation score is determined based on all the sub-scores, and the expression for the comprehensive deviation score is:
[0036] ;
[0037] in, This represents the overall deviation score at time t. This represents the sub-score obtained by normalizing the distance deviation from the stimulus focus to the target point. This represents the sub-score obtained by normalizing the distance deviation between the real-time stimulus focus and the target stimulus focus. This represents the sub-score obtained by normalizing the coil center distance deviation. This represents the sub-score obtained by normalizing the deviation of the coil normal angle. This represents the sub-score obtained by normalizing the coil plane rotation deviation. , , , and This indicates the weight of each sub-rating. ;
[0038] The deviation level is determined based on the comprehensive deviation score.
[0039] On the other hand, the distance deviation from the stimulus focus to the target point is determined, and the expression for the distance from the stimulus focus to the target point is:
[0040] ;
[0041] in, This represents the distance from the real-time stimulus focus to the target at time t. This indicates that the focus of the real-time stimulus is activated at time t. Indicates the target coordinates;
[0042] The distance deviation between the real-time stimulus focus and the target stimulus focus is determined, and the expression for the distance between the stimulus focus and the target stimulus focus is:
[0043] ;
[0044] in, This represents the distance between the real-time stimulus focus and the target stimulus focus at time t. Indicates the target stimulus focus;
[0045] The coil center distance deviation is determined, and the expression for the coil center distance deviation is:
[0046] ;
[0047] in, This represents the distance between the center of the real-time coil and the center of the target coil at time t. This indicates the real-time coil center at time t. Indicates the center of the target coil;
[0048] The deviation of the coil's normal angle is determined, and the expression for the deviation of the normal angle is:
[0049] ;
[0050] in, This represents the angle between the real-time coil normal and the target coil normal at time t. This represents the real-time coil normal vector at time t. Represents the normal vector of the target coil. Represents the dot product of vectors. Indicates the length of the vector. This represents a small constant to prevent the denominator from being zero;
[0051] The rotational deviation of the coil plane is determined, and the expression for the rotational deviation of the coil plane is:
[0052] , , ;
[0053] in, This indicates the rotational deviation of the coil plane at time t. Indicates the real-time coil plane reference direction. Indicates the reference direction of the target coil plane. The projection vector representing the reference direction of the real-time coil plane. The projection vector represents the reference direction of the target coil plane.
[0054] On the other hand, determining the deviation level based on the comprehensive deviation score includes:
[0055] When the distance from the real-time stimulus focus to the target point Less than or equal to the normal threshold of the distance from the stimulus focus to the target point Coil normal angle deviation Less than or equal to the normal angle normal threshold And the coil plane rotation deviation Less than or equal to the normal threshold for planar rotation At that time, output the normal level;
[0056] When any deviation indicator exceeds the corresponding normal threshold but does not exceed the corresponding alarm threshold, an alert level is output.
[0057] The alarm level will be output when any of the following conditions are met:
[0058] ;
[0059] Distance deviation between real-time stimulus focus and target stimulus focus ;
[0060] Coil center distance deviation ;
[0061] ;
[0062] ;
[0063] Tracking data validity indicators It is false;
[0064] in, The alarm threshold represents the distance from the stimulus focus to the target point. The alarm threshold representing the distance between the real-time stimulus focus and the target stimulus focus. The alarm threshold representing the distance from the coil center. The alarm threshold representing the angle between the normal and the target direction. The alarm threshold represents the plane rotation angle.
[0065] On the other hand, determining the access control state based on the deviation level and controlling the coil to operate based on the access control state includes:
[0066] Acquire the registration status between the tracking coordinate system and the individual image coordinate system, the binding status between the target point and the target coil model, the effective status of coil tracking, the treatment status, and the coil model matching status;
[0067] The admission control state is determined based on the deviation level, the registration status, the binding status between the target point and the target coil model, the effective status of coil tracking, the treatment status, and the coil model matching status.
[0068] When the access control state meets the treatment access conditions, control the treatment start command or continue the coil operation;
[0069] When the admission control state does not meet the treatment admission conditions, the control treatment start command is not executed, or the control treatment continue command is not executed.
[0070] When the deviation level is an alarm level, the control pauses the operation of the coil and records the alarm event;
[0071] When the deviation level returns to the treatment access range and the registration status is valid, the control coil continues to operate;
[0072] Based on the changes in the level of deviation during the treatment process, control the operation permissions of key targets and record the treatment process data.
[0073] To address the aforementioned technical problems, the present invention also provides a transcranial magnetic stimulation device, including the aforementioned coil deviation warning and control device.
[0074] This application provides a device for coil deviation early warning and control, and a transcranial magnetic stimulation (TMS) instrument, relating to the field of TMS. The device includes: establishing a target coil model bound to a target point in an individual image coordinate system, and generating a real-time coil model based on the pose of real-time coil markers, thereby achieving automatic modeling comparison between the target state and the actual state, improving the objectivity of coil deviation judgment, and reducing reliance on operator experience for manual judgment; calculating the model deviation between the target coil model and the real-time coil model, and generating a deviation level based on the model deviation, enabling the system to automatically identify the degree of coil deviation; further determining the access control state and controlling coil operation based on the deviation level, allowing the deviation detection results to participate in the treatment process control, and restricting or suspending treatment operations in case of abnormal deviation, thus improving the safety and reliability of the TMS treatment process. Attached Figure Description
[0075] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0076] Figure 1 A schematic diagram of the structure of a coil deviation early warning and control device provided by the present invention;
[0077] Figure 2 A flowchart illustrating the method for implementing a coil deviation early warning and control device provided by the present invention. Detailed Implementation
[0078] The core of this invention is to provide a device for coil deviation early warning and control, and a transcranial magnetic stimulator, which can output different status levels according to the actual degree of coil deviation to achieve graded identification of treatment risks; determine the access control state according to the deviation level to control the coil operation; and restrict the coil operation when the deviation is abnormal to improve treatment safety.
[0079] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0080] Figure 1 This is a schematic diagram of a coil deviation warning and control device provided by the present invention. The coil deviation warning and control device includes:
[0081] Memory 11 is used to store computer programs;
[0082] Processor 12 is configured to perform the following steps when executing a computer program:
[0083] Figure 2 A flowchart illustrating a method for implementing a coil deviation early warning and control device provided by the present invention;
[0084] S21: Obtain individual image data of the object and establish an individual image coordinate system based on the individual image data of the object;
[0085] Individual imaging data can include MRI images, CT images, or other medical imaging data that reflects the structural features of the subject's head. After reading the individual imaging data, spatial analysis is performed to establish a corresponding individual imaging coordinate system. This coordinate system serves as the spatial reference for subsequent calculations of target location, target coil model, and real-time coil model. After establishing the individual imaging coordinate system, corresponding head models, skin models, brain tissue models, or cerebral cortex models can be generated based on the subject's imaging data. The head model can be used to help determine the spatial relationship between the coil and the subject's head, while the brain tissue model can be used to help determine the correspondence between the stimulation area and the target location.
[0086] S22: Determine the target location of the object, and generate a target coil model bound to the target location in the individual image coordinate system based on the target location, the coil model and the coil model parameters. The coil is used to perform transcranial magnetic stimulation on the object.
[0087] Target points can be directly selected by the physician from MRI or CT images, obtained through standard brain region coordinate transformation, or derived from brain region templates, historical treatment plans, or external treatment plan data. By transforming target points to an individual image coordinate system, the target points can correspond to the spatial structure of the subject's head, avoiding positioning deviations between different subjects caused by using fixed coordinates.
[0088] Furthermore, based on the target location, coil type, and coil model parameters, a target coil model bound to the target location is generated in the individual image coordinate system. The coil is used to perform transcranial magnetic stimulation on the subject. Specifically, the coil type used in the current treatment is obtained, and the corresponding coil model parameters are read according to the coil type. By spatially transforming the coil model parameters, a target coil model corresponding to the current treatment plan is formed.
[0089] The target coil model represents the desired spatial state of the coil in the treatment plan, and includes at least the spatial position and orientation information of the coil model, as well as its binding relationship with the target point. By binding the target coil model to the target point, the target coil model can represent the position and orientation of the coil under the current treatment plan.
[0090] S23: Obtain the real-time pose of the coil's markers and generate a real-time coil model in the individual image coordinate system based on the real-time pose of the coil's markers.
[0091] Furthermore, the real-time pose of the coil's markers is acquired, and a real-time coil model in the individual image coordinate system is generated based on the real-time pose of the coil's markers. Specifically, coil markers are set on the coil body, and the tracking device obtains the current spatial state of the coil by detecting the coil markers. The tracking device can be an optical tracking device, a visual tracking system, a robotic arm end-effector positioning device, an inertial measurement unit, or a multi-sensor fusion positioning device.
[0092] Since there is a correspondence between the space where the coil marker is located and the actual model space of the coil, the spatial state of the coil marker is converted into the spatial state of the coil model based on the real-time pose of the coil marker and the pre-established calibration relationship, and then further converted into the individual image coordinate system to form a real-time coil model.
[0093] S24: Calculate the model deviation based on the target coil model and the real-time coil model;
[0094] A real-time coil model is used to represent the current actual position and orientation of the coil during treatment. Model deviation is calculated based on the target coil model and the real-time coil model. Model deviation represents the difference between the current coil state and the target treatment state.
[0095] Model deviation can be determined based on the positional and orientational relationships between the target coil model and the real-time coil model. For example, spatial information such as the stimulus focus, coil center, and coil orientation in the real-time coil model can be compared with the corresponding information in the target coil model to obtain the degree of offset between the two.
[0096] S25: Generate deviation levels based on model deviations;
[0097] A deviation level is generated based on the aforementioned model deviation. The deviation level reflects the degree of deviation of the current coil pose from the target pose and can be a normal level, a warning level, or an alarm level. Each deviation indicator is compared with preset normal and alarm thresholds to comprehensively determine the current deviation level. For example, when all deviation indicators are within the normal threshold range, a normal level is output; when any deviation indicator exceeds the normal threshold but does not exceed the alarm threshold, a warning level is output; when any deviation indicator exceeds the alarm threshold or the tracking data is invalid, an alarm level is output.
[0098] S26: Determine the access control state based on the deviation level, and control the coil to work according to the access control state.
[0099] The access control state is determined based on the deviation level, and the execution of treatment commands is controlled according to the access control state. The access control state is a comprehensive judgment result that considers multiple factors such as deviation level, registration status, tracking effectiveness, target location binding status, and treatment command status. When the deviation level meets the treatment requirements, the coil is allowed to continue to execute the corresponding treatment operation; when the deviation level does not meet the treatment requirements, the coil is restricted from executing the treatment operation, or the coil's operating status is adjusted.
[0100] In summary, by establishing a target coil model and a real-time coil model, and generating a deviation level based on the model deviation between the two, the automatic judgment of the coil state during transcranial magnetic stimulation is realized. This transforms the coil positioning process from manual observation and judgment to an automatic detection process based on model comparison, thereby improving the consistency and reliability of coil position judgment during treatment.
[0101] This application provides a device for coil deviation early warning and control, relating to the field of transcranial magnetic stimulation (TMS). The device includes: establishing a target coil model bound to a target point in an individual image coordinate system; generating a real-time coil model based on the pose of real-time coil markers; achieving automatic model comparison between the target state and the actual state; improving the objectivity of coil deviation judgment; reducing reliance on operator experience for manual judgment; calculating the model deviation between the target coil model and the real-time coil model; generating a deviation level based on the model deviation; enabling the system to automatically identify the degree of coil deviation; further determining the access control state based on the deviation level and controlling coil operation; allowing deviation detection results to participate in treatment process control; and restricting or suspending treatment operations in cases of abnormal deviation, thereby improving the safety and reliability of the TMS treatment process.
[0102] Based on the above embodiments:
[0103] In some embodiments, determining the target location of an object includes:
[0104] Obtain the target area based on the individual image data of the object;
[0105] Determine the location of the target point based on the target area;
[0106] The target's position is transformed into the individual image coordinate system to obtain the target's corresponding three-dimensional coordinates.
[0107] After reading the patient's medical imaging data, the system identifies the head structures, brain regions, and target tissue areas within the images. Based on a pre-defined treatment plan, it determines the target areas to be stimulated. Target areas can be selected by the doctor through the image viewing interface or automatically determined by the system based on pre-defined brain region templates. When the doctor selects an area, the system receives the doctor's selection in the image space and obtains the corresponding coordinates. When using template matching, the system determines the target area based on the correspondence between the patient's image data and a standard brain region template.
[0108] The target location can be represented as a three-dimensional spatial point within the target region, which indicates the desired location for transcranial magnetic stimulation (TMS). After determining the target location, it is transformed into the individual image coordinate system to obtain the corresponding three-dimensional coordinates. Specifically, if the initial target data originates from a standard coordinate system, an external treatment plan, or other spatial references, it is transformed into the individual image coordinate system of the subject using coordinate transformation relationships.
[0109] Through the above processing, the target point can accurately correspond to the target area in the object's own image space, providing a spatial reference for the subsequent generation of the target coil model, so that the coil target position can maintain a correspondence with the actual treatment target.
[0110] In some embodiments, generating a target coil model bound to the target location based on the target location, the coil model, and the coil model parameters includes:
[0111] Obtain the 3D model file of the coil corresponding to the coil model;
[0112] Determine the coil stimulation focus, coil center, coil normal, and coil plane reference direction based on the coil model;
[0113] Determine the target pose of the target coil model based on the location of the target point;
[0114] Convert the coil 3D model file to the individual image coordinate system based on the target pose;
[0115] Generate the target coil model based on the converted 3D coil model file.
[0116] The target coil model represents the pre-defined spatial state of the target coil during transcranial magnetic stimulation (TMS) therapy. After determining the target location, the coil model used in the current treatment is obtained, and the corresponding coil model parameters are called based on the coil model to generate a target coil model that matches the current treatment plan. The coil model parameters include the coil stimulation focus, coil center, coil normal, and coil plane reference direction.
[0117] First, obtain the 3D model file corresponding to the coil model. This file can be stored in a coil model database or imported from an external device. The 3D model file can be stored in PLY, STL, OBJ, VTKpolydata, or a programmatically generated geometric model file format. Different coil models differ in their external structure, stimulation area distribution, marker installation location, and internal coordinate definition methods; therefore, their corresponding 3D model parameters need to be saved separately.
[0118] The coil stimulation focus represents the location in the coil model that generates the primary magnetic stimulation effect; it can be obtained based on coil manufacturing parameters, experimental calibration results, or model coordinate definitions. The coil center represents the reference center position in the coil's geometry. The coil normal represents the coil stimulation direction. The coil plane reference direction represents the reference direction when the coil rotates around the normal direction. A coil model coordinate system is established within the coil model, and the coil stimulation focus, coil center, coil normal, and coil plane reference direction are all defined within this coordinate system. By uniformly defining the internal spatial parameters of the coil model, different coil models can participate in subsequent model conversion and deviation calculation processes using the same data structure.
[0119] Based on the target's position in the individual image coordinate system, and the coil orientation, stimulation distance, and posture requirements set in the treatment plan, the target position and posture of the coil's 3D model in the individual image coordinate system are determined. This allows the stimulation focus in the target coil model to coincide with the target, or maintains a preset distance between the stimulation focus and the target according to clinical treatment requirements. For example, in some treatment plans, the stimulation focus can be located at a certain distance above the target to adapt to the patient's head surface morphology and stimulation depth requirements.
[0120] Based on the spatial transformation relationship corresponding to the target coil model, each spatial point in the coil model coordinate system is transformed to the individual image coordinate system, thereby obtaining the target coil model in the patient's individual space. The transformed target coil model includes the coil's three-dimensional structural information, the coil's center position, the stimulation focus position, the coil's normal direction, the coil's planar reference direction, and the binding relationship with the target point.
[0121] The target coil model establishment process includes steps such as target acquisition, coil model selection, coil model parameter reading, target pose determination, and model space transformation. Through the above process, corresponding target coil models can be automatically generated based on the individual image structure of different objects and different coil models, so that the treatment target state can be saved in the form of a three-dimensional model, providing a unified reference for subsequent real-time deviation judgment.
[0122] Therefore, by associating the target point, coil type, and coil model parameters, personalized coil targets for different subjects and different coil types are achieved, enabling the target coil model to accurately reflect the desired coil state in the current treatment plan, thereby improving the accuracy of subsequent deviation calculations.
[0123] In some embodiments, acquiring the real-time pose of the coil's markers and generating a real-time coil model in an individual image coordinate system based on the real-time pose of the coil's markers includes:
[0124] Acquire the real-time pose of the marker on the coil collected by the tracking device;
[0125] Obtain the registration transformation between the tracking coordinate system and the individual image coordinate system, as well as the calibration transformation between the coil marker coordinate system and the coil model coordinate system;
[0126] Based on the real-time pose of the coil's markers, registration transformation, and calibration transformation, the pose of the real-time coil model in the individual image coordinate system is determined.
[0127] A real-time coil model is generated based on the pose of the real-time coil model in the individual image coordinate system.
[0128] First, the real-time pose of the coil marker is acquired using a tracking device. This tracking device can be an infrared optical tracker, visible light visual tracker, depth camera, robotic arm encoder, inertial measurement unit, electromagnetic positioning, or multi-sensor fusion. The coil marker is a rigid body fixedly mounted on the coil, with at least three non-collinear reflective marker spheres or visually identifiable tags affixed to it, thus defining the coil marker's coordinate system. The tracking device outputs the pose of the coil marker's coordinate system in the tracking coordinate system in real time at a preset sampling frequency. This pose includes three-dimensional translation and three-dimensional rotation.
[0129] A real-time coil model is used to represent the actual spatial state of the coil during transcranial magnetic stimulation (TMS) therapy. By acquiring the real-time pose of the coil's markers and combining the spatial registration relationship with the calibration relationship between the coil markers and the coil model, the data collected by the tracking device is converted into a real-time coil model in the individual image coordinate system.
[0130] First, the real-time pose of the coil marker, acquired by the tracking device, is obtained. This tracking device can be an optical tracker, a visual tracker, a robot end effector, an inertial measurement unit, or a multi-sensor fusion positioning device. Rigid markers, reflective marks, or visual tags are installed outside the coil. The tracking device detects changes in the position and orientation of these markers to obtain the current motion state of the coil. The data output by the tracking device is located in the tracking coordinate system and includes the position coordinates and orientation information of the coil marker. Because there is a spatial difference between the tracking coordinate system and the patient's individual image coordinate system, further coordinate transformation is required.
[0131] The system acquires the registration transformation between the tracking coordinate system and the individual image coordinate system, as well as the calibration transformation between the coil marker coordinate system and the coil model coordinate system. The registration transformation describes the positional correspondence between the tracking space and the patient image space, and can be obtained through surface registration, marker registration, or probe point selection registration. The calibration transformation describes the spatial relationship between the coil marker installation position and the actual coil model, which is usually determined during equipment installation or calibration.
[0132] First, the current spatial state of the coil marker is determined based on its real-time pose. Then, the marker coordinates are transformed to the coil model coordinate system using calibration transformation. Finally, the coil model coordinates are transformed to the individual image coordinate system using registration transformation.
[0133] A real-time coil model is generated based on its pose in the individual image coordinate system. The real-time coil model includes the current coil type, the spatial transformation relationship of the real-time coil model, the center of the real-time coil, the real-time stimulus focus, the real-time coil normal, and the plane reference direction of the real-time coil.
[0134] Therefore, by acquiring the coil motion state in real time and combining registration and calibration transformations to generate a real-time coil model in the individual image coordinate system, the actual coil state during the treatment process can be in the same spatial reference as the treatment target state, providing a reliable data basis for model deviation calculation.
[0135] In some embodiments, determining the pose of the real-time coil model in the individual image coordinate system based on the real-time pose of the coil's markers, registration transformation, and calibration transformation includes:
[0136] The transformation relationship from the real-time coil model to the individual image coordinate system is determined using the following formula:
[0137] ;
[0138] in, This represents the transformation from the real-time coil model coordinate system to the individual image coordinate system at time t. This indicates the registration transformation from the tracking coordinate system to the individual image coordinate system. This represents the coil marker pose output by the tracking device at time t. This indicates the calibration transformation from the coordinate system of the coil marker to the coordinate system of the coil model.
[0139] × represents matrix multiplication. Through the above transformation, any point in the coil model coordinate system is transformed to the individual image coordinate system: ;
[0140] in, This represents the coordinates of the point in the individual image coordinate system at time t. This represents the homogeneous coordinates of the point in the coordinate system of the coil model.
[0141] After determining the complete pose of the real-time coil model in the individual image coordinate system, the key feature points and orientation vectors in the coil model are transformed to the individual image coordinate system, including: transforming the coil center to the individual image coordinate system to obtain the real-time coil center, transforming the stimulation focus to obtain the real-time stimulation focus, transforming the coil normal to obtain the real-time coil normal, and transforming the coil plane reference direction to obtain the real-time coil plane reference direction.
[0142] Ultimately, a complete real-time coil model is formed, whose data structure includes: coil model, transformation from the real-time coil to the individual image coordinate system, real-time coil center, real-time stimulation focus, real-time coil normal, real-time coil plane reference direction, and tracking data validity indicator. This real-time coil model is continuously updated over time, reflecting the real-time spatial pose of the coil during treatment.
[0143] First, a calibration transformation is used to convert points in the coil model coordinate system to the coil marker coordinate system. Then, the pose output by the tracking device is used to convert points from the coil marker coordinate system to the tracking coordinate system. Finally, a registration transformation is used to convert points from the tracking coordinate system to the individual image coordinate system. Through this transformation chain, any point in the coil model coordinate system is accurately mapped to its corresponding position in the individual image coordinate system.
[0144] At each sampling time t, a transformation calculation is performed according to the above formula, and the result is updated. This transformation matrix was then used to calculate the corresponding values of the real-time coil center, real-time stimulus focus, real-time coil normal, and real-time coil plane reference direction in the individual image coordinate system. Specifically, for the coordinates of points such as the coil center and stimulus focus, the formula was used. Perform the conversion; for direction vectors such as the coil normal and the plane reference direction, use the formula... Perform the conversion, where yes The rotation component in the model does not include the translation component. The spatial pose of the real-time coil model was determined using matrix transformation formulas, improving the accuracy of position and pose calculations of the real-time coil model in the individual image coordinate system.
[0145] In some embodiments, the model deviation is calculated based on the target coil model and the real-time coil model, including:
[0146] Determine the distance deviation from the stimulus focus to the target point, the distance deviation between the real-time stimulus focus and the target stimulus focus, the coil center distance deviation, the coil normal angle deviation, and the coil plane rotation deviation;
[0147] The deviations of the distance from the stimulus focus to the target point, the distances of the real-time stimulus focus to the target stimulus focus, the distances of the coil center, the coil normal angle deviation, and the coil plane rotation deviation are normalized to obtain the corresponding sub-scores.
[0148] The overall deviation score is determined based on all sub-scores. The expression for the overall deviation score is as follows:
[0149] ;
[0150] in, This represents the overall deviation score at time t. This represents the sub-score obtained by normalizing the distance deviation from the stimulus focus to the target point. This represents the sub-score obtained by normalizing the distance deviation between the real-time stimulus focus and the target stimulus focus. This represents the sub-score obtained by normalizing the coil center distance deviation. This represents the sub-score obtained by normalizing the deviation of the coil normal angle. This represents the sub-score obtained by normalizing the coil plane rotation deviation. , , , and This indicates the weight of each sub-rating. ;
[0151] The deviation level is determined based on the comprehensive deviation score.
[0152] Based on the spatial differences between the target coil model and the real-time coil model, multiple deviation parameters are determined to evaluate the coil offset state, and a comprehensive deviation score is generated based on each parameter. Specifically, the deviations are: the distance deviation from the stimulus focus to the target point, the distance deviation between the real-time stimulus focus and the target stimulus focus, the coil center distance deviation, the coil normal angle deviation, and the coil plane rotation deviation. The distance deviation from the stimulus focus to the target point reflects the degree of spatial offset of the real-time coil stimulus focus relative to the target stimulus position; the distance deviation between the real-time stimulus focus and the target stimulus focus reflects the positional change of the current coil stimulus focus relative to the stimulus focus in the target state; the coil center distance deviation reflects the degree of offset of the overall position of the real-time coil relative to the target coil position; the coil normal angle deviation reflects the change in the coil stimulus direction; and the coil plane rotation deviation reflects the rotational change of the coil around the stimulus direction.
[0153] By simultaneously acquiring the aforementioned multiple deviation parameters, the difference between the actual treatment state and the target treatment state can be described from multiple perspectives, such as coil position, stimulation focus position, and coil posture, thus avoiding the problem of failing to accurately reflect the spatial state of the coil due to using only a single distance parameter.
[0154] Furthermore, the deviations in distance from the stimulus focus to the target point, the deviation in distance between the real-time stimulus focus and the target stimulus focus, the deviation in distance from the coil center, the deviation in the coil normal angle, and the deviation in coil plane rotation are all normalized to obtain corresponding sub-scores. Since different types of deviation parameters have different physical units and numerical ranges (e.g., distance deviation is expressed in millimeters, and angle deviation is expressed in angles), they are first normalized according to the allowable range or threshold range of each deviation parameter to convert different types of deviations to a unified evaluation scale.
[0155] After calculating the five deviation indicators, each indicator is normalized to obtain the corresponding sub-score. The purpose of normalization is to convert deviation indicators with different dimensions into score values on a unified scale. Specifically, for each deviation indicator, a linear normalization method is used: ,in This represents the alarm threshold corresponding to the indicator, with "min" indicating the smaller value. This normalization method maps the deviation value to the [0,1] interval. When the deviation reaches the alarm threshold, the sub-score is 1. As an alternative, other normalization methods such as segmented normalization or threshold level normalization can also be used.
[0156] In some embodiments, the normalized sub-scores can represent the degree of deviation; the greater the deviation, the higher the corresponding sub-score. When the real-time coil state is completely consistent with the target state or within the allowable error range, the corresponding sub-score is lower. A comprehensive deviation score is determined based on all sub-scores, where each weight can be preset according to treatment needs. For example, for treatment plans that require ensuring the accuracy of the stimulation position, the weight of the deviation related to the stimulation focus can be increased; for treatment plans that require strict control of the coil posture, the weight corresponding to the angle deviation can be increased. Finally, the deviation level is determined based on the comprehensive deviation score.
[0157] Therefore, this embodiment establishes a multi-parameter fusion model deviation calculation method, enabling the system to comprehensively consider coil position and attitude changes, thereby improving the accuracy and stability of deviation detection results and providing a reliable basis for subsequent deviation level judgment.
[0158] In some embodiments, the distance deviation from the stimulus focus to the target is determined, and the expression for the distance from the stimulus focus to the target is:
[0159] ;
[0160] in, This represents the distance from the real-time stimulus focus to the target at time t. This indicates that the focus of the stimulus is activated in real time at time t. Indicates the target coordinates;
[0161] The distance deviation between the real-time stimulus focus and the target stimulus focus is determined. The expression for the distance between the stimulus focus and the target stimulus focus is:
[0162] ;
[0163] in, This represents the distance between the real-time stimulus focus and the target stimulus focus at time t. Indicates the target stimulus focus;
[0164] The coil center distance deviation is determined by the expression:
[0165] ;
[0166] in, This represents the distance between the center of the real-time coil and the center of the target coil at time t. This indicates the real-time coil center at time t. Indicates the center of the target coil;
[0167] The deviation of the coil's normal angle is determined by the expression for:
[0168] ;
[0169] in, This represents the angle between the real-time coil normal and the target coil normal at time t. This represents the real-time coil normal vector at time t. Represents the normal vector of the target coil. Represents the dot product of vectors. Indicates the length of the vector. This represents a small constant to prevent the denominator from being zero;
[0170] The coil plane rotation deviation is determined by the following expression:
[0171] , , ;
[0172] in, This indicates the rotational deviation of the coil plane at time t. Indicates the real-time coil plane reference direction. Indicates the reference direction of the target coil plane. The projection vector representing the reference direction of the real-time coil plane. The projection vector represents the reference direction of the target coil plane.
[0173] The physical meaning of the deviation between the stimulation focus and the target point is the straight-line distance between the actual convergence point of the magnetic stimulation and the doctor's target stimulation point. It is the most direct indicator for assessing the accuracy of treatment. The smaller this value, the closer the actual location of the magnetic stimulation is to the target brain region.
[0174] The coil center serves as the reference point for the coil's geometric model, and its positional deviation reflects the overall spatial displacement of the coil. This indicator complements the deviation of the stimulation focal point distance: the coil center distance deviation reflects the positional displacement of the coil itself, while the stimulation focal point distance deviation reflects the displacement of the magnetic stimulation application point. The two are interconnected through the fixed geometric relationships within the coil.
[0175] The deviation of the coil normal angle reflects the angular deviation between the coil orientation and the target orientation. For transcranial magnetic stimulation therapy, the coil normal determines the direction of the stimulation electric field in the brain tissue, thereby affecting the pattern of neural activation.
[0176] The calculation process for coil plane rotation deviation is as follows:
[0177] First, the projection vector of the real-time coil plane reference direction onto the target coil plane is calculated. This projection operation will... Decomposed into perpendicular to The components and parallel to The component that is perpendicular to the x-axis is retained only. The component is the component projected onto the target coil plane.
[0178] Then, the projection vector of the reference direction of the target coil plane onto the target coil plane is calculated. This operation will... Projected onto In a vertical plane.
[0179] Finally, the angle between the two projection vectors is calculated, with a value ranging from [0, π]. The significance of this indicator is that even when the coil normal is correct, the rotation of the coil around the normal may still change, causing the direction of the stimulation electric field to rotate within the tangential plane of the target brain region. Monitoring this indicator is particularly important for certain treatment protocols that require precise control of the stimulation direction. Five deviation indicators are defined, covering multiple dimensions such as coil position (center distance), stimulation point (focal distance), coil orientation (normal angle), and rotation around the axis (planar rotation), providing a quantitative method for comprehensively assessing coil pose deviation.
[0180] In some embodiments, determining the deviation level based on the comprehensive deviation score includes:
[0181] When the distance from the real-time stimulus focus to the target point Less than or equal to the normal threshold of the distance from the stimulus focus to the target point Coil normal angle deviation Less than or equal to the normal angle normal threshold And the coil plane rotation deviation Less than or equal to the normal threshold for planar rotation At that time, output the normal level;
[0182] When any deviation indicator exceeds the corresponding normal threshold but does not exceed the corresponding alarm threshold, an alert level is output.
[0183] The alarm level will be output when any of the following conditions are met:
[0184] ;
[0185] Distance deviation between real-time stimulus focus and target stimulus focus ;
[0186] Coil center distance deviation ;
[0187] ;
[0188] ;
[0189] Tracking data validity indicators It is false;
[0190] in, The alarm threshold represents the distance from the stimulus focus to the target point. The alarm threshold representing the distance between the real-time stimulus focus and the target stimulus focus. The alarm threshold representing the distance from the coil center. The alarm threshold representing the angle between the normal and the target direction. The alarm threshold represents the plane rotation angle.
[0191] First, determine if the conditions for a normal level are met. A deviation level is considered normal if all three of the following conditions are met:
[0192] ≤ and ≤ and ≤ ;
[0193] in, This represents the normal threshold distance from the stimulus focus to the target point. The normal threshold representing the included normal angle. This represents the normal threshold for the planar rotation angle. This normal threshold indicates that the coil pose is within a clinically acceptable ideal range, and treatment within this range will achieve the desired stimulation effect. When the deviation level is normal, the current treatment state is maintained, allowing treatment commands to be executed normally.
[0194] Specifically, when the distance from the real-time stimulation focus to the target point is less than or equal to the normal threshold for the distance from the stimulation focus to the target point, the deviation of the coil normal angle is less than or equal to the normal threshold for the normal angle, and the deviation of the coil plane rotation is less than or equal to the normal threshold for plane rotation, a normal level is output. This indicates that the real-time coil position and orientation are within the allowable range for treatment, and the coil can continue to perform the current treatment process.
[0195] When any deviation indicator exceeds the corresponding normal threshold but not the corresponding alarm threshold, an alert level is output. At the alert level, it indicates that the coil is deviated to a certain extent, but not to the point of affecting treatment safety. The system can prompt the operator to adjust the coil position or record the current deviation status.
[0196] When any alarm condition is met, the alarm level is output. Alarm conditions include: the deviation of the distance from the real-time stimulus focus to the target point exceeds the corresponding alarm threshold; the deviation of the distance between the real-time stimulus focus and the target stimulus focus exceeds the corresponding alarm threshold; the deviation of the coil center distance exceeds the corresponding alarm threshold; the deviation of the coil normal angle exceeds the corresponding alarm threshold; the deviation of the coil plane rotation exceeds the corresponding alarm threshold; or the tracking data validity flag is false.
[0197] Specifically, the deviation level is an alarm level when any of the following conditions are met: or or or or or =false;
[0198] The alarm level is triggered using OR logic, meaning that an alarm level is output as soon as any deviation indicator exceeds the alarm threshold or the tracked data is invalid. This determination method ensures that a clear alarm signal is issued even under the most unfavorable conditions, reflecting the design principle of prioritizing safety.
[0199] Deviation levels are output as status labels, color codes, numerical scores, or log fields. For example, a green label corresponds to a normal level, a yellow label to a warning level, and a red label to an alarm level. These outputs can be synchronized to the 3D navigation window, warning zone, treatment status window, and database, allowing operators to understand the current coil pose status in real time. A three-level warning system is implemented using dual thresholds—a normal threshold and an alarm threshold—which avoids overly sensitive and frequent alarms while ensuring timely alerts in cases of severe deviation.
[0200] Therefore, different processing methods can be adopted according to different degrees of deviation, so that the system can not only avoid frequent interruptions of the treatment process due to slight deviations, but also restrict treatment in a timely manner in the case of serious deviations or tracking abnormalities, thereby improving the safety of the treatment process.
[0201] In some embodiments, determining the access control state based on the deviation level and controlling the coil to operate based on the access control state includes:
[0202] Acquire the registration status between the tracking coordinate system and the individual image coordinate system, the binding status between the target point and the target coil model, the effective status of coil tracking, the treatment status, and the coil model matching status;
[0203] The admission control status is determined based on the deviation level, registration status, target point and target coil model binding status, coil tracking effectiveness status, treatment status, and coil model matching status.
[0204] When the access control status meets the treatment access conditions, control the treatment start command or continue coil operation;
[0205] When the access control status does not meet the treatment access conditions, the control treatment start command is not executed, or the control treatment continue command is not executed.
[0206] When the deviation level reaches the alarm level, the control pauses the coil operation and records the alarm event;
[0207] When the deviation level returns to the treatment access range and the registration status is valid, the control coil continues to operate;
[0208] Based on the changes in the level of deviation during the treatment process, control the operation permissions of key targets and record the treatment process data.
[0209] Before treatment begins, the registration status between the tracking coordinate system and the individual image coordinate system, the binding status between the target point and the target coil model, the coil tracking validity status, the treatment status, and the coil model matching status are acquired. The registration status indicates whether the current registration transformation is valid, such as whether the registration has been completed and is not expired; the binding status indicates whether the current target point is bound to the target coil model; the tracking validity status indicates whether the tracking data of the current coil markers is valid; the treatment status indicates whether the current state allows treatment to begin (e.g., not in treatment, not paused, etc.); and the coil model matching status indicates whether the coil model currently being used matches the coil model in the target coil model.
[0210] Based on the deviation level and the above status information, the access control status is determined comprehensively. Specifically, the admission control state is a set of multiple Boolean flags:
[0211] ;
[0212] in, This indicates the status of the treatment command, determined by a comprehensive assessment of other statuses. When For true, For true, For true, Normal level Allow startup and When true, Entry is permitted unless otherwise permitted.
[0213] When the access control status meets the treatment access criteria (i.e.) When permitted, the system executes either the treatment start command or the treatment continue command. Specifically, upon receiving a treatment start command from the operator, the system automatically performs the aforementioned access check. If all conditions are met, the treatment start command is sent to the stimulator, robot, or treatment control module to initiate treatment. If any condition is not met, the treatment start command is marked as not permitted, and no start command is sent to the stimulator or robot, or the command is placed in a pending confirmation state, while the reason for rejection is written into the treatment process log. This automatic access mechanism ensures that treatment can only begin when all safety conditions are met, avoiding misoperation due to abnormal conditions such as registration failure, tracking loss, or excessive coil deviation.
[0214] During treatment, the deviation level is continuously monitored. When the deviation level reaches an alarm level, a treatment pause command is executed, and the alarm event is recorded. Specifically, when the deviation level continuously exceeds the alarm threshold for a preset time, a treatment pause control state is automatically generated, and a pause command is sent to the stimulator to terminate the current magnetic stimulation output. Simultaneously, the alarm event (including alarm time, alarm type, current deviation value, etc.) is written to the treatment log. If the deviation level briefly triggers an alarm and then quickly recovers, a pause can be performed based on the configuration to avoid excessively frequent start-stop cycles interfering with the treatment process.
[0215] When the deviation level returns to the treatment access range (i.e., returns to the normal level) and the registration status remains valid, the command to continue treatment is executed. Specifically, after treatment is paused, the effectiveness of tracking and the deviation level are continuously monitored. When the deviation level returns to the normal level and remains so for a preset time, and the registration status remains valid, the operator's command to continue treatment is allowed to proceed, and magnetic stimulation output is restored. If the deviation level remains at the alarm level or the tracking data is invalid, the command to continue treatment is marked as inaccessible, and the paused state is maintained.
[0216] Based on changes in deviation levels during treatment, access permissions for critical target operations are controlled. During treatment, at least one of the following critical operations is disabled: re-registration, target deletion, target coil modification, treatment plane switching, and coil model switching. Disabling these critical operations prevents treatment interruptions or safety risks caused by accidental modification of target data during treatment. Upon completion or cancellation of treatment, the above operation permissions are restored, allowing the operator to perform new treatment targets or modifications.
[0217] Record treatment process data. At the end of treatment, stop deviation access control, save the warning status, and write the maximum deviation, average deviation, number of alarms, alarm duration, and final treatment status into the treatment process log. The treatment process log also includes information such as the reason for rejection of each command access, the temporal change of deviation level, and alarm event details, providing complete data support for subsequent treatment quality assessment and traceability. The deviation level is linked to treatment commands, registration status, tracking effectiveness, target location binding status, and treatment status for enhanced safety and automation of the transcranial magnetic stimulation (TMS) treatment process.
[0218] The present invention also provides a transcranial magnetic stimulation device, including the above-mentioned coil deviation warning and control device.
[0219] Please refer to the above embodiments for a description of the transcranial magnetic stimulation device provided in this application, and it will not be repeated here.
[0220] 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.
[0221] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0222] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A device for early warning and control of coil deviation, characterized in that, include: Memory, used to store computer programs; A processor, configured to perform the following steps when executing the computer program: Acquire individual image data of the object, and establish an individual image coordinate system based on the individual image data of the object; The target location of the object is determined, and a target coil model bound to the target location is generated in the individual image coordinate system based on the target location, the coil model and the coil model parameters. The coil is used to perform transcranial magnetic stimulation on the object. The real-time pose of the coil's marker is obtained, and a real-time coil model in the individual image coordinate system is generated based on the real-time pose of the coil's marker. Calculate the model deviation based on the target coil model and the real-time coil model; A deviation level is generated based on the model deviation; The admission control state is determined based on the deviation level, and the control coil is operated based on the admission control state.
2. The coil deviation early warning and control device as described in claim 1, characterized in that, Determining the target location of the object includes: The target region is obtained based on the individual image data of the object; The location of the target point is determined based on the target area; The position of the target point is transformed into the individual image coordinate system to obtain the three-dimensional coordinates corresponding to the target point.
3. The coil deviation early warning and control device as described in claim 1, characterized in that, Generate a target coil model bound to the target location based on the target location, the coil type, and the coil model parameters, including: Obtain the 3D model file of the coil corresponding to the coil model; Determine the coil stimulation focus, coil center, coil normal, and coil plane reference direction based on the coil model. The target pose of the target coil model is determined based on the position of the target point. Based on the target pose, the coil 3D model file is converted to the individual image coordinate system; The target coil model is generated based on the converted 3D coil model file.
4. The coil deviation early warning and control device as described in claim 1, characterized in that, Acquire the real-time pose of the coil's markers, and generate a real-time coil model in the individual image coordinate system based on the real-time pose of the coil's markers, including: Acquire the real-time pose of the marker on the coil collected by the tracking device; The registration transformation between the tracking coordinate system and the individual image coordinate system, and the calibration transformation between the coil marker coordinate system and the coil model coordinate system are obtained. The tracking coordinate system is the coordinate system in which the real-time pose acquired by the tracking device is located. Based on the real-time pose of the coil's markers, the registration transformation, and the calibration transformation, the pose of the real-time coil model in the individual image coordinate system is determined. The real-time coil model is generated based on its pose in the individual image coordinate system.
5. The coil deviation early warning and control device as described in claim 4, characterized in that, Based on the real-time pose of the coil's markers, the registration transformation, and the calibration transformation, the pose of the real-time coil model in the individual image coordinate system is determined, including: The transformation relationship from the real-time coil model to the individual image coordinate system is determined according to the following formula: ; in, This represents the transformation from the real-time coil model coordinate system to the individual image coordinate system at time t. This indicates the registration transformation from the tracking coordinate system to the individual image coordinate system. This represents the coil marker pose output by the tracking device at time t. This indicates the calibration transformation from the coordinate system of the coil marker to the coordinate system of the coil model.
6. The coil deviation early warning and control device as described in any one of claims 1 to 5, characterized in that, Based on the target coil model and the real-time coil model, the model deviation is calculated, including: Determine the distance deviation from the stimulus focus to the target point, the distance deviation between the real-time stimulus focus and the target stimulus focus, the coil center distance deviation, the coil normal angle deviation, and the coil plane rotation deviation; The distance deviation from the stimulus focus to the target point, the distance deviation between the real-time stimulus focus and the target stimulus focus, the distance deviation from the coil center, the deviation of the coil normal angle, and the deviation of the coil plane rotation are normalized respectively to obtain the corresponding sub-scores; A comprehensive deviation score is determined based on all the sub-scores, and the expression for the comprehensive deviation score is: ; in, This represents the overall deviation score at time t. This represents the sub-score obtained by normalizing the distance deviation from the stimulus focus to the target point. This represents the sub-score obtained by normalizing the distance deviation between the real-time stimulus focus and the target stimulus focus. This represents the sub-score obtained by normalizing the coil center distance deviation. This represents the sub-score obtained by normalizing the deviation of the coil normal angle. This represents the sub-score obtained by normalizing the coil plane rotation deviation. , , , and This indicates the weight of each sub-rating. ; The deviation level is determined based on the comprehensive deviation score.
7. The coil deviation early warning and control device as described in claim 6, characterized in that, The distance deviation from the stimulus focus to the target point is determined, and the expression for the distance from the stimulus focus to the target point is: ; in, This represents the distance from the real-time stimulus focus to the target at time t. This indicates that the focus of the real-time stimulus is activated at time t. Indicates the target coordinates; The distance deviation between the real-time stimulus focus and the target stimulus focus is determined, and the expression for the distance between the stimulus focus and the target stimulus focus is: ; in, This represents the distance between the real-time stimulus focus and the target stimulus focus at time t. Indicates the target stimulus focus; The coil center distance deviation is determined, and the expression for the coil center distance deviation is: ; in, This represents the distance between the center of the real-time coil and the center of the target coil at time t. This indicates the real-time coil center at time t. Indicates the center of the target coil; The deviation of the coil's normal angle is determined, and the expression for the deviation of the normal angle is: ; in, This represents the angle between the real-time coil normal and the target coil normal at time t. This represents the real-time coil normal vector at time t. Represents the normal vector of the target coil. Represents the dot product of vectors. Indicates the length of the vector. This represents a small constant to prevent the denominator from being zero; The rotational deviation of the coil plane is determined, and the expression for the rotational deviation of the coil plane is: , , ; in, This indicates the rotational deviation of the coil plane at time t. Indicates the real-time coil plane reference direction. Indicates the reference direction of the target coil plane. The projection vector representing the reference direction of the real-time coil plane. The projection vector represents the reference direction of the target coil plane.
8. The coil deviation early warning and control device as described in claim 6, characterized in that, The deviation level is determined based on the comprehensive deviation score, including: When the distance from the real-time stimulus focus to the target point Less than or equal to the normal threshold of the distance from the stimulus focus to the target point Coil normal angle deviation Less than or equal to the normal angle normal threshold And the coil plane rotation deviation Less than or equal to the normal threshold for planar rotation At that time, output the normal level; When any deviation indicator exceeds the corresponding normal threshold but does not exceed the corresponding alarm threshold, an alert level is output. The alarm level will be output when any of the following conditions are met: ; Distance deviation between real-time stimulus focus and target stimulus focus ; Coil center distance deviation ; ; ; Tracking data validity indicators It is false; in, The alarm threshold represents the distance from the stimulus focus to the target point. The alarm threshold representing the distance between the real-time stimulus focus and the target stimulus focus. The alarm threshold representing the distance from the coil center. The alarm threshold representing the angle between the normal and the target direction. The alarm threshold represents the plane rotation angle.
9. The coil deviation early warning and control device as described in claim 8, characterized in that, Determining the access control state based on the deviation level, and controlling the coil to operate based on the access control state, including: Acquire the registration status between the tracking coordinate system and the individual image coordinate system, the binding status between the target point and the target coil model, the effective status of coil tracking, the treatment status, and the coil model matching status; The admission control state is determined based on the deviation level, the registration status, the binding status between the target point and the target coil model, the effective status of coil tracking, the treatment status, and the coil model matching status. When the access control state meets the treatment access conditions, control the treatment start command or continue the coil operation; When the admission control state does not meet the treatment admission conditions, the control treatment start command is not executed, or the control treatment continue command is not executed. When the deviation level is an alarm level, the control pauses the operation of the coil and records the alarm event; When the deviation level returns to the treatment access range and the registration status is valid, the control coil continues to operate; Based on the changes in the level of deviation during the treatment process, control the operation permissions of key targets and record the treatment process data.
10. A transcranial magnetic stimulation device, characterized in that, The device includes the coil deviation warning and control device as described in any one of claims 1 to 9.
