Virtual endoscope pose identifier rendering method and device, medium and electronic equipment

By obtaining the pixel position and direction vector during the virtual endoscope operation, rendering the medical image and pose identification, it solves the problem of difficult determination of the position and direction of the virtual endoscope in the medical image, and realizes visual navigation of the virtual endoscope. and intuitive operation.

CN118864579APending Publication Date: 2024-10-29SHENYANG NEUSOFT INTELLIGENT MEDICAL TECH RES INST
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202410832437.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

During virtual endoscopy operations, it is difficult for observers to intuitively understand the position and direction of the virtual endoscope in medical images, resulting in navigation difficulties.

Method used

By obtaining the pixel position and direction vector of the virtual endoscope in the medical image sequence, the target medical image and pose identification are rendered in the WEB-based canvas to provide intuitive position and direction information.

Benefits of technology

The visual navigation of the virtual endoscope is realized, helping the observer to clearly understand the position and direction of the virtual endoscope in the area of ​​interest, and improving the intuitiveness and accuracy of the operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118864579A_ABST
    Figure CN118864579A_ABST
Patent Text Reader

Abstract

The invention relates to a virtual endoscope pose identifier rendering method and device, a medium and electronic equipment. The method comprises the following steps: acquiring a pixel position of a virtual endoscope in a pixel matrix corresponding to a medical image sequence; respectively acquiring a lens direction vector and an on-lens direction vector of the virtual endoscope in the pixel matrix; according to the pixel position, the lens direction vector and the above-lens direction vector, a target medical image and an identifier are rendered in a canvas, and the identifier is used for describing the pose of the virtual endoscope in the target medical image. The target medical image is a medical image determined in the medical image sequence according to the pixel position, and rendering the target medical image and an identifier used for describing the pose of the virtual endoscope in the target medical image in a canvas provided based on a WEB end technology, therefore, an observer can visually and clearly know the position and direction of the virtual endoscope in the target medical image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of virtual endoscopes, and in particular to a method, device, medium and electronic device for rendering a virtual endoscope posture mark. Background Art

[0002] Virtual endoscopy (VE) technology is the application of virtual reality technology in modern medicine. It simulates traditional optical endoscopy based on medical image processing and 3D reconstruction. Virtual endoscopy overcomes the disadvantage of traditional optical endoscopy that the endoscope must be inserted into the human body, and is a completely contactless inspection method.

[0003] However, when the observer observes and evaluates the area of ​​interest in the medical image, the virtual endoscope viewing angle is required to change continuously, so there is a possibility of disorientation when the observer operates the virtual endoscope. Therefore, it is necessary to explore virtual endoscope navigation. Summary of the invention

[0004] The purpose of the present disclosure is to provide a virtual endoscope posture identification rendering method, device, medium and electronic device, which render the target medical image and the identification used to describe the posture of the virtual endoscope in the target medical image in a canvas provided by the WEB (World Wide Web) terminal technology, so that the observer can intuitively and clearly understand the position and direction of the virtual endoscope in the target medical image.

[0005] In order to achieve the above objectives, in a first aspect, the present disclosure provides a virtual endoscope pose identification rendering method, comprising:

[0006] Obtaining the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence;

[0007] Respectively obtaining a lens direction vector and a lens upward direction vector of the virtual endoscope in the pixel matrix;

[0008] According to the pixel position, the lens direction vector and the lens upward direction vector, a target medical image and an identifier are rendered in a canvas, wherein the identifier is used to describe the position of the virtual endoscope in the target medical image, and the target medical image is a medical image determined in the medical image sequence according to the pixel position.

[0009] Optionally, obtaining the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence includes:

[0010] Acquire a first position of the virtual endoscope in a virtual three-dimensional space, and reconstruct a three-dimensional stereoscopic model corresponding to the medical image sequence in the virtual three-dimensional space, wherein the coordinate origin of a first coordinate system in which the virtual three-dimensional space is located is the center point of the three-dimensional stereoscopic model, the cross-sectional growth direction of the medical image sequence coincides with the z-axis direction of the first coordinate system, the coronal plane growth direction coincides with the y-axis direction of the first coordinate system, and the sagittal plane growth direction coincides with the x-axis direction of the first coordinate system;

[0011] Obtaining a rotation matrix of the three-dimensional model;

[0012] Determine, according to the first position and the rotation matrix, a second position of the first position in a second coordinate system where the three-dimensional stereoscopic model is located;

[0013] The pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence is determined according to the second position, the image information of the medical image sequence and the size information of the three-dimensional model.

[0014] Optionally, the direction vector is obtained in the following manner, where the direction vector is the lens direction vector or the lens upward direction vector:

[0015] Acquire a first direction vector of the virtual endoscope in the virtual three-dimensional space;

[0016] According to the first direction vector and the rotation matrix, the second direction vector of the virtual endoscope in the second coordinate system is determined. When the first direction vector is a direction vector representing the direction of the lens, the second direction vector is the lens direction vector. When the first direction vector is a direction vector representing the upward direction of the lens, the second direction vector is the upward direction vector of the lens.

[0017] Optionally, the posture includes a position, the identifier includes a position identifier, the position and size of the canvas are the same as the position and size of the target medical image, and rendering the target medical image and the identifier in the canvas according to the pixel position, the lens direction vector, and the lens upward direction vector includes:

[0018] Determine, according to the pixel position, a medical image corresponding to a target view, wherein the target view includes at least one of an axial plane view, a coronal plane view, and a sagittal plane view, and the medical image corresponding to the target view is the target medical image;

[0019] Determine, according to the pixel position, the size information of the canvas and the image information of the medical image sequence, a first two-dimensional coordinate of the pixel position in a third coordinate system where the canvas is located;

[0020] In the third coordinate system, a target medical image and a position marker having a preset shape and centered on the first two-dimensional coordinate system are rendered in a canvas.

[0021] Optionally, rendering the target medical image and a location marker having a preset shape and centered at the first two-dimensional coordinate in the canvas includes:

[0022] In the third coordinate system, the target medical image and a graphic having the preset shape and centered at the first two-dimensional coordinate are rendered in the canvas; and,

[0023] A first straight line is rendered in the horizontal direction of the canvas, and a second straight line is rendered in the vertical direction of the canvas, and the intersection of the first straight line and the second straight line is the first two-dimensional coordinate, and the first straight line, the second straight line and the graphic constitute a position mark.

[0024] Optionally, the posture further includes a lens direction, the identifier further includes a lens direction identifier, and the rendering of the target medical image and the identifier in the canvas according to the pixel position, the lens direction vector and the lens upward direction vector further includes:

[0025] Determine, according to the lens direction vector and the first preset length, a first projection length of the lens direction mark in the transverse direction and a second projection length in the longitudinal direction of the canvas;

[0026] Determine a second two-dimensional coordinate according to the first two-dimensional coordinate, the first projection length, and the second projection length;

[0027] A third straight line is rendered in the canvas with the first two-dimensional coordinate as a starting point, the second two-dimensional coordinate as an end point and the third coordinate system as a basis, and the third straight line is the lens direction mark.

[0028] Optionally, the rendering of the target medical image and the logo in the canvas according to the pixel position, the lens direction vector and the lens upward direction vector further includes:

[0029] When the determined width of the arrow head satisfies a preset resolution condition, determining a third two-dimensional coordinate and a fourth two-dimensional coordinate according to the width, the second two-dimensional coordinate, a preset bifurcation angle of the arrow head, and an angle between a lens vector and a positive direction of an x-axis of the third coordinate system;

[0030] Taking the second two-dimensional coordinate as the starting point, and the third two-dimensional coordinate and the fourth two-dimensional coordinate as the end points respectively, a fourth straight line and a fifth straight line are rendered, and the third straight line, the fourth straight line and the fifth straight line constitute the lens direction mark.

[0031] Optionally, the posture further includes a lens upward direction, the identifier further includes a lens upward direction mark, and the rendering of the target medical image and the identifier in the canvas according to the pixel position, the lens direction vector and the lens upward direction vector further includes:

[0032] Determine, according to the lens upward direction vector and the second preset length, a third projection length of the lens upward direction mark in the transverse direction and a fourth projection length in the longitudinal direction of the canvas;

