A DR image display method and device, computer equipment and a storage medium
By defining custom regions of interest in DR images, pixel statistical features are automatically acquired and optimal window width and level are set for local grayscale mapping. This solves the problem of simultaneously optimizing the display of high and low density tissues in existing technologies, enabling synchronous observation and diagnosis of the overall and local details of DR images, thus improving diagnostic efficiency and accuracy.
Patent Information
- Application Number
- CN202511593321.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-11-03
AI Technical Summary
Existing DR imaging methods struggle to simultaneously optimize the display of both high-density tissues (such as bone) and low-density tissues (such as lung parenchyma or soft tissue), requiring doctors to frequently adjust window width and level manually, which affects diagnostic efficiency and lacks objective quantitative standards.
By receiving the user-defined region of interest, the system automatically acquires the region's pixel statistical features, sets the optimal window width and window level for local grayscale mapping, and then merges the optimized region's grayscale image into the original DR image to generate a target DR image that takes into account both overall and local details.
It improves the display effect of DR images, enhances the image contrast and detail visibility of different regions of interest, and improves diagnostic efficiency and accuracy.
Smart Images

Figure CN121053244B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of medical image processing, and in particular to a DR image display method and device, a computer device and a storage medium. BACKGROUND
[0002] In medical image clinical diagnosis, digital X-ray imaging (DR) is widely used due to its fast imaging speed, low radiation dose and digital advantages. However, due to the significant difference in attenuation of X-rays by different tissues in the human body (such as bone, soft tissue, lung, etc.), DR images have a very wide dynamic range. Limited by the gray performance of conventional display devices, clinicians usually use window width (WW) and window level (WL) techniques to locally stretch the contrast of a specific gray interval to observe different tissue structures.
[0003] Currently, it mainly relies on globally uniform window width and window level settings, which is difficult to simultaneously optimize the display of high-density tissues (such as bone) and low-density tissues (such as lung parenchyma or soft tissue): setting a bias towards bone can easily lead to loss of soft tissue details, and vice versa. Doctors need to manually adjust the parameters frequently, interrupting the diagnosis process and affecting efficiency. Although some image systems support independent window width and window level adjustment for local regions, this process relies on subjective experience and lacks objective quantitative standards, and cannot fuse multiple optimized regions into one overall coordinated visual image, making it difficult to form a comprehensive diagnostic view.
[0004] Therefore, it is urgent to find a new DR image display method to improve the display effect of DR images, which is beneficial to improve the diagnosis efficiency of doctors. SUMMARY
[0005] The embodiments of the present application provide a DR image display method, device, computer device and storage medium to improve the display effect of DR images.
[0006] A DR image display method, comprising:
[0007] receiving a region setting instruction input by a user, and setting at least one region of interest on an original DR image according to the region setting instruction;
[0008] obtaining a region pixel statistical feature of each region of interest;
[0009] setting region window width and window level data of the region of interest according to the region pixel statistical feature;
[0010] performing gray mapping on a region image in each region of interest according to a preset mapping rule and the region window width and window level data to obtain a region gray image;
[0011] generate a target DR image according to all the region gray images and the original DR image.
[0012] Optionally, the acquiring of the region pixel statistical feature of each of the interest regions comprises:
[0013] acquiring a region image of the interest region;
[0014] calculating a region gray histogram, a region average pixel value and a region pixel value standard deviation of the region image;
[0015] determining the region pixel statistical feature according to the region gray histogram, the region average pixel value and the region pixel value standard deviation.
[0016] Optionally, the setting of the region window width and window level data of the interest region according to the region pixel statistical feature comprises:
[0017] setting a region gray pixel extreme value according to the region gray histogram;
[0018] setting a region initial window width and a region window level according to the region gray pixel extreme value;
[0019] determining a region type of the interest region according to the region average pixel value and the region pixel value standard deviation, and acquiring a window width adjustment coefficient associated with the region type;
[0020] determining a region window width of the interest region according to the window width adjustment coefficient and the region initial window width;
[0021] determining the region window width and window level data according to the region window level and the region window width.
[0022] Optionally, the gray mapping of the region image in each of the interest regions according to a preset mapping rule and the region window width and window level data to obtain a region gray image comprises:
[0023] determining a region window maximum value and a region window minimum value according to the region window width and window level data;
[0024] acquiring a first pixel point in the region image with a pixel value greater than or equal to the region window maximum value, and setting a pixel value of the first pixel point as a preset output gray maximum value;
[0025] acquiring a second pixel point in the region image with a pixel value less than or equal to the region window minimum value, and setting a pixel value of the second pixel point as a preset output gray minimum value.
[0026] Optionally, the preset mapping rule comprises a high segment mapping rule and a low segment mapping rule.
[0027] The gray scale mapping of the region image in each of the interest regions according to the preset mapping rule and the region window width and window level data obtains a region gray scale image, comprising:
[0028] The region window level, the region window maximum value and the region window minimum value are determined according to the region window width and window level data;
[0029] The third pixel point in the region image whose pixel value is less than the region window maximum value and greater than or equal to the region window level is obtained;
[0030] The initial high segment pixel value of the third pixel point is processed according to the high segment mapping rule to obtain a high segment pixel output value of the third pixel point;
[0031] The fourth pixel point in the region image whose pixel value is greater than the region window minimum value and less than the region window level is obtained;
[0032] The initial low segment pixel value of the fourth pixel point is processed according to the low segment mapping rule to obtain a low segment pixel output value of the fourth pixel point.
[0033] Optionally, the high segment mapping rule comprises:
[0034]
[0035] wherein, represents the high segment pixel output value;
[0036] represents a preset output gray scale maximum value;
[0037] represents the region window maximum value;
[0038] represents the initial high segment pixel value of the third pixel point;
[0039] represents a high segment linear mapping coefficient; wherein, , represents a region window level; is a shift parameter;
[0040] The low segment mapping rule comprises:
[0041]
[0042] wherein, represents the low segment pixel output value;
[0043] represents a preset output gray scale minimum value;
[0044] representing the region window minimum value;
[0045] representing the initial high segment pixel value of the fourth pixel point;
[0046] representing a low segment linear mapping coefficient; wherein, .
[0047] Optionally, the generating a target DR image according to all the region gray scale images and the original DR image comprises:
[0048] superimposing all the region gray scale images on the original DR image to obtain the target DR image.
[0049] A DR image display device comprises:
[0050] a region setting module configured to receive a region setting instruction input by a user and set at least one region of interest on an original DR image according to the region setting instruction;
[0051] a statistical feature acquisition module configured to acquire a region pixel statistical feature of each region of interest;
[0052] a window width and window level setting module configured to set region window width and window level data of the region of interest according to the region pixel statistical feature;
[0053] a gray scale mapping module configured to perform gray scale mapping on a region image in each region of interest according to a preset mapping rule and the region window width and window level data to obtain a region gray scale image;
[0054] a target DR image generation module configured to generate a target DR image according to all the region gray scale images and the original DR image.
[0055] A computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the DR image display method when executing the computer program.
[0056] A computer readable storage medium stores a computer program, and the computer program is executable on a processor to implement the DR image display method.
[0057] The DR image display method, device, computer device and storage medium, by automatically obtaining the regional pixel statistical features according to the user set interest region, and setting the optimal window width and window level for local gray scale mapping, the image contrast and detail visibility of each interest region are improved; by fusing the multiple optimized regional gray scale images to the original DR image, the target DR image considering the overall and local details is generated. The display effect of the DR image can be improved, which is helpful for the user to observe and diagnose the different interest regions synchronously, and the reading efficiency and accuracy are improved. BRIEF DESCRIPTION OF DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0059] Figure 1 is an application environment diagram of the DR image display method in an embodiment of the present application;
[0060] Figure 2 is a flow chart of the DR image display method in an embodiment of the present application;
[0061] Figure 3 is an original DR image in an embodiment of the present application;
[0062] Figure 4 is a target DR image in an embodiment of the present application;
[0063] Figure 5 is a schematic diagram of the DR image display device in an embodiment of the present application;
[0064] Figure 6 is a schematic diagram of the computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0065] The technical solutions of the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0066] The DR image display method provided by the embodiments of the present application can be applied to the DR image display device as shown in Figure 1The application environment shown. Specifically, the DR image display method is applied in a DR image display system, which includes a client and a server as shown Figure 1 The client and the server communicate through a network to improve the display effect of the DR image. The client, also known as the user end, is a program that provides local services for clients corresponding to the server. The client can be installed on various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, but is not limited to these. The server can be implemented by an independent server or a server cluster composed of multiple servers.
[0067] In an embodiment, as shown in Figure 2 A DR image display method is provided, which is applied in a server as shown in Figure 1 The steps S10-S50 are as follows.
[0068] S10, receiving a region setting instruction input by a user, and setting at least one region of interest on an original DR image according to the region setting instruction.
[0069] Understandably, the DR image display method provided by the embodiment allows the user (such as a clinician) to customize the region of interest (ROI), optimizes the display effect of each region of interest through adaptive window width and window level adjustment of the region of interest, and finally generates a target DR image with better overall visual effect.
[0070] Specifically, an original DR image can be preloaded, as shown in Figure 3 The user inputs a region setting instruction (such as a rectangular frame) through an interactive interface, and sets one or more regions of interest according to the region setting instruction. Here, the region of interest refers to a specific region specified by the user on the DR image, which needs to be adjusted locally in terms of window width and window level.
[0071] S20, obtaining the regional pixel statistical characteristics of each region of interest.
[0072] Understandably, the pixel gray value in each region of interest can be statistically calculated to obtain the regional pixel statistical characteristics. The regional pixel statistical characteristics include but are not limited to regional gray histogram, regional average pixel value, and regional pixel value standard deviation.
[0073] Optionally, step S20, i.e., the step of obtaining the regional pixel statistical characteristics of each region of interest, includes:
[0074] S201, obtaining a region image of the region of interest;
[0075] S202, calculating the regional gray histogram, the regional average pixel value, and the regional pixel value standard deviation of the region image.
[0076] S203, determining the region pixel statistical features according to the region gray histogram, the region average pixel value and the region pixel value standard deviation.
[0077] It can be understood that the region of interest can be defined by a coordinate range. For example, a rectangular region of interest can be represented by the upper left corner coordinate (x1, y1) and the lower right corner coordinate (x2, y2). The region image includes all pixel points within the coordinate range on the original DR image.
[0078] The arithmetic mean value of all pixel points in the region of interest can be calculated, that is, the region average pixel value. The region average pixel value can reflect the overall brightness of the region of interest.
[0079] The standard value of all pixel points in the region of interest can be calculated, that is, the region pixel value standard deviation. The region pixel value standard deviation can measure the dispersion degree of the gray value in the region of interest. The larger the region pixel value standard deviation, the wider the required window width.
[0080] The frequency of occurrence of each gray level (such as 0-255) in the region of interest can be counted to obtain a region gray histogram. The region gray histogram can represent the pixel number distribution of different gray levels.
[0081] The region pixel statistical features at least include the above-mentioned region gray histogram, region average pixel value and region pixel value standard deviation.
[0082] The embodiment accurately obtains the region pixel statistical features reflecting the region characteristics by calculating the gray histogram, average pixel value and pixel value standard deviation of the region of interest. These region pixel statistical features provide quantitative basis for subsequent adjustment of window width and window level, which helps to realize more fine gray mapping and image optimization.
[0083] S30, setting the region window width and window level data of the region of interest according to the region pixel statistical features.
[0084] It can be understood that the window width (WW) and window level (WL) of each region of interest can be calculated based on the region pixel statistical features to form the region window width and window level data. The window width refers to the range width of the gray value when the DR image is displayed. The larger the window width, the lower the image contrast; the smaller the window width, the higher the contrast. The window level can refer to the center gray value of the window width.
[0085] Optionally, step S30, that is, setting the region window width and window level data of the region of interest according to the region pixel statistical features, includes:
[0086] S301, setting the region gray pixel extreme value according to the region gray histogram;
[0087] S302, setting a region initial window width and a region window level according to the region gray scale pixel extreme value;
[0088] S303, determining a region type of the region of interest according to the region average pixel value and the region pixel value standard deviation, and obtaining a window width adjustment coefficient associated with the region type;
[0089] S304, determining a region window width of the region of interest according to the window width adjustment coefficient and the region initial window width;
[0090] S305, determining the region window width window level data according to the region window level and the region window width.
[0091] It can be understood that the region gray scale pixel extreme value includes the minimum value (MinVal) and the maximum value (MaxVal) in all pixel gray scale values in the window width range in the region of interest. The pixel value of the 5th percentile in the region gray scale histogram can be taken as the region window minimum value , and the pixel value of the 95th percentile in the region gray scale histogram can be taken as the region window maximum value . Then the initial window width is:
[0092]
[0093] The region window level is:
[0094]
[0095] The region window level is the center value of the display gray scale range of the region of interest, which determines the overall brightness of the region image.
[0096] The region type of the region of interest can be determined according to the region average pixel value and the region pixel value standard deviation. The region type includes two types of high density type (such as bone) and low density type (such as soft tissue, lung). The region pixel intensity of the high density type is generally high, and a narrower window width and a higher window level are suitable, which aims to compress the gray scale display range and enhance the contrast of the internal structure and edge of the bone, so as to facilitate the observation of small fractures and bone texture. Therefore, the window width adjustment coefficient of the window width adjustment coefficient α associated with the high density type can be set to 0.5-1.0 to narrow the window width and improve the image contrast. Thus, the region window width of the high density type can be expressed as:
[0097]
[0098] The pixel intensity of the region of the low-density type is generally low, and a wider window width and a lower window level are suitable to be used, aiming to expand the gray scale display range, improve the detail visibility of the low-contrast region, and avoid detail loss. Therefore, the window width adjustment coefficient β associated with the low-density type can be set to 1.0-1.5 to widen the window width and improve the detail visibility. Thus, the region window width of the low-density type can be represented as:
[0099]
[0100] Here, the region window width is the gray value range that can be covered by the region of interest.
[0101] After obtaining the region window width and the region window level of the region of interest, the region window width window level data of the region of interest can be generated according to the region window width and the region window level.
[0102] The embodiment analyzes the region gray histogram to determine the pixel extreme value, provides a basis for setting the initial window width and window level, and realizes accurate control of the DR image gray scale range; the region type is determined in combination with the region average pixel value and the standard deviation, and the window width adjustment coefficient is introduced for adaptive adjustment, and the display effect of different tissue types is further optimized. The embodiment improves the contrast and clarity of the region of interest in the medical image, and helps to improve the diagnostic accuracy.
[0103] S40, according to the preset mapping rule and the region window width window level data, the region image in each region of interest is gray mapped to obtain a region gray image.
[0104] Understandably, for each pixel in the region of interest, a linear or nonlinear gray scale transformation function can be used to map the original gray value to the optimized display range. The preset mapping rule can be set according to actual needs. The preset mapping rule is used to convert the original pixel gray value into a display gray value in combination with the window width and window level. Thus, the mapping parameters in the preset mapping rule are related to the display bit number of the display. After gray mapping, the region gray image of each region of interest can be obtained.
[0105] Optionally, step S40, i.e., the gray mapping of the region image in each region of interest according to the preset mapping rule and the region window width window level data to obtain a region gray image, comprises:
[0106] S401, determining the region window maximum value and the region window minimum value according to the region window width window level data;
[0107] S402, obtaining a first pixel point with a pixel value greater than or equal to the region window maximum value in the region image, and setting the pixel value of the first pixel point to a preset output gray maximum value;
[0108] S403. Obtain the second pixel point in the region image whose pixel value is less than or equal to the minimum value of the region window, and set the pixel value of the second pixel point to a preset minimum output grayscale value.
[0109] Understandably, the maximum value of the region window can be determined based on the region window width and window level data. And the minimum value of the region window. Where the maximum value of the region window is... for:
[0110]
[0111] WL indicates the area window level;
[0112] WW indicates the area window width;
[0113] Minimum value of the region window for:
[0114]
[0115] It can identify the first pixel in the region image whose pixel value is greater than or equal to the maximum value of the region window, and set the pixel value of the first pixel to the preset maximum output grayscale value. In some examples, it can iterate through each pixel P in the region of interest, if... Then the pixel value of pixel P is set to: .
[0116] It can identify the second pixel in the region image whose pixel value is less than or equal to the minimum value of the region window, and set the pixel value of the second pixel to a preset minimum output grayscale value. In some examples, it can iterate through each pixel P in the region of interest, if... Then the pixel value of pixel P is set to: .
[0117] Here, if the polarity of the DR image is negative, the default output grayscale maximum value is set to... =255, preset output grayscale minimum value is set to 255. =0. If the polarity flag of the DR image is positive, the preset output grayscale maximum value is set to 0. =0, preset output grayscale minimum value is set to 0. =255.
[0118] The embodiment provides clear conversion standards for pixel points of different gray levels in the DR image by determining the maximum value and the minimum value of the region window; for the case that the pixel value is higher or lower than the set window width range, the pixel value is adjusted to the preset maximum or minimum output gray value respectively, so that the image contrast is effectively enhanced. The method can not only highlight the key details of the region of interest, but also effectively avoid information loss, and improves the accuracy and efficiency of medical image diagnosis.
[0119] Optionally, the preset mapping rule includes a high-segment mapping rule and a low-segment mapping rule.
[0120] The step S40, i.e., the gray mapping of the region image in each region of interest according to the preset mapping rule and the region window width and window position data to obtain a region gray image, includes:
[0121] S404, determining a region window position, a region window maximum value and a region window minimum value according to the region window width and window position data.
[0122] S405, acquiring third pixel points in the region image, the pixel value of which is less than the region window maximum value and greater than or equal to the region window position.
[0123] S406, processing an initial high-segment pixel value of the third pixel point according to the high-segment mapping rule to obtain a high-segment pixel output value of the third pixel point.
[0124] S407, acquiring fourth pixel points in the region image, the pixel value of which is greater than the region window minimum value and less than the region window position.
[0125] S408, processing an initial low-segment pixel value of the fourth pixel point according to the low-segment mapping rule to obtain a low-segment pixel output value of the fourth pixel point.
[0126] Understandably, the region window position, the region window maximum value and the region window minimum value can be determined according to the region window width and window position data. The way of determining the region window maximum value and the region window minimum value can refer to the step S401, which will not be repeated here.
[0127] The embodiment is used for determining pixel output values of pixels in a window. The pixels in the window can be divided into two types, the first type of pixel value is greater than or equal to a region window level, which is a third pixel belonging to a high segment; the second type of pixel value is less than the region window level, which is a fourth pixel belonging to a low segment. For the third pixel, an initial high segment pixel value of the third pixel can be processed according to a high segment mapping rule to obtain a high segment pixel output value of the third pixel. For the fourth pixel, an initial low segment pixel value of the fourth pixel can be processed according to a low segment mapping rule to obtain a low segment pixel output value of the fourth pixel. The high segment mapping rule and the low segment mapping rule can be set according to actual needs.
[0128] The embodiment realizes more fine control of image gray values by refining the setting of the region window width and the region window level, and adopts different mapping rules for pixel values in different ranges; not only can the contrast of the region of interest be enhanced, but also the detail performance of the highlight area and the shadow area in the DR image can be effectively improved, so that the key information is more prominent. The embodiment processes pixel points of different brightness levels by using the high segment and the low segment mapping rules respectively, which can improve the visual resolution ability while maintaining the relevant information of the DR image, and is helpful to improve the accuracy and efficiency of DR image analysis.
[0129] Optionally, the high segment mapping rule comprises:
[0130]
[0131] wherein, represents the high segment pixel output value;
[0132] represents a preset output gray maximum value;
[0133] represents the region window maximum value;
[0134] represents an initial high segment pixel value of the third pixel;
[0135] represents a high segment linear mapping coefficient; wherein, , represents a region window level; is a shift parameter;
[0136] The low segment mapping rule comprises:
[0137]
[0138] wherein, represents the low segment pixel output value;
[0139] This indicates the preset minimum output grayscale value;
[0140] This represents the minimum value of the region window;
[0141] This represents the initial high-segment pixel value of the fourth pixel.
[0142] Represents the low-segment linear mapping coefficients; where, .
[0143] Understandably, in the high-segment mapping rules, if The closer Then its output value The closer . This is a shift parameter, related to the number of bits displayed on the monitor. If the monitor is 8-bit, It is 7. The value is 128. In the low-segment mapping rules, if... The closer Then its output value The closer .
[0144] This embodiment achieves fine-tuning of the grayscale values of DR images through precise high-segment and low-segment mapping rules, effectively enhancing the contrast and clarity of different regions of interest in DR images.
[0145] S50. Generate a target DR image based on all the grayscale images of the regions and the original DR image.
[0146] Understandably, the grayscale images generated from each region of interest can be directly overlaid on the original DR image to generate the target DR image. Users can simultaneously view the structural details of each region of interest on the target DR image without manually adjusting window width and level, greatly improving the efficiency and accuracy of image reading. Figure 4 As shown, Figure 4 Targeted DR images containing three regions of interest: the left lung, the thoracic spine, and the right lung. Comparison. Figure 3 and Figure 4 It can be seen that, Figure 3 Using a single global window width and level setting makes it difficult to clearly display tissues with vastly different densities simultaneously. Figure 4 Each region of interest uses independent window level and window width parameters, which can better display the details of the region of interest.
[0147] This embodiment automatically acquires the pixel statistical features of user-defined regions of interest and sets the optimal window width and level for local grayscale mapping, thereby improving image contrast and detail visibility in each region of interest. By fusing multiple optimized regional grayscale images into the original DR image, a target DR image that balances overall and local details is generated. This embodiment improves the display effect of DR images, helps users to simultaneously observe and diagnose different regions of interest, and improves the efficiency and accuracy of image interpretation.
[0148] Optionally, step S50, namely generating the target DR image based on all the grayscale images of the regions and the original DR image, includes:
[0149] S501. Superimpose all the grayscale images of the regions onto the original DR image to obtain the target DR image.
[0150] Understandably, after obtaining the grayscale images of each region, each region's grayscale image can be precisely placed back into its corresponding position in the original DR image. After all the region grayscale images are superimposed, the target DR image is obtained.
[0151] This embodiment achieves an organic fusion of local detail enhancement and overall image structure by precisely overlaying optimized grayscale images of each region of interest onto the original DR image. While preserving the original anatomical background information, the target DR image highlights the tissue features of different regions of interest, facilitating global observation and focused comparative analysis by the user.
[0152] It should be understood that the sequence number of each step in the above embodiments does not imply 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 invention.
[0153] In one embodiment, a DR image display device is provided, which corresponds one-to-one with the DR image display method described in the above embodiments. For example... Figure 5 As shown, the DR image display device includes:
[0154] The region setting module 10 is used to receive a region setting instruction input by the user and set at least one region of interest on the original DR image according to the region setting instruction;
[0155] The statistical feature acquisition module 20 is used to acquire the regional pixel statistical features of each region of interest.
[0156] The window width and window level setting module 30 is used to set the region window width and window level data of the region of interest according to the region pixel statistical characteristics.
[0157] The gray scale mapping module 40 is configured to perform gray scale mapping on the region image in each of the interest regions according to a preset mapping rule and the region window width and window level data, to obtain a region gray scale image.
[0158] The target DR image generation module 50 is configured to generate a target DR image according to all the region gray scale images and the original DR image.
[0159] Optionally, the statistical feature acquisition module 20 comprises:
[0160] The region image acquisition unit is configured to acquire the region image of the interest region.
[0161] The image index calculation unit is configured to calculate a region gray scale histogram, a region average pixel value and a region pixel value standard deviation of the region image.
[0162] The image statistical feature acquisition unit is configured to determine the region pixel statistical feature according to the region gray scale histogram, the region average pixel value and the region pixel value standard deviation.
[0163] Optionally, the window width and window level setting module 30 comprises:
[0164] The pixel extreme value acquisition unit is configured to set a region gray scale pixel extreme value according to the region gray scale histogram.
[0165] The first setting unit is configured to set a region initial window width and a region window level according to the region gray scale pixel extreme value.
[0166] The window width adjustment coefficient acquisition unit is configured to determine a region type of the interest region according to the region average pixel value and the region pixel value standard deviation, and acquire a window width adjustment coefficient associated with the region type.
[0167] The second setting unit is configured to determine a region window width of the interest region according to the window width adjustment coefficient and the region initial window width.
[0168] The region window width and window level data determination unit is configured to determine the region window width and window level data according to the region window level and the region window width.
[0169] Optionally, the gray scale mapping module 40 comprises:
[0170] The window extreme value determination unit is configured to determine a region window maximum value and a region window minimum value according to the region window width and window level data.
[0171] The first output unit is configured to acquire a first pixel point in the region image, whose pixel value is greater than or equal to the region window maximum value, and set a pixel value of the first pixel point as a preset output gray scale maximum value.
[0172] The second output unit is configured to obtain second pixel points in the region image with pixel values less than or equal to the minimum value of the region window, and set the pixel values of the second pixel points as a preset minimum output gray scale value.
[0173] Optionally, the preset mapping rule includes a high-segment mapping rule and a low-segment mapping rule; and the gray scale mapping module 40 includes:
[0174] The window level and window extreme value determination unit is configured to determine a region window level, a maximum value of a region window and a minimum value of the region window according to the region window width and window level data;
[0175] The third pixel point obtaining unit is configured to obtain third pixel points in the region image with pixel values less than the maximum value of the region window and greater than or equal to the region window level;
[0176] The third output unit is configured to process initial high-segment pixel values of the third pixel points according to the high-segment mapping rule to obtain high-segment pixel output values of the third pixel points;
[0177] The fourth pixel point obtaining unit is configured to obtain fourth pixel points in the region image with pixel values greater than the minimum value of the region window and less than the region window level;
[0178] The fourth output unit is configured to process initial low-segment pixel values of the fourth pixel points according to the low-segment mapping rule to obtain low-segment pixel output values of the fourth pixel points.
[0179] Optionally, the high-segment mapping rule includes:
[0180]
[0181] wherein, represents the high-segment pixel output value;
[0182] represents a preset maximum output gray scale value;
[0183] represents the maximum value of the region window;
[0184] represents the initial high-segment pixel value of the third pixel points;
[0185] is a shift parameter;
[0186] represents a high-segment linear mapping coefficient; wherein, , represents the region window level;
[0187] The low-segment mapping rule includes:
[0188]
[0189] wherein, represents the low segment pixel output value;
[0190] represents a preset output gray extremum minimum value;
[0191] represents the region window minimum value;
[0192] represents the initial high segment pixel value of the fourth pixel point;
[0193] represents a low segment linear mapping coefficient; wherein, .
[0194] Optionally, the target DR image generation module 50 comprises:
[0195] a target DR image generation unit, configured to superimpose all the region gray images on the original DR image to obtain the target DR image.
[0196] The specific definition of the DR image display device can refer to the definition of the DR image display method in the foregoing, and will not be described here. Each module in the DR image display device can be realized by software, hardware, and a combination thereof, in whole or in part. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operation corresponding to each module.
[0197] In one embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 6 The computer device comprises a processor, a memory, a network interface, and a database connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store data related to the DR image display method. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a DR image display method.
[0198] In an embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the DR image display method in the above embodiment when executing the computer program. For the sake of brevity, the functions of the modules / units in the DR image display device in this embodiment will not be repeated here. Alternatively, the processor implements the functions of the modules / units in the DR image display device in this embodiment when executing the computer program. For the sake of brevity, the functions of the modules / units in the DR image display device in this embodiment will not be repeated here.
[0199] In an embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executable on a processor to implement the DR image display method in the above embodiment. For the sake of brevity, the functions of the modules / units in the DR image display device in this embodiment will not be repeated here. Alternatively, the computer program is executable on the processor to implement the functions of the modules / units in the DR image display device in this embodiment. For the sake of brevity, the functions of the modules / units in the DR image display device in this embodiment will not be repeated here.
[0200] Those skilled in the art can understand that all or part of the processes in the above embodiments can be completed by a computer program instructing related hardware, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, the processes of the above embodiments can be included. Any reference to memory, storage, database or other medium in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct RAM bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0201] Those skilled in the art can clearly understand that, for the sake of brevity and simplicity of description, only the division of the above functional units and modules is exemplified, and in actual applications, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above described functions.
[0202] The above-described embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method for displaying DR images, characterized in that, include: Receive a region setting instruction input by the user, and set at least one region of interest on the original DR image according to the region setting instruction; Obtain the regional pixel statistical features of each region of interest; Set the region window width and window level data of the region of interest based on the region pixel statistical characteristics; According to the preset mapping rules and the region window width and window level data, the region image within each region of interest is grayscale mapped to obtain a region grayscale image; the preset mapping rules include high-segment mapping rules and low-segment mapping rules. Generate a target DR image based on all the grayscale images of the said regions and the original DR image; The step of performing grayscale mapping on the region image within each region of interest according to a preset mapping rule and the region window width and window level data to obtain a region grayscale image includes: The region window level, the maximum region window value, and the minimum region window value are determined based on the region window width and window level data. Obtain the third pixel in the region image whose pixel value is less than the maximum value of the region window and greater than or equal to the region window position; The initial high-segment pixel value of the third pixel is processed according to the high-segment mapping rule to obtain the high-segment pixel output value of the third pixel. Obtain the fourth pixel in the region image whose pixel value is greater than the minimum value of the region window and less than the region window position; The initial low-segment pixel value of the fourth pixel is processed according to the low-segment mapping rule to obtain the low-segment pixel output value of the fourth pixel. The high-segment mapping rules include: in, This represents the output value of the high-segment pixels; This indicates the preset maximum grayscale value; This represents the maximum value of the region window; This represents the initial high-segment pixel value of the third pixel. Denotes the coefficients of the high-segment linear mapping; where, , Indicates the window level of the region; For shift parameters; The low-segment mapping rules include: in, This represents the output value of the lower pixel segment; This indicates the preset minimum output grayscale value; This represents the minimum value of the region window; This represents the initial high-segment pixel value of the fourth pixel. Represents the low-segment linear mapping coefficients; where, .
2. The DR image display method according to claim 1, characterized in that, The step of obtaining the region pixel statistical features of each region of interest includes: Obtain the region image of the region of interest; Calculate the region grayscale histogram, the region average pixel value, and the region pixel value standard deviation of the image region. The pixel statistical characteristics of the region are determined based on the region's grayscale histogram, the region's average pixel value, and the region's pixel value standard deviation.
3. The DR image display method according to claim 2, characterized in that, The step of setting the region window width and window level data of the region of interest based on the region pixel statistical features includes: Set the extreme values of grayscale pixels in the region based on the region's grayscale histogram; The initial window width and window level of the region are set according to the extreme values of grayscale pixels in the region. The region type of the region of interest is determined based on the average pixel value of the region and the standard deviation of the pixel value of the region, and the window width adjustment coefficient associated with the region type is obtained. The region window width of the region of interest is determined based on the window width adjustment coefficient and the initial window width of the region. The region window width and window level data are determined based on the region window level and the region window width.
4. The DR image display method according to any one of claims 1 to 3, characterized in that, The step of performing grayscale mapping on the region image within each region of interest according to a preset mapping rule and the region window width and window level data to obtain a region grayscale image includes: The maximum and minimum values of the region window are determined based on the region window width and window level data. Obtain the first pixel in the region image whose pixel value is greater than or equal to the maximum value of the region window, and set the pixel value of the first pixel to a preset maximum output grayscale value; Obtain the second pixel in the region image whose pixel value is less than or equal to the minimum value of the region window, and set the pixel value of the second pixel to a preset minimum output grayscale value.
5. The DR image display method according to any one of claims 1 to 3, characterized in that, The step of generating a target DR image based on all the grayscale images of the regions and the original DR image includes: The grayscale images of all the regions are superimposed on the original DR image to obtain the target DR image.
6. A DR image display device, characterized in that, include: The region setting module is used to receive region setting instructions input by the user and set at least one region of interest on the original DR image according to the region setting instructions. The statistical feature acquisition module is used to acquire the regional pixel statistical features of each region of interest. The window width and window level setting module is used to set the region window width and window level data of the region of interest based on the region pixel statistical characteristics. The grayscale mapping module is used to perform grayscale mapping on the region image within each region of interest according to a preset mapping rule and the region window width and window level data to obtain a region grayscale image; the preset mapping rule includes a high-segment mapping rule and a low-segment mapping rule. The target DR image generation module is used to generate a target DR image based on all the grayscale images of the said regions and the original DR image; The grayscale mapping module includes: The window level and window extreme value determination unit is used to determine the regional window level, the maximum value of the regional window, and the minimum value of the regional window based on the regional window width and window level data. The third pixel point acquisition unit is used to acquire the third pixel point in the region image whose pixel value is less than the maximum value of the region window and greater than or equal to the region window position; The third output unit is used to process the initial high-segment pixel value of the third pixel according to the high-segment mapping rule, and obtain the high-segment pixel output value of the third pixel. The fourth pixel unit is used to acquire the fourth pixel in the region image whose pixel value is greater than the minimum value of the region window and less than the region window position; The fourth output unit is used to process the initial low-segment pixel value of the fourth pixel according to the low-segment mapping rule to obtain the low-segment pixel output value of the fourth pixel. The high-segment mapping rules include: in, This represents the output value of the high-segment pixels; This indicates the preset maximum grayscale value; This represents the maximum value of the region window; This represents the initial high-segment pixel value of the third pixel. Denotes the coefficients of the high-segment linear mapping; where, , Indicates the window level of the region; For shift parameters; The low-segment mapping rules include: in, This represents the output value of the lower pixel segment; This indicates the preset minimum output grayscale value; This represents the minimum value of the region window; This represents the initial high-segment pixel value of the fourth pixel. Represents the low-segment linear mapping coefficients; where, .
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the DR image display method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the DR image display method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Digital radiography (DR) contrast balancing method and system
CN104200446A
Image characteristic oriented tone mapping for high dynamic range images
US20090317017A1