Disclosure of Invention
In order to solve the above problems, the present application provides a method and a system for calibrating the consistency of a catheter control direction and an image motion direction, which accurately calculates a calibration offset angle after a contrast body position is switched, and ensures the consistency of a rocker control direction and a motion direction in an image plane.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, the present application provides a method for calibrating consistency between a catheter control direction and an image motion direction, including:
receiving a calibration start instruction;
determining the current bending depth of the catheter in the image according to the traction length increment values of the steel wires before and after the bending of the catheter, and determining the bending depth increment value according to the current bending depth and the bending depth target value so as to control the bending of the catheter to the bending depth target value;
setting a bending direction increment rotation angle of each period, and carrying out bending direction change according to the bending direction increment rotation angle under a bending depth target value until a calibration end instruction is received, so as to finish calibration;
and determining an angle value of the bending direction after the calibration is completed, and determining a calibration offset angle according to the angle value of the bending direction so as to add the angle value of the control direction and the calibration offset angle as a final control direction when the bending direction of the catheter is controlled next time.
As an alternative embodiment, the steel wire drawing length increment value is: and obtaining the steel wire traction length increment value according to the proportional relation between the motor tail encoder value for controlling the bending of the guide pipe and the steel wire traction length increment value.
As an alternative embodiment, the steel wire drawing length increment value is:=K*(Value coder -InitValue coder ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein K is the conversion ratio of the encoder value at the tail of the motor and the increment value of the traction length of the steel wire; value coder The current encoder value is the motor tail; initValue coder Initial encoder values for motor tails.
As an alternative embodiment, the current bending depth is:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Is the current bending depth;The current bending direction angle value;Pulling a length increment value for the first wire;Is the radius of the catheter.
Alternatively, the catheter is controlled to perform a change in the bending direction between 0 and 360 ° clockwise by increasing the rotation angle in the bending direction until the catheter in the image assumes maximum bending to the right of the advancing direction, at which point the calibration is ended.
Alternatively, the angle value of the bending direction is:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>A first wire drawing length increment value,and drawing a length increment value for the second steel wire.
Alternatively, the calibration offset angle is the angle value of the bending direction when the maximum bending is observed on the right side in the image divided by 360 to obtain the remainder.
In a second aspect, the present application provides a system for calibrating the consistency of a catheter control direction and an image motion direction, comprising:
an instruction receiving module configured to receive a calibration start instruction;
the bending depth control module is configured to determine the current bending depth of the catheter in the image according to the steel wire pulling length increment values before and after the bending of the catheter, and determine the bending depth increment value according to the current bending depth and the bending depth target value so as to control the bending of the catheter to the bending depth target value;
the bending direction control module is configured to set a bending direction increment rotation angle of each period, and change the bending direction according to the bending direction increment rotation angle under the bending depth target value until the calibration is completed after a calibration end instruction is received;
and the calibration module is configured to determine an angle value of the bending direction after calibration is completed, and determine a calibration offset angle according to the angle value of the bending direction so as to add the angle value of the control direction and the calibration offset angle as a final control direction when the bending direction of the catheter is controlled next time.
In a third aspect, the application provides an electronic device comprising a memory and a processor and computer instructions stored on the memory and running on the processor, which when executed by the processor, perform the method of the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium storing computer instructions which, when executed by a processor, perform the method of the first aspect.
Compared with the prior art, the application has the beneficial effects that:
the application provides a method and a system for calibrating consistency of a catheter control direction and an image action direction, which are provided with plane calibration functions, wherein after a contrast body position is switched, a calibration flow is executed, when the maximum bending of the tail end of the catheter on the right side of the advancing direction is observed in an image, the calibration flow is ended, a calibration offset angle is recorded, and the calibration offset angle is accurately calculated in a motion control process of ensuring consistency of a follow-up rocker control direction and a motion direction in an image plane, so that the hand-eye coordination of operation is ensured after a projection plane is switched.
Additional aspects of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Detailed Description
The application is further described below with reference to the drawings and examples.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the application. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular forms also are intended to include the plural forms, and furthermore, it is to be understood that the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, such as, for example, processes, methods, systems, products or devices that comprise a series of steps or units, are not necessarily limited to those steps or units that are expressly listed, but may include other steps or units that are not expressly listed or inherent to such processes, methods, products or devices.
Embodiments of the application and features of the embodiments may be combined with each other without conflict.
Example 1
The embodiment provides a method for calibrating consistency of a catheter control direction and an image motion direction, which comprises the following steps:
receiving a calibration start instruction;
determining the current bending depth of the catheter in the image according to the traction length increment values of the steel wires before and after the bending of the catheter, and determining the bending depth increment value according to the current bending depth and the bending depth target value so as to control the bending of the catheter to the bending depth target value;
setting a bending direction increment rotation angle of each period, and carrying out bending direction change according to the bending direction increment rotation angle under a bending depth target value until a calibration end instruction is received, so as to finish calibration;
and determining an angle value of the bending direction after the calibration is completed, and determining a calibration offset angle according to the angle value of the bending direction so as to add the angle value of the control direction and the calibration offset angle as a final control direction when the bending direction of the catheter is controlled next time.
In the embodiment, the bending of the catheter is controlled by adopting a universal rocker, and the action range of the universal rocker is as a circle shown in fig. 1, wherein the positive direction of the corresponding X axis is a position of 0 DEG in the bending direction;
when the universal rocker is controlled towards the 0-degree direction, the tail end of the catheter is bent along the right side of the advancing direction in the perspective image plane;
when the universal rocker bends towards the 180 DEG direction, the tail end of the catheter bends along the left side of the advancing direction in the perspective image plane;
when the universal rocker is bent towards the 90 DEG direction, the tail end of the catheter is bent along the right side of the advancing direction on the plane perpendicular to the plane of the perspective image;
when the universal rocker is bent in the 270 DEG direction, the catheter tip is bent along the left side of the advancing direction on a plane perpendicular to the perspective image plane;
and so on.
Therefore, when the above condition cannot be satisfied after the perspective image plane is switched, the response result can be obtained by adding the calibration offset angle to the original rocker control signal.
In the embodiment, three steel wires are uniformly distributed in the catheter, the three steel wires form an included angle of 120 degrees, and the three steel wires are pulled by corresponding three motors to form different lengths, so that different bending effects of the tail end are formed. After each projection plane is switched, a calibration command is sent, a calibration program is automatically executed, and a cycle period can be set.
As shown in fig. 2, the flow of the method for calibrating the consistency of the catheter control direction and the image motion direction is specifically as follows:
step 1: monitoring a calibration command signal; executing corresponding steps according to the change of the calibration command signal;
step 2: judging whether the calibration command signal is from 0- >1; when the calibration command signal changes by 0- >1, the following steps are performed:
step 2.1: let the calibration offset angle be 0 °; the previously recorded calibration offset angle is cleared for recalculation.
Step 2.2: calculating the current bending depth; since it is necessary that the catheter tip assumes a certain bending depth if the bending direction of the catheter tip is to be observed in the fluoroscopic image, rather than being kept in a vertical state, it is necessary to calculate the current bending depth; the method comprises the following steps:
firstly, according to the proportional relation between the encoder value at the tail of a motor for controlling the bending of a catheter and the length of a steel wire after being pulled, obtaining the pulling length increment value of two steel wires:
=K*(Value coder1 -InitValue coder1 );
=K*(Value coder2 -InitValue coder2 );
wherein L1 and L2 are the increment value of the traction length of the steel wire relative to the initial state, and the unit is mm; k is the conversion ratio of the encoder Value at the tail of the motor and the increment Value of the traction length of the steel wire, value coder For the current encoder value of the motor tail, initValue coder For the initial encoder value of the motor tail, the initial position is the encoder value of the motor of each steel wire when the guide pipe keeps a vertical stretching state before the calibration starts.
Then, obtaining the current bending direction angle value and the current bending depth of the tail end of the catheter according to the steel wire pulling length increment value;
;
;
wherein,,the current bending direction angle value is 0 degrees on the right side;Is the current bending depth;Pulling a length increment value for the first wire, < >>The pulling length increment value of the second steel wire is obtained, and as the three steel wires are uniformly distributed at 120 degrees, the pulling length condition of the third steel wire can be deduced under the condition that the pulling lengths of the two steel wires are known;is the radius of the catheter.
Step 2.3: determining a bending depth increment value according to the current bending depth and a bending depth target value;
during calibration, the catheter tip needs to be bent to 90 ° in order to observe the bending direction, so this embodiment sets the bending depth target value to 90 °, and the bending depth increment value=90° -the current bending depth.
Step 2.4: and (3) reversely pushing according to the bending model of the tail end of the steel wire traction catheter, converting the bending depth increment value into target positions which are required to be changed by the three motors, and sending the target positions to the corresponding motors to execute actions so as to achieve the purpose that the bending depth of the tail end of the catheter reaches 90 degrees.
Step 2.5: setting the calibration state as a first stage; wherein, the calibration state has three states; the method comprises the following steps: the first stage is when a calibration instruction is received; the second stage is to execute the target with 90 degrees of bending depth and is used for identifying the movement state of the calibration program in 360 degrees of cyclic change of the bending direction; the uncalibrated phase is at the end of calibration.
Step 3: if the calibration command signal is not changed from 0- >1, judging that the calibration signal is 1 and the period does not change from 0 to 1, and if the condition is met, executing the following steps:
step 3.1: whether the calibration state is the first phase; since it takes time for the catheter to bend to 90 °, in the case where the calibration command signal is equal to 1, the case where the calibration is performed is confirmed for judging whether the bending depth or the bending direction should be continued at present.
Step 3.2: if the calibration state is the first stage, the catheter is not bent to 90 degrees, the current bending depth is required to be calculated continuously, and the process is the same as that of the step 2.2; if the calibration state is the second stage, executing the step 3.5;
step 3.3: judging whether the current bending depth is within the range of 90 degrees+/-1 degrees; if not, continuing to execute the step 3.2 until the catheter is bent to 90 degrees;
step 3.4: if the step 3.3 is satisfied, the calibration state is set to be the second stage, which means that the bending depth reaches about 90 degrees required by the calibration procedure, and the step 3.5 is executed;
step 3.5: setting a bending direction increment rotation angle per cycle;
the purpose of this step is to have the consumable tip perform a change in bending direction between 0 and 360 ° in the clockwise direction while maintaining a clearly observable bending depth (90 °) until the catheter is observed to exhibit maximum bending on the right side of the advancing direction in the fluoroscopic image plane, as shown in fig. 3, at which point the user is facilitated to observe, the calibration is ended, and the calibration offset angle is obtained after the calibration is ended.
As an alternative embodiment, the incremental rotation angle of the bending direction per cycle may be set as: 360 °/(3000 ms/2 ms) =0.24°.
Step 3.6: converting the incremental rotation angle of the bending direction into target positions which are required to be changed by the three motors, and transmitting the target positions to the corresponding motors to execute actions;
the bending direction to be issued to the motor is the sum of the current bending direction and the incremental rotation angle of the bending direction, and the bending depth is the bending depth target value (90 ° in this embodiment).
Step 4: when the calibration command signal is from 1- >0, the following steps are performed:
step 4.1: calculating the angle value of the bending direction after the step 3.6 is executed by adopting the method of the step 2.2;
step 4.2: the calibration command signal jumps by 1- >0, indicating that the operator observes the maximum curve on the right side of the direction of advance of the fluoroscopic catheter, and the calibration is completed at this time, and the curve direction angle value% 360 calculated in step 4.1 is used as the calibration offset angle.
Step 4.3: let the calibration state be uncalibrated; updating the calibration state identifier, and facilitating the next calibration execution.
Step 4.4: when the bending direction of the catheter is controlled next time, the angle value of the control direction and the calibration offset angle are added to be used as the final control direction, so that the control direction of the rocker is consistent with the action direction under the perspective image.
Example 2
The present embodiment provides a system for calibrating the consistency of a catheter control direction and an image motion direction, comprising:
an instruction receiving module configured to receive a calibration start instruction;
the bending depth control module is configured to determine the current bending depth of the catheter in the image according to the steel wire pulling length increment values before and after the bending of the catheter, and determine the bending depth increment value according to the current bending depth and the bending depth target value so as to control the bending of the catheter to the bending depth target value;
the bending direction control module is configured to set a bending direction increment rotation angle of each period, and change the bending direction according to the bending direction increment rotation angle under the bending depth target value until the calibration is completed after a calibration end instruction is received;
and the calibration module is configured to determine an angle value of the bending direction after calibration is completed, and determine a calibration offset angle according to the angle value of the bending direction so as to add the angle value of the control direction and the calibration offset angle as a final control direction when the bending direction of the catheter is controlled next time.
It should be noted that the above modules correspond to the steps described in embodiment 1, and the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in embodiment 1. It should be noted that the modules described above may be implemented as part of a system in a computer system, such as a set of computer-executable instructions.
In further embodiments, there is also provided:
an electronic device comprising a memory and a processor and computer instructions stored on the memory and running on the processor, which when executed by the processor, perform the method described in embodiment 1. For brevity, the description is omitted here.
It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general purpose processors, digital signal processors DSP, application specific integrated circuits ASIC, off-the-shelf programmable gate array FPGA or other programmable logic device, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include read only memory and random access memory and provide instructions and data to the processor, and a portion of the memory may also include non-volatile random access memory. For example, the memory may also store information of the device type.
A computer readable storage medium storing computer instructions which, when executed by a processor, perform the method described in embodiment 1.
The method in embodiment 1 may be directly embodied as a hardware processor executing or executed with a combination of hardware and software modules in the processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method. To avoid repetition, a detailed description is not provided herein.
Those of ordinary skill in the art will appreciate that the elements of the various examples described in connection with the present embodiments, i.e., the algorithm steps, can be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
While the foregoing description of the embodiments of the present application has been presented in conjunction with the drawings, it should be understood that it is not intended to limit the scope of the application, but rather, it is intended to cover all modifications or variations within the scope of the application as defined by the claims of the present application.