[0033] Determine a fifth two-dimensional coordinate according to the first two-dimensional coordinate, the third projection length and the fourth projection length;

[0034] A sixth straight line serving as an upward direction mark of the lens is rendered in the canvas with the first two-dimensional coordinate as a starting point, the fifth two-dimensional coordinate as an end point and the third coordinate system as a basis.

[0035] In a second aspect, the present disclosure provides a virtual endoscope posture identification rendering device, comprising:

[0036] A first acquisition module is configured to acquire a pixel position of the virtual endoscope in a pixel matrix corresponding to the medical image sequence;

[0037] A second acquisition module is configured to respectively acquire a lens direction vector and a lens upward direction vector of the virtual endoscope in the pixel matrix;

[0038] A rendering module is configured to render a target medical image and an identifier in a canvas according to the pixel position, the lens direction vector and the lens upward direction vector, wherein the identifier is used to describe the position of the virtual endoscope in the target medical image, and the target medical image is a medical image determined in the medical image sequence according to the pixel position.

[0039] In a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any method described in the first aspect.

[0040] In a fourth aspect, the present disclosure provides an electronic device, including:

[0041] a memory having a computer program stored thereon;

[0042] A processor is used to execute the computer program in the memory to implement the steps of any method described in the first aspect.

[0043] Through the above technical solution, the target medical image and the identifier used to describe the position of the virtual endoscope in the target medical image are rendered in the canvas provided by the WEB technology, so that the observer can clearly know the position and direction of the virtual endoscope when observing and evaluating the area of ​​interest, thereby realizing the visual navigation of the virtual endoscope.

[0044] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0046] Figure 1 The present invention is a flowchart of a method for rendering a virtual endoscope pose identification according to an exemplary embodiment of the present invention.

[0047] Figure 2 It is a schematic diagram showing the relative position relationship between a three-dimensional stereoscopic model and a coordinate system where a virtual three-dimensional space is located according to an exemplary embodiment of the present disclosure.

[0048] Figure 3 It is a schematic diagram showing a medical image of an axial plane view and a position identification of a virtual endoscope in the medical image according to an exemplary embodiment of the present disclosure.

[0049] Figure 4 It is a schematic diagram showing a medical image of a coronal view and a position identification of a virtual endoscope in the medical image according to an exemplary embodiment of the present disclosure.

[0050] Figure 5 It is a schematic diagram showing a medical image of a sagittal view and a position identification of a virtual endoscope in the medical image according to an exemplary embodiment of the present disclosure.

[0051] Figure 6 The diagram is a schematic diagram of an interface of an electronic device according to an exemplary embodiment of the present disclosure.

[0052] Figure 7 The present invention is a block diagram of a virtual endoscope pose identification rendering device according to an exemplary embodiment of the present invention.

[0053] Figure 8 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0054] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0055] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0056] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0057] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0058] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0059] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0060] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0061] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0062] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0063] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0064] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0065] The virtual endoscope pose identification rendering method involved in the embodiment of the present application can be applied to the field of medical imaging. When the observer observes and evaluates the area of ​​interest in the medical image, the virtual endoscope viewing angle is required to change continuously. Therefore, there is a possibility of getting lost when the observer operates the virtual endoscope. Therefore, it is necessary to explore virtual endoscope navigation.

[0066] In view of this, the embodiments of the present disclosure provide a method, device, medium and electronic device for rendering a virtual endoscope posture identification, which renders a target medical image and an identification for describing the posture of the virtual endoscope in the target medical image in a canvas provided by the WEB technology, thereby facilitating the observer to intuitively and clearly understand the position and direction of the virtual endoscope in the target medical image.

[0067] Figure 1 is a flowchart of a virtual endoscope pose identification rendering method according to an exemplary embodiment of the present disclosure. The virtual endoscope pose identification rendering method can be applied to electronic devices, referring to Figure 1 The virtual endoscope pose identification rendering method may include the following steps:

[0068] Step 110: Obtain the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence.

[0069] In the field of medical imaging, a medical image sequence may include multiple medical images, and the medical image sequence may be a CT (Computed Tomography) image or an MR (Magnetic Resonance) image.

[0070] Take CT images as an example. CT images are a series of two-dimensional images obtained by computer tomography. These CT images are displayed in the form of continuous slices (i.e., two-dimensional images), and each slice represents a cross-sectional view of a certain part on a specific plane. Based on this, the pixel matrix corresponding to the medical image sequence can be composed of the pixels of all two-dimensional images of the CT image.

[0071] Furthermore, the specific planes of the slice may include the axial plane, the coronal plane, and the sagittal plane. The axial plane is also called the cross-sectional plane or horizontal plane, which is a plane perpendicular to the ground and parallel to the human shoulder. The axial plane image shows the cross-sectional structure of the human body from top to bottom, which allows the observer to observe the details of the organs, bones, and soft tissues in the width and height directions. The coronal plane is a plane perpendicular to the ground but at right angles to the axial plane. It cuts vertically from the front to the back of the human body, similar to the plane that divides the human body into the front and back parts. The coronal plane image can help the observer observe the structure of the side of the body, such as the two sides of the brain, the front and back structures of the knee joint, etc. The sagittal plane is a plane perpendicular to the ground and at right angles to both the axial plane and the coronal plane. It cuts vertically from one side of the body to the other side, dividing the human body into left and right parts. The sagittal plane image is often used to observe the length direction of the body, such as the full length of the spinal cord, the full length of the thigh bone, etc.

[0072] The present application uses the reconstruction technology of medical image sequence to obtain the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence. The pixel position represents the coordinate value in the direction of the three coordinate axes. The pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence posImg=(x img ,y img ,z img ), and taking the target medical image as the axial plane view as an example, the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence can represent the virtual endoscope in z img +1 medical image (i.e. target medical image) in the xth img +1 row, and y img In addition, it is worth noting that in the spatial coordinate system of the computer, the voxel coordinate values ​​of the medical image sequence start counting from 0, so when z is 0, it corresponds to the first image, that is, for example, posIm g = (x img ,y img ,z img ) is (0,0,0), it represents the pixel position corresponding to the first row and the first column of the first image (i.e., the target medical image).

[0073] The implementation method for obtaining the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence may refer to the following related embodiments, which will not be described in detail in this embodiment.

[0074] Step 120, respectively obtaining a lens direction vector and a lens upward direction vector of the virtual endoscope in the pixel matrix;

[0075] The lens direction refers to the orientation of the virtual camera in the virtual endoscope. In the virtual endoscope system, the observer can control this direction to observe the anatomical structure of interest. The lens direction determines where the virtual camera "looks", similar to the direction that the observer sees through the endoscope in a real endoscope. When performing a virtual endoscopy, the observer can adjust the lens direction through the user interface to obtain the best viewing angle. The lens direction vector in the embodiment of the present disclosure represents the lens direction.

[0076] The up direction refers to the "up" vector defined in the virtual endoscope, which is usually used to determine the "up" and "down" directions in three-dimensional space. In a virtual environment, the up direction helps maintain the consistency and intuitiveness of the space, ensuring that the observer can maintain the correct sense of direction when navigating. The up direction usually corresponds to the direction of gravity, that is, pointing in the direction of the patient's head.

[0077] Among them, the implementation method of obtaining the lens direction vector and the lens upward direction vector of the virtual endoscope in the pixel matrix can refer to the following related embodiments, and this embodiment will not be described in detail here.

[0078] Step 130, render the target medical image and the logo in the canvas according to the pixel position, the lens direction vector and the lens upward direction vector, the logo is used to describe the position of the virtual endoscope in the target medical image, and the target medical image is a medical image determined in the medical image sequence according to the pixel position.

[0079] It is worth noting that the target medical image is the medical image that the observer wants to observe based on the electronic device. After the medical image is selected, its pixel position is also fixed. Further, step 110 can be performed in response to the selection operation for the target medical image. For the selection operation here, reference can be made to the following related embodiments, which will not be described in detail in this embodiment.

[0080] The canvas may be a canvas object provided by the WEB end.

