An AI technology-based medical image printing output optimization method

By using AI technology to process image pixel matrices and metadata, the problem of insufficient coordination in the spatial layout of text and images was solved, achieving spatial coordination of text and image areas and improving the quality and readability of printed output.

CN121143736BActive Publication Date: 2026-02-24JIANGSU MAIRUIKE CELL BIOTECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511666875.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-02-24
Estimated Expiration
2045-11-14

AI Technical Summary

Technical Problem

Current medical image printing technology lacks intelligent analysis of the spatial layout coordination of images and text, which makes it easy for field information sets to overlap with key anatomical areas, reducing text readability and affecting print output quality.

Method used

Using AI technology, the image pixel matrix and metadata information are extracted to generate structural partition data and field information sets. The occupancy weight value and arrangement priority value are calculated, spatial conflicts are dynamically evaluated, grayscale difference compensation is performed, and compatible printing instruction data is generated.

Benefits of technology

It achieves spatial coordination of text and image areas, improves the occlusion rate of text areas and image structures, ensures the complete presentation of image structures and the readability of text content, and enhances the fidelity of printing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121143736B_ABST
    Figure CN121143736B_ABST
Patent Text Reader

Abstract

The application discloses a medical image printing output optimization method based on AI technology and relates to the technical field of medical image processing, which comprises the following steps: based on a DICOM image file, extracting an image pixel matrix and metadata information, inputting the image pixel matrix into a structure segmentation network to generate structure partition data, and parsing the metadata information into a field information set, wherein the field information set comprises a patient information field, an examination parameter field and a device information field; according to the spatial position coordinates and the pixel density values of each partition in the structure partition data, calculating the space-occupying weight values of each partition, and generating a layout frame data containing the target boundaries of each partition; and inputting the field information set into a layout coding network to generate the arrangement priority values of each field; through adaptive arrangement of the structure partition data and the field information set and brightness correction of the layers, the application realizes the space coordination of the graphic-text layout and the content fidelity of the printing output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, and more specifically to a method for optimizing medical image printing output based on AI technology. Background Technology

[0002] In the field of medical image printing, with the widespread application of the DICOM format in medical imaging, the quality requirements for image printing output in clinical diagnostic scenarios are constantly increasing. It is necessary to clearly present the detailed information carried by the image pixel matrix on paper, while simultaneously including key fields such as patient identity, examination parameters, and equipment information from metadata, to ensure the synchronous delivery of image content and text descriptions. However, traditional printing processes generally only perform layered stitching of image and text content, lacking intelligent analysis of the spatial layout coordination of images and text, making the image and text arrangement process often rely on manual layout and template presets.

[0003] Some existing methods can embed field information sets in fixed positions using predefined templates and employ high-resolution image rendering algorithms to ensure the clarity of the main image, thus reducing the risk of blurring in printed output to some extent. Other solutions perform region clipping based on partitioned masks to avoid large areas of text obscuring the main image area. These methods have advantages in terms of image clarity and basic layout consistency, ensuring basic image readability and page neatness.

[0004] However, these methods fail to adapt the layout by combining the content characteristics of structural partition data and field information sets, and cannot dynamically evaluate the impact of placeholder weight values ​​and layout priority values ​​on layout conflicts, which makes it easy for fields to overlap with key anatomical regions when embedded. At the same time, the lack of a mechanism to handle the grayscale differences between text and image regions can easily lead to a decrease in text readability and local color deviation, thereby affecting the output quality after the final print instruction data is generated. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method for optimizing medical image printing output based on AI technology, the method comprising:

[0006] S11, Based on the DICOM image file, extract the image pixel matrix and metadata information, input the image pixel matrix into the structural segmentation network to generate structural partition data, and parse the metadata information into a field information set, which includes patient information field, examination parameter field and device information field;

[0007] S12, based on the spatial coordinates and pixel density values ​​of each partition in the structural partition data, calculate the occupancy weight value of each partition and generate layout framework data containing the target boundaries of each partition; and input the field information set into the layout coding network to generate the layout priority value of each field;

