Image drawing method and device and computer equipment

By using two-dimensional transfer functions in volume rendering technology, combining grayscale values ​​and gradient amplitudes, the problem of loss of organizational material boundaries and detailed information in the prior art is solved, and the visual quality of the image is significantly improved.

CN119832135APending Publication Date: 2025-04-15SHANGHAI LIANYING ZHIYUAN MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411932760.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the prior art, only the grayscale value is relied as the transfer function to determine the color of the voxel, resulting in similar colors of voxels with similar grayscale values, which can easily lead to the loss of boundaries and details of different tissue materials, affecting the accuracy of medical diagnosis.

Method used

By obtaining the region of interest of the volume rendered image, determine the numerical value of the two-dimensional transfer function of each voxel, including grayscale value and gradient amplitude, and match the color values ​​corresponding to these values ​​in the relationship set to render to significantly improve the visual quality of the image.

Benefits of technology

By comprehensively considering the information of the two dimensions of grayscale and gradient, the boundary and detailed information between different organizations can be captured and expressed more accurately, avoiding the loss of organizational boundary and detailed information, and significantly improving the visual quality of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832135A_ABST
    Figure CN119832135A_ABST
Patent Text Reader

Abstract

The invention discloses an image drawing method and device and computer equipment, and is applied to the technical field of image processing. The method comprises the following steps: acquiring a region of interest of a volume rendering image; determining a numerical value of a two-dimensional transfer function corresponding to each voxel in the region of interest, wherein the numerical value of the two-dimensional transfer function comprises a gray value and a gradient amplitude; and drawing the color of the region of interest according to the numerical value of the two-dimensional transfer function of each voxel to obtain a rendered region of interest. According to the method, the visualization quality of the image can be remarkably improved, so that an observer can see boundary and detail information between different tissue materials more clearly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and in particular to an image rendering method, device and computer equipment. Background Art

[0002] As an important 3D volume data visualization technology, direct volume rendering has significantly improved the reconstruction effect of medical images. Compared with the traditional 2D slice observation method, it not only intuitively displays key anatomical structures in a 3D form, which is convenient for communication between doctors, but also provides richer spatial information, which helps doctors identify and understand the relationship and morphology of organs or lesions of interest and surrounding tissues from a spatial perspective. Therefore, in clinical medical diagnosis, volume rendering technology has irreplaceable practical value.

[0003] In the prior art, the grayscale value is mainly used as a transfer function to determine the color of voxels. However, using only grayscale value as a single color metric will cause voxels with similar grayscale values ​​to appear similar colors in the image, which can easily lead to the loss of boundaries and detail information of different tissue materials, thereby affecting the accuracy of medical diagnosis. Summary of the invention

[0004] The embodiments of the present application provide an image drawing method, apparatus, and computer equipment, which can significantly improve the visualization quality of the image, allowing the observer to more clearly see the boundaries and detail information between different tissue materials.

[0005] In a first aspect, an embodiment of the present application provides an image drawing method, comprising: obtaining a region of interest of a volume rendered image; confirming a value of a two-dimensional transfer function corresponding to each voxel in the region of interest, the value of the two-dimensional transfer function including a grayscale value and a gradient amplitude; drawing the color of the region of interest according to the value of the two-dimensional transfer function of each voxel to obtain a rendered region of interest.

[0006] In a possible implementation of the first aspect, the color of the region of interest is drawn according to the numerical value of the two-dimensional transfer function of each voxel to obtain the rendered region of interest, including: for each voxel, matching the color value corresponding to the numerical value of the two-dimensional transfer function in a relationship set; the relationship set is used to characterize the color values ​​corresponding to each combination of multiple grayscale values ​​and gradient amplitudes; and using the color value of each voxel to update the voxel to obtain the rendered region of interest.

[0007] In a possible implementation of the first aspect, a method for obtaining a relationship set includes: displaying an editing interface corresponding to the region of interest; the editing interface includes a ruler and a line editing area, the ruler is used to represent the grayscale value of the tissue material that needs to be edited in the region of interest, and a slider corresponding to the tissue material is displayed at the grayscale value of each tissue material on the ruler, and each grayscale value on the ruler corresponds to a color value under at least one gradient amplitude; for any two tissue materials, editing at least three control points in the line editing area, the control points are used to represent the correspondence between the grayscale value, gradient amplitude and color value contained between the two tissue materials; the at least three control points include the starting point, peak point and end point of the line; for any two tissue materials, constructing and displaying a line between the two tissue materials based on at least three control points; and obtaining a relationship set based on the lines corresponding to the two tissue materials.

[0008] In a possible implementation of the first aspect, the editing interface also includes a line configuration item for constructing a line between two tissue materials based on at least three control points; in response to a selection operation on a target line in the line configuration item, determining the shape of the line between the two tissue materials; performing an interpolation operation between at least three control points according to an interpolation method corresponding to the shape to obtain multiple interpolation points; and constructing a line between the two tissue materials based on the multiple interpolation points and at least three control points.

[0009] In a possible implementation of the first aspect, the editing interface also includes a control point editing control, a grayscale configuration item, and a gradient configuration item; editing at least three control points in the line editing area includes: for any control point among the at least three control points, in response to an operation of adding a control point in the control point editing control, displaying the control point in the line editing area; in response to the editing operation of the control point, associating the control point with the grayscale configuration item and the gradient configuration item; in response to the selection operation of the grayscale value in the grayscale configuration item and the selection operation of the gradient amplitude in the gradient configuration item, displaying the control point at the intersection of the selected grayscale value and the gradient amplitude; based on the color values ​​of the two tissue materials, obtaining the color value represented by the control point.

[0010] In a possible implementation of the first aspect, the color value represented by the control point is obtained based on the color values ​​of the two tissue materials, including: determining a first distance between the control point and the starting point of the line where the control point is located, and a second distance between the control point and the end point of the line where the control point is located; and obtaining the color value represented by the control point based on the first distance, the second distance and the color values ​​of the two tissue materials.

[0011] In a possible implementation of the first aspect, the editing interface also includes a color configuration item; for any slider, in response to a selection operation on the slider, the color configuration item is associated with the slider; in response to a selection operation on a target color value in the color configuration item, the target color value is determined as the color value corresponding to the slider.

[0012] In a possible implementation manner of the first aspect, the editing interface further includes a color type configuration item; the method further includes: in response to a selection operation of a target color type in the color type configuration item, displaying a color configuration item of the target color type.

[0013] In a second aspect, an embodiment of the present application provides an image drawing device, the device comprising:

[0014] The acquisition module is used to acquire the region of interest of the volume rendering image.

[0015] The processing module is used to determine the value of the two-dimensional transfer function corresponding to each voxel in the region of interest, where the value of the two-dimensional transfer function includes a grayscale value and a gradient amplitude.