[0081] The posture may include position and direction, and the direction here may further include an upward direction and a lens direction.

[0082] As an example, the target medical image can be rendered first, and then the logo can be rendered in the target medical image, or the target medical image and the logo can be rendered at the same time, and this solution does not limit this. Through the above method, in the canvas provided by the WEB-based technology, the target medical image and the logo used to describe the position of the virtual endoscope in the target medical image are rendered, so that the position and direction of the virtual endoscope in the target medical image can be intuitively and clearly understood, and the visual navigation of the virtual endoscope can be realized, so that the observer can clearly know the position and direction of the virtual endoscope when observing and evaluating the area of ​​interest in the medical image.

[0083] In the following embodiments, the following information is used as a premise for exemplary description. The information here includes: there are zDim medical image sequences, the resolution of each medical image is xDim in length and yDim in width. A three-dimensional model is reproduced in a virtual three-dimensional space, and the length, width and height of the three-dimensional model are l box 、w box and h box , the center point of the three-dimensional model is the origin of the coordinate system of the virtual three-dimensional space, the cross-sectional growth direction of the medical image at the initial position of the three-dimensional model coincides with the Z-axis direction of the virtual three-dimensional space, the coronal plane growth direction coincides with the Y-axis direction of the virtual three-dimensional space, and the sagittal plane growth direction coincides with the X-axis direction of the virtual three-dimensional space. The geometric transformation of the three-dimensional model in the virtual three-dimensional space only has rotation transformation but no translation transformation and scale transformation. For specific examples, please refer to Figure 2 The schematic diagram of the three-dimensional model shown in FIG. Figure 2 The coordinate system shown is the coordinate system of the virtual three-dimensional space, that is, the first coordinate system described below.

[0084] In some embodiments, the above-mentioned step of obtaining the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence can be implemented in the following manner: obtaining the first position of the virtual endoscope in the virtual three-dimensional space, and reconstructing the three-dimensional model corresponding to the medical image sequence in the virtual three-dimensional space; obtaining the rotation matrix of the three-dimensional model; determining the second position of the first position in the second coordinate system where the three-dimensional model is located based on the first position and the rotation matrix; determining the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence based on the second position, the image information of the medical image sequence and the size information of the three-dimensional model.

[0085] The first position is the position of the virtual endoscope in the world coordinate system. In this embodiment, the world coordinate system is the first coordinate system of the virtual three-dimensional space. It is worth noting that the three-dimensional model can be rendered using a three-dimensional engine object, which supports many methods for calling, including a method for obtaining the first position of the virtual endoscope in the virtual three-dimensional space. world ,y world ,z world ) is taken as an example to illustrate the acquisition of pixel positions in the pixel matrix implemented by this method.

[0086] The rotation matrix is ​​a matrix used to represent rotation in three-dimensional space, which can be used to transform a vector from one coordinate system to another rotated coordinate system. As an example, the rotation matrix can be determined in the following way:

[0087] First, determine the axis of rotation, which is taken as a unit vector

[0088] Next, determine the rotation angle θ β , construct the rotation matrix R using the rotation axis and rotation angle:

[0089]

[0090] Where I is the identity matrix, is the matrix generated by the outer product, and S is the unit vector The resulting skew-symmetric matrix is:

[0091]

[0092] Here, u x 、u y and u z Is the axis of rotation Components on different coordinate axes.

[0093] Wherein, by calculating the product of the first position and the inverse matrix invR of the rotation matrix, the second position posLocal of the first position in the second coordinate system where the three-dimensional stereoscopic model is located can be obtained. local ,y local ,z local ), the second coordinate system where the three-dimensional model is located can be called the local coordinate system.

[0094] The image information of the medical image sequence may include the resolutions xDim and yDim of the medical images mentioned above, and the length zDim of the medical image sequence. The size information of the three-dimensional model may include the length l box 、Widthbox and high h box .

[0095] The following is to determine the pixel position posImg of the virtual endoscope in the pixel matrix corresponding to the medical image sequence according to the second position, the image information of the medical image sequence and the size information of the three-dimensional model. img ,y img ,z img ) for exemplary description:

[0096] First, the length l of the three-dimensional model box The xDim corresponding to the medical image sequence is calculated by img :

[0097] x img =round((x Dim-1)·(x local / l box +0.5));

[0098] Wherein, round(a) is a rounding function. For example, if a=0.5, then round(a) is 1. In this embodiment, a=((x Dim-1)·(x local / l box +0.5)). And if x img If it is greater than xDim-1, then x is assigned img is xDim-1; if x img Less than 0, assign x img is 0.

[0099] The width of the three-dimensional model box Corresponding to the yDim of the medical image sequence, y is calculated by img :

[0100] y img =round((y Dim-1)·(y local / w box +0.5));

[0101] In this embodiment, a=((y Dim-1)·(y local / w box +0.5)), if y img If it is greater than yDim-1, then assign y img is yDim-1; if y img Less than 0, assign value y img is 0.

[0102] High h of three-dimensional model box The zDim corresponding to the medical image sequence is calculated by img:

[0103] z img =round((z Dim-1)·(z local / h box +0.5));

[0104] In this embodiment, a=((z Dim-1)·(z local / h box +0.5)), if z img If it is greater than zDim-1, then z is assigned img is zDim-1; if z img Less than 0, assign value z img is 0.

[0105] Finally, based on x img ,y img and z img The assignment result is to obtain the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence posImg=(x img ,y img ,z img ).

[0106] In the above manner, MPR (Multi-Planar Reconstruction) technology is used to reconstruct the cross-sectional two-dimensional image in pixels into three-dimensional data in voxels, so as to determine the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence based on this technology.

[0107] In some embodiments, the direction vector may be obtained in the following manner: obtaining a first direction vector of the virtual endoscope in a virtual three-dimensional space; and determining a second direction vector of the virtual endoscope in a second coordinate system based on the first direction vector and a rotation matrix.

[0108] In this embodiment, the direction vector may be a lens direction vector or a lens upward direction vector. When the first direction vector is a direction vector indicating the lens direction, the second direction vector is the lens direction vector; when the first direction vector is a direction vector indicating the lens upward direction, the second direction vector is the lens upward direction vector.

[0109] The rotation matrix in this embodiment is the rotation matrix of the three-dimensional model in the above embodiment.

[0110] The following determines the lens direction vector of the virtual endoscope in the pixel matrix: An example explanation is given below:

[0111] First, similar to the method of obtaining the first position, the method provided by the three-dimensional engine object can be called to obtain the direction vector of the virtual endoscope used to represent the lens direction in the virtual three-dimensional space.

[0112] according to And the inverse matrix of the rotation matrix is ​​obtained The lens direction vector in the second coordinate system:

[0113]

[0114] in, for The lens direction vector in the second coordinate system, invR is the inverse matrix of the rotation matrix, To find the vector normalization function of the unit vector. In this embodiment, for

[0115] Since the center point of the three-dimensional model is the coordinate origin of the first coordinate system where the virtual three-dimensional space is located, and the cross-sectional growth direction of the medical image at the initial position of the three-dimensional model coincides with the Z-axis direction of the virtual three-dimensional space, the coronal plane growth direction coincides with the Y-axis direction of the virtual three-dimensional space, and the sagittal plane growth direction coincides with the X-axis direction of the virtual three-dimensional space, and the geometric transformation of the three-dimensional model in the virtual three-dimensional space only has rotation transformation, and there is no translation transformation and scale transformation. Therefore, the lens direction vector of the virtual endoscope in the second coordinate system where the three-dimensional model is located is consistent with the lens direction vector of the virtual endoscope in the pixel matrix of the medical image sequence, that is: and x dir ,y dir ,z dir They are Regarding the components of different coordinate axes, it is worth noting that the lens direction vector of the virtual endoscope in the second coordinate system where the three-dimensional model is located is equivalent to the lens direction vector of the virtual endoscope in the pixel matrix.

[0116] The following determines the lens up direction vector of the virtual endoscope in the pixel matrix: An example explanation is given below:

[0117] First, similar to the method of obtaining the first position and the direction vector of the virtual endoscope in the virtual three-dimensional space for indicating the direction of the lens, the method provided by the three-dimensional engine object can be called to obtain the direction vector of the virtual endoscope in the virtual three-dimensional space for indicating the direction of the lens.

[0118] according to And the inverse matrix of the rotation matrix is ​​obtained The upward vector of the lens in the second coordinate system:

[0119]

[0120] in, for The direction vector in the second coordinate system, invR is the inverse matrix of the rotation matrix, To find the vector normalization function of the unit vector. In this embodiment, for

[0121] Similarly, since the center point of the three-dimensional model is the coordinate origin of the first coordinate system where the virtual three-dimensional space is located, and the cross-sectional growth direction of the medical image at the initial position of the three-dimensional model coincides with the Z-axis direction of the virtual three-dimensional space, the coronal plane growth direction coincides with the Y-axis direction of the virtual three-dimensional space, and the sagittal plane growth direction coincides with the X-axis direction of the virtual three-dimensional space, and the geometric transformation of the three-dimensional model in the virtual three-dimensional space only includes rotation transformation, and there is no translation transformation and scale transformation. Therefore, the lens upward direction vector of the virtual endoscope in the second coordinate system where the three-dimensional model is located is consistent with the lens upward direction vector of the virtual endoscope in the pixel matrix of the medical image sequence, that is,: and x up ,y up ,z up They are Components on different coordinate axes. It is worth noting that the lens upward direction vector of the virtual endoscope in the second coordinate system where the three-dimensional model is located is equivalent to the lens upward direction vector of the virtual endoscope in the pixel matrix.

[0122] The following will provide an exemplary description of the rendering identifier in combination with the above content.

[0123] As can be seen from the above content, the pose may include a position, and further, the identifier may include a position identifier, and the position and size of the canvas are the same as the position and size of the target medical image. In this case, the above steps of rendering the target medical image and the identifier in the canvas according to the pixel position, the lens direction vector, and the lens upward direction vector may include: determining the medical image corresponding to the target view according to the pixel position, and the medical image corresponding to the target view is the target medical image; determining the first two-dimensional coordinates of the pixel position in the third coordinate system where the canvas is located according to the pixel position, the size information of the canvas, and the image information of the medical image sequence, and rendering the target medical image and the position identifier having a preset shape and centered on the first two-dimensional coordinates in the canvas in the third coordinate system.

[0124] The target view includes at least one of an axial plane view, a coronal plane view, and a sagittal plane view. The target view can be specified by the observer through the electronic device. When the target view includes multiple views, the target medical image includes multiple views. The target medical image and the target view are Figure 1 One to one correspondence.

[0125] The size information of the canvas may include the width and height of the canvas, and the position of the canvas coincides with the position of the target medical image.

[0126] The explanation and description of the image information of the medical image sequence may refer to the above-mentioned related embodiments, and this embodiment will not be described in detail here.

[0127] As an example, the origin of the third coordinate system where the canvas is located is at the upper left corner of the canvas, the origin of the third coordinate system is positive along the x-axis to the right, and the origin is positive downward along the y-axis.

[0128] As an example, the preset shape may be a circle, a square, etc. The following takes the preset shape of a circle as an example to exemplify the position mark of the rendered virtual endoscope in the target medical image.

[0129] Reference Figure 3 The schematic diagram of the medical image of the axial plane view shown in FIG. 1 is a schematic diagram of the medical image of the axial plane view shown in FIG. The rendering process of the position mark of the target medical image can refer to the following process:

[0130] First, determine the pixel position posIm g=(x img ,y img ,z img ) is the target medical image, which is the medical image of the axial plane view. Since the voxel coordinates start from 0, the pixel position posImg=(x img ,y img ,z img ) corresponds to the target medical image z img +1 corresponding medical image.

[0131] Next, create a transparent canvas object, that is, the canvas mentioned above, the position and size of the canvas object are the same as the zth img +1 The corresponding medical images completely overlap, and the width of the canvas object is w A , height h A ;

[0132] Next, determine the pixel position posIm g=(x img ,y img ,z img ) in the third coordinate system where the canvas object is located:

[0133]

[0134] Among them, (x cnv1 ,y cnv1 ) is the pixel position posIm g=(x img ,y img ,z img ) is the position of the canvas object in the third coordinate system, w A is the width of the canvas object, h A is the height of the canvas object, xDim and yDim are the z img +1 resolution of medical images.

[0135] Finally, based on the third coordinate system, (x cnv1 ,y cnv1 ) and a first preset pixel value (e.g., 5 pixels) to render a solid circle, such as Figure 3 The pink solid circle shown is the location marker of the target medical image.

[0136] Reference Figure 4 The schematic diagram of the medical image shown in FIG. 1 may refer to the following process for the rendering process of the position mark of the target medical image of the coronal view:

[0137] First, determine the pixel position posIm g=(x img ,y img ,z img ) is a target medical image, which is a medical image of a coronal view. As can be seen from the above content, the pixel position posImg=(x img ,y img ,z img ) corresponds to the target medical image y img +1 corresponding medical image.

[0138] Next, create a transparent canvas object, that is, the canvas mentioned above, the position and size of the canvas object are the same as the yth img +1 The corresponding medical images completely overlap, and the width of the canvas object is w A , height h A ;

[0139] Next, determine the pixel position posIm g=(x img ,y img ,z img ) in the third coordinate system where the canvas object is located:

[0140]

[0141] Among them, (x cnv2 ,y cnv2 ) is the pixel position posIm g=(x img ,y img ,z img ) is the position of the canvas object in the third coordinate system, w A is the width of the canvas object, h A is the height of the canvas object, and zDim is the length of the medical image sequence.

[0142] Finally, based on the third coordinate system, (x cnv2 ,y cnv2 ) and a second preset pixel value (e.g., 5 pixels) to render a solid circle, such as Figure 4 The pink solid circle shown is the location marker of the target medical image.

[0143] Reference Figure 5 The schematic diagram of the medical image shown in FIG. 1 may refer to the following process for the rendering process of the position mark of the target medical image in the sagittal view:

[0144] First, determine the pixel position posIm g=(x img ,y img ,z img ) is a target medical image, which is a medical image of a sagittal view. As can be seen from the above content, the pixel position posImg=(x img ,y img ,z img ) corresponds to the target medical image x img +1 corresponding medical image.

[0145] Next, create a transparent canvas object, that is, the canvas mentioned above, with the same position and size as the xth img +1 The corresponding medical images completely overlap, and the width of the canvas object is w A , height h A ;

[0146] Next, determine the pixel position posIm g=(x img ,y img ,z img ) in the third coordinate system where the canvas object is located:

[0147]

[0148] Among them, (x cnv3 ,y cnv3 ) is the pixel position posIm g=(ximg ,y img ,z img ) is the position of the canvas object in the third coordinate system, w A is the width of the canvas object, h A is the height of the canvas object, and zDim is the length of the medical image sequence.

[0149] Finally, based on the third coordinate system, (x cnv3 ,y cnv3 ) and a third preset pixel value (e.g., 5 pixels) to render a solid circle, such as Figure 5 The pink solid circle shown is the location marker of the target medical image.

[0150] In some embodiments, the above-mentioned step of rendering the target medical image and the position marker having a preset shape and centered on the first two-dimensional coordinate in the canvas can be implemented in the following manner: in a third coordinate system, rendering the target medical image and a graphic having the preset shape centered on the first two-dimensional coordinate in the canvas; and rendering a first straight line in the horizontal direction of the canvas and a second straight line in the vertical direction of the canvas, and the intersection of the first straight line and the second straight line is the first two-dimensional coordinate, and the first straight line, the second straight line and the graphic constitute the position marker.

[0151] It can be known from the above content that the above-mentioned preset shape can be a circle or a positive direction, etc. Continuing to take a circle as an example, the explanation and description of this embodiment are carried out.

[0152] When rendering the first straight line and the second straight line, the line thickness of the straight line may adopt a fourth preset pixel value, such as 1 pixel.

[0153] The first straight line and the second straight line may be solid lines or dashed lines, which is not limited in this embodiment.

[0154] The lengths of the first straight line and the second straight line can be set according to actual conditions. Figure 3 , Figure 4 and Figure 5 An exemplary description is given.