[0008] S13. Based on the layout priority value and the occupancy weight value, determine whether there is a spatial conflict between the layout framework data and the target layout area of ​​each field. If there is a spatial conflict, call the layout decision network to generate field embedding coordinate data and generate layout configuration data containing structural partition data and field embedding coordinate data.

[0009] S14, perform layer overlay on the image pixel matrix through layout configuration data to generate a fused layer containing text area and image area, and calculate the gray difference compensation value of the overlapping block of text area and image area during the overlay process, and apply the gray difference compensation value to the overlapping block to generate gray-corrected fused layer.

[0010] S15 translates the grayscale-corrected blended layer into a print control file, and combines the print control file to generate print instruction data compatible with the print driver.

[0011] Furthermore, the step of inputting the image pixel matrix into the structure segmentation network to generate structure partitioning data includes:

[0012] S111, extract the grayscale value, texture gradient value and spatial coordinates of all pixels in the image pixel matrix;

[0013] S112, concatenates grayscale values, texture gradient values ​​and spatial coordinates to construct a multimodal image tensor;

[0014] S113 inputs the multimodal image tensor into the structural segmentation network and outputs structural partitioning data containing the boundaries of anatomical regions.

[0015] Furthermore, the training process of the structure segmentation network includes:

[0016] S113.1, Obtain a medical image training set containing pixel-level structural labels;

[0017] S113.2, divide the medical image training set into a training subset and a validation subset;

[0018] S113.3, train the residual U-Net network based on the training subset and output the initial segmentation model;

[0019] S113.4 evaluates the segmentation accuracy of the initial segmentation model based on the validation subset, and outputs the structural segmentation network when the segmentation accuracy is greater than or equal to the accuracy threshold.

[0020] Furthermore, the step of inputting the field information set into the layout encoding network to generate layout priority values ​​includes:

[0021] S121, Assign field category labels to each field in the field information set;

[0022] S122, Calculate the misread rate and occlusion rate of each field in the historical printed samples;

[0023] S123 concatenates the field category label, misread rate value, and occlusion rate value into a field feature vector, inputs it into the layout encoding network, and outputs the layout priority value corresponding to each field.

[0024] Furthermore, the training process of the layout coding network includes:

[0025] S123.1, Obtain a historical print sample set containing field spatial coordinates, overlapping area, and readability labels;

[0026] S123.2, input the field spatial coordinates into the location encoding subnetwork, input the overlapping area into the area encoding subnetwork, and input the readability label into the readability encoding subnetwork;

[0027] S123.3 concatenates the three types of encoded outputs into a fully connected network;

[0028] S123.4, Minimize the readability prediction error, and output the layout coding network when the readability prediction error is less than or equal to the error threshold.

[0029] Furthermore, the process of calling the layout decision network to generate fields embedding coordinate data includes:

[0030] S131, based on the arrangement priority value, filter out the fields with the highest priority ranking N;

[0031] S132, extract the target layout area and spatial boundaries in the layout framework data of each priority field;

[0032] S133 concatenates the target layout area and spatial boundary into a conflict feature vector, inputs it into the layout decision network, and outputs the field embedding coordinate data of each field.

[0033] Furthermore, the training process of the layout decision network includes:

[0034] S133.1, Obtain the training set containing the initial coordinates and manually corrected coordinates;

[0035] S133.2, concatenate the initial coordinate difference vector with the field category embedding vector and input it into the attention network;

[0036] S133.3, Calculate the set of predicted candidate coordinates based on the attention weights output by the attention network;

[0037] S133.4 Select the coordinates with the smallest prediction error from the candidate coordinate set and embed them as fields in the coordinate data.

[0038] Furthermore, the calculation of the grayscale difference compensation value includes:

[0039] S141, extract the overlapping pixel blocks of the text area and the image area in the blended layer;

