DICOM file storage method and device and calling method thereof
By decomposing the data set in the DICOM file into metadata and pixel data, and using the master image for differentiated storage and differential operations, the storage problem of duplicate data in the DICOM file storage is solved, and a more efficient storage solution is achieved, reducing the Storage costs and space waste.
Patent Information
- Application Number
- CN202411255591.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, DICOM files as a whole storage lead to the storage of duplicate data, increasing storage costs and waste of space, especially when high-precision instruments generate large quantities of images.
Decompose the data set in the DICOM file into metadata and pixel data and store it separately. Select an image as the master for full storage. Other images only store the difference part. According to the set threshold, the pixel data is divided into thick layers and thin. The layer sequence is used, and differential operations are performed in the thin layer sequence to reduce the storage amount.
It effectively reduces the amount of duplicate data stored, reduces the storage cost, and further optimizes the storage efficiency of pixel data through differential computing and incremental storage.
Smart Images

Figure CN119207732A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a DICOM file storage method, device and calling method thereof. Background Art
[0002] DICOM (Digital Imaging and Communications in Medicine) is an international standard for processing, storing, printing and transmitting medical images (such as X-rays, CT scans, MRI, etc.) in the medical field. DICOM files are medical image files that follow the DICOM standard and contain image data and metadata such as related patient information and examination information. Figure 1 As shown:
[0003] The data elements in the DICOM data set are arranged in the order of the tags and are mainly divided into the following categories:
[0004] Patient Information: describes the patient's basic information, such as name, gender, date of birth, etc.
[0005] Study Information: Describes the basic information of the study, such as study date, study type, etc.
[0006] Sequence Information: describes the basic information of the sequence, such as sequence number, sequence description, etc.
[0007] Image Information: describes the basic information of the image, such as image size, pixel spacing, etc.
[0008] Pixel Data: Stores the pixel values of an image.
[0009] The current storage method is to store DICOM files as a whole, that is, each DICOM file contains complete patient information, examination information, sequence information, image information, and pixel data.
[0010] A patient's examination usually includes multiple sequences, and each sequence contains multiple images. Generally, each image corresponds to a DICOM file. The patient information in the same examination (such as patient name, age, height, weight, etc.) and the sequence information in the same sequence (such as sequence name, scanning protocol, etc.) are basically the same, and the image description information in the same sequence is also mostly the same. Because in the existing storage method, DICOM files are stored as a whole, that is, each DICOM file contains complete patient information, examination information, sequence information, image information, and pixel data. This leads to the storage of a large number of duplicate data sets. At the same time, because these data belong to different files, even if the files are compressed and then stored, the space occupied by this part of the duplicate data cannot be eliminated.
[0011] With the advancement of technology and the reduction of equipment costs, high-precision instruments are becoming more and more popular, and more and more images are generated in a single examination. For example, a 64-row CT scan of the chest will generate hundreds or even more than a thousand images. The repeated data in this will occupy a large amount of storage, increasing the storage cost.
[0012] In addition, because the image layer thickness of thin-layer sequence is small (such as 1mm or even less than 1mm), the pixel data of adjacent images are relatively similar. At the same time, the number of images is also large (200 to 1000 images in a single sequence). In the traditional storage method, the similarity of pixel data is not considered and ignored. Each image saves the full amount of pixel data, resulting in a large amount of storage waste. To this end, we propose a DICOM file storage method, device and calling method to solve the above problems. Summary of the invention
[0013] The technical problem to be solved by the present invention is to overcome the defects of the prior art. The present invention proposes a DICOM file storage method, device and calling method thereof, which can eliminate the repeated storage of duplicate data and effectively reduce storage costs.
[0014] In order to solve the above technical problems, the technical solution adopted by the present invention is: a DICOM file storage method, comprising the following steps:
[0015] S1. Decompose the data set in the DICOM file into metadata and pixel data according to its characteristics and store them separately;
[0016] S2. Incrementally store metadata, select a certain image as the master and store the corresponding metadata in full, and store values in other graphic metadata that are different from the master.
[0017] The pixel data is divided into thick layer sequence and thin layer sequence according to the set threshold value, and the pixel data of the thick layer sequence image is fully stored. The pixel data of the thin layer sequence image is divided into multiple groups according to the position of the image sequence. In each group, an image is selected as the master and the corresponding pixel data is fully stored. The difference operation is performed between other images in the same group and the master image, and the pixel data corresponding to the difference part is saved;
[0018] S3. A DICOM reconstruction service is created on the DICM-based server to reconstruct the metadata and pixel data stored in S2 into the original DICOM file.
[0019] Furthermore, the metadata includes patient information, examination information, sequence information and image information, and the pixel data is image pixel binary data.
[0020] Furthermore, in step S2, the metadata selects the image as the first or middle image in the sequence.
[0021] Furthermore, in step S2, the pixel data threshold is set to 5 mm.
[0022] Furthermore, in the step S2, the master selected from each group of pixel data is an image of the intermediate sequence, and the corresponding splitting operation step is obtained by subtracting the original pixel value of the master image from the original pixel value of other images.
[0023] A device using the above-mentioned DICOM file storage method comprises: a DICOM server, wherein the DICOM server is deployed with:
[0024] Classification module, used to decompose the data set characteristics in the DICOM file into metadata and pixel data;
[0025] The splitting operation module divides the pixel data into thin and thick sequences according to the set threshold, divides and groups the thin sequence images, selects the middle sequence image as the master in each group, and calculates the difference between the pixel values of other images in the same group and the master;
[0026] The storage module is used to incrementally store the above metadata, fully store the master image pixel values in the above pixel data, and synchronously store the difference values in the pixel data.
[0027] A DICOM file calling method according to the above device comprises the following steps:
[0028] The client requests a DICOM file and calls the metadata service and pixel service separately;
[0029] The metadata service obtains the master number referenced by the DICOM file from the storage and obtains the master metadata and the incremental metadata of the DICOM file from the storage, and merges them to obtain the complete metadata.
[0030] The pixel service obtains the pixel data of the master in the group where the DICOM file is located from the storage, synchronously obtains and decompresses the corresponding difference data, merges the pixel data of the master and the difference, and restores the original pixel data;
[0031] The complete metadata and raw pixel data are combined to generate a DICOM file and returned to the client.
[0032] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the DICOM file storage method as described above when executing the program.
[0033] A non-transitory computer-readable storage medium stores a computer program, which implements the steps of the DICOM file storage method described above when executed by a processor.
[0034] Compared with the prior art, the beneficial effects of the present invention include:
[0035] 1. By decomposing the characteristics of the data set, different data sets in the DICOM file can be classified and stored;
[0036] 2. Select appropriate images as the master for data with high repetition frequency, and perform differential calculations on other images based on the master, only storing the data of the difference part, thus reducing the amount of data storage;
[0037] 3. By grouping the images in the thin layer sequence according to similarity, and taking advantage of the similarity of the image structures and the large approximation of the pixel data within the same group, differential calculations are performed on the pixel data and only the differential data is stored, further reducing the storage volume of DICOM files. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The disclosure of the present invention is described with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. In the accompanying drawings, the same reference numerals are used to refer to the same components. Among them:
[0039] Figure 1 A schematic diagram of the processing and storage process of a DICOM file according to an embodiment of the present invention is shown;
[0040] Figure 2 A schematic diagram of a DICOM file service process proposed according to an embodiment of the present invention is shown;
[0041] Figure 3 The schematic diagram shows the effect of group differential storage proposed according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] It is easy to understand that according to the technical solution of the present invention, without changing the essential spirit of the present invention, a person skilled in the art can propose a variety of interchangeable structural modes and implementation modes. Therefore, the following specific implementation modes and drawings are only exemplary descriptions of the technical solution of the present invention, and should not be regarded as the whole of the present invention or as a limitation or restriction to the technical solution of the present invention.
[0043] According to one embodiment of the present invention, Figure 1-Figure 3 Shown.
[0044] For the overall storage step, such as Figure 1 As shown, in this embodiment, a DICOM file storage method includes the following steps:
[0045] S1. Decompose the data set in the DICOM file into metadata and pixel data according to its characteristics and store them separately;
[0046] S2. Incrementally store metadata, select a certain image as the master and store the corresponding metadata in full, and store values in other graphic metadata that are different from the master.
[0047] The pixel data is divided into thick layer sequence and thin layer sequence according to the set threshold value, and the pixel data of the thick layer sequence image is fully stored. The pixel data of the thin layer sequence image is divided into multiple groups according to the position of the image sequence. In each group, an image is selected as the master and the corresponding pixel data is fully stored. The difference operation is performed between other images in the same group and the master image, and the pixel data corresponding to the difference part is saved;
[0048] S3. A DICOM reconstruction service is created on the DICM-based server to reconstruct the metadata and pixel data stored in S2 into the original DICOM file.
[0049] Through the above method steps, it can be seen that this application decomposes the data set in the DICOM file into two parts according to its characteristics:
[0050] Descriptive metadata (patient information, examination information, sequence information, image information): These data have a high duplication rate.
[0051] Pixel data: These are binary data of image pixels, which can be stored in an optimized way based on similarity between adjacent images.
[0052] For these two types of data, store them separately;
[0053] Incremental storage of metadata: Select a certain image in the inspection as the master, store the metadata in full, compare the metadata of other images with the master, and only store the values that are different from the master.
[0054] Pixel data is divided into two categories: thick layer and thin layer. For example, we set the sequence with a layer thickness of more than 5mm as a thick layer sequence; and the sequence less than or equal to 5mm as a thin layer sequence. Because the similarity between adjacent images in the thick layer sequence is relatively low and the number of images is relatively small, the pixel data of the images in this part of the sequence are directly stored in full; and for thin layer images, because the similarity between adjacent images is high and the total number of images is relatively large, for this part of the images, we can divide the images in the sequence according to the location of the image, for example, we divide them by a thickness of 5mm. Each image in the same 5mm unit is a group, and the middle image is selected as the master; the pixel data of the master is saved in full, and the other images in the same group are differentially calculated with the master, the difference part is calculated, and only the difference part is saved. Because the difference part is the data after the difference operation of similar images, this part of the data can be compressed to obtain a higher compression ratio. The specific image difference effect is as follows: Figure 3 shown.
[0055] Similarly, a device or system constructed based on the above method is also within the protection scope of the present invention. Specifically, a device using the above DICOM file storage method includes: a DICOM server, wherein the DICOM server is deployed with:
[0056] Classification module, used to decompose the data set characteristics in the DICOM file into metadata and pixel data;
[0057] The splitting operation module divides the pixel data into thin and thick sequences according to the set threshold, divides and groups the thin sequence images, selects the middle sequence image as the master in each group, and calculates the difference between the pixel values of other images in the same group and the master;
[0058] The storage module is used to incrementally store the above metadata, fully store the master image pixel values in the above pixel data, and synchronously store the difference values in the pixel data.
[0059] Furthermore, if Figure 2 As shown, the inherent DICOM file calling method based on the above device is also within the protection scope of the present invention, which specifically includes the following steps:
[0060] The client requests a DICOM file and calls the metadata service and pixel service separately;
[0061] The metadata service obtains the master number referenced by the DICOM file from the storage and obtains the master metadata and the incremental metadata of the DICOM file from the storage, and merges them to obtain the complete metadata.
[0062] The pixel service obtains the pixel data of the master in the group where the DICOM file is located from the storage, synchronously obtains and decompresses the corresponding difference data, merges the pixel data of the master and the difference, and restores the original pixel data;
[0063] The complete metadata and raw pixel data are combined to generate a DICOM file and returned to the client.
[0064] It can be seen that the present invention can create a DICOM reconstruction service on a server that provides DICOM services. Metadata part = metadata of the master + differential part data; pixel data = pixel data of the master in the group + differential part data. Then the metadata and pixel data are merged together to reconstruct the original DICOM file.
[0065] In addition, the above-mentioned method steps and system can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0066] The technical scope of the present invention is not limited to the contents in the above description. Those skilled in the art can make various deformations and modifications to the above embodiments without departing from the technical idea of the present invention, and these deformations and modifications should all fall within the protection scope of the present invention.
Claims
1. A DICOM file storage method, characterized in that: The steps include: S1. Decompose the data set in the DICOM file into metadata and pixel data according to its characteristics and store them separately; S2. Perform incremental storage of metadata, select any image as the master and store the corresponding metadata in full, and store values of other graphic metadata that are different from the master. The pixel data is divided into thick layer sequence and thin layer sequence according to the set threshold value, and the pixel data of the thick layer sequence image is fully stored. The pixel data of the thin layer sequence image is divided into multiple groups according to the position of the image sequence. In each group, an image is selected as the master and the corresponding pixel data is fully stored. The difference operation is performed between other images in the same group and the master image, and the pixel data corresponding to the difference part is saved; S3. A DICOM-based server creates a DICOM reconstruction service to reconstruct the metadata and pixel data stored in S2 into the original DICOM file.
2. A DICOM file storage method according to claim 1, characterized in that: The metadata includes patient information, examination information, sequence information and image information, and the pixel data is image pixel binary data.
3. A DICOM file storage method according to claim 1, characterized in that: In step S2, the metadata selects the image as the first or middle image in the sequence.
4. A DICOM file storage method according to claim 1, characterized in that: In step S2, the pixel data threshold is set to 5 mm.
5. A DICOM file storage method according to claim 1, characterized in that: The master selected from each group of pixel data in step S2 is an image of the intermediate sequence, and the corresponding splitting operation step is obtained by subtracting the original pixel value of the master image from the original pixel value of other images.
6. A device using the DICOM file storage method according to any one of claims 1 to 5, characterized in that: include: A DICM server, wherein the DICOM server is deployed with: Classification module, used to decompose the data set characteristics in the DICOM file into metadata and pixel data; The splitting operation module divides the pixel data into thin and thick sequences according to the set threshold, divides and groups the thin sequence images, selects the middle sequence image as the master in each group, and calculates the difference between the pixel values of other images in the same group and the master; The storage module is used to incrementally store the above metadata, fully store the master image pixel values in the above pixel data, and synchronously store the difference values in the pixel data.
7. A DICOM file calling method according to the device of claim 6, characterized in that: The steps include: The client requests a DICOM file and calls the metadata service and pixel service separately; The metadata service obtains the master number referenced by the DICOM file from the storage and obtains the master metadata and the incremental metadata of the DICOM file from the storage, and merges them to obtain the complete metadata. The pixel service obtains the pixel data of the master in the group where the DICOM file is located from the storage, synchronously obtains and decompresses the corresponding difference data, merges the pixel data of the master and the difference, and restores the original pixel data; The complete metadata and raw pixel data are combined to generate a DICOM file and returned to the client.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the DICOM file storage method according to any one of claims 1 to 5 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the DICOM file storage method according to any one of claims 1 to 5 are implemented.