[0016] A drawing module is used to draw the color of the region of interest according to the value of the two-dimensional transfer function of each voxel to obtain a rendered region of interest.

[0017] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, an image drawing method as described in any one of the first aspects above is implemented.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the image drawing method as described in any one of the above-mentioned first aspects is implemented.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is executed on a computer device, the computer device executes the image drawing method described in any one of the above-mentioned first aspects.

[0020] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be referred to the relevant descriptions below and will not be repeated here.

[0021] Compared with the prior art, the present application has the following beneficial effects: in the process of volume rendering of an image, the present application takes into account that the grayscale reflects the brightness information of the pixels in the image, while the gradient reflects the rate and direction of brightness change between pixels, that is, the edge and texture information of the image. In volume data, different tissue materials often have different grayscale and gradient characteristics. Therefore, by comprehensively considering these two dimensions, the boundaries and detail information between different tissues can be captured and represented more accurately.

[0022] Secondly, by introducing grayscale and gradient as two-dimensional transfer functions, the color mapping mechanism is more diversified and refined. Traditional volume rendering methods only consider single grayscale information, which makes it impossible to fully reflect the complexity and diversity of volume data in the color mapping process. The two-dimensional transfer function can comprehensively consider the information of grayscale and gradient, and provide more accurate color allocation for each voxel, thereby effectively avoiding the loss of tissue boundaries and detail information. By assigning more diverse and realistic colors to different voxels, the visualization quality of the image can be significantly improved, allowing observers to more clearly see the boundaries and detail information between different tissue materials. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0024] Figure 1 is a structural schematic diagram of an image drawing system provided by an embodiment of the present application;

[0025] Figure 2 It is a flowchart of an image drawing method provided by an embodiment of the present application;

[0026] Figure 3 This is a schematic diagram of an outline effect of a region of interest provided by another embodiment of the present application;

[0027] Figure 4 It is a visualized line graph of a two-dimensional transfer function provided by an embodiment of the present application;

[0028] Figure 5 is a grayscale-gradient histogram provided in an embodiment of the present application;

[0029] Figure 6 This is a schematic diagram of the effect of an editing interface provided by an embodiment of the present application;

[0030] Figure 7This is a schematic diagram of another editing interface provided by an embodiment of the present application;

[0031] Figure 8 This is a schematic diagram of another editing interface effect provided by an embodiment of the present application;

[0032] Fig. 9 This is a schematic diagram of another editing interface effect provided by an embodiment of the present application;

[0033] Fig.10 is a structural schematic diagram of an image drawing device provided in an embodiment of the present application;

[0034] Fig.11 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0036] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0037] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0038] As used in the specification and appended claims of this application, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]", depending on the context.

[0039] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0040] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0041] In the prior art, the grayscale value is mainly used as a transfer function to determine the color of voxels. However, using only grayscale value as a single color metric will cause voxels with similar grayscale values ​​to appear similar colors in the image, which can easily lead to the loss of boundaries and detail information of different tissue materials, thereby affecting the accuracy of medical diagnosis.

[0042] Based on this, the embodiments of the present application provide an image drawing method, apparatus and computer equipment. The technical principle of the method is: by providing an editable image drawing method, first, outline the region of interest of the image that needs to be volume rendered. After that, determine the grayscale value and gradient amplitude (i.e., the value of the two-dimensional transfer function) of each voxel in the region of interest, match the color value corresponding to the value of the two-dimensional transfer function in the relationship set, and then use the color value of each voxel to render each voxel to obtain the rendered region of interest. In this way, through a more fine-grained transfer function, color segmentation can be achieved, thereby effectively avoiding the loss of tissue boundaries and detail information.

[0043] Based on the above, when the color values ​​corresponding to the grayscale values ​​and gradient amplitudes in the relationship set need to be changed, the color values ​​corresponding to the grayscale values ​​and gradient amplitudes in the relationship set can be freely adjusted through the editing interface. Whether it is to highlight the data characteristics of a specific organization or to be more in line with visual aesthetics, users can adjust according to their actual needs. This fine-grained custom modification method can make the visualization of the image more accurate, vivid and layered.

[0044] To facilitate the use of this embodiment, see Figure 1 The architecture of the image rendering system 100 shown in FIG. 1 includes a terminal device 101 and an imaging device 102 .

[0045] The imaging device 102 can scan the target object (scanning object) in the detection area or the scanning area to obtain the scanned data of the target object. For example, the imaging device 102 can use high-energy rays (such as X-rays, etc.) to scan the target object to collect scanned data related to the target object, such as a three-dimensional image. The target object may include biological or non-biological objects. As an example only, the target object may include a patient, an artificial object (such as an artificial phantom), etc. For another example, the target object may include a patient's part to be examined, such as an organ and / or tissue (such as the head, ear, nose, mouth, neck, chest, abdomen, liver, gallbladder, pancreas, spleen, kidney, spine, heart or tumor tissue, etc.).

[0046] Furthermore, the imaging device 102 can perform image reconstruction based on raw data obtained by scanning the target object, thereby obtaining an image that needs to be volume rendered, and transmit the image to the terminal device 101. The terminal device 101 performs volume rendering on the image.

[0047] In some embodiments, the imaging device 102 may include a single-modality scanning device and / or a multi-modality scanning device. The single-modality scanning device may be a computed tomography (CT) device, a digital radiography (DR) device, a magnetic resonance imaging (MRI) device, a positron emission tomography-computed tomography (PET-CT), or a positron emission tomography-magnetic resonance imaging (PET-MRI). The multi-modality scanner may include any combination of the multi-modalities of the above-mentioned devices. The embodiment of the present application is described by taking a CT device as an example.

[0048] As an example, a CT device may include a computer tomography scanner and a scanning bed coupled to the computer tomography scanner, wherein the computer tomography scanner forms a scanning cavity, the scanning bed is used to support the detection object, and the scanning bed is movable and moves the detection object into the scanning cavity.

[0049] The computer tomography scanner includes an X-ray source module and a detector module. The X-ray source module may include an X-ray tube and associated control circuits. The X-ray tube may generate X-rays during a computer tomography (CT) process. The X-ray source may be of various types, including, for example, a rotating anode X-ray tube or a fixed anode X-ray tube. The detector module may generate absorption information of X-rays in the X, Y or Z directions. The X-ray source module may emit X-ray signals to an object of interest.

[0050] In some embodiments, the function, size, type, geometry, position, amount, and / or amplitude of the X-ray source module and / or the detector module may be determined or changed according to one or more specific conditions. In some embodiments of the present application, the detector module may include a scintillation detector, a semiconductor detector, etc. In some embodiments, the X-ray source module and the detector module may be designed to surround the object to form a tunnel type or an open type.