[0040] S142, calculate the gray difference between the average gray value of the overlapping pixel block and the gray value of the text region's gray encoding;

[0041] S143, apply the grayscale difference as a grayscale difference compensation value to the overlapping pixel block to generate a grayscale-corrected blended layer.

[0042] Furthermore, the generation of print instruction data compatible with the print driver includes:

[0043] S151, parse the print driver interface file to obtain print resolution parameters and color space parameters;

[0044] S152, perform resolution resampling on the grayscale-corrected blended layer according to the print resolution parameters and color conversion according to the color space parameters;

[0045] S153 encapsulates the resolution resampling results and color conversion results into a print control file and translates them into print instruction data.

[0046] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0047] This invention incorporates the feature information of structural partition data and field information set into the pre-layout processing flow by jointly analyzing the image pixel matrix and metadata information, so as to achieve spatial coordination distribution between text content and image area boundaries, thereby reducing the occlusion rate of text area and image structure and ensuring the complete presentation of image structure.

[0048] In addition, this invention also determines spatial conflicts based on layout priority values ​​and occupancy weight values, enabling the layout framework data to dynamically match the target layout area of ​​each field, thereby ensuring layout compatibility between text content and image structure, and improving the space utilization of field layout positions, thus achieving stable output of image-text fusion layout.

[0049] Furthermore, this invention performs layer overlay based on the layout configuration data, applies grayscale difference compensation values ​​to the overlapping areas of text and images to achieve brightness consistency correction of the fused layers, and generates print instruction data that can be directly output by combining print resolution parameters and color space parameters, thereby improving the fidelity of image details and the readability of text content in the print results.

[0050] In summary, this invention achieves spatial coordination of text and image layout and fidelity of printed output by combining structural partition data and field information sets for adaptive layout and layer brightness correction. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0052] Figure 1 The flowchart illustrates a method for optimizing medical image printing output based on AI technology, as provided in Embodiment 1 of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Example 1

[0054] Please see Figure 1 As shown in the figure, this embodiment discloses a method for optimizing medical image printing output based on AI technology, the method including:

[0055] S11, Based on the DICOM image file, extract the image pixel matrix and metadata information, input the image pixel matrix into the structural segmentation network to generate structural partition data, and parse the metadata information into a field information set, which includes patient information field, examination parameter field and device information field;

[0056] It should be noted that the DICOM image files are generated by acquisition modules deployed on medical imaging equipment (including CT, MRI, and ultrasound equipment) and retrieved through the hospital's image archiving system. The metadata information consists of text-based annotation data fields embedded in the DICOM image files, extracted using a standard DICOM tag parsing interface.

[0057] Specifically, the step of inputting the image pixel matrix into the structure segmentation network to generate structure partitioning data includes:

[0058] S111, extract the grayscale value, texture gradient value and spatial coordinates of all pixels in the image pixel matrix;

[0059] It should be noted that the image pixel matrix is ​​a two-dimensional matrix, with row indices in the vertical direction and column indices in the horizontal direction. The matrix elements are pixel grayscale values, with a resolution of 512×512 and a bit depth of 16 bits.

[0060] Specifically, grayscale values ​​are the original numerical values ​​of the elements within the matrix; spatial coordinates are obtained by converting the row and column indices of the pixels with the pixel spacing; and texture gradient values ​​are obtained by calculating the difference in grayscale values ​​between adjacent pixels, which is used to characterize the local texture intensity.

[0061] S112, concatenates grayscale values, texture gradient values ​​and spatial coordinates to construct a multimodal image tensor;

[0062] It should be noted that the structural partitioning data is a pixel-level segmentation result, and the output is a region mask with the same size as the image pixel matrix. Each pixel corresponds to a structural category label, which includes anatomical regions such as bones, soft tissues, and cavities.

[0063] S113 inputs the multimodal image tensor into the structural segmentation network and outputs structural partitioning data containing the boundaries of anatomical regions.