[0155] Continue to refer to Figure 3 , Figure 3 The green straight line shown in is the first straight line rendered in the horizontal direction (i.e., horizontal direction) of the canvas. Figure 3 The yellow straight line shown in the figure is the second straight line rendered in the vertical direction of the canvas. Figure 3 The green straight line shown in Figure 3The yellow straight line and the pink solid circle shown in the figure constitute the position mark of the target medical image. In this embodiment, the starting point of the first straight line can be (0, y cnv1 ), the end point can be (w A ,y cnv1 ), the thickness of the first straight line is 1 pixel; the starting point of the second straight line can be (x cnv1 ,0), the end point can be,(x cnv1 ,h A )The second straight line has a line thickness of 1 pixel.

[0156] Continue to refer to Figure 4 , Figure 4 The red line shown in the figure is the first line rendered in the horizontal direction of the canvas. Figure 4 The yellow straight line shown in the figure is the second straight line rendered in the vertical direction of the canvas. Figure 4 The red straight line shown in Figure 4 The yellow straight line and the pink solid circle shown in the figure constitute the position mark of the target medical image. In this embodiment, the starting point of the first straight line can be (0, y cnv2 ), the end point can be (w A ,y cnv2 ), the thickness of the first straight line is 1 pixel; the starting point of the second straight line can be (x cnv2 ,0), the end point can be,(x cnv2 ,h A )The second straight line has a line thickness of 1 pixel.

[0157] Continue to refer to Figure 5 , Figure 5 The red line shown in the figure is the first line rendered in the horizontal direction of the canvas. Figure 5 The green straight line shown in the figure is the second straight line rendered in the vertical direction of the canvas. Figure 5 The red straight line shown in Figure 5 The green straight line and the pink solid circle shown in the figure constitute the position mark of the target medical image. In this embodiment, the starting point of the first straight line can be (0, y cnv3 ), the end point can be (w A ,y cnv3 ), the thickness of the first straight line is 1 pixel; the starting point of the second straight line can be (x cnv3 ,0), the end point can be,(x cnv3 ,h A )The second straight line has a line thickness of 1 pixel.

[0158] Through the above method, on the basis of the graphics of the preset shape, the cross lines formed by the first straight line and the second straight line are rendered at the same time, so as to strengthen the display position mark.

[0159] In some embodiments, the above-mentioned posture may further include a lens direction, and the identification may further include a lens direction identification. The above-mentioned steps of rendering the target medical image and the identification in the canvas according to the pixel position, the lens direction vector and the lens upward direction vector may further include: determining the first projection length of the lens direction identification in the horizontal direction of the canvas and the second projection length in the vertical direction according to the lens direction vector and the first preset length; determining the second two-dimensional coordinate according to the first two-dimensional coordinate, the first projection length and the second projection length; rendering a third straight line in the canvas with the first two-dimensional coordinate as the starting point, the second two-dimensional coordinate as the end point and the third coordinate system as the basis, and the third straight line is the lens direction mark.

[0160] The first preset length is the maximum length of the configured direction-type pointing mark, where the direction-type pointing mark is, for example, the lens direction mark in this embodiment.

[0161] The lens direction vector includes components on different coordinate axes. Continuing with the above example, the lens direction vector is x dir ,y dir ,z dir They are Components in different coordinate axis directions in the second coordinate system.

[0162] The following takes the target views as the axial plane view, the coronal plane view and the sagittal plane view as examples to illustrate how to determine the first projection length of the lens direction mark in the transverse direction of the canvas and the second projection length in the longitudinal direction, as well as how to determine the second two-dimensional coordinate.

[0163] For the axial plane view, the first projection length of the lens direction mark in the transverse direction of the canvas can be determined by the following formula:

[0164] l x11 =x dir ·L arrow1 ;

[0165] Among them, l x11 is the first projection length, x dir is the component of the lens direction vector in the x-axis direction in the second coordinate system, L arrow1 is the first preset length.

[0166] For the axial plane view, the second projection length of the lens direction mark in the longitudinal direction of the canvas can be determined by the following formula:

[0167] l y11 =y dir ·L arrow1 ;

[0168] Among them, l y11is the second projection length, y dir is the component of the lens direction vector in the y-axis direction in the second coordinate system, L arrow1 is the first preset length.

[0169] For the axial view, the first two-dimensional coordinate is (x cnv1 ,y cnv1 ), the second 2D coordinate is (x cnv1 +l x11 ,y cnv1 +l y11 ).

[0170] For the coronal view, the length of the first projection of the lens direction mark in the transverse direction of the canvas can be determined by the following formula:

[0171] l x12 =x dir ·L arrow1 ;

[0172] Among them, l x12 is the first projection length, x dir is the component of the lens direction vector in the x-axis direction in the second coordinate system, L arrow1 is the first preset length.

[0173] For the coronal view, the second projection length of the lens direction mark in the longitudinal direction of the canvas can be determined by the following formula:

[0174] l y12 =-z dir ·L arrow1 ;

[0175] Among them, l y12 is the second projection length, z dir is the component of the lens direction vector in the z-axis direction in the second coordinate system, L arrow1 is the first preset length.

[0176] For the coronal view, the first two-dimensional coordinate is (x cnv2 ,y cnv2 ), the second 2D coordinate is (x cnv2 +l x12 ,y cnv2 +l y12 ).

[0177] For the sagittal view, the length of the first projection of the lens direction marker in the transverse direction of the canvas can be determined by the following formula:

[0178] l x13 =y dir ·L arrow1 ;

[0179] Among them, l x13 is the first projection length, y dir is the component of the lens direction vector in the y-axis direction in the second coordinate system, L arrow1 is the first preset length.

[0180] For the sagittal view, the second projection length of the lens direction mark in the longitudinal direction of the canvas can be determined by the following formula:

[0181] l y13 =-z dir ·L arrow1 ;

[0182] Among them, l y13 is the second projection length, z dir is the component of the lens direction vector in the z-axis direction in the second coordinate system, L arrow1 is the first preset length.

[0183] For the sagittal view, the first two-dimensional coordinate is (x cnv3 ,y cnv3 ), the second 2D coordinate is (x cnv3 +l x13 ,y cnv3 +l y13 ).

[0184] The third straight line may be a solid line or a dotted line, which is not limited in this embodiment.

[0185] The line thickness of the third straight line may be a fifth preset pixel value, such as 2 pixels, which is not limited in this embodiment.

[0186] In the above manner, a straight line is rendered in the target medical image as a lens direction marker, so that the observer can clearly know the direction of the lens of the virtual endoscope when observing and evaluating the area of ​​interest in the medical image.

[0187] In some embodiments, the above-mentioned step of rendering the target medical image and the mark in the canvas according to the pixel position, the lens direction vector and the lens upward direction vector may also include: when the determined width of the arrow head meets the preset resolution condition, determining the third two-dimensional coordinates and the fourth two-dimensional coordinates according to the width, the second two-dimensional coordinates, the preset bifurcation angle of the arrow head, and the angle between the lens vector and the positive direction of the x-axis of the third coordinate system; rendering the fourth straight line and the fifth straight line with the second two-dimensional coordinates as the starting point and the third two-dimensional coordinates and the fourth two-dimensional coordinates as the end points respectively, and the third straight line, the fourth straight line and the fifth straight line constitute the lens direction mark.

[0188] It should be noted that the arrow head is a part of the lens direction mark, and the arrow head may be composed of two sides. The preset resolution condition may be that the pixels occupied by the width of the arrow head are not less than the sixth preset pixel value, and the sixth preset pixel value may be, for example, 3 pixels. In addition, the width of the arrow head may be understood as the width of the sides constituting the arrow head.

[0189] The preset bifurcation angle refers to the angle formed by the line at the arrow head and the third straight line.

[0190] The width of the arrow head can be determined as follows:

[0191]

