Compression algorithm based on DICOM JXL
Through a compression algorithm based on DICOM JXL, metadata and pixel data are separated and core clinical labels are encrypted. Grayscale statistical features and morphological filtering are combined to optimize predictor selection and dynamically adjust the entropy coding model. The problems of low compression efficiency and poor compatibility of DICOM images are solved, and efficient and secure medical image compression is achieved.
Patent Information
- Application Number
- CN202510903208.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-09-19
AI Technical Summary
The existing DICOM image compression method has low compression efficiency and poor compatibility in high-resolution imaging scenarios. It does not fully utilize emerging efficient coding technologies and cannot meet the high-performance compression requirements of modern medical imaging systems.
A compression algorithm based on DICOM JXL is used to separate metadata from pixel data, encrypt core clinical labels using AES-256, generate bone tissue masks by combining grayscale statistical features and morphological filtering, and dynamically adjust the context model of CABAC entropy coding to generate a .dcmc file.
It achieves efficient medical image compression, ensures data security and diagnostic information integrity, improves compression ratio and decompression speed, and maintains good cross-platform compatibility.
Smart Images

Figure CN120676146A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image data processing and image compression, and in particular to a compression algorithm based on DICOMJXL. Background Art
[0002] In the field of modern medical imaging storage and transmission, the rapid growth of data volumes has placed higher demands on the efficient processing of DICOM (Digital Imaging and Communications in Medicine) format images. Traditional compression methods, especially in high-resolution imaging scenarios, face numerous challenges in terms of storage usage, transmission efficiency, and decompression performance, making it difficult to fully meet the high-performance compression technology requirements of medical imaging systems.
[0003] Currently, mainstream compression methods for DICOM images include technologies based on comparison processing and data culling strategies, as well as solutions that use the PNG format for pixel data storage. For example, patent publication number CN118921431B proposes a comparison compression method for DICOM single-sequence images, achieving efficient compression by removing identical TAG element parsed values and optimizing the representation of point data. However, this method may be limited in compression efficiency when used with large, multi-sequence DICOM images. It also fails to fully utilize emerging high-efficiency encoding technologies (such as JXL), potentially hindering its application in high-resolution imaging. Furthermore, patent publication number CN105631212B uses the PNG format to store DICOM image pixel data, achieving lossless compression and cross-platform decompression and restoration. However, the PNG format suffers from low compression efficiency, resulting in high storage space and transmission time when processing large or high-resolution images. Furthermore, hardware decoding compatibility is limited, which may result in decompression performance degradation on some terminal devices.
[0004] The above issues indicate that existing DICOM image compression methods still have room for improvement in terms of compression efficiency, compatibility, and the application of emerging high-efficiency coding technologies. Therefore, this paper proposes a compression algorithm based on DICOM JXL. This algorithm aims to combine the high-efficiency characteristics of the JPEG XL (JXL) format to further improve compression ratio and decompression speed, while maintaining lossless or near-lossless image quality and ensuring good cross-platform compatibility to better meet the needs of modern medical imaging systems. Summary of the Invention
[0005] The purpose of the present invention is to provide a compression algorithm based on DICOM JXL to address the deficiencies of the existing technology.
[0006] In order to solve the above technical problems, the following technical solutions are adopted: A first aspect of the present invention provides a compression algorithm based on DICOM JXL, comprising the following steps: S1: Separate the metadata segment and pixel data segment of the DICOM file; S2: Extract descriptive tags, operational tags, and core clinical tags from the metadata segment through a metadata parser, and encrypt the core clinical tags using AES-256 to generate an independent key; S3: Obtain a two-dimensional pixel matrix through a pixel separator, and divide the two-dimensional pixel matrix into N×N sub-blocks; S4: Predict tissue density type based on sub-block grayscale statistical feature vectors and preliminarily select gradient adaptive predictor or improved LOCO-I predictor; S5: Generate bone tissue mask using morphological filtering and modify the predictor selection result accordingly; S6: Dynamically adjust the context model of CABAC entropy coding using bone tissue mask; S7: Recombining the encrypted metadata and compressed pixel data to generate a .dcmc file.
[0007] Furthermore, the S1 specifically includes: identifying the DICOM file header information through a byte stream parser and locating the dividing point between the metadata segment and the pixel data segment; the metadata segment contains all non-image information, and the pixel data segment stores the pixel values of the image; the separation process is based on the tag field defined in the DICOM standard to ensure that the two parts of the data maintain logical integrity after separation.
[0008] Furthermore, the S2 specifically includes: S21: Scanning the metadata segments through a metadata parser to distinguish descriptive tags, operational tags, and core clinical tags; the descriptive tags record the technical parameters of the imaging device, the operational tags record the operation process of image acquisition, and the core clinical tags record sensitive information directly related to the patient's diagnosis; S22: The core clinical labels are encrypted using the AES-256 encryption algorithm, and independent keys are generated and stored in the security key management module. During the encryption process, the plaintext data of each label is divided into data blocks of fixed length, which are encrypted block by block and then spliced together to form a ciphertext data stream.
[0009] Furthermore, the S3 specifically includes: S31: reading the separated pixel data segments through a pixel separator, and converting the pixel data segments into a two-dimensional pixel matrix; the number of rows and columns of the two-dimensional pixel matrix is determined by the image size field in the DICOM file header; S32: Divide the two-dimensional pixel matrix into N×N sub-blocks, where the value range of N is dynamically adjusted according to the image resolution; during the division process, if the matrix size cannot be divided evenly by N, fill the boundaries with zero values to make up the difference; S33: Calculating the grayscale mean, variance and histogram distribution of each sub-block to generate a sub-block grayscale statistical feature vector; the sub-block grayscale statistical feature vector is used to characterize the tissue density characteristics of the sub-block.
[0010] Furthermore, the S4 specifically includes: S41: Analyze the tissue density type of the sub-block based on the grayscale statistical feature vector of the sub-block; sub-blocks with low grayscale mean and low variance are determined to be soft tissue areas, and sub-blocks with high grayscale mean and high variance are determined to be bone tissue areas; S42: Preliminary selection of predictors based on tissue density type; the gradient adaptive predictor is preferred for soft tissue areas, and the improved LOCO-I predictor is preferred for bone tissue areas.
[0011] Furthermore, the S5 specifically includes: S51: constructing a morphological filter based on opening and closing operations, with the input being the sub-block grayscale statistical feature vector of the sub-block; the size of the filter kernel is dynamically adjusted according to the sub-block size; S52: extracting the bone tissue area in the sub-block by using the morphological filter to generate a bone tissue mask; pixels marked as 1 in the mask represent the bone tissue area, and pixels marked as 0 represent the non-bone tissue area; S53: Re-evaluate the selection of the predictor based on the result of the bone tissue mask; if the proportion of the bone tissue area exceeds the set threshold, force switching to the improved LOCO-I predictor.
[0012] Furthermore, the S6 specifically includes: S61: Based on the CABAC entropy coding principle, an initial context model is constructed; the context model is used to record the probability distribution of pixels in the sub-block; S62: Adjusting parameters of the context model according to the distribution of the bone tissue mask; the context model of the bone tissue area adopts a high probability distribution, and the context model of the non-bone tissue area adopts a low probability distribution.
[0013] Furthermore, the S7 specifically includes: S71: Recombining the encrypted metadata and the compressed pixel data according to a predefined format to generate a .dcmc file; during the recombining process, the metadata segment is located at the head of the file, and the compressed pixel data segment is located at the tail of the file; S72: Writing the version number, encryption key index, and compression parameter configuration information into the .dcmc file header to ensure the integrity and parsability of the file.
[0014] Furthermore, the S7 further includes: The compression efficiency is evaluated by calculating the ratio of the data volume before and after compression. At the same time, the compression quality is verified by decompressing and reconstructing the image and calculating the peak signal-to-noise ratio and structural similarity between the reconstructed image and the original image. Import .dcmc files into various medical terminal devices to test their decompression performance and display effects; ensure the compatibility of files on different platforms.
[0015] 10. The compression algorithm based on DICOM JXL according to claim 5 is characterized in that the set threshold of the bone tissue area ratio is 50%. When the bone tissue area ratio exceeds the threshold, it is forced to switch to the improved LOCO-I predictor.
[0016] It has the following technical effects: This patent relates to a compression algorithm based on the DICOM (Digital Imaging and Communications in Medicine) standard, combined with JXL (JPEG XL) compression technology, optimized for efficient storage and transmission of medical images. Its core goal is to achieve highly efficient medical image compression while ensuring data security and diagnostic information integrity by separating metadata from pixel data, encrypting core clinical labels, and employing predictor selection and dynamic entropy coding.
[0017] The present invention solves the problem of sensitive information leakage in the existing technology by separating the metadata segment and pixel data segment of the DICOM file and using AES-256 encryption for the core clinical tags. Through pixel matrix segmentation and tissue density type prediction based on grayscale statistical characteristics, differentiated predictor selection for different tissue types is achieved, thereby improving compression efficiency. Bone tissue masks are generated through morphological filtering, and the predictor selection results are corrected accordingly, further optimizing the compression accuracy. The compression ratio is significantly improved by dynamically adjusting the context model of CABAC entropy coding and combining the distribution characteristics of bone tissue masks. The final generated .dcmc file has both efficient compression and good compatibility, meeting the requirements of modern medical imaging systems for high-performance compression technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The present invention will be further described below in conjunction with the accompanying drawings: Figure 1 Schematic diagram of the DICOM file separation and encryption process in an embodiment of the present invention.
[0019] Figure 2 Schematic diagram of the pixel matrix segmentation and tissue density type prediction process in an embodiment of the present invention.
[0020] Figure 3Schematic diagram of the bone tissue mask generation and predictor correction process in an embodiment of the present invention.
[0021] Figure 4 dcmc file generation and performance evaluation process in an embodiment of the present invention.
[0022] The accompanying drawings are numbered as follows: 1. Metadata segment; 2. Pixel data segment; 3. Core clinical label; 4. Two-dimensional pixel matrix; 5. Sub-block; 6. Bone tissue mask; 7. Predictor; 8. .dcmc file; 9. Compression performance evaluation module; 10. Compatibility test module. DETAILED DESCRIPTION
[0023] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention is described in detail below with reference to the accompanying drawings and examples. However, it should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the scope of the present invention. In addition, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessary confusion of the present invention.
[0024] The present invention provides a compression algorithm based on DICOM JXL, and its implementation method is combined with the attached Figure 1 To the attached Figure 4 Detailed description is given. Figure 1 The separation process of metadata segment 1 and pixel data segment 2 and the encryption steps of core clinical label 3 are shown; Figure 2 The process of predicting tissue density type based on grayscale statistical features after the pixel matrix 4 is divided into sub-blocks 5 is described; Appendix Figure 3 The logic of morphological filtering to generate bone tissue mask 6 and its correction of the prediction result 7 is shown; Appendix Figure 4 The process of reassembling the compressed data stream into a .dcmc file 8 and the key steps of the compression performance evaluation module 9 and the compatibility testing module 10 are presented.
[0025] The specific implementation process of a compression algorithm based on DICOM JXL is as follows: During implementation, S1. first reads the input DICOM file through a byte stream parser, identifying the file header information to locate the demarcation point between metadata segment 1 and pixel data segment 2. Metadata segment 1 contains all non-image information, including descriptive tags, operational tags, and core clinical tags 3, while pixel data segment 2 stores the image pixel values. This separation process is based on the tag fields defined in the DICOM standard, ensuring that the two separated data segments maintain logical integrity.
[0026] Subsequently, S2. uses a metadata parser to scan metadata segment 1, extracting the imaging device technical parameters recorded in the descriptive tag, the imaging acquisition process recorded in the operational tag, and the sensitive patient diagnosis information recorded in the core clinical tag 3. The core clinical tag 3 is encrypted using the AES-256 algorithm. During the encryption process, the plaintext data of each tag is divided into fixed-length data blocks, which are encrypted and concatenated to form a ciphertext data stream. The encrypted key is stored in the secure key management module to ensure the security of sensitive information.
[0027] The key length of the AES-256 encryption algorithm is 256 bits, and the length of each data block in the encryption process is 128 bits.
[0028] Next, S3. The separated pixel data segment 2 is read through the pixel separator and converted into a two-dimensional matrix form, namely a two-dimensional pixel matrix 4. The number of rows and columns of the two-dimensional pixel matrix 4 is determined by the image size field in the DICOM file header. In order to facilitate subsequent processing, the two-dimensional pixel matrix 4 is divided into sub-blocks 5 of N×N size, where the value range of N is dynamically adjusted according to the image resolution. If the size of the two-dimensional pixel matrix 4 cannot be divided by N, zero values are padded at the boundaries to make it even. The grayscale mean, variance and histogram distribution are calculated for each sub-block 5 to generate a sub-block grayscale statistical feature vector, which is used to characterize the tissue density characteristics of the sub-block 5.
[0029] S4. Based on the sub-block grayscale statistical eigenvectors, the tissue density type of sub-block 5 is analyzed. Sub-blocks 5 with low grayscale mean and low variance are determined to be soft tissue regions, while sub-blocks 5 with high grayscale mean and high variance are determined to be bone tissue regions. Predictor 7 is preliminarily selected based on the tissue density type, with the gradient adaptive predictor being preferred for soft tissue regions and the improved LOCO-I predictor being preferred for bone tissue regions. The present invention predicts tissue density type based on the sub-block grayscale statistical eigenvectors, dynamically selects either the gradient adaptive predictor or the improved LOCO-I predictor, and further corrects the predictor selection result through morphological filtering, significantly improving compression efficiency.
[0030] S5. To further optimize the selection result of predictor 7, a morphological filter based on opening and closing operations is constructed, with the grayscale distribution matrix of sub-block 5 as input. The size of the filter kernel is dynamically adjusted based on the size of sub-block 5. The bone tissue region in sub-block 5 is extracted using the morphological filter, and a binary mask is generated as bone tissue mask 6. Pixels marked as 1 in bone tissue mask 6 represent bone tissue regions, and pixels marked as 0 represent non-bone tissue regions. Based on the results of bone tissue mask 6, the selection of predictor 7 is re-evaluated. If the proportion of bone tissue regions exceeds a set threshold, the improved LOCO-I predictor is forcibly switched to.
[0031] S6. After completing the selection of the predictor 7, an initial context model is constructed based on the CABAC entropy coding principle. The context model is used to record the probability distribution of pixels in the sub-block 5. The parameters of the context model are dynamically adjusted according to the distribution of the bone tissue mask 6. The context model of the bone tissue area adopts a high probability distribution, and the context model of the non-bone tissue area adopts a low probability distribution. By dynamically adjusting the context model and combining the distribution characteristics of the bone tissue mask 6, the compression ratio is further improved. The present invention uses the bone tissue mask to dynamically adjust the context model of CABAC entropy coding, so that the compression algorithm can better adapt to the characteristics of complex medical images.
[0032] S7. Reorganize the encrypted metadata segment 1 and the compressed pixel data segment 2 according to a predefined format to generate a .dcmc file 8. During the reorganization process, the metadata segment 1 is located at the head of the file, and the compressed pixel data segment 2 is located at the end of the file. Write the version number, encryption key index and compression parameter configuration information in the head of the .dcmc file 8 to ensure the integrity and parsability of the file. The generated .dcmc file 8 is evaluated by the compression performance evaluation module 9, and the ratio of the data volume before and after compression is calculated to evaluate the compression efficiency. At the same time, the image is reconstructed by decompression, and the peak signal-to-noise ratio and structural similarity between the reconstructed image and the original image are calculated to verify the compression quality. In addition, the .dcmc file 8 is imported into a variety of medical terminal devices through the compatibility test module 10 to test its decompression performance and display effect to ensure the compatibility of the file on different platforms.
[0033] In the above embodiment, the separation of metadata segment 1 and pixel data segment 2 is achieved through a byte stream parser. After the separation, metadata segment 1 is processed by the metadata parser to extract descriptive labels, operational labels and core clinical labels 3. The core clinical labels 3 are encrypted by the AES-256 encryption algorithm in conjunction with the security key management module. The pixel data segment 2 is converted into a two-dimensional pixel matrix 4 by a pixel separator, and sub-blocks 5 are obtained by segmentation. After the sub-block grayscale statistical feature vector is generated, it is used to predict the tissue density type. The prediction result is combined with the bone tissue mask 6 generated by morphological filtering to act on the selection of the predictor 7. The selection result of the predictor 7 is further optimized by the dynamically adjusted context model, and the final generated .dcmc file 8 is subjected to performance verification and compatibility testing by the compression performance evaluation module 9 and the compatibility testing module 10. The connection relationship and collaboration logic between the components are clear and well-defined, achieving the goals of efficient compression and good compatibility.
[0034] In order to better enable relevant personnel in this technical field to fully understand and implement the present invention, the specific implementation principle of the present invention is further supplemented below with reference to a specific application scenario.
[0035] In a medical imaging system, a hospital needs to store and transmit a batch of high-resolution CT images. These images are stored in the DICOM format, with individual files often exceeding 500MB in size and containing a large amount of sensitive patient information. To address the issues of large storage usage, low transmission efficiency, and the vulnerability of core clinical tags to leakage, a compression algorithm based on DICOM JXL, proposed in this paper, was employed.
[0036] First, in step S1, the byte stream parser reads the input DICOM file and identifies the file header information to locate the demarcation point between metadata segment 1 and pixel data segment 2. Specifically, by parsing the marker fields in the DICOM standard, such as the metadata fields in the range of "0x0002, 0x0000" to "0x0002, 0xFFFF", metadata segment 1 and pixel data segment 2 are accurately separated. Subsequently, in step S2, the metadata parser scans metadata segment 1, extracting the imaging device parameters recorded by the descriptive tags, the acquisition process recorded by the operational tags, and the sensitive patient diagnosis information recorded by the core clinical tags 3. The core clinical tags 3 are encrypted block by block using the AES-256 encryption algorithm to generate a ciphertext data stream, and the independent key is stored in the secure key management module. This process ensures the security of sensitive information while preserving the logical integrity of metadata segment 1.
[0037] Next, in step S3, the pixel separator reads the separated pixel data segments 2 and converts them into a two-dimensional matrix, namely, a two-dimensional pixel matrix 4. Assuming the current image resolution is 2048×2048, the number of rows and columns of the two-dimensional pixel matrix 4 is 2048, respectively. To facilitate subsequent processing, the two-dimensional pixel matrix 4 is divided into N×N sub-blocks 5, where N is dynamically adjusted based on the image resolution. For example, for high-resolution images, N is set to 64. If the size of the two-dimensional pixel matrix 4 does not divide N, zero values are added to the boundaries to make it uniform. Subsequently, in step S4, the grayscale mean, variance, and histogram distribution are calculated for each sub-block 5 to generate a sub-block grayscale statistical feature vector. For example, a sub-block 5 with a grayscale mean of 50 and a variance of 20 is identified as a soft tissue region; another sub-block 5 with a grayscale mean of 150 and a variance of 80 is identified as a bone tissue region. Based on this analysis, a preliminary predictor 7 is selected: the gradient adaptive predictor is preferred for soft tissue regions, while the improved LOCO-I predictor is preferred for bone tissue regions.
[0038] To further optimize the selection results of predictor 7, a morphological filter based on opening and closing operations is constructed in step S5. For example, for the grayscale distribution matrix of a sub-block 5, a filter kernel size of 5×5 is designed. The bone tissue region in sub-block 5 is extracted using the morphological filter, and a binary mask is generated as bone tissue mask 6. If the proportion of pixels marked as 1 in bone tissue mask 6 exceeds 60%, the improved LOCO-I predictor is forced to switch. This correction mechanism effectively improves the selection accuracy of predictor 7, thereby enhancing the compression effect.
[0039] After selecting predictor 7, step S6 constructs an initial context model based on the CABAC entropy coding principle. For example, for a sub-block 5, if the proportion of pixels marked as 1 in the bone tissue mask 6 is high, the context model uses a high probability distribution; conversely, if the proportion of pixels marked as 0 is high, a low probability distribution is used. By dynamically adjusting the parameters of the context model and combining the distribution characteristics of the bone tissue mask 6, the compression ratio is further improved. For example, for a typical CT image, after this step, the compression ratio is increased from 1:5 to 1:8.
[0040] Subsequently, in step S7, the encrypted metadata segment 1 and the compressed pixel data segment 2 are reassembled according to a predefined format to generate a .dcmc file 8. During this reassembly, the metadata segment 1 is placed at the file header, and the compressed pixel data segment 2 is placed at the file footer. The .dcmc file 8 header contains the version number, encryption key index, and compression parameter configuration information. For example, the version number is "1.0," the encryption key index is "Key_001," and the compression parameter configuration includes the sub-block size N and the predictor type. This process ensures file integrity and parsability.
[0041] Finally, in step S7, the generated .dcmc file 8 is verified by the compression performance evaluation module 9 and the compatibility testing module 10. For example, the ratio of the data volume before and after compression is calculated. Assuming the original file size is 512MB and the compressed file size is 64MB, the compression efficiency is 1:8. Simultaneously, the reconstructed image is decompressed and the peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) between the reconstructed image and the original image are calculated. For example, the PSNR of a reconstructed image is 45dB and the SSIM is 0.98, indicating near-lossless compression quality. Furthermore, the .dcmc file 8 is imported into various medical terminal devices for testing, such as a Windows-based PACS system and a Linux-based reading workstation, to verify its decompression performance and display quality. The test results show that the file can be quickly decompressed and displayed normally on different platforms, demonstrating good compatibility.
[0042] Through the above steps, the present invention achieves the goals of efficient compression and good compatibility, meeting the requirements of modern medical imaging systems for high-performance compression technology. The connection relationship and collaborative logic between the various components are clear and well-defined, ensuring the integrity and feasibility of the technical solution.
[0043] In general, the present invention has the following innovations: Metadata encryption: By independently encrypting core clinical tags, it solves the data security problem that is often overlooked in existing technologies.
[0044] Dynamic predictor selection: A dual mechanism based on grayscale statistical features and morphological filtering is introduced to achieve differentiated processing of soft tissue and bone tissue.
[0045] Dynamic adjustment of entropy coding context model: The context model parameters are adjusted according to the bone tissue mask, breaking through the limitations of the traditional fixed context model.
[0046] The technical effects are as follows: 1. Improve performance The present invention significantly improves compression efficiency through tissue-specific predictor selection and dynamic context model adjustment, while ensuring high signal-to-noise ratio and structural similarity of the reconstructed image.
[0047] 2. Enhanced security AES-256 encryption of core clinical tags ensures the security of sensitive information and complies with modern medical data protection requirements.
[0048] 3. Simplify the operation process From metadata separation to final file generation, the present invention provides a complete solution with a high degree of automation, reducing the operational complexity in practical applications.
[0049] 4. Promote industry development This invention is not only applicable to current medical image compression needs, but also lays the foundation for future efficient compression technology based on DICOM JXL, and is expected to promote further development in the field of medical imaging.
[0050] The above are only specific embodiments of the present invention, but the technical features of the present invention are not limited thereto. Any simple changes, equivalent substitutions, or modifications based on the present invention to solve substantially the same technical problems and achieve substantially the same technical effects are included within the scope of protection of the present invention.
Claims
1. A compression algorithm based on DICOM JXL, characterized in that: The following steps are involved: S1: Separate the metadata segment and pixel data segment of the DICOM file; S2: Extract descriptive tags, operational tags, and core clinical tags from the metadata segment through a metadata parser, and encrypt the core clinical tags using AES-256 to generate an independent key; S3: Obtain a two-dimensional pixel matrix through a pixel separator, and divide the two-dimensional pixel matrix into N×N sub-blocks; S4: Predict tissue density type based on sub-block grayscale statistical feature vectors and preliminarily select gradient adaptive predictor or improved LOCO-I predictor; S5: Generate bone tissue mask using morphological filtering and modify the predictor selection result accordingly; S6: Dynamically adjust the context model of CABAC entropy coding using bone tissue mask; S7: Recombining the encrypted metadata and compressed pixel data to generate a .dcmc file.
2. The DICOM JXL-based compression algorithm according to claim 1, characterized in that: The S1 specifically includes: identifying the DICOM file header information through a byte stream parser and locating the dividing point between the metadata segment and the pixel data segment; the metadata segment contains all non-image information, and the pixel data segment stores the pixel values of the image; the separation process is based on the tag field defined in the DICOM standard to ensure that the two parts of the data maintain logical integrity after separation.
3. The DICOM JXL-based compression algorithm according to claim 1, characterized in that: The S2 specifically includes: S21: Scanning the metadata segments through a metadata parser to distinguish descriptive tags, operational tags, and core clinical tags; the descriptive tags record the technical parameters of the imaging device, the operational tags record the operation process of image acquisition, and the core clinical tags record sensitive information directly related to the patient's diagnosis; S22: The core clinical labels are encrypted using the AES-256 encryption algorithm, and independent keys are generated and stored in the security key management module. During the encryption process, the plaintext data of each label is divided into data blocks of fixed length, which are encrypted block by block and then spliced together to form a ciphertext data stream.
4. The DICOM JXL-based compression algorithm according to claim 1, wherein: The S3 specifically includes: S31: reading the separated pixel data segments through a pixel separator, and converting the pixel data segments into a two-dimensional pixel matrix; the number of rows and columns of the two-dimensional pixel matrix is determined by the image size field in the DICOM file header; S32: Divide the two-dimensional pixel matrix into N×N sub-blocks, where the value range of N is dynamically adjusted according to the image resolution; during the division process, if the matrix size cannot be divided evenly by N, fill the boundaries with zero values to make up the difference; S33: Calculating the grayscale mean, variance and histogram distribution of each sub-block to generate a sub-block grayscale statistical feature vector; the sub-block grayscale statistical feature vector is used to characterize the tissue density characteristics of the sub-block.
5. The DICOM JXL-based compression algorithm according to claim 1, characterized in that: The S4 specifically includes: S41: Analyze the tissue density type of the sub-block based on the grayscale statistical feature vector of the sub-block; sub-blocks with low grayscale mean and low variance are determined to be soft tissue areas, and sub-blocks with high grayscale mean and high variance are determined to be bone tissue areas; S42: Preliminary selection of predictors based on tissue density type; the gradient adaptive predictor is preferred for soft tissue areas, and the improved LOCO-I predictor is preferred for bone tissue areas.
6. The DICOM JXL-based compression algorithm according to claim 1, characterized in that: The S5 specifically includes: S51: constructing a morphological filter based on opening and closing operations, with the input being the sub-block grayscale statistical feature vector of the sub-block; the size of the filter kernel is dynamically adjusted according to the sub-block size; S52: extracting the bone tissue area in the sub-block by using the morphological filter to generate a bone tissue mask; pixels marked as 1 in the mask represent the bone tissue area, and pixels marked as 0 represent the non-bone tissue area; S53: Re-evaluate the selection of the predictor based on the result of the bone tissue mask; if the proportion of the bone tissue area exceeds the set threshold, force switching to the improved LOCO-I predictor.
7. The DICOM JXL-based compression algorithm according to claim 1, characterized in that: The S6 specifically includes: S61: Based on the CABAC entropy coding principle, an initial context model is constructed; the context model is used to record the probability distribution of pixels in the sub-block; S62: Adjusting parameters of the context model according to the distribution of the bone tissue mask; the context model of the bone tissue area adopts a high probability distribution, and the context model of the non-bone tissue area adopts a low probability distribution.
8. The DICOM JXL-based compression algorithm according to claim 1, wherein: The S7 specifically includes: S71: Recombining the encrypted metadata and the compressed pixel data according to a predefined format to generate a .dcmc file; during the recombining process, the metadata segment is located at the head of the file, and the compressed pixel data segment is located at the tail of the file; S72: Writing the version number, encryption key index, and compression parameter configuration information into the .dcmc file header to ensure the integrity and parsability of the file.
9. The DICOM JXL-based compression algorithm according to claim 1, wherein: The S7 further includes: The compression efficiency is evaluated by calculating the ratio of the data volume before and after compression. At the same time, the compression quality is verified by decompressing and reconstructing the image and calculating the peak signal-to-noise ratio and structural similarity between the reconstructed image and the original image. Import .dcmc files into various medical terminal devices to test their decompression performance and display effects; ensure the compatibility of files on different platforms.
10. The DICOM JXL-based compression algorithm according to claim 5, characterized in that: The set threshold of the bone tissue area ratio is 50%. When the bone tissue area ratio exceeds the threshold, it is forced to switch to the improved LOCO-I predictor.
Citation Information
Patent Citations
A PNG format bearing method of dicom image raw data
CN105631212B
A comparison and compression method and system for DICOM single sequence images
CN118921431B