[0064] It should be noted that the medical image training set is manually annotated by medical imaging experts and includes an image pixel matrix and corresponding pixel structure labels. The pixel structure labels are stored in the form of a mask of the same size, and the label value is the anatomical region classification number.

[0065] Specifically, the training process of the structure segmentation network includes:

[0066] S113.1, Obtain a medical image training set containing pixel-level structural labels;

[0067] It should be noted that the medical image training set is manually annotated by medical imaging experts and includes an image pixel matrix and corresponding pixel structure labels. The pixel structure labels are stored in the form of a mask of the same size, and the label value is the anatomical region classification number.

[0068] S113.2, divide the medical image training set into a training subset and a validation subset;

[0069] It should be noted that the ratio of the training subset to the validation subset is 8:2. During the partitioning process, it is ensured that the distribution of the number of samples of each category in the training subset and the validation subset is basically the same to avoid class bias during network training.

[0070] S113.3, train the residual U-Net network based on the training subset and output the initial segmentation model;

[0071] During training, the image pixel matrix in the training subset is used as input, and the pixel structure label is used as supervision signal. The network parameters are optimized through backpropagation, and the cross-entropy loss function is used to minimize the classification error between the prediction mask and the pixel structure label.

[0072] S113.4 evaluates the segmentation accuracy of the initial segmentation model based on the validation subset, and outputs the structural segmentation network when the segmentation accuracy is greater than or equal to the accuracy threshold.

[0073] In one specific embodiment, the segmentation accuracy value is obtained by calculating the intersection-union ratio (IOU) between the predicted mask and the pixel structure label, expressed as: In the formula, The number of pixels that are predicted to be positive and actually are positive. This represents the number of pixels that were predicted to be positive but were actually negative. This represents the number of pixels that were predicted to be negative but actually turned out to be positive.

[0074] It should be noted that when the segmentation accuracy (IOU) is ≥0.85, the initial segmentation model is deemed to have reached the usable standard, and its parameters are fixed as the structural segmentation network.

[0075] S12, based on the spatial coordinates and pixel density values ​​of each partition in the structural partition data, calculate the occupancy weight value of each partition and generate layout framework data containing the target boundaries of each partition; and input the field information set into the layout coding network to generate the layout priority value of each field;

[0076] It should be noted that: the structural partitioning data is the region mask output in step S11, containing a region category label for each pixel, which can be obtained from the DICOM image file. The field information set is the text data field output in step S11, containing patient information field, examination parameter field, and device information field, extracted by the DICOM label parsing interface.

[0077] Specifically, the step of inputting the field information set into the layout coding network to generate layout priority values ​​includes:

[0078] S121, Assign field category labels to each field in the field information set;

[0079] The field information set includes patient information field, examination parameter field and equipment information field, which are used to represent identity information, medical examination parameters and equipment source parameters, respectively. In the subsequent calculation of priority value, risk weights need to be distinguished for different fields by category.

[0080] In one specific embodiment, the numerical encoding of the field category label is obtained by mapping from the category text label through a preset mapping table. The preset mapping table is manually set based on the statistical results of the misread rate and occlusion rate of various fields in the historical printed sample set, mapping the identity field to the value 2, the inspection parameter field to the value 1, and the device parameter field to the value 0.

[0081] It should be noted that: field category labels are generated by keyword matching of the field text content, and the label category is used to characterize the importance level of the field when printing.

[0082] S122, Calculate the misread rate and occlusion rate of each field in the historical printed samples;

[0083] In one specific embodiment, the misread rate is the number of fields in the historical printed sample that were manually verified as misread divided by the total number of read fields, and the occlusion rate is the area of ​​overlap between the field and the image area divided by the total area of ​​the field.

[0084] It should be noted that the historical print samples mentioned are past print records archived within the institute and retrieved from the print archive database.

[0085] S123 concatenates the field category label, misread rate value, and occlusion rate value into a field feature vector, inputs it into the layout encoding network, and outputs the layout priority value corresponding to each field.