[0051] In an exemplary solution, the terminal device 101 may have a general or special computing device environment or configuration. For example: a personal computer, a server computer, a handheld device or a portable device, a tablet device, a multi-processor device, a distributed computing environment including any of the above devices or devices, etc. The terminal device 101 may have different names, such as user equipment (UE), access device, terminal unit, terminal station, mobile station, mobile station, remote station, remote terminal, mobile device, wireless communication device, terminal agent or terminal device, etc.

[0052] In some embodiments, the terminal device 101 may run application software for volume rendering of images, and the application software may implement the image rendering method provided in the embodiments of the present application.

[0053] Furthermore, the terminal device 101 may run an operating system, which may include but is not limited to Android system, IOS system, Linux system, Unix, Windows system, etc., and may also include a user interface (UI) layer, which can provide display of image drawing results to the outside through the UI layer.

[0054] In one possible implementation, a communication connection is established between the terminal device 101 and the imaging device 102 via a wired or wireless network. Optionally, the wireless network or wired network uses standard communication technology and / or protocols. The network is typically the Internet, but may be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network.

[0055] It should be noted that the “volume rendering” and “volume rendering” involved in the embodiments of the present application have the same meaning.

[0056] For ease of understanding and explanation, the following Figures 2 to 9 The posture detection method, apparatus and terminal device provided in the embodiments of the present application are described in detail.

[0057] Figure 2 FIG. 1 is a flow chart of an image drawing method according to an embodiment of the present application, and the method can be executed by the imaging device 102. Figure 2 As shown, the method includes:

[0058] 201. Obtain a region of interest of a volume rendering image.

[0059] In the embodiment of the present invention, the volume rendering image can be understood as an image to be drawn into a 3D effect, that is, the image data of the volume rendering image is three-dimensional image data. Optionally, the image type of the volume rendering image can be any type, such as a medical image, a portrait image, or a landscape image. For the sake of ease of introduction, this embodiment takes the volume rendering image as three-dimensional medical image data as an example. It should be noted that the image type of the above-mentioned volume rendering image is only an exemplary introduction of several optional types. The image type of this embodiment can also be other types, which is not limited in this embodiment. Accordingly, the image type of the subsequent image obtained based on the volume rendering image is not limited.

[0060] Optionally, when the volume rendering image is a three-dimensional medical image, the volume rendering image is a volume data image containing several tissues. In this embodiment, the volume rendering image is obtained by scanning and collecting a three-dimensional image using medical imaging equipment of various modalities, and can also be obtained by transmitting through internal or external storage systems such as cloud platforms, storage systems, and picture archiving and communication systems (PACS). Modalities include, but are not limited to, magnetic resonance imaging (MRI), magnetic resonance angiography (MRA), computed tomography (CT), positron emission tomography (PET), and one or more combinations thereof.

[0061] As an example, a CT scan is performed on the human lungs to obtain a CT image corresponding to the human lungs; of course, the three-dimensional medical image obtained is different depending on the medical imaging device, and this embodiment does not limit the specific medical imaging device. Optionally, the method for obtaining the original image can also be to read the image data based on the database stored in the device, and render the image data to obtain the original image. This embodiment does not limit the method for obtaining the original image.

[0062] In some embodiments, the boundary of the region of interest is outlined by using tools such as dotting and drawing lines, such as Figure 3 As shown in the figure, on the volume rendering image, the user draws a line at the edge of the region of interest, and when the line is completed, the region of interest can be obtained. Considering that the user may have an error in outlining the range, the range of the region of interest can be smoothed, and Ray-Casting can be used to obtain the volume data inside the region of interest.

[0063] In some embodiments, first, discrete point data of the boundary is obtained by using dotting and line drawing tools. These points can be in the form of two-dimensional coordinates (x, y). On this basis, the smoothing method can include any one or a combination of the following methods:

[0064] Moving Average, that is, smoothing the curve by calculating the average value of each discrete point and its neighboring points.

[0065] Gaussian Smoothing is to apply Gaussian weights to each discrete point and perform weighted averaging on the neighborhood points. During the smoothing process, the degree of smoothing can be adjusted by selecting an appropriate standard deviation.

[0066] Spline Interpolation, that is, using spline curves (such as B-spline or Catmull-Rom spline) to interpolate discrete points.

[0067] Bézier Curves, that is, select control points and use the Bézier curve formula to generate a smooth curve.

[0068] Curve fitting is to select an appropriate fitting function (such as a polynomial) and fit the original points using the least squares method.

[0069] In one implementation, after the region of interest is determined, Raycast is performed on the points in the region of interest according to the delineation result and the grayscale values ​​of the points in the region are recorded.

[0070] Furthermore, based on the three-dimensional space of the region of interest, a ray is emitted from each pixel of the region of interest along a fixed direction (usually the line of sight), and the ray passes through the image sequence (which can also be understood as slice data or volume texture) under the entire region of interest. During the traversal process, the image sequence is sampled to obtain the grayscale value of each sampling point until the ray passes through the entire image sequence.

[0071] It should be understood that in the Raycast process, when a ray intersects a voxel, the absorption or scattering of the ray at that point is calculated based on the grayscale value and other properties of the voxel. Specifically, a voxel with a higher grayscale value may absorb more ray energy, resulting in a lower brightness at that point; while a voxel with a lower grayscale value absorbs less ray energy, resulting in a relatively higher brightness at that point.

[0072] 202. Determine a value of a two-dimensional transfer function corresponding to each voxel in the region of interest, where the value of the two-dimensional transfer function includes a grayscale value and a gradient amplitude.

[0073] It can be understood that the grayscale value of each voxel in the region is traversed and stored, and the gradient amplitude is calculated for each voxel using the Sobel operator or other gradient operators (such as Prewitt operator, Roberts operator, Laplacian operator, etc.), and the gradient amplitude G(x, y, z) can be used to measure the intensity change of the voxel in the local area.

[0074] As an example, first, select a suitable gradient operator according to the application requirements. Different gradient operators differ in weight distribution, kernel size, computational complexity, etc., so they need to be selected according to the actual situation. According to the selected gradient operator, the corresponding convolution kernel is constructed. The convolution kernel is a matrix whose elements determine how to perform convolution operations on the image in the region of interest. For three-dimensional volume data, it is necessary to construct convolution kernels in three directions (such as x, y, and z directions). Apply the constructed convolution kernel to each voxel. This usually involves aligning the center of the convolution kernel with the current voxel, then multiplying each weight in the convolution kernel with the grayscale value of the corresponding adjacent voxel, and adding all the products. This process can calculate the gradient amplitude of the current voxel in the selected direction. Then the gradient amplitude of the voxel in each direction is obtained.