[0192] Among them, w arrow is the width of the arrow head, hypot(l x1 ,l y1 ) represents the coordinates from the origin of the third coordinate system to the fixed point (l x1 ,l y1 ) distance, the fixed point coordinates are different in different views. Specifically, corresponding to the axial plane view, the fixed point coordinates can be specifically (l x11 ,l y11 ); corresponding to the coronal view, the fixed point coordinates can be specifically (l x12 ,l y12 ); corresponding to the sagittal view, the fixed point coordinates can be specifically (l x13 ,l y13 ).

[0193] The following is an illustrative description of determining the third two-dimensional coordinate and the fourth two-dimensional coordinate, taking the target views as the axial plane view, the coronal plane view, and the sagittal plane view as examples.

[0194] For the axial view, the third 2D coordinate can be (x cnv1 +l x11 +w arrow ·cos(θ α +30°),y cnv1 +l y11 +w arrow ·sin(θ α +30°)); the fourth two-dimensional coordinate can be: (x cnv1 +l x11 +w arrow ·cos(θ α -30°),y cnv1 +l y11 +w arrow ·sin(θ α -30°)).

[0195] Among them, xcnv1 +l x11 is the value of the second 2D coordinate on the x-axis under the axial plane view, y cnv1 +l y11 is the value of the second 2D coordinate on the y-axis in the axial plane view, w arrow is the width of the arrow head, θ α is the angle between the lens vector and the positive direction of the x-axis of the third coordinate system. In the axial plane view, the lens vector is (l x11 ,l y11 ), 30° is the preset bifurcation angle.

[0196] For the coronal view, the third 2D coordinate can be (x cnv2 +l x12 +w arrow ·cos(θ α +30°),y cnv2 +l y12 +w arrow ·sin(θ α +30°)); the fourth two-dimensional coordinate can be: (x cnv2 +l x12 +w arrow ·cos(θ α -30°),y cnv2 +l y12 +w arrow ·sin(θ α -30°)).

[0197] Among them, x cnv2 +l x12 is the value of the second 2D coordinate on the x-axis under the coronal view, y cnv2 +l y12 is the value of the second 2D coordinate on the y-axis under the coronal view, w arrow is the width of the arrow head, θ α is the angle between the lens vector and the positive direction of the x-axis of the third coordinate system. In the axial plane view, the lens vector is (l x12 ,l y12 ), 30° is the preset bifurcation angle.

[0198] For the sagittal view, the third 2D coordinate can be (x cnv3 +l x13 +w arrow ·cos(θ α +30°),y cnv3 +l y13 +w arrow ·sin(θ α +30°)); the fourth two-dimensional coordinate can be: (x cnv3 +lx13 +w arrow ·cos(θ α -30°),y cnv3 +l y13 +w arrow ·sin(θ α -30°)).

[0199] Among them, x cnv3 +l x13 is the value of the second 2D coordinate on the x-axis under the sagittal view, y cnv3 +l y13 is the value of the second 2D coordinate on the y-axis in the axial plane view, w arrow is the width of the arrow head, θ α is the angle between the lens vector and the positive direction of the x-axis of the third coordinate system. In the sagittal view, the lens vector is (l x13 ,l y13 ), 30° is the preset bifurcation angle.

[0200] Among them, in different views, the straight line formed by starting from the corresponding second two-dimensional coordinates in different views and ending at the third two-dimensional coordinates in the corresponding views is the fourth straight line in the corresponding views; similarly, the straight line formed by starting from the corresponding second two-dimensional coordinates in different views and ending at the fourth two-dimensional coordinates in the corresponding views is the fifth straight line in the corresponding views. Furthermore, the fourth straight line and the fifth straight line in the same view constitute the arrow head rendered in the view.

[0201] As an example, the line width of the fourth straight line or the fifth straight line may be a seventh preset pixel value, such as 2 pixels.

[0202] Continue to refer to Figure 3 , Figure 3 The straight line with a pink arrow in the figure is the lens direction mark corresponding to the axial plane view. Figure 4 , Figure 4 The straight line with a pink arrow in the figure is the lens direction mark corresponding to the coronal view. Figure 5 , Figure 5 The straight line with a pink arrow shown in the figure is the lens direction mark corresponding to the sagittal view.

[0203] In the above manner, the lens direction mark is enhanced and displayed by a straight line with an arrow, so that the observer can clearly know the direction of the lens of the virtual endoscope when observing and evaluating the area of ​​interest in the medical image.

[0204] In some embodiments, when the determined width of the arrow head does not meet the preset resolution condition, it means that the pixels occupied by the width of the arrow head are narrow, and the width is narrow, so it is not clear even if rendered. Therefore, when the determined width of the arrow head does not meet the preset resolution condition, the arrow head may not be rendered.

[0205] In some embodiments, the posture may further include an upward direction of the lens, and the mark may further include an upward direction mark of the lens. The above-mentioned steps of rendering the target medical image and the mark in the canvas according to the pixel position, the lens direction vector and the upward direction vector of the lens may further include: determining the third projection length of the upward direction mark in the horizontal direction of the canvas and the fourth projection length in the vertical direction according to the upward direction vector of the lens and the second preset length; determining the fifth two-dimensional coordinate according to the first two-dimensional coordinate, the third projection length and the fourth projection length; rendering a sixth straight line as the upward direction mark of the lens in the canvas with the first two-dimensional coordinate as the starting point, the fifth two-dimensional coordinate as the end point and the third coordinate system as the basis.

[0206] The second preset length is the maximum length of the configured direction-type pointing mark, where the direction-type pointing mark is, for example, the lens-up direction mark in this embodiment. It is worth noting that, in order to facilitate the distinction between the lens direction mark and the lens-up direction mark, the lens-up direction mark and the lens direction mark are at least different in length. As another example, the colors can be rendered differently. As another example, the lens-up direction mark can have an arrow head, while the lens direction mark can not have an arrow head.

[0207] The sixth straight line may be a solid line or a dotted line, which is not limited in this embodiment.

[0208] The lens upward direction vector includes components on different coordinate axes. The lens upward direction vector is x up ,y up ,z up They are Components in different coordinate axis directions.

[0209] The following takes the target views as the axial plane view, the coronal plane view and the sagittal plane view as examples to illustrate how to determine the third projection length of the direction mark on the lens in the transverse direction of the canvas and the fourth projection length in the longitudinal direction, as well as how to determine the fifth two-dimensional coordinate.

[0210] For the axial plane view, the third projection length of the direction mark on the lens in the transverse direction of the canvas can be determined by the following formula:

[0211] l x21 =x up ·L arrow2 / 2;

[0212] Among them, l x21 is the third projection length, x up is the component of the lens upward vector in the x-axis direction in the second coordinate system, L arrow2 It is a second preset length. The second preset length in this embodiment is equal to the first preset length mentioned above.

[0213] For the axial plane view, the fourth projection length of the direction mark on the lens in the longitudinal direction of the canvas can be determined by the following formula:

[0214] l y21 =y up ·L arrow2 / 2;

[0215] Among them, l y21 is the fourth projection length, y up is the component of the lens upward vector in the y-axis direction in the second coordinate system, L arrow2 It is a second preset length. The second preset length in this embodiment is equal to the first preset length mentioned above.

[0216] For the axial view, the first two-dimensional coordinate is (x cnv1 ,y cnv1 ), the fifth two-dimensional coordinate can be (x cnv1 +l x21 ,y cnv1 +l y21 ).

[0217] For the coronal view, the third projection length of the lens marker in the lateral direction of the canvas can be determined by the following formula:

[0218] l x22 =x up ·L arrow2 / 2;

[0219] Among them, l x22 is the third projection length, x up is the component of the lens upward vector in the x-axis direction in the second coordinate system, L arrow2 It is a second preset length. The second preset length in this embodiment is equal to the first preset length mentioned above.

[0220] For the coronal view, the fourth projection length of the lens upper direction mark in the longitudinal direction of the canvas can be determined by the following formula:

[0221] l y22 =-z up ·L arrow2 / 2;

[0222] Among them, ly22 is the fourth projection length, z up is the component of the lens upward vector in the z-axis direction in the second coordinate system, L arrow2 It is a second preset length. The second preset length in this embodiment is equal to the first preset length mentioned above.

[0223] For the coronal view, the first two-dimensional coordinate is (x cnv2 ,y cnv2 ), the fifth two-dimensional coordinate can be (x cnv2 +l x22 ,y cnv2 +l y22 ).