[0086] In one specific embodiment, the arrangement priority value is calculated to obtain the comprehensive score using the following formula:

[0087] Represented as: In the formula, As the priority value for arrangement, Numerical encoding for field category labels, This is the misread rate value. This is the occlusion rate value. , , These are predetermined weighting factors;

[0088] It should be noted that: , , The correct reading rate of fields in historical printed samples is optimized and determined, with a weight sum of 1.

[0089] Specifically, the training process of the layout coding network includes:

[0090] S123.1, Obtain a historical print sample set containing field spatial coordinates, overlapping area, and readability labels;

[0091] It should be noted that: the field spatial coordinates are the pixel coordinates of the top left corner of the field in the print template, the overlap area is the number of pixels that overlap between the field area and the image area, and the readability label is a binary label (readable / unreadable) evaluated manually, all of which are derived from the historical print sample set;

[0092] S123.2, input the field spatial coordinates into the location encoding subnetwork, input the overlapping area into the area encoding subnetwork, and input the readability label into the readability encoding subnetwork;

[0093] It should be noted that all three types of sub-networks are shallow networks consisting of one convolutional layer and one fully connected layer, respectively learning spatial location features, coverage features, and semantic readability features;

[0094] S123.3 concatenates the three types of encoded outputs into a fully connected network;

[0095] It should be noted that the concatenated joint feature vector is mapped to the regression output node for predicting the priority value of the arrangement through a fully connected network.

[0096] S123.4, Minimize the readability prediction error, and output the layout coding network when the readability prediction error is less than or equal to the error threshold;

[0097] In one specific embodiment, numerical encoding of the tags is performed based on the readability tags, generating a one-hot tag vector of the same length as the number of categories according to the readability tags of each sample;

[0098] It should be noted that in a one-hot label vector, only the element corresponding to the true category is 1, and the rest are 0. This is used to convert discrete labels into a numerical representation that can be aligned with probability values.

[0099] The output vector of the concatenated position encoding subnetwork, area encoding subnetwork and readability encoding subnetwork is input into the fully connected network to obtain a readability probability vector with a length equal to the number of categories, where each element represents the predicted probability value of a sample belonging to the corresponding category.

[0100] It should be noted that the readability probability vector is normalized by the Softmax function so that each element is in the interval [0,1] and the sum of all elements is 1.

[0101] The mean squared error loss between the readability tag vector and the readability probability vector is calculated as the readability prediction error, and the network parameters are optimized through backpropagation.

[0102] Represented as: In the formula, For readability prediction error, For the sample size, For the number of readability categories, For the first The sample at the th The one-hot tag value of the class. For the first The sample at the th The predicted probability value of the class;

[0103] When all training samples are on the validation set When the error is less than or equal to the preset error threshold, the current layout encoding network is output as the final trained network model.

[0104] S13. Based on the layout priority value and the occupancy weight value, determine whether there is a spatial conflict between the layout framework data and the target layout area of ​​each field. If there is a spatial conflict, call the layout decision network to generate field embedding coordinate data and generate layout configuration data containing structural partition data and field embedding coordinate data.

[0105] It should be noted that the spatial conflict refers to the state in which the boundary of the target layout area of ​​the field overlaps with the boundary of the anatomical area in the layout framework data. The determination criterion is whether the boundary overlap area value of the two is greater than zero.

[0106] Specifically, the process of calling the layout decision network to generate fields embedding coordinate data includes:

[0107] S131, based on the arrangement priority value, filter out the fields with the highest priority ranking N;

[0108] It should be noted that the priority ranking is sorted from high to low according to the arrangement priority value, N is a preset threshold, and the average number of fields is set to 10 based on the statistical distribution of the historical printed sample set, which is used to control the computational cost of subsequent conflict resolution.

[0109] S132, extract the target layout area and spatial boundaries in the layout framework data of each priority field;

[0110] It should be noted that: the target layout area is defined by the preset printing template and is a rectangular area coordinate range; the spatial boundary is the minimum bounding rectangle boundary coordinate of each partition of the corresponding structural partition data in the layout framework data, which is used for conflict detection;