[0075] Specifically, for each voxel, its gradient in the x, y, and z directions needs to be calculated. Gradient calculation can be achieved through the grayscale value difference between adjacent voxels. For example, in the x direction, the gradient of voxel (i, j, k) can be approximated by calculating the grayscale value difference between voxel (i+1, j, k) and voxel (i-1, j, k). Similarly, the gradient can be calculated in the y and z directions respectively. After calculating the gradient of each voxel in the x, y, and z directions, they can be synthesized into a gradient vector. The magnitude (modulus) of this vector represents the gradient amplitude, and the direction represents the direction in which the grayscale value changes fastest. For voxel (i, j, k) in three-dimensional volume data, its gradient vector can be expressed as:

[0076] G x =f(i+1,j,k)-f(i-1,j,k)(x-direction gradient)

[0077] G y =f(i,j+1,k)-f(i,j-1,k)(y-direction gradient)

[0078] G z =f(i,j,k+1)-f(i,j,k-1)(z-direction gradient)

[0079] Based on the above, the gradient magnitudes in various directions can be combined to obtain the gradient magnitude of the voxel. The Euclidean distance formula can be used to take the gradient magnitudes in various directions as components of a vector, and then the modulus of the vector is calculated.

[0080] Where f(i,j,k) represents the grayscale value of voxel (i,j,k). The magnitude (modulus) of the gradient vector can be calculated by the following formula:

[0081]

[0082] In order to simplify the calculation, the sum of absolute values ​​can also be used to approximate the gradient modulus, that is:

[0083] G | ≈ | G x | + | G y | + | G z

[0084] It should be noted that special processing is required for voxels located on the border of the region of interest. This is because the voxels on the border do not have enough adjacent voxels to apply the complete convolution kernel. Common processing methods include mirroring voxels, zero padding, or copying the values ​​of edge voxels.

[0085] It should be understood that, as required, the calculated gradient image may be post-processed, such as smoothing filtering, threshold processing, etc., to further highlight edge features or suppress noise.

[0086] In one implementation, the gradient of each voxel in each direction is calculated based on each voxel and the voxels on both sides of each voxel in each direction; and the gradient amplitude of each voxel is obtained based on the gradient in each direction.

[0087] 203. Draw the color of the region of interest according to the value of the two-dimensional transfer function of each voxel to obtain a rendered region of interest.

[0088] Optionally, the color may include a color (eg, RGB) and a transparency.

[0089] Optionally, for each voxel, a color list is read according to the value of the two-dimensional transfer function of the voxel to determine the color of the voxel. The color list is preset with color values ​​corresponding to the values ​​of the two-dimensional transfer function, and the color value is in a mapping relationship with the value of the two-dimensional transfer function. The color of the voxel is determined according to the mapping relationship to achieve the purpose of volume rendering of the voxel.

[0090] Compared with the prior art, the embodiments of the present application have the following beneficial effects: in the process of volume rendering of an image, the present application takes into account that the grayscale reflects the brightness information of the pixels in the image, while the gradient reflects the rate and direction of brightness change between pixels, that is, the edge and texture information of the image. In volume data, different tissue materials often have different grayscale and gradient characteristics. Therefore, by comprehensively considering these two dimensions, the boundaries and detail information between different tissues can be captured and represented more accurately.

[0091] Secondly, by introducing grayscale and gradient as two-dimensional transfer functions, the color mapping mechanism is more diversified and refined. Traditional volume rendering methods only consider single grayscale information, which makes it impossible to fully reflect the complexity and diversity of volume data in the color mapping process. The two-dimensional transfer function can comprehensively consider the information of grayscale and gradient, and provide more accurate color allocation for each voxel, thereby effectively avoiding the loss of tissue boundaries and detail information. By assigning more diverse and realistic colors to different voxels, the visualization quality of the image can be significantly improved, allowing observers to more clearly see the boundaries and detail information between different tissue materials.

[0092] In one embodiment of the present application, the color of the region of interest is drawn according to the numerical value of the two-dimensional transfer function of each voxel to obtain the rendered region of interest, including: for each voxel, matching the color value corresponding to the numerical value of the two-dimensional transfer function in a relationship set; the relationship set is used to represent the color values ​​corresponding to each combination of multiple grayscale values ​​and gradient amplitudes; and using the color value of each voxel to update the voxel to obtain the rendered region of interest.

[0093] Optionally, create a two-dimensional array or matrix where the rows represent grayscale values ​​and the columns represent gradient amplitudes. Each element (M(g,l)) stores the color value (including color and transparency) settings corresponding to the grayscale (g) value and gradient (l) value, and sets the initial rules for color mapping and transparency mapping, for example: low grayscale and high gradient amplitude (such as edge areas) are mapped to high transparency (Transparency) and bright (Salutation) colors. High grayscale and low gradient amplitude (such as bone areas) are mapped to low transparency and brighter (Brightness) colors.

[0094] It should be understood that during actual use, the mapping rules are adjusted according to actual needs and the doctor's guidance.

[0095] In some embodiments, in order to generate an interactive two-dimensional transfer function image, a transfer function lookup table (i.e., a set of relationships) is established. The table consists of grayscale values ​​and gradient amplitudes (after taking the logarithm), where the grayscale value is the x-axis and the gradient amplitude is the y-axis. For each (x, y) combination, an opacity and color are specified, thus forming the basis of the transfer function lookup table. During the drawing process, each data point will obtain a grayscale value and gradient amplitude, which are used as inputs to the two-dimensional transfer function. By looking up the transfer function table, the color and opacity corresponding to each data point can be obtained. As an example, Figure 4The two-dimensional transfer function visualization lines are shown in Figure 1. For each line graph, the x-axis corresponds to the grayscale value range (F1min, F1max), and the y-axis corresponds to the gradient amplitude value range (F2min, F2max). These values ​​define the range of each transfer function. In three-dimensional space, the Z value represents the color data point, which is composed of R, G, B, and A values ​​and is used to determine the color and opacity of each data point. Figure 4 (a) in the figure shows one of the two-dimensional transfer function configurations, which contains four peak points within its value range. Figure 4 (b) in Figure 1 shows another transfer function configuration where the gradient magnitude is high in some areas, resulting in significant changes in color and transparency. This reflects the behavior of the transfer function under different combinations of grayscale values ​​and gradient magnitudes. Figure 4 (c) and Figure 4 (d) in Figure 3 shows the significant effect of gradient amplitude on color and transparency when the grayscale value is low and high, respectively. Figure 4 In (c), the gradient amplitude change in the low gray value area significantly affects the color and transparency; Figure 4 In (d), the change in gradient amplitude in the high gray value area also leads to significant changes in color and transparency.

[0096] In summary, Figure 4 Four different 2D transfer function configurations are shown to show the color and transparency changes in 3D space for different combinations of grayscale values ​​and gradient amplitudes. These visualizations help understand the behavior of the transfer function under different input conditions and provide a basis for interactive 2D transfer function graph generation.

[0097] In this embodiment, the introduction of a relationship set provides flexibility and scalability for color mapping, and users can customize the two-dimensional transfer function according to specific needs, adjust the combination of grayscale values ​​and gradient amplitudes and their corresponding color values. This customized color mapping strategy can meet more fine-grained rendering requirements and make the rendered image more realistic.