[0224] For the sagittal view, the length of the third projection of the lens marker in the transverse direction of the canvas can be determined by the following formula:

[0225] l x23 =y up ·L arrow2 / 2;

[0226] Among them, l x23 is the third projection length, y up is the component of the lens upward vector in the y-axis direction in the second coordinate system, L arrow2 It is a second preset length. The second preset length in this embodiment is equal to the first preset length mentioned above.

[0227] For the sagittal view, the length of the fourth projection of the lens marker in the longitudinal direction of the canvas can be determined by the following formula:

[0228] l y23 =-z up ·L arrow2 / 2;

[0229] Among them, l y23 is the fourth projection length, z up is the component of the lens upward vector in the z-axis direction in the second coordinate system, L arrow2 It is a second preset length. The second preset length in this embodiment is equal to the first preset length mentioned above.

[0230] For the sagittal view, the first two-dimensional coordinate is (x cnv3 ,y cnv3 ), the fifth two-dimensional coordinate can be (x cnv3 +l x23 ,y cnv3 +l y23 ).

[0231] It is worth noting that, in the above embodiment, the second preset length is equal to the first preset length. Therefore, in order to distinguish between the lens direction mark without an arrow head and the lens upward direction mark, different formulas are used when solving the projection length, so that the lens direction mark and the lens upward direction mark remain different in length, that is, in the above example, in the same formula, the value of the projection length associated with the lens upward direction mark is half of the value of the projection length associated with the lens direction mark.

[0232] Continue to refer to Figure 3 , Figure 3 The straight line without a pink arrow is the upper direction mark of the lens corresponding to the axial plane view. Figure 4 , Figure 5 The straight line with a pink arrow in the figure coincides with the straight line without a pink arrow, that is, the lens upper direction mark and the lens direction mark coincide, and the lens upper direction and the lens direction are the same direction. Figure 5 , Figure 5 The straight line without the pink arrow in the figure is the upper direction mark of the lens corresponding to the sagittal view.

[0233] In the above manner, by rendering the lens upper direction mark, the observer can clearly know the lens upper direction where the virtual endoscope is located when observing and evaluating the region of interest in the medical image.

[0234] Figure 6 is a schematic diagram of an interface of an electronic device according to an example of the present disclosure. Figure 6 In the figure, the position identification of the virtual endoscope in the corresponding target medical image is shown when the target views are the axial view, the coronal view and the sagittal view. Figure 6 The three sub-images on the left side of the middle image with red dots are axial views, the sub-images with green dots are coronal views, and the sub-images with yellow dots are sagittal views. Figure 6 On the right side of the figure is a 3D image of a medical imaging sequence. Figure 6 In the embodiment, corresponding to different views, the observer can perform a selection operation through a slider in the electronic device interface to select the medical image to be observed. After the medical image is selected, its pixel position is also fixed.

[0235] Figure 7 is a block diagram of a virtual endoscope pose identification rendering device according to an exemplary embodiment of the present disclosure. Figure 7 The virtual endoscope posture identification rendering device comprises:

[0236] A first acquisition module 701 is configured to acquire a pixel position of a virtual endoscope in a pixel matrix corresponding to a medical image sequence;

[0237] A second acquisition module 702 is configured to respectively acquire a lens direction vector and a lens upward direction vector of the virtual endoscope in the pixel matrix;

[0238] The rendering module 703 is configured to render a target medical image and an identifier in a canvas according to the pixel position, the lens direction vector and the lens upward direction vector, wherein the identifier is used to describe the position of the virtual endoscope in the target medical image, and the target medical image is a medical image determined in the medical image sequence according to the pixel position.

[0239] Optionally, the first acquisition module 701 includes:

[0240] A first acquisition submodule is configured to acquire a first position of the virtual endoscope in a virtual three-dimensional space, and to reconstruct a three-dimensional stereoscopic model corresponding to the medical image sequence in the virtual three-dimensional space, wherein the coordinate origin of a first coordinate system in which the virtual three-dimensional space is located is the center point of the three-dimensional stereoscopic model, and a cross-sectional growth direction of the medical image sequence coincides with a z-axis direction of the first coordinate system, a coronal plane growth direction coincides with a y-axis direction of the first coordinate system, and a sagittal plane growth direction coincides with an x-axis direction of the first coordinate system;

[0241] A second acquisition submodule is configured to acquire a rotation matrix of the three-dimensional model;

[0242] A first determining submodule is configured to determine a second position of the first position in a second coordinate system where the three-dimensional stereo model is located according to the first position and the rotation matrix;

[0243] The second determination submodule is configured to determine the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence according to the second position, the image information of the medical image sequence and the size information of the three-dimensional stereo model.

[0244] Optionally, the second acquisition module 702 is configured to acquire a direction vector in the following manner, where the direction vector is the lens direction vector or the lens upward direction vector:

[0245] Acquire a first direction vector of the virtual endoscope in the virtual three-dimensional space;

[0246] According to the first direction vector and the rotation matrix, the second direction vector of the virtual endoscope in the second coordinate system is determined. When the first direction vector is a direction vector representing the direction of the lens, the second direction vector is the lens direction vector. When the first direction vector is a direction vector representing the upward direction of the lens, the second direction vector is the upward direction vector of the lens.

[0247] Optionally, the posture includes a position, the identifier includes a position identifier, the position and size of the canvas are the same as the position and size of the target medical image, and the rendering module 703 includes:

[0248] A third determination submodule is configured to determine the medical image corresponding to the target view according to the pixel position, the target view comprising at least one of an axial plane view, a coronal plane view and a sagittal plane view, and the medical image corresponding to the target view is the target medical image;

[0249] The fourth determination submodule is configured to determine the first two-dimensional coordinate of the pixel position in the third coordinate system where the canvas is located according to the pixel position, the size information of the canvas and the image information of the medical image sequence,

[0250] The first rendering submodule is configured to render the target medical image and a position marker having a preset shape and centered on the first two-dimensional coordinate system in the canvas in the third coordinate system.

[0251] Optionally, the first rendering submodule is specifically configured as follows:

[0252] In the third coordinate system, the target medical image and a graphic having the preset shape and centered at the first two-dimensional coordinate are rendered in the canvas; and,

[0253] A first straight line is rendered in the horizontal direction of the canvas, and a second straight line is rendered in the vertical direction of the canvas, and the intersection of the first straight line and the second straight line is the first two-dimensional coordinate, and the first straight line, the second straight line and the graphic constitute a position mark.

[0254] Optionally, the posture further includes a lens direction, the identifier further includes a lens direction identifier, and the rendering module 703 further includes:

[0255] A fifth determining submodule is configured to determine, according to the lens direction vector and the first preset length, a first projection length of the lens direction mark in the horizontal direction and a second projection length in the vertical direction of the canvas;

[0256] a sixth determining submodule, configured to determine a second two-dimensional coordinate according to the first two-dimensional coordinate, the first projection length, and the second projection length;

[0257] The second rendering submodule is configured to render a third straight line in the canvas with the first two-dimensional coordinate as a starting point, the second two-dimensional coordinate as an end point and the third coordinate system as a basis, wherein the third straight line is the lens direction mark.

[0258] Optionally, the rendering module 703 further includes:

[0259] a seventh determination submodule, configured to determine the third two-dimensional coordinate and the fourth two-dimensional coordinate according to the width, the second two-dimensional coordinate, the preset bifurcation angle of the arrow head, and the angle between the lens vector and the positive direction of the x-axis of the third coordinate system when the determined width of the arrow head satisfies the preset resolution condition;

[0260] The third rendering submodule is configured to render a fourth straight line and a fifth straight line with the second two-dimensional coordinate as a starting point, and the third two-dimensional coordinate and the fourth two-dimensional coordinate as end points respectively, and the third straight line, the fourth straight line and the fifth straight line constitute the lens direction mark.

[0261] Optionally, the posture further includes an upward direction of the lens, the identification further includes an upward direction mark of the lens, and the rendering module 703 further includes:

[0262] an eighth determination submodule, configured to determine, according to the lens upward direction vector and the second preset length, a third projection length of the lens upward direction mark in the horizontal direction and a fourth projection length in the vertical direction of the canvas;

[0263] a ninth determination submodule, configured to determine a fifth two-dimensional coordinate according to the first two-dimensional coordinate, the third projection length, and the fourth projection length;

[0264] The fourth rendering submodule is configured to render a sixth straight line as an upward direction mark of the lens in the canvas with the first two-dimensional coordinate as a starting point, the fifth two-dimensional coordinate as an end point and the third coordinate system as a basis.

[0265] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0266] The embodiment of the present disclosure also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the above method are implemented.

[0267] The present disclosure also provides an electronic device, including:

[0268] a memory having a computer program stored thereon;

[0269] A processor is used to execute the computer program in the memory to implement the steps of the above method.

[0270] Figure 8 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 8As shown, the electronic device 800 may include: a processor 801 and a memory 802. The electronic device 800 may also include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805.

[0271] The processor 801 is used to control the overall operation of the electronic device 800 to complete all or part of the steps in the above-mentioned virtual endoscope pose identification rendering method. The memory 802 is used to store various types of data to support the operation of the electronic device 800, and these data may include instructions for any application or method used to operate on the electronic device 800, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, which is used to receive external audio signals. The received audio signal may be further stored in the memory 802 or sent through the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 may include: Wi-Fi module, Bluetooth module, NFC module.

[0272] In an exemplary embodiment, the electronic device 800 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned virtual endoscope pose identification rendering method.

[0273] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned virtual endoscope pose identification rendering method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above-mentioned program instructions can be executed by the processor 801 of the electronic device 800 to complete the above-mentioned virtual endoscope pose identification rendering method.

[0274] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0275] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0276] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A virtual endoscope pose identification rendering method, characterized in that: include: Obtaining the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence; Respectively obtaining a lens direction vector and a lens upward direction vector of the virtual endoscope in the pixel matrix; According to the pixel position, the lens direction vector and the lens upward direction vector, a target medical image and an identifier are rendered in a canvas, wherein the identifier is used to describe the position of the virtual endoscope in the target medical image, and the target medical image is a medical image determined in the medical image sequence according to the pixel position.

2. The method according to claim 1, characterized in that The step of obtaining the pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence includes: Acquire a first position of the virtual endoscope in a virtual three-dimensional space, and reconstruct a three-dimensional stereoscopic model corresponding to the medical image sequence in the virtual three-dimensional space, wherein the coordinate origin of a first coordinate system in which the virtual three-dimensional space is located is the center point of the three-dimensional stereoscopic model, the cross-sectional growth direction of the medical image sequence coincides with the z-axis direction of the first coordinate system, the coronal plane growth direction coincides with the y-axis direction of the first coordinate system, and the sagittal plane growth direction coincides with the x-axis direction of the first coordinate system; Obtaining a rotation matrix of the three-dimensional model; Determine, according to the first position and the rotation matrix, a second position of the first position in a second coordinate system where the three-dimensional stereoscopic model is located; The pixel position of the virtual endoscope in the pixel matrix corresponding to the medical image sequence is determined according to the second position, the image information of the medical image sequence and the size information of the three-dimensional model.

3. The method according to claim 2, characterized in that The direction vector is obtained by the following method, where the direction vector is the lens direction vector or the lens upward direction vector: Acquire a first direction vector of the virtual endoscope in the virtual three-dimensional space; According to the first direction vector and the rotation matrix, the second direction vector of the virtual endoscope in the second coordinate system is determined. When the first direction vector is a direction vector representing the direction of the lens, the second direction vector is the lens direction vector. When the first direction vector is a direction vector representing the upward direction of the lens, the second direction vector is the upward direction vector of the lens.

4. The method according to any one of claims 1 to 3, characterized in that: The pose includes a position, the identifier includes a position identifier, the position and size of the canvas are the same as the position and size of the target medical image, and the rendering of the target medical image and the identifier in the canvas according to the pixel position, the lens direction vector, and the lens upward direction vector includes: Determine, according to the pixel position, a medical image corresponding to a target view, wherein the target view includes at least one of an axial plane view, a coronal plane view, and a sagittal plane view, and the medical image corresponding to the target view is the target medical image; Determine, according to the pixel position, the size information of the canvas and the image information of the medical image sequence, a first two-dimensional coordinate of the pixel position in a third coordinate system where the canvas is located; In the third coordinate system, a target medical image and a position marker having a preset shape and centered on the first two-dimensional coordinate system are rendered in a canvas.

5. The method according to claim 4, characterized in that The rendering of the target medical image and a position mark having a preset shape and centered at the first two-dimensional coordinate in the canvas includes: In the third coordinate system, the target medical image and a graphic having the preset shape and centered at the first two-dimensional coordinate are rendered in the canvas; and, A first straight line is rendered in the horizontal direction of the canvas, and a second straight line is rendered in the vertical direction of the canvas, and the intersection of the first straight line and the second straight line is the first two-dimensional coordinate, and the first straight line, the second straight line and the graphic constitute a position mark.

6. The method according to claim 4, characterized in that The pose further includes a lens direction, the identifier further includes a lens direction identifier, and the rendering of the target medical image and the identifier in the canvas according to the pixel position, the lens direction vector and the lens upward direction vector further includes: Determine, according to the lens direction vector and the first preset length, a first projection length of the lens direction mark in the transverse direction and a second projection length in the longitudinal direction of the canvas; Determine a second two-dimensional coordinate according to the first two-dimensional coordinate, the first projection length, and the second projection length; A third straight line is rendered in the canvas with the first two-dimensional coordinate as a starting point, the second two-dimensional coordinate as an end point and the third coordinate system as a basis, and the third straight line is the lens direction mark.

7. The method according to claim 6, characterized in that The rendering of the target medical image and the logo in the canvas according to the pixel position, the lens direction vector and the lens upward direction vector also includes: When the determined width of the arrow head satisfies a preset resolution condition, determining a third two-dimensional coordinate and a fourth two-dimensional coordinate according to the width, the second two-dimensional coordinate, a preset bifurcation angle of the arrow head, and an angle between a lens vector and a positive direction of an x-axis of the third coordinate system; Taking the second two-dimensional coordinate as the starting point, and the third two-dimensional coordinate and the fourth two-dimensional coordinate as the end points respectively, a fourth straight line and a fifth straight line are rendered, and the third straight line, the fourth straight line and the fifth straight line constitute the lens direction mark.

8. The method according to claim 4, characterized in that The pose further includes a lens upward direction, the identifier further includes a lens upward direction mark, and the rendering of the target medical image and the identifier in the canvas according to the pixel position, the lens direction vector and the lens upward direction vector further includes: Determine, according to the lens upward direction vector and the second preset length, a third projection length of the lens upward direction mark in the transverse direction and a fourth projection length in the longitudinal direction of the canvas; Determine a fifth two-dimensional coordinate according to the first two-dimensional coordinate, the third projection length and the fourth projection length; A sixth straight line serving as an upward direction mark of the lens is rendered in the canvas with the first two-dimensional coordinate as a starting point, the fifth two-dimensional coordinate as an end point and the third coordinate system as a basis.

9. A virtual endoscope posture identification rendering device, characterized in that: include: A first acquisition module is configured to acquire a pixel position of the virtual endoscope in a pixel matrix corresponding to the medical image sequence; A second acquisition module is configured to respectively acquire a lens direction vector and a lens upward direction vector of the virtual endoscope in the pixel matrix; A rendering module is configured to render a target medical image and an identifier in a canvas according to the pixel position, the lens direction vector and the lens upward direction vector, wherein the identifier is used to describe the position of the virtual endoscope in the target medical image, and the target medical image is a medical image determined in the medical image sequence according to the pixel position.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.

11. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Virtual endoscope system having improved roaming effect

    CN107330236A

  • Image display method, device and system for transanal endoscopic microsurgery navigation

    CN107610109A

  • Three-dimensional navigation method of bronchial endoscope

    CN110368089A

  • Endoscopic surgery navigation method and device based on video image augmented reality

    CN115836914A

  • Endoscope registration method and device and calibration system

    CN115908121A