[0111] S133 concatenates the target layout area and spatial boundary into a conflict feature vector, inputs it into the layout decision network, and outputs the field embedding coordinate data of each field.

[0112] It should be noted that the conflict feature vector includes six types of geometric features: the center coordinates of the target layout area, the width and height dimensions, the center coordinates of the spatial boundary, and the width and height dimensions. After normalization, these features are used as the input to the layout decision network.

[0113] Specifically, the training process of the layout decision network includes:

[0114] S133.1, Obtain the training set containing the initial coordinates and manually corrected coordinates;

[0115] It should be noted that the initial coordinates are the preset printing positions of the fields on the template, and the manually corrected coordinates are the repositioned printing positions after manually avoiding conflicts, which are obtained by collecting past manual correction records.

[0116] S133.2, concatenate the initial coordinate difference vector with the field category embedding vector and input it into the attention network;

[0117] The initial coordinate difference vector is obtained by calculating the difference between the initial coordinates and the manually corrected coordinates, and is expressed as:

[0118] ;

[0119] for The initial coordinate difference vector of each field. , The x and y coordinates are manually corrected. , The x and y coordinates are the initial coordinates;

[0120] It should be noted that the field category embedding vector is a dense vector generated by the embedding layer after the field category label is encoded by looking up a table.

[0121] S133.3, Calculate the set of predicted candidate coordinates based on the attention weights output by the attention network;

[0122] In one specific embodiment, the attention weight is used to measure the contribution of each candidate location to the coordinate offset prediction, and the calculation formula is as follows:

[0123] ;

[0124] In the formula, For the first Attention weights for each candidate position, For the first in the attention network Hidden layer vectors, , These are trainable parameters;

[0125] It should be noted that attention weights Higher-ranking candidate positions are more likely to be selected as the final field for embedding coordinate data;

[0126] S133.4 Select the coordinates with the smallest prediction error from the candidate coordinate set and embed them as fields in the coordinate data.

[0127] In one specific embodiment, the prediction error is obtained by calculating the Euclidean distance between the candidate coordinates and the manually corrected coordinates, expressed as:

[0128] ;

[0129] In the formula, For the first The prediction error for each candidate position. for Candidate coordinates of candidate positions, The coordinates were manually corrected.

[0130] It should be noted that: selection The smallest candidate coordinate is embedded as the final field in the coordinate data output;

[0131] S14, perform layer overlay on the image pixel matrix through layout configuration data to generate a fused layer containing text area and image area, and calculate the gray difference compensation value of the overlapping block of text area and image area during the overlay process, and apply the gray difference compensation value to the overlapping block to generate gray-corrected fused layer.

[0132] It should be noted that the layout configuration data includes structural partition data and field embedding coordinate data, which are used to determine the embedding position of the text area in the image pixel matrix to achieve image-text compositing.

[0133] Specifically, the calculation of the grayscale difference compensation value includes:

[0134] S141, extract the overlapping pixel blocks of the text area and the image area in the blended layer;

[0135] It should be noted that the overlapping pixel block is obtained by calculating the intersection area of ​​the rectangular boundary of the text region and the rectangular boundary of the corresponding partition of the structural partition data in the image region. All pixels within the overlapping area are output as overlapping pixel blocks.

[0136] S142, calculate the gray difference between the average gray value of the overlapping pixel block and the gray value of the text region's gray encoding;

[0137] In one specific embodiment, the average gray value is obtained by summing the gray values ​​of all pixels in the overlapping pixel block and then dividing by the number of pixels;

[0138] The grayscale encoding value of the text region is a preset single-channel grayscale value when the text region is generated, which is used to uniformly control the color depth of the text strokes.

[0139] S143, apply the grayscale difference as a grayscale difference compensation value to the overlapping pixel block to generate a grayscale-corrected blended layer.