[0098] In one embodiment of the present application, a method for obtaining a relationship set includes: displaying an editing interface corresponding to the region of interest; the editing interface includes a ruler and a line editing area, the ruler is used to represent the grayscale value of the tissue material that needs to be edited in the region of interest, and a slider corresponding to the tissue material is displayed at the grayscale value of each tissue material on the ruler, and each grayscale value on the ruler corresponds to a color value under at least one gradient amplitude; for any two tissue materials, at least three control points are edited in the line editing area, and the control points are used to represent the correspondence between the grayscale value, gradient amplitude and color value contained between the two tissue materials; at least three control points include the starting point, peak point and end point of the line. For any two tissue materials, a line between the two tissue materials is constructed and displayed based on at least three control points; and a relationship set is obtained based on the lines corresponding to each pair of tissue materials.

[0099] It should be understood that each point on the line represents the color value (including color and transparency) corresponding to the grayscale value and gradient amplitude. In other words, the values ​​of the four elements of grayscale value, gradient amplitude, color and transparency correspond to one point on the scale.

[0100] As an example, see Figure 5 , provides a grayscale-gradient histogram. Taking material A, material B, and material C as examples, the grayscale value inside the material is relatively stable and changes little, so the gradient amplitude is close to 0. This low gradient amplitude characteristic reflects the continuity and consistency inside the material, allowing us to clearly identify the internal areas of different materials.

[0101] It is understandable that in the material boundary area, the grayscale value changes significantly, resulting in an increase in the gradient amplitude. These boundary areas are presented as arc distributions in the histogram, and each arc corresponds to the boundary between different materials. Specifically, arc D represents the boundary between material A and material B, arc E represents the boundary between material B and material C, and arc F represents the boundary between material A and material C. By carefully observing the distribution and morphology of these arcs, we can further analyze the transition mode and boundary characteristics between different materials.

[0102] It is worth noting that the change in gradient amplitude not only reveals the existence of material boundaries, but also provides information about the rate of grayscale change in the boundary area. In the boundary area, the rate of change of grayscale values ​​is faster, resulting in a higher gradient amplitude. This high gradient amplitude feature can more accurately locate and analyze the boundaries between materials, providing strong support for subsequent image processing and analysis.

[0103] As an example, material A may be effusion, material B may be soft tissue (such as muscle), and material C may be bone.

[0104] based on Figure 5As an example, refer to Figure 6 , showing the editing interface 60 corresponding to the area of ​​interest; the editing interface 60 includes a ruler 61 and a line editing area 62. The ruler 61 corresponds to three types of sliders 611, 612 and 613 corresponding to material A, material B and material C respectively, among which the grayscale value of material A is the smallest, and the grayscale value corresponding to material C is the largest. From the results displayed on the ruler, it can be seen that the ruler shows the change in color value from material A to material B, and the ruler shows the change in color value from material B to material C. The line editing area 62 includes three arcs D, arc E and arc F. Arc D represents the boundary between material A and material B, arc E represents the boundary between material B and material C, and arc F represents the boundary between material A and material C. Each arc represents a control unit of the transfer function, and each control unit contains at least three key control points, for example, Figure 6 The starting point, middle point d1 and end point of the curved arc D are shown; the starting point, middle point e1 and end point of the curved arc E; the starting point, middle point f1 and end point of the curved arc F. The entire transfer function requires at least one such control unit. By adjusting the control points on the curved arc, the transfer function can be customized.

[0105] It should be noted that Figure 6 The starting point and the end point of each curved arc are not clearly marked in a similar way to the marking form of the middle point d1, the middle point e1, and the middle point f1, but it can be understood that the starting point and the end point are the two end points of the curved arc, which characterizes the value range of the gray value of the curved arc.

[0106] In the line editing area 62, each control point on each curved arc carries important information: the x-axis position corresponding to the control point represents the grayscale value corresponding to the point, and the corresponding y-axis position reflects the gradient amplitude. In addition, each control point also supports the editing of color (HSV mode) and opacity (a), providing users with a rich visual adjustment space.

[0107] In the line editing area, the curved arc graphic intuitively displays the control unit of the transfer function. The user can drag the control point on the curved arc to adjust its position on the gray value and gradient amplitude, thereby changing the shape of the transfer function. At the same time, the user can also add or delete control points to more finely adjust the shape of the curved arc. By modifying the slope of the area where the control point is located, the user can further adjust the interpolation results of other points on the curved arc to achieve precise control of the transfer function. It should be noted that adding and deleting control points are explained below and are not described in detail here.

[0108] In this embodiment, by displaying the editing interface corresponding to the region of interest, the user's editing efficiency and pertinence can be improved. The user no longer needs to waste time searching for the part that needs to be edited in the entire image, but can directly operate in the region of interest, which greatly shortens the editing cycle and improves work efficiency. At the same time, through the ruler function embedded in the editing interface, the user is provided with an accurate grayscale value reference, and the color value corresponding to each tissue material is intuitively displayed in the form of a slider. This not only enables the user to grasp the color and grayscale distribution in the image more accurately, but also gives the user greater flexibility and control during the editing process, thereby ensuring the accuracy and consistency of the editing results.

[0109] Furthermore, by allowing users to edit at least three control points in the line editing area (including the starting point, peak point and end point of the line), fine control of the grayscale value, gradient amplitude and color value correspondence between the two tissue materials is achieved. This control point-based line editing method not only makes the transition between color and grayscale more natural and smooth, but also provides users with intuitive visual feedback, making the editing process more intuitive and controllable.

[0110] In one embodiment of the present application, the editing interface also includes a line configuration item for constructing a line between two tissue materials based on at least three control points; in response to a selection operation on a target line in the line configuration item, determining the shape of the line between the two tissue materials; performing an interpolation operation between at least three control points according to an interpolation method corresponding to the shape to obtain multiple interpolation points; and constructing a line between the two tissue materials based on the multiple interpolation points and at least three control points.

[0111] It is understandable that the line configuration item can be a selection control corresponding to a variety of line shapes, recorded as a line configuration control, for example, Figure 6 , the line configuration control 621 and the line configuration control 622 are displayed in the line editing area 62; wherein the line configuration control 621 can configure the line to a curve shape, that is, an arc shape, and the line configuration control 622 can configure the line between material B and material C to Figure 7 The broken line shape shown is broken line G.

[0112] In one implementation, the line configuration item may be a selection item. The selection item supports the user to configure according to actual needs. For example, the line configuration options are displayed in a drop-down menu of the selection item.

[0113] In some embodiments, performing interpolation operations between control points using an interpolation method corresponding to the shape of the line may include the following two methods:

[0114] First, for the curve shape, one or more of the following combinations can be used, for example:

[0115] Spline interpolation: including quadratic spline interpolation, cubic spline interpolation, etc. Spline interpolation can generate smooth curves, especially when there are many control points, it can generate more precise curve shapes.

[0116] Bezier curve interpolation: Bezier curve is a mathematical method to define a curve through control points. By adjusting the position and number of control points, smooth curves of various shapes can be generated.

[0117] Bicubic interpolation: The influence of the grayscale values ​​of surrounding pixels and the rate of change of their grayscale values ​​can generate smoother edges than bilinear interpolation, which is suitable for high-precision interpolation of images.

[0118] The second method, for a broken line shape, can be:

[0119] Nearest neighbor interpolation method: also known as zero-order interpolation method, it selects the value of the known data point closest to the point to be interpolated as the interpolation result.

[0120] Linear interpolation: For each straight line segment in a polyline, linear interpolation can be used to estimate the value of any point on the segment.

[0121] It should be noted that the above-mentioned two line shapes of curve and broken line are only for illustrative purposes, and the embodiments of the present application do not impose any limitation on the specific shapes of the lines. For example, the line between two materials can be a combination of a broken line and a curve.

[0122] In this embodiment, the various line configuration items provide more choices. Whether it is a curve or a polyline, users can easily find and apply the most suitable line type through the line configuration line in the editing interface according to actual needs. According to the specific shape and requirements of the line, the interpolation method most suitable for the line shape can be selected to draw the line, accurately showing the transition and connection between the two tissue materials, so that the final drawn area of ​​interest can better meet the actual needs.

[0123] In one embodiment of the present application, the editing interface also includes a control point editing control, a grayscale configuration item and a gradient configuration item; editing at least three control points in the line editing area includes: for any control point among the at least three control points, in response to an operation of adding a control point in the control point editing control, displaying the control point in the line editing area; in response to the editing operation of the control point, associating the control point with the grayscale configuration item and the gradient configuration item; in response to the selection operation of the grayscale value in the grayscale configuration item and the selection operation of the gradient amplitude in the gradient configuration item, displaying the control point at the intersection of the selected grayscale value and the gradient amplitude; based on the color values ​​of the two tissue materials, obtaining the color value represented by the control point.

[0124] As an example, see Figure 6 In the line editing area 62, two control point editing controls 623 and 624 are also displayed. In some embodiments, the line to be edited can be selected first, for example, the selected line is the curved arc E. Then, the control point adding control 623 can be triggered, and the control point deleting control 624 can be displayed. Figure 8 Similarly, when the control point e2 is selected, the control point deletion control 624 is triggered, and the control point e2 is deleted from the curved arc E. Figure 6 The editing interface 60 also includes a transfer function editing area 63 of grayscale value and gradient amplitude, and the transfer function editing area 63 includes a grayscale configuration item 631 and a gradient configuration item 632. The grayscale configuration item 631 includes a grayscale slider 6311, a grayscale display bar 6312, and a grayscale adjustment control 6313. The grayscale slider 6311 includes a ruler and a sliding component, and the grayscale value is adjusted by sliding the sliding component on the ruler. The grayscale adjustment control 6313 includes an upper adjustment control and a lower adjustment control, and the upper adjustment control is used to increase the grayscale value, and the lower adjustment control is used to reduce the grayscale value. The grayscale value can be adjusted by the up and down adjustment controls of the grayscale slider 6311 or the grayscale adjustment control 6313, and the grayscale display bar 6312 will synchronously display the grayscale value selected by the up and down adjustment controls of the grayscale slider 6311 or the grayscale adjustment control 6313.

[0125] Similarly, the gradient configuration item 632 includes a gradient slider 6321, a gradient display bar 6322, and a gradient adjustment control 6323. The gradient slider 6321 includes a ruler and a sliding component, and the gradient value is adjusted by sliding the sliding component on the ruler. The gradient adjustment control 6323 includes an upper adjustment control and a lower adjustment control, and the upper adjustment control is used to increase the gradient value, and the lower adjustment control is used to reduce the gradient value. The gradient value can be adjusted by the up and down adjustment controls of the gradient slider 6321 or the gradient adjustment control 6323, and the gradient display bar 6322 will synchronously display the gradient value selected by the up and down adjustment controls of the gradient slider 6321 or the gradient adjustment control 6323.

[0126] In a possible grayscale slider 6311, the slider component will slide on the scale correspondingly with the value selected by the up and down adjustment controls of the grayscale adjustment control 6313. The gradient is the same, and will not be described here.

[0127] Based on the above, when the control point e2 is selected, the grayscale value and gradient amplitude of the control point e2 can be adjusted in the grayscale value and gradient amplitude transfer function editing area 63. It should be understood that after the control point e2 is selected, the grayscale configuration item and the gradient configuration item are relatedly operated, that is, the control point is associated with the grayscale configuration item and the gradient configuration item.

[0128] In order to fit the actual arc shape, users can not only add or delete control points, but also adjust the slope of the area where the control points are located. This flexibility ensures fine adjustment of the transfer function, which in turn affects the interpolation results of other points on the arc to meet diverse image processing needs.

[0129] In one possible implementation, referring to Fig. 9 The gray value and gradient amplitude transfer function editing area 63 may also include a first display control 633 and a second display control 634, wherein the first display control 634 is used to control the line editing area 62 to display all edited contents (including lines, control points, etc.), and the second display control 635 is used to control the contents of the currently edited line. When the first display control 633 is triggered, the contents displayed in the line editing area 62 are as follows: Fig. 9 (a); Assuming that the currently edited line is curve D, when the second display control 634 is triggered, the content displayed in the line editing area is as follows Fig. 9 (b) in .

[0130] In this embodiment, through the control point editing control, the user can increase or decrease the number of control points in the line to achieve flexible control point editing. At the same time, the user can associate the control point with the grayscale configuration item and the gradient configuration item through the editing operation of the control point, which significantly improves the interactivity between the user and the two-dimensional transfer function editing process. The user can freely adjust the position and related parameters of the control point according to actual needs. In addition, the control point is displayed instantly at the intersection of the selected grayscale value and the gradient amplitude, providing the user with intuitive visual feedback, helping the user to quickly understand the role and effect of the control point, so as to edit with higher efficiency. This intuitive display and operation method reduces the learning cost and improves the user experience.

[0131] In one embodiment of the present application, the color value represented by the control point is obtained based on the color values ​​of two tissue materials, including: determining a first distance between the control point and the starting point of the line where the control point is located, and a second distance between the control point and the end point of the line where the control point is located; and obtaining the color value represented by the control point based on the first distance, the second distance and the color values ​​of the two tissue materials.

[0132] As an example, the position ratio of the control point relative to the starting point and the terminal is calculated based on the first distance and the second distance. This ratio can be used to determine the mixing ratio of the two tissue material colors when the color value of the control point is determined later. Use the distance ratio as a weight (the weight corresponding to the first distance is w1, and the weight corresponding to the second distance is w2) to assign a mixing ratio to the color values ​​of the starting point and the terminal. For example, if the control point is closer to the starting point, the color value of the starting point will account for a higher proportion in the mixing. According to the mixing ratio determined in the previous step, the color values ​​of the starting point and the terminal are mixed to obtain the color value of the control point. This mixing can be a simple linear mixing, that is, the weighted sum of the components of the two color values ​​(such as the various channels of RGB) according to the ratio. The calculation formula is as follows:

[0133] C=w1×C1+w2×C2

[0134] Among them, C represents the color value represented by the control point; C1 represents the color value of the material at the starting position; C2 represents the color value of the material at the end position.

[0135] In one embodiment of the present application, the editing interface also includes a color configuration item; for any slider, in response to a selection operation on the slider, the color configuration item is associated with the slider; in response to a selection operation on a target color value in the color configuration item, the target color value is determined as the color value corresponding to the slider.

[0136] Reference Figure 6 , the editing interface is also configured with a color configuration item 64, which includes a color configuration item 641 and a transparency configuration item 642. The color configuration item 641 can be implemented by a color slider, which includes a color scale and a slide control, and the slide control is dragged to slide on the color scale to select the desired color. Similarly, the transparency configuration item 642 can be implemented by a transparency slider, which includes a transparency scale and a slide control, and the slide control is dragged to slide on the transparency scale to select the desired transparency.

[0137] like Figure 6 As shown, the color configuration item 64 may further include a color amplifier 643 and a color block 644. The color amplifier 643 is used to magnify and display the color selected in the color configuration item 641 and its surroundings, and a color can be selected through a color selection control 6431 in the color amplifier 643 and displayed through the color block 644. It can be understood that the color configuration item 641 is used to roughly select a color, and the color amplifier 643 is used to finely select a color.

[0138] Furthermore, the color configuration item 64 may also include a color code display area 645 and a transparency display area 646. The color code display area 645 is used to display the currently selected color code, such as Figure 6 The "#4354A6" shown in the figure is used to represent a deep and elegant blue tone. The transparency display area 646 is used to display the currently selected transparency, such as Figure 6 Optionally, the color code display area 645 also has an input function, and the user can input a corresponding color code in the color code display area 645 .

[0139] In this embodiment, an intuitive color configuration method is provided to facilitate users to set color values.

[0140] In one embodiment of the present application, the editing interface also includes a color type configuration item; the method also includes: in response to a selection operation of a target color type in the color type configuration item, displaying a color configuration item of the target color type.

[0141] Optionally, the color type configuration items may include RGB, HSL, and HEX color coding. Among them, RGB is a color representation method based on three color channels: red, green, and blue. The intensity of each color channel can vary between 0 and 255, thereby combining various colors. HSL is a color representation method based on hue, saturation, and lightness. HEX color coding is a method of representing colors using hexadecimal numbers. It is usually represented by six hexadecimal digits, with every two digits representing the intensity of a color channel (red, green, and blue).

[0142] As an example, see Figure 6 , showing the color type configuration item 65, the color type configuration item 65 can provide the user with various color type options through a drop-down menu for the user to choose, thereby increasing the convenience of use.

[0143] In some embodiments, the grayscale range and gradient amplitude range between two tissue materials (such as bone and soft tissue) can be pre-set in the editing interface, and basic colors (such as color and transparency) can be mapped in the grayscale range and gradient amplitude range to obtain the three control points of the starting point, peak point and end point between the two tissue materials, and the aforementioned lines can be obtained based on the three control points. After the setting is completed, the region of interest can be volume rendered. When the pre-set control points do not meet the actual needs, the position and number of the control points on the line can be adjusted in the editing interface to achieve a specific rendering effect corresponding to a specific grayscale value and gradient amplitude of the volume data.

[0144] In practical applications, the information of these control points can be determined based on anatomical knowledge and actual needs. For example, voxels with image signal values ​​higher than 500 can be mapped to white (similar to the color of bones) according to the grayscale values ​​and gradient amplitudes corresponding to each signal value; and voxels of soft tissue (-50-200) can be mapped to orange, red and other colors according to the grayscale values ​​and gradient amplitudes corresponding to each signal value, in order to simulate the actual anatomical effect of the human body.

[0145] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0146] Corresponding to the image drawing method described in the above embodiment, Fig.10 A structural block diagram of an image drawing device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0147] Reference Fig.10 The image drawing device includes: an acquisition module 1001, a processing module 1002, a drawing module 1003, a display module 1004, an editing module 1005, and a construction module 1006, wherein:

[0148] The acquisition module 1001 is used to acquire a region of interest of a volume rendering image.

[0149] The processing module 1002 is used to determine the value of the two-dimensional transfer function corresponding to each voxel in the region of interest, where the value of the two-dimensional transfer function includes a grayscale value and a gradient amplitude.

[0150] The drawing module 1003 is used to draw the color of the region of interest according to the value of the two-dimensional transfer function of each voxel to obtain a rendered region of interest.

[0151] In a possible implementation, the drawing module 1003 is specifically used to match, for each voxel, a color value corresponding to the numerical value of the two-dimensional transfer function in a relationship set; the relationship set is used to represent the color values ​​corresponding to each combination of multiple grayscale values ​​and gradient amplitudes; and the voxel is updated using the color value of each voxel to obtain a rendered region of interest.

[0152] In one possible implementation, the display module 1004 is used to display an editing interface corresponding to the region of interest; the editing interface includes a ruler and a line editing area, the ruler is used to represent the grayscale value of the tissue material that needs to be edited in the region of interest, and at each grayscale value of the tissue material on the ruler, a slider corresponding to the tissue material is displayed, and each grayscale value on the ruler corresponds to a color value under at least one gradient amplitude.

[0153] The editing module 1005 is used to edit at least three control points in the line editing area for any two tissue materials, and the control points are used to characterize the corresponding relationship between the grayscale value, gradient amplitude and color value contained in the two tissue materials; the at least three control points include the starting point, peak point and end point of the line.

[0154] The construction module 1006 is used to construct and display a line between any two tissue materials based on the at least three control points.

[0155] The processing module 1002 is used to obtain the relationship set based on the lines corresponding to the two-by-two organization materials.

[0156] In a possible implementation, the editing interface further includes a line configuration item, and a construction module 1006 is specifically used to:

[0157] In response to a selection operation on a target line in the line configuration item, a shape of a line between the two tissue materials is determined.

[0158] An interpolation operation is performed between the at least three control points according to an interpolation method corresponding to the shape to obtain a plurality of interpolation points.

[0159] A line between the two tissue materials is constructed based on the multiple interpolation points and the at least three control points.

