Disclosure of Invention
The application aims to provide a three-dimensional registration method, a system and computer equipment for a transcranial magnetic stimulation navigation process, which fill the blank of the three-dimensional registration technology of the current transcranial magnetic stimulation navigation process.
In a first aspect, the present application provides a three-dimensional registration method for transcranial magnetic stimulation navigation, comprising:
Determining a first conversion relation of the probe coordinate system in the camera coordinate system;
determining a second conversion relation of a head tracking coordinate system represented by a mark point of the head of the patient in the camera coordinate system;
When the probe tip of the probe coordinate system touches X actual feature points on the head of the patient respectively, calculating coordinates of the X actual feature points on the camera coordinate system by utilizing the first conversion relation, wherein X is a positive integer greater than or equal to 3, and at least 3 actual feature points in the X actual feature points are not coplanar and collinear;
calculating coordinates of the X actual feature points in the head tracking coordinate system by using the second conversion relation;
Picking up X virtual feature points corresponding to the X actual feature points in a preset three-dimensional virtual head model, wherein the three-dimensional virtual head model is positioned in a three-dimensional virtual head model coordinate system;
Registering X virtual feature points corresponding to the X actual feature points respectively to obtain a third conversion relation between the head tracking coordinate system and the three-dimensional virtual head model coordinate system;
mapping the three-dimensional virtual head model to the head tracking coordinate system by utilizing the third conversion relation, so that the head of the patient is registered with the three-dimensional virtual head model.
Optionally, determining the first conversion relation of the probe coordinate system in the camera coordinate system includes:
Obtaining probe images of K marking points of a probe in the probe coordinate system, wherein the K marking points can reflect the outline shape of the probe, K is a positive integer greater than or equal to 3, and at least 3 marking points in the K marking points are not coplanar and are not collinear;
and determining the first conversion relation of the probe coordinate system in the camera coordinate system according to the K marked points of the probe image.
Optionally, the K is equal to 4, the outline shape of the probe is in a Y shape, the 4 mark points form the Y outline shape, and determining the first conversion relationship of the probe coordinate system in the camera coordinate system according to the K mark points of the probe image includes:
And identifying and classifying the shape features formed by the K marking points of the probe image through a trained neural network model to obtain the first conversion relation of the probe coordinate system in the camera coordinate system.
Optionally, the K marker points include a probe tip of the probe, and after obtaining the first conversion relation of the probe coordinate system in the camera coordinate system, the method further includes:
And calculating the spatial coordinates of the probe tip in the camera coordinate system by utilizing the first conversion relation.
Optionally, the determining the second conversion relation of the head tracking coordinate system represented by the mark point of the head of the patient in the camera coordinate system includes:
Acquiring head tracking coordinate system images of L marking points of the head of the patient in the head tracking coordinate system, wherein the L marking points can reflect the space shape of the head tracking coordinate system, L is a positive integer greater than or equal to 3, and at least 3 marking points in the L marking points are not coplanar and not collinear;
And determining a second conversion relation of the head tracking coordinate system in the camera coordinate system according to the L mark points of the head tracking coordinate system image.
Optionally, after determining the second conversion relation of the head tracking coordinate system in the camera coordinate system, the method further comprises:
acquiring mark point images of the L mark points of the head of the patient;
and analyzing the moving track of the head tracking coordinate system reflected in the mark point image to obtain the motion compensation coordinate of the head tracking coordinate system.
Optionally, before picking up X virtual feature points corresponding to the X actual feature points in the preset three-dimensional virtual head model, the method further includes:
acquiring a nuclear magnetic resonance image of the patient's head using a standard template;
Converting the nuclear magnetic resonance image into a bitmap image;
The three-dimensional virtual head model of the patient's head is constructed using the bitmap image.
Optionally, after constructing the three-dimensional virtual head model of the patient's head using the bitmap image, the method further comprises:
registering the three-dimensional virtual head model with template data of a standard electrode placement method to obtain 10-20 coordinates on the three-dimensional virtual head model.
In a second aspect, the present application provides a three-dimensional registration system for transcranial magnetic stimulation navigation procedures, comprising:
a first determining unit for determining a first conversion relation of the probe coordinate system in the camera coordinate system;
a second determining unit, configured to determine a second conversion relationship of a head tracking coordinate system represented by a mark point of the head of the patient in the camera coordinate system;
The first calculation unit is used for calculating coordinates of the X actual feature points in the camera coordinate system by utilizing the first conversion relation when the probe tip of the probe coordinate system touches the X actual feature points on the head of the patient respectively, wherein X is a positive integer which is more than or equal to 3, and at least 3 actual feature points in the X actual feature points are not coplanar and are not collinear;
the second calculation unit is used for calculating coordinates of the X actual feature points in the head tracking coordinate system by using the second conversion relation;
the pick-up unit is used for picking up X virtual feature points corresponding to the X actual feature points in a preset three-dimensional virtual head model, and the three-dimensional virtual head model is located in a three-dimensional virtual head model coordinate system;
the registration unit is used for registering the X virtual feature points corresponding to the X actual feature points respectively to obtain a third conversion relation between the head tracking coordinate system and the three-dimensional virtual head model coordinate system;
and the mapping unit is used for mapping the three-dimensional virtual head model to the head tracking coordinate system by utilizing the third conversion relation so that the head of the patient is registered with the three-dimensional virtual head model.
Optionally, when the first determining unit determines the first conversion relation of the probe coordinate system in the camera coordinate system, the first determining unit is specifically configured to:
Obtaining probe images of K marking points of a probe in the probe coordinate system, wherein the K marking points can reflect the outline shape of the probe, K is a positive integer greater than or equal to 3, and at least 3 marking points in the K marking points are not coplanar and are not collinear;
and determining the first conversion relation of the probe coordinate system in the camera coordinate system according to the K marked points of the probe image.
Optionally, the K is equal to 4, the outline shape of the probe is a "Y" shape, the 4 mark points form the "Y" outline shape, and the first determining unit is specifically configured to:
And identifying and classifying the shape features formed by the K marking points of the probe image through a trained neural network model to obtain the first conversion relation of the probe coordinate system in the camera coordinate system.
Optionally, the K marker points include a probe tip of the probe, and the system further includes:
And a third calculation unit for calculating the spatial coordinates of the probe tip in the camera coordinate system by using the first conversion relation.
Optionally, when the second determining unit determines that the head tracking coordinate system represented by the mark point of the head of the patient is in the second conversion relationship of the camera coordinate system, the second determining unit is specifically configured to:
Acquiring head tracking coordinate system images of L marking points of the head of the patient in the head tracking coordinate system, wherein the L marking points can reflect the space shape of the head tracking coordinate system, L is a positive integer greater than or equal to 3, and at least 3 marking points in the L marking points are not coplanar and not collinear;
And determining a second conversion relation of the head tracking coordinate system in the camera coordinate system according to the L mark points of the head tracking coordinate system image.
Optionally, the system further comprises:
the acquisition unit is used for acquiring mark point images of the L mark points of the head of the patient;
And the analysis unit is used for analyzing the moving track of the head tracking coordinate system reflected in the mark point image to obtain the motion compensation coordinate of the head tracking coordinate system.
Optionally, the system further comprises:
The acquisition unit is also used for acquiring nuclear magnetic resonance images of the head of the patient by using a standard template;
the conversion unit is used for converting the nuclear magnetic resonance image into a bitmap image;
a construction unit for constructing the three-dimensional virtual head model of the patient's head using the bitmap image.
Optionally, the system further comprises:
and the registration unit is also used for registering the three-dimensional virtual head model with template data of a standard electrode placement method to obtain 10-20 coordinates on the three-dimensional virtual head model.
In a third aspect, the present application provides a computer device comprising:
a processor, a memory, a bus, an input-output interface, and a wireless network interface;
The processor is connected with the memory, the input/output interface and the wireless network interface through buses;
the memory stores a program;
The processor, when executing the program stored in the memory, implements the three-dimensional registration method of the transcranial magnetic stimulation navigation procedure of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having instructions stored therein, which when executed on a computer, cause the computer to perform a three-dimensional registration method of a transcranial magnetic stimulation navigation procedure as described in the first aspect above.
In a fifth aspect, the present application provides a computer program product which, when executed on a computer, causes the computer to perform a three-dimensional registration method of a transcranial magnetic stimulation navigation procedure as described in the first aspect.
The above technical solution can be seen that the embodiment of the application has the following advantages:
The three-dimensional registration method for the transcranial magnetic stimulation navigation process comprises the steps of determining a first conversion relation of a probe coordinate system in a camera coordinate system, determining a second conversion relation of a head tracking coordinate system represented by a mark point of a patient head in the camera coordinate system, calculating to obtain a coordinate of an actual feature point in the camera coordinate system by using the first conversion relation when a probe tip of the probe coordinate system touches the actual feature point on the patient head, calculating to obtain a coordinate of the actual feature point in the head tracking coordinate system by using the second conversion relation, and further picking up virtual feature points respectively corresponding to the actual feature point in a preset three-dimensional virtual head model, wherein the three-dimensional virtual head model is located in the three-dimensional virtual head model coordinate system, registering the virtual feature points corresponding to the actual feature points to obtain a third conversion relation of the head tracking coordinate system and the three-dimensional virtual head model coordinate system, and mapping the three-dimensional virtual head model to the head tracking coordinate system by using the third conversion relation, so that registration of the patient head and the three-dimensional virtual head model can be realized.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It is well known that mental diseases and cerebral cortex dysfunction in humans have a close relationship, and for example, research shows that depression is related to cerebral forehead lobe dysfunction, so that accurate providing cerebral cortex functional partition information is important for transcranial magnetic stimulation treatment. The transcranial magnetic stimulation navigation refers to a process that a transcranial magnetic stimulation navigation system converts the coordinates of virtual feature points selected by a specified head model into navigation coordinates of a magnetic stimulation executing mechanism according to the coordinates of the virtual feature points so as to realize the magnetic stimulation of the magnetic stimulation executing mechanism to a specific part of a patient according to the navigation coordinates. The three-dimensional registration of the transcranial magnetic stimulation navigation process refers to a process of establishing mapping between the head of a patient and a corresponding preset three-dimensional virtual head model before transcranial magnetic stimulation navigation, namely a technology of performing calibration matching on the three-dimensional virtual head model reconstructed based on image data in a transcranial magnetic stimulation system and the head of the patient. The embodiment of the application mainly realizes three-dimensional registration of the transcranial magnetic stimulation navigation process in the camera coordinate system of the camera.
Referring to fig. 1, one embodiment of a three-dimensional registration method of a transcranial magnetic stimulation navigation procedure according to the present application includes:
101. a first transformation relationship of the probe coordinate system in the camera coordinate system is determined.
The first conversion relation of the probe coordinate system where the probe is located in the camera coordinate system of the camera needs to be known, the camera is preferably an infrared binocular vision camera, for example, a binocular vision system of the infrared binocular vision camera is an MV-VS220 binocular stereoscopic vision system developed by a dimension vision and intelligence manufacturing company, and the system is a relatively perfect system integrating image acquisition, processing, matching and measurement, so that image data can be conveniently processed.
Specifically, a probe image of K marking points of a probe in a probe coordinate system is obtained through an infrared binocular vision camera, wherein the K marking points can reflect the outline shape of the probe, K is a positive integer greater than or equal to 3, at least 3 marking points in the K marking points are not coplanar and are not collinear, the distances between every two marking points on the probe are calculated under a space coordinate system constructed by the infrared binocular vision camera, so that the probe coordinate system of the probe can be established, the probe coordinate system is located in the camera coordinate system, and the first conversion relation of the probe coordinate system in the camera coordinate system can be determined according to the K marking points of the probe image.
In one possible embodiment, the binocular vision system may use a trained neural network model to identify and classify the shape features composed of K marker points of the probe image, so as to obtain a first conversion relationship of the probe coordinate system in the camera coordinate system, where the training process of the neural network model is a relatively mature prior art, and will not be described in detail herein.
Further, referring to fig. 8, fig. 8 shows a schematic structural diagram of a probe, the profile shape of the probe is "Y" shaped, and 4 mark points on the probe form "Y" profile shape.
The first conversion relation can be used for calculating the space coordinates of the probe tip of the probe in a camera coordinate system. For example, referring to fig. 8 and 9 in combination, a passive optical mark point may be fixed at the position of the probe tip, so that the probe tip is just located at the center of the sphere of the passive optical mark point, then the probe images of the 4 mark points of the probe in the probe coordinate system are obtained by using an infrared binocular vision camera, and the obtained coordinates of the center of the sphere of the passive optical mark point in the camera coordinate system are the spatial coordinates of the probe tip in the camera coordinate system. Specifically, 6 groups of probe images of probes in different postures can be acquired, the spatial coordinates of the probe tip positions of the probes in a camera coordinate system are calculated respectively, then the average value of each group of postures is calculated respectively and used as the spatial coordinates of the probe tip in the camera coordinate system, and further the accurate coordinates of the probe tip in the different postures of the camera coordinate system are obtained.
102. A second conversion relation of a head tracking coordinate system represented by a mark point of the head of the patient in a camera coordinate system is determined.
This step requires knowing the second conversion relation of the head tracking coordinate system represented by the mark point of the patient's head in the camera coordinate system of the camera, which is preferably an infrared binocular vision camera, for example, the binocular vision system of the infrared binocular vision camera is MV-VS220 binocular stereoscopic vision system developed by the visuals manufacturing company. It will be appreciated that it is difficult to accurately position the patient's head in space directly in the camera coordinate system by the binocular vision system of the camera, since the head shape varies from patient to patient. In order to solve the technical problem, the method adopted in the step is to identify the head tracking coordinate system represented by the mark points of the head of the patient through the infrared camera, and because the mark points can be fixed on the head of the patient through a standard positioning reference frame in the form of a binding band, the mark points on the positioning reference frame can be well and accurately identified by a binocular vision system of the camera, so that the camera can determine the second conversion relation of the head tracking coordinate system represented by the mark points of the head of the patient in the camera coordinate system, and the camera still does not know the actual space position of the head of the patient in the head tracking coordinate system, but realizes that the camera can determine the position of the head tracking coordinate system represented by the mark points of the head of the patient in the camera coordinate system. Referring to fig. 10, fig. 10 is a schematic diagram showing the effect of an embodiment in which the positioning reference frame is fixed to the head model of the patient, and in fig. 10, the positioning reference frame (the positioning reference frame is placed with 3 infrared reflective beads) is fixed to the head model of the person, and the relative position of the positioning reference frame and the head model of the person is kept unchanged.
103. When the probe tip of the probe coordinate system touches X actual feature points on the head of the patient respectively, the coordinates of the X actual feature points on the camera coordinate system are calculated by utilizing the first conversion relation.
After knowing the first conversion relation of the probe coordinate system in the camera coordinate system in the step 101, the camera knows that the head tracking coordinate system represented by the mark point of the head of the patient in the step 102 is in the second conversion relation of the camera coordinate system, the step can take the probe tip of the probe coordinate system to touch the actual feature point on the head of the patient, so as to realize the tool setting of the probe tip and the actual feature point of the head of the patient, and thus the spatial position of the head of the patient in the camera space coordinate system is depicted for the camera coordinate system. For example, when the probe tip of the probe coordinate system touches X actual feature points on the head of the patient respectively, the coordinates of the X actual feature points on the camera coordinate system are calculated by using the first transformation relationship, wherein X is a positive integer greater than or equal to 3, and at least 3 of the X actual feature points are not coplanar and are not collinear. Specifically, the probe tip can be sequentially touched with the front left ear point, the front right ear point and the nose tip of the head of the patient to obtain coordinates of the front left ear point, the front right ear point and the nose tip under the coordinates of the camera, namely, when the probe tip touches the front left ear point, the front right ear point and the nose tip respectively, the coordinates of the probe tip corresponding to the camera coordinate system at the time are the coordinates of the front left ear point, the front right ear point and the nose tip.
104. And calculating coordinates of the X actual feature points in a head tracking coordinate system by using the second conversion relation.
After knowing the coordinates of the X actual feature points of the patient's head in the camera coordinate system in step 103, since step 102 has known the second conversion relationship of the head tracking coordinate system in the camera coordinate system, and the patient's head is located in the head tracking coordinate system, that is, the patient's head is in the absolute position relationship in the head tracking coordinate system, the coordinates of the X actual feature points of the patient's head in the head tracking coordinate system can be calculated by using the second conversion relationship. For example, the coordinates of the left anterior auricular point, the right anterior auricular point and the nose tip of the head of the patient in the head tracking coordinate system are calculated by using the second conversion relation.
105. And picking up X virtual feature points corresponding to the X actual feature points in a preset three-dimensional virtual head model, wherein the three-dimensional virtual head model is positioned in a three-dimensional virtual head model coordinate system.
It is noted that, in the transcranial magnetic stimulation navigation process, after the space coordinates of the preset three-dimensional virtual head model are registered with the space coordinates of the head of the patient in reality (namely, the head coordinates of the patient in the head tracking coordinate system in the camera coordinate system), the three-dimensional virtual head model corresponds to the head coordinates of the patient one by one, and when transcranial magnetic stimulation is performed on a specific coordinate point designated by the three-dimensional virtual head model, the specific coordinate point corresponding to the head of the patient is subjected to magnetic stimulation by the corresponding command magnetic stimulation executing mechanism in reality. Based on such understanding, the present step needs to pick up X virtual feature points in the preset three-dimensional virtual head model for the X actual feature points determined in the camera coordinate system in step 104, where the three-dimensional virtual head model is located in the three-dimensional virtual head model coordinate system. For example, the step may pick up three coordinate points of the left anterior auricular point, the right anterior auricular point and the nasion root in the three-dimensional virtual head model based on VTKPICKER types. VTK (visualization toolkit) is a free, open source software system, primarily for three-dimensional computer graphics, image processing and visualization.
106. And registering X virtual feature points corresponding to the X actual feature points respectively to obtain a third conversion relation between the head tracking coordinate system and the three-dimensional virtual head model coordinate system.
The X virtual feature points picked up in step 105 are registered with the X actual feature points for which the coordinate positions are determined in the camera coordinate system in step 104, respectively. For example, registration may be implemented by using a Landmark in the VTK, so as to obtain a third conversion relationship between the head tracking coordinate system and the three-dimensional virtual head model coordinate system. The vtkLandmarkTransform class is one of more classical registration algorithms in the VTK, linear transformation is adopted based on the marked points, so that the average distance between two point sets (the head of a patient and a three-dimensional virtual head model) after registration is minimized, the VTKLANDMARK algorithm is simpler, the source point set (for example, the coordinate set of the three-dimensional virtual head model) and the target point set (for example, the coordinate set of the head of the patient in a camera coordinate system) are respectively set through SetSourceLandmarks and SETTARGETLANDMARKS functions, the transformation type is set through SetMode, for example, the SetModeToRigidBody () function is used for setting the registration transformation type as rigid body transformation, the SetModeToSimilarity () function is used for setting similarity transformation, and the GetMatrix () function is used for obtaining a transformation matrix, so that errors caused by manual operation can be reduced, the treatment time is shortened, and the operation risk is reduced.
It can be understood that, since X is a positive integer greater than or equal to 3, and at least 3 actual feature points among the X actual feature points are not coplanar and not collinear, after the X virtual feature points corresponding to the X actual feature points are to be registered respectively, it is equivalent to substantially determining a third conversion relationship between the whole three-dimensional virtual head model and the head of the patient in the camera coordinate system.
107. And mapping the three-dimensional virtual head model to a head tracking coordinate system by utilizing a third conversion relation, so that the registration of the head of the patient and the three-dimensional virtual head model is realized.
The three-dimensional virtual head model can be mapped to the head tracking coordinate system entirely by utilizing the third conversion relation in the step 106, so that the registration of the head of the patient and the three-dimensional virtual head model is realized in the camera coordinate system.
The embodiment of the application can also realize the motion tracking of the head tracking coordinate system through the binocular vision system of the camera so as to know the real-time motion condition of the head of the patient, provide accurate patient head motion data support for the transcranial magnetic stimulation treatment process, and conveniently command the magnetic stimulation executing mechanism to compensate the motion of the head of the patient during the operation, thereby realizing dynamic and accurate magnetic stimulation treatment. Referring to fig. 2, after step 102 of fig. 1, another embodiment of the three-dimensional registration method of the transcranial magnetic stimulation navigation procedure of the present application includes:
201. marker point images of L marker points of the patient's head are acquired.
For example, marker point images of L marker points on a positioning reference frame fixed to the head of a patient are acquired in real time by an infrared binocular vision camera.
202. And analyzing the moving track of the head tracking coordinate system reflected in the mark point image to obtain the motion compensation coordinate of the head tracking coordinate system.
The head tracking coordinate system represented by the mark points of the head of the patient is identified through the infrared camera, and because the mark points can be fixed on the head of the patient in the form of a binding band through a standard positioning reference frame, the mark points on the positioning reference frame can be well and accurately identified by a binocular vision system of the camera, and the motion compensation coordinate of the head tracking coordinate system is obtained by analyzing the motion track of the head tracking coordinate system reflected in the mark point images at the front and back time, at the moment, the camera does not need to know the actual space position of the head of the patient in the head tracking coordinate system, and only needs to know the motion compensation coordinate of the head tracking coordinate system, namely the motion compensation coordinate of the head of the patient, because the head of the patient is in absolute position relation in the head tracking coordinate system. The method comprises the steps that a GPU module in opencv software can be used for accelerating an image processing process, then L mark points are tracked by adopting a CV_TM_CCOEFF_ NORMED normalization correlation coefficient matching method, the operation tracking effect on the head of a patient is achieved, head movement of the patient is compensated, a magnetic stimulation coil in a transcranial magnetic stimulation process is located at the most suitable stimulation position under the drive of a magnetic stimulation executing mechanism, and a good magnetic stimulation treatment effect is achieved. The magnetic stimulation actuating mechanism of the embodiment of the application is generally a multi-axis mechanical arm, and the tail end of the multi-axis mechanical arm is fixedly provided with a magnetic stimulation coil.
Referring to fig. 3, prior to step 105 of the embodiment of fig. 1, the present application requires the construction of a three-dimensional virtual head model of the patient's head in advance, and another embodiment of the three-dimensional registration method of the transcranial magnetic stimulation navigation process of the present application includes:
301. Nuclear magnetic resonance images of the patient's head are acquired using a standard template.
For example, the ICBM152 data is used as a standard template, and the image resolution of the standard template is 256×256, and the voxel size is 1mm×1mm. The step uses the standard template to collect the nuclear magnetic resonance image of the head of the patient so as to obtain standardized nuclear magnetic resonance image data.
302. And converting the nuclear magnetic resonance image into a bitmap image.
For example, in this step, the nmr image data acquired in step 301 is segmented by the medical image analysis software MRIcron and stored as a bmp picture sequence, which is referred to as a Bitmap image.
303. A three-dimensional virtual head model of the patient's head is constructed using the bitmap image.
For example, the Bitmap image in step 302 is imported SIMPLEWARE into software to construct a three-dimensional virtual head model of the patient's head, and the three-dimensional virtual head model export is saved as STL format.
304. Registering the three-dimensional virtual head model with template data of a standard electrode placement method to obtain 10-20 coordinates on the three-dimensional virtual head model.
Furthermore, in order to obtain a more accurate three-dimensional virtual head model of the patient's head, a template three-dimensional virtual head model of a standard template can be created, and then the three-dimensional virtual head model of the patient's head and the data of the template three-dimensional virtual head model are registered by using the three-dimensional geometry processing system MeshLab, so as to obtain the more accurate three-dimensional virtual head model of the patient's head.
Next, the 10-20 coordinates of the template three-dimensional virtual head model are obtained by using Brainstorm software, wherein the 10-20 coordinates refer to the placement coordinates of a standard electrode placement method specified by the International electroencephalogram society for electrode placement of a 10-20 system. The application uses the 10-20 coordinates to better select the stimulation target point of the subsequent transcranial magnetic stimulation coil. Because the three-dimensional virtual head model of the patient's head and the data of the template three-dimensional virtual head model are registered, the accurate 10-20 coordinates of the three-dimensional virtual head model of the patient's head can be obtained as well, and referring to fig. 6 and 7, an embodiment of marking the 10-20 coordinates of the three-dimensional virtual head model of the patient's head with a sphere with a radius of 4mm in 3ds Max has the effect of the embodiment of the application. Based on the 10-20 system, the target area of the head of the patient can be conveniently positioned by an operator, and the magnetic stimulation actuating mechanism is better commanded to carry out the treatment of the target area by the magnetic stimulation coil.
The above embodiment describes a three-dimensional registration method of the transcranial magnetic stimulation navigation process according to the present application, and the following describes a three-dimensional registration system of the transcranial magnetic stimulation navigation process according to the present application, referring to fig. 4, the three-dimensional registration system of the transcranial magnetic stimulation navigation process includes:
A first determining unit 401 for determining a first conversion relation of the probe coordinate system in the camera coordinate system;
A second determining unit 402, configured to determine a second conversion relationship of a head tracking coordinate system represented by a mark point of the head of the patient in the camera coordinate system;
A first calculating unit 403, configured to calculate, using the first conversion relationship, coordinates of X actual feature points in the camera coordinate system when the probe tip of the probe coordinate system touches the X actual feature points on the head of the patient, where X is a positive integer greater than or equal to 3, and at least 3 actual feature points in the X actual feature points are not coplanar and not collinear;
A second calculating unit 404, configured to calculate coordinates of the X actual feature points in the head tracking coordinate system by using the second conversion relationship;
A pickup unit 405, configured to pick up X virtual feature points corresponding to the X actual feature points in a preset three-dimensional virtual head model, where the three-dimensional virtual head model is located in a three-dimensional virtual head model coordinate system;
a registration unit 406, configured to register the X virtual feature points corresponding to the X actual feature points, to obtain a third conversion relationship between the head tracking coordinate system and the three-dimensional virtual head model coordinate system;
A mapping unit 407, configured to map the three-dimensional virtual head model to the head tracking coordinate system by using the third conversion relationship, so that the patient head and the three-dimensional virtual head model implement registration.
Optionally, when the first determining unit 401 determines the first conversion relation of the probe coordinate system in the camera coordinate system, the method is specifically used for:
Obtaining probe images of K marking points of a probe in the probe coordinate system, wherein the K marking points can reflect the outline shape of the probe, K is a positive integer greater than or equal to 3, and at least 3 marking points in the K marking points are not coplanar and are not collinear;
and determining the first conversion relation of the probe coordinate system in the camera coordinate system according to the K marked points of the probe image.
Optionally, the K is equal to 4, the outline shape of the probe is a "Y" shape, the 4 mark points form the "Y" outline shape, and the first determining unit 401 is specifically configured to:
And identifying and classifying the shape features formed by the K marking points of the probe image through a trained neural network model to obtain the first conversion relation of the probe coordinate system in the camera coordinate system.
Optionally, the K marker points include a probe tip of the probe, and the system further includes:
A third calculation unit 408, configured to calculate, using the first conversion relation, a spatial coordinate of the probe tip in the camera coordinate system.
Optionally, when the second determining unit 402 determines that the head tracking coordinate system represented by the marker point of the head of the patient is in the second conversion relationship of the camera coordinate system, the second determining unit is specifically configured to:
Acquiring head tracking coordinate system images of L marking points of the head of the patient in the head tracking coordinate system, wherein the L marking points can reflect the space shape of the head tracking coordinate system, L is a positive integer greater than or equal to 3, and at least 3 marking points in the L marking points are not coplanar and not collinear;
And determining a second conversion relation of the head tracking coordinate system in the camera coordinate system according to the L mark points of the head tracking coordinate system image.
Optionally, the system further comprises:
An acquisition unit 409 for acquiring marker point images of the L marker points of the head of the patient;
And an analysis unit 410, configured to analyze the motion trajectory of the head tracking coordinate system reflected in the mark point image, and obtain motion compensation coordinates of the head tracking coordinate system.
Optionally, the system further comprises:
An acquisition unit 409 further configured to acquire a nuclear magnetic resonance image of the head of the patient using a standard template;
A conversion unit 411, configured to convert the nmr image into a bitmap image;
a construction unit 412 for constructing the three-dimensional virtual head model of the patient's head using the bitmap image.
Optionally, the system further comprises:
and the registration unit 413 is further configured to register the three-dimensional virtual head model with template data of a standard electrode placement method, so as to obtain 10-20 coordinates on the three-dimensional virtual head model.
The operation performed by the three-dimensional registration system of the transcranial magnetic stimulation navigation process according to the embodiments of the present application is similar to that performed in the embodiments of fig. 1,2 and 3, and will not be described in detail herein.
Referring to fig. 5, an embodiment of a computer device according to an embodiment of the present application includes:
The computer device 500 may include one or more processors (central processing units, CPU) 501 and memory 502, with one or more applications or data stored in the memory 502. Wherein the memory 502 is volatile storage or persistent storage. The program stored in memory 502 may include one or more modules, each of which may include a series of instruction operations in a computer device. Still further, the processor 501 may be configured to communicate with the memory 502 and execute a series of instruction operations in the memory 502 on the computer device 500. The computer device 500 may also include one or more wireless network interfaces 503, one or more input/output interfaces 504, and/or one or more operating systems, such as Windows Server, mac OS, unix, linux, freeBSD, etc. The processor 501 may perform the operations performed in the embodiments shown in fig. 1 to 3, and detailed descriptions thereof are omitted herein.
In the several embodiments provided in the embodiments of the present application, it should be understood by those skilled in the art that the disclosed systems, apparatuses and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. The storage medium includes a usb disk, a removable hard disk, a read-only memory (ROM), a random-access memory (RAM, random access memory), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather is intended to cover all modifications, equivalents, or alternatives falling within the spirit and principles of the application.