[0140] It should be noted that the compensation operation involves adding a grayscale difference compensation value to the grayscale value of each pixel in the overlapping pixel block, and cropping the result to the range of 0 to 255 to maintain pixel validity.

[0141] The grayscale-corrected blending layer is used to ensure that the text area remains readable under different background grayscale levels.

[0142] S15 translates the grayscale-corrected blended layer into a print control file, and combines the print control file to generate print instruction data compatible with the print driver.

[0143] It should be noted that the print control file is an intermediate format containing image data and print meta-parameters, used to transmit executable print information to the print driver.

[0144] Specifically, the generation of print instruction data compatible with the print driver includes:

[0145] S151, parse the print driver interface file to obtain print resolution parameters and color space parameters;

[0146] It should be noted that the print driver interface file is a configuration description file provided by the corresponding print driver in the operating system. It uses structured markup language to record resolution parameters and color space parameters. The print resolution parameter is the number of pixels per inch (dpi) horizontally and vertically, and the color space parameter is the color channel encoding format supported by the device, such as RGB or CMYK.

[0147] S152, perform resolution resampling on the grayscale-corrected blended layer according to the print resolution parameters and color conversion according to the color space parameters;

[0148] In one specific embodiment, the resolution resampling is performed by scaling the pixel matrix of the fused layer using a bilinear interpolation algorithm to ensure that the number of pixels in the horizontal and vertical directions meets the following requirements:

[0149] ;

[0150] In the formula, , These are the original width and height of the blended layer after grayscale correction. Original image resolution , This refers to the horizontal and vertical resolution parameters for printing. , The width and height are the resampled dimensions;

[0151] The color conversion uses a lookup table mapping to convert single-channel grayscale values. Convert to multi-channel color values ​​as defined by the target color space parameters; for example, perform this in the CMYK space:

[0152] ;

[0153] It should be noted that the color channel values ​​are normalized and clipped to the [0,1] range to adapt to the channel depth of the print driver. for The value of the minimum value;

[0154] S153 encapsulates the resolution resampling results and color conversion results into a print control file and translates them into print instruction data;

[0155] It should be noted that the encapsulation process involves combining the resolution resampling results as pixel image data blocks and the color conversion results as channel configuration blocks, and writing them into the header and image section of the print control file. Then, through the instruction format description parsed by the print driver interface file, the print control file is translated into print instruction data compatible with the print driver execution, so as to achieve direct output.

[0156] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired or wireless network. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0157] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only one method, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0158] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0159] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0160] Some of the data in the above formula are calculated by removing dimensions and taking their numerical values. The formula is the closest to the real situation obtained by software simulation of a large amount of collected data. The preset parameters and preset thresholds in the formula are set by those skilled in the art according to the actual situation or obtained through simulation of a large amount of data.

[0161] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A method for optimizing medical image printing output based on AI technology, characterized in that, The method includes: S11, Based on the DICOM image file, extract the image pixel matrix and metadata information, input the image pixel matrix into the structural segmentation network to generate structural partition data, and parse the metadata information into a field information set, which includes patient information field, examination parameter field and device information field; S12, based on the spatial coordinates and pixel density values ​​of each partition in the structural partition data, calculate the occupancy weight value of each partition and generate layout framework data containing the target boundaries of each partition; and input the field information set into the layout coding network to generate the layout priority value of each field; S13. Based on the layout priority value and the occupancy weight value, determine whether there is a spatial conflict between the layout framework data and the target layout area of ​​each field. If there is a spatial conflict, call the layout decision network to generate field embedding coordinate data and generate layout configuration data containing structural partition data and field embedding coordinate data. The coordinate data embedded in the fields generated by the call to the layout decision network includes: S131, based on the arrangement priority value, filter out the fields with the highest priority ranking N; S132, extract the target layout area and spatial boundaries in the layout framework data of each priority field; S133, the target layout area and spatial boundary are concatenated into a conflict feature vector, which is input into the layout decision network and outputs the field embedding coordinate data of each field; The training process of the layout decision network includes: S133.1, Obtain the training set containing the initial coordinates and manually corrected coordinates; S133.2, concatenate the initial coordinate difference vector with the field category embedding vector and input it into the attention network; S133.3, Calculate the set of predicted candidate coordinates based on the attention weights output by the attention network; S133.4 Select the coordinates with the smallest prediction error from the candidate coordinate set and embed them as fields in the coordinate data; S14, perform layer overlay on the image pixel matrix through layout configuration data to generate a fused layer containing text area and image area, and calculate the gray difference compensation value of the overlapping block of text area and image area during the overlay process, and apply the gray difference compensation value to the overlapping block to generate gray-corrected fused layer. S15 translates the grayscale-corrected blended layer into a print control file, and combines the print control file to generate print instruction data compatible with the print driver.

2. The method for optimizing medical image printing output based on AI technology according to claim 1, characterized in that, The step of inputting the image pixel matrix into the structural segmentation network to generate structural partitioning data includes: S111, extract the grayscale value, texture gradient value and spatial coordinates of all pixels in the image pixel matrix; S112, concatenates grayscale values, texture gradient values ​​and spatial coordinates to construct a multimodal image tensor; S113 inputs the multimodal image tensor into the structural segmentation network and outputs structural partitioning data containing the boundaries of anatomical regions.

3. The method for optimizing medical image printing output based on AI technology according to claim 2, characterized in that, The training process of the structure segmentation network includes: S113.1, Obtain a medical image training set containing pixel-level structural labels; S113.2, divide the medical image training set into a training subset and a validation subset; S113.3, train the residual U-Net network based on the training subset and output the initial segmentation model; S113.4 evaluates the segmentation accuracy of the initial segmentation model based on the validation subset, and outputs the structural segmentation network when the segmentation accuracy is greater than or equal to the accuracy threshold.

4. The method for optimizing medical image printing output based on AI technology according to claim 3, characterized in that, The step of inputting the field information set into the layout encoding network to generate the layout priority value includes: S121, Assign field category labels to each field in the field information set; S122, Calculate the misread rate and occlusion rate of each field in the historical printed samples; S123 concatenates the field category label, misread rate value, and occlusion rate value into a field feature vector, inputs it into the layout encoding network, and outputs the layout priority value corresponding to each field.

5. The method for optimizing medical image printing output based on AI technology according to claim 4, characterized in that, The training process of the layout coding network includes: S123.1, Obtain a historical print sample set containing field spatial coordinates, overlapping area, and readability labels; S123.2, input the field spatial coordinates into the location encoding subnetwork, input the overlapping area into the area encoding subnetwork, and input the readability label into the readability encoding subnetwork; S123.3 concatenates the three types of encoded outputs into a fully connected network; S123.4, Minimize the readability prediction error, and output the layout coding network when the readability prediction error is less than or equal to the error threshold.

6. The method for optimizing medical image printing output based on AI technology according to claim 5, characterized in that, The calculation of the grayscale difference compensation value includes: S141, extract the overlapping pixel blocks of the text area and the image area in the blended layer; S142, calculate the gray difference between the average gray value of the overlapping pixel block and the gray value of the text region's gray encoding; S143, apply the grayscale difference as a grayscale difference compensation value to the overlapping pixel block to generate a grayscale-corrected blended layer.

7. The method for optimizing medical image printing output based on AI technology according to claim 6, characterized in that, The print instruction data for generating a compatible print driver includes: S151, parse the print driver interface file to obtain print resolution parameters and color space parameters; S152, perform resolution resampling on the grayscale-corrected blended layer according to the print resolution parameters and color conversion according to the color space parameters; S153 encapsulates the resolution resampling results and color conversion results into a print control file and translates them into print instruction data.

Citation Information

Patent Citations

  • Method of displaying ultrasound image and ultrasound diagnosis apparatus

    CN107358015A

  • Image generation method and device, electronic equipment, medium and computer program product

    CN118657655A