[0160] In a possible implementation, the editing interface further includes a control point editing control, a grayscale configuration item, and a gradient configuration item; the editing module 1005 is specifically used to:

[0161] For any control point among the at least three control points, in response to an operation of adding a control point in the control point editing control, the control point is displayed in the line editing area.

[0162] In response to an editing operation of the control point, the control point is associated with the grayscale configuration item and the gradient configuration item.

[0163] In response to a selection operation of a grayscale value in the grayscale configuration item and a selection operation of a gradient amplitude in the gradient configuration item, the control point is displayed at an intersection of the selected grayscale value and the gradient amplitude.

[0164] Based on the color values ​​of the two tissue materials, the color value represented by the control point is obtained.

[0165] In one possible implementation, the editing module 1005 is specifically used to determine a first distance between a control point and the starting point of a line where the control point is located, and a second distance between the control point and the end point of the line where the control point is located; and obtain the color value represented by the control point based on the first distance, the second distance and the color values ​​of the two tissue materials.

[0166] In one possible implementation, the editing interface also includes a color configuration item; the processing module 1002 is also used to, for any slider, in response to a selection operation on the slider, associate the color configuration item with the slider; in response to a selection operation on a target color value in the color configuration item, determine the target color value as the color value corresponding to the slider.

[0167] In a possible implementation, the editing interface further includes a color type configuration item; the processing module 1002 is further configured to display the color configuration item of the target color type in response to a selection operation on the target color type in the color type configuration item.

[0168] It should be noted that the information interaction, execution process and other contents between the above-mentioned devices are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0169] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0170] Reference below Fig.11 , Fig.11 A schematic diagram of the structure of a computer device suitable for implementing the embodiments of the present application is shown. Fig.11 As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage part 1108 to the random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation instructions of the system are also stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0171] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage section 1108 as needed.

[0172] In particular, according to an embodiment of the present application, the above reference flow chart Figure 2 The described process can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the central processing unit (CPU) 1101, the above-mentioned functions defined in the system of the present application are executed.

[0173] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium such as a computer-readable storage medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0174] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operating instructions of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the aforementioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operating instruction, or can be implemented with a combination of dedicated hardware and computer instructions.

[0175] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be provided in a processor, for example, may be described as: a processor including an illegal person detection unit, a multimodal detection unit, and a recognition unit. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.

[0176] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the computer device described in the above embodiment, or may exist independently without being installed in the computer device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the image drawing method described in the present application. For example, it can be executed Figure 2 The various steps of the image drawing method shown.

[0177] The present application embodiment provides a computer program product, which includes instructions. When the instructions are executed, the method described in the present application embodiment is executed. For example, Figure 2 The various steps of the image drawing method shown.

[0178] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

[0179] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An image drawing method, characterized in that: include: Obtaining a region of interest of a volume rendered image; Determine a value of a two-dimensional transfer function corresponding to each voxel in the region of interest, wherein the value of the two-dimensional transfer function includes a grayscale value and a gradient amplitude; The color of the region of interest is drawn according to the value of the two-dimensional transfer function of each voxel to obtain a rendered region of interest.

2. The image drawing method according to claim 1, characterized in that: The step of drawing the color of the region of interest according to the value of the two-dimensional transfer function of each voxel to obtain a rendered region of interest includes: For each of the voxels, matching the color value corresponding to the numerical value of the two-dimensional transfer function in the relationship set; the relationship set is used to represent the color values ​​corresponding to each of the multiple combinations of the grayscale value and the gradient amplitude; The voxel is updated using the color value of each voxel to obtain a rendered region of interest.

3. The image drawing method according to claim 2, characterized in that: The method of obtaining the relationship set includes: Displaying an editing interface corresponding to the region of interest; the editing interface includes a ruler and a line editing area, the ruler is used to represent the grayscale value of the tissue material to be edited in the region of interest, and a slider corresponding to the tissue material is displayed at each grayscale value of the tissue material on the ruler, and each grayscale value on the ruler corresponds to a color value under at least one gradient amplitude; For any two tissue materials, edit at least three control points in the line editing area, wherein the control points are used to characterize the corresponding relationship between the grayscale value, gradient amplitude and color value contained in the two tissue materials; the at least three control points include the starting point, peak point and end point of the line; For any two tissue materials, construct and display a line between the two tissue materials based on the at least three control points; The relationship set is obtained based on the lines corresponding to the tissue materials in pairs.

4. The image drawing method according to claim 3, characterized in that: The editing interface also includes a line configuration item, which is directed to constructing a line between the two tissue materials based on the at least three control points; In response to a selection operation on a target line in the line configuration item, determining a shape of a line between the two tissue materials; Performing an interpolation operation between the at least three control points according to an interpolation method corresponding to the shape to obtain a plurality of interpolation points; A line between the two tissue materials is constructed based on the multiple interpolation points and the at least three control points.

5. The image drawing method according to claim 3 or 4, characterized in that: The editing interface further includes a control point editing control, a grayscale configuration item, and a gradient configuration item; and editing at least three control points in the line editing area includes: For any control point among the at least three control points, in response to an operation of adding a control point in the control point editing control, displaying the control point in the line editing area; In response to an editing operation on the control point, associating the control point with the grayscale configuration item and the gradient configuration item; In response to a selection operation of a grayscale value in the grayscale configuration item and a selection operation of a gradient amplitude in the gradient configuration item, displaying the control point at an intersection of the selected grayscale value and the gradient amplitude; Based on the color values ​​of the two tissue materials, the color value represented by the control point is obtained.

6. The image drawing method according to claim 5, characterized in that: The step of obtaining the color value represented by the control point based on the color values ​​of the two tissue materials includes: Determine a first distance between the control point and a starting point of a line where the control point is located, and a second distance between the control point and an end point of the line where the control point is located; The color value represented by the control point is obtained according to the first distance, the second distance and the color values ​​of the two tissue materials.

7. The image drawing method according to claim 3 or 4, characterized in that: The editing interface also includes a color configuration item; the method also includes: For any slider, in response to a selection operation on the slider, associating the color configuration item with the slider; In response to a selection operation on a target color value in the color configuration item, the target color value is determined as a color value corresponding to the slider.

8. The image drawing method according to claim 7, characterized in that: The editing interface also includes a color type configuration item; the method also includes: In response to a selection operation on a target color type in the color type configuration items, the color configuration items of the target color type are displayed.

9. An image drawing device, characterized in that: The device comprises: An acquisition module, used for acquiring a region of interest of a volume rendering image; A processing module, used for determining a value of a two-dimensional transfer function corresponding to each voxel in the region of interest, wherein the value of the two-dimensional transfer function includes a gray value and a gradient amplitude; A drawing module is used to draw the color of the region of interest according to the value of the two-dimensional transfer function of each voxel to obtain a rendered region of interest.

10. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the image drawing method according to any one of claims 1 to 8 when executing the computer program.