A method and system for archiving multi-type DICOM files

By analyzing and classifying DICOM objects, nested folders are generated based on Patient ID and UID tag values, which solves the problems of cumbersome DICOM file archives and low accuracy, and improves the automation and efficiency of image processing.

CN114664412BActive Publication Date: 2024-11-26PERCEPTION VISION MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210333314.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2024-11-26
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

In the prior art, DICOM image files are not classified and stored, resulting in cumbersome operations and low accuracy when archiving multiple DICOM files, which is not conducive to image automation processing.

Method used

By obtaining the DICOM object, the image file collection, structure file collection, plan file collection and dose file collection are parsed, and the image files are classified based on the label values ​​of Patient ID, Study Instance UID and Series Instance UID to generate a sequence that characterizes the patient's examination. Nested folders for associations that store structure, planning and dosage files, simplifying the archiving process.

Benefits of technology

The archiving operation of DICOM files is simplified, the degree of automation and efficiency of image processing is improved, and the accurate archiving and subsequent operations of multiple types of files are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114664412B_ABST
    Figure CN114664412B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and system for archiving multiple types of DICOM files to solve the problems of complicated operation, low accuracy and disadvantageous for automatic image processing when archiving multiple types of DICOM files. The method and system are mainly used in the field of medical image processing, such as target area delineation, dose assessment and tracking, etc., which need to process and use multiple types of DICOM files at the same time, and can simplify the archiving operation, improve the automation degree of image processing and subsequent operations, and improve efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of information storage technology, and in particular to a method and system for archiving multiple types of DICOM files. Background Art

[0002] Picture Archiving and Communication Systems (PACS) are systems used in hospital imaging departments. Their main task is to store a large number of medical images (including images produced by MRI, CT, ultrasound, X-ray machines, various infrared devices, microscopes, etc.) produced daily in digital form through various interfaces (such as Digital Imaging An Communication In Medicine (DICOM), network, and simulation). When needed, they can be quickly retrieved and used under certain authorizations, while adding some auxiliary diagnosis management functions. It plays an important role in transmitting data between various imaging devices and organizing and storing data.

[0003] In the prior art, DICOM image files are not classified and stored, resulting in cumbersome operations when archiving multiple types of DICOM files when target delineation, dose assessment and tracking need to be processed and used simultaneously, and the low accuracy is not conducive to image automation processing. Summary of the invention

[0004] The embodiment of the present invention provides a method and system for archiving multiple types of DICOM files, so as to solve the problems of complicated operation, low accuracy and disadvantageous for automatic image processing when archiving multiple types of DICOM files.

[0005] In a first aspect, an embodiment of the present invention provides a method for archiving multiple types of DICOM files, comprising:

[0006] Step S1, obtaining a DICOM object, and parsing the DICOM object according to the file type of the DICOM object to obtain an image file set, a structure file set, a plan file set, and a dose file set;

[0007] Step S2, classifying the image files in the image file set based on the label values ​​of Patient ID, Study Instance UID and Series Instance UID, and generating a nested folder representing the serial association relationship of the patient examination;

[0008] Step S3, based on the first Series Instance UID tag value of the structure file in the structure file set, the corresponding structure file is stored in the corresponding Series Instance UID file; the structure file corresponding to the plan file in the plan file set is obtained to determine the second Study Instance UID tag value in the plan file. If it is determined that the plan file is not stored, the plan file is stored in the corresponding Series Instance UID file based on the second Study Instance UID tag value; the third Study Instance UID tag value of each dose file in the dose file set is obtained. If it is determined that the dose file is not stored, the dose file is stored in the corresponding Series Instance UID file based on the third Study Instance UID tag value.

[0009] Preferably, the step S1 specifically includes:

[0010] Reading a DICOM object, and if it is determined that the DICOM object is a multi-frame DICOM image, converting the DICOM object into a single-frame DICOM image;

[0011] If it is determined that the file type of the DICOM object is image, calling an image file parsing method to parse the DICOM object;

[0012] If it is determined that the file type of the DICOM object is rtstruct, calling a structure file parsing method to parse the DICOM object;

[0013] If it is determined that the file type of the DICOM object is rtplan, calling the plan file parsing method to parse the DICOM object;

[0014] If it is determined that the file type of the DICOM object is rtdose, a dose file parsing method is called to parse the DICOM object.

[0015] Preferably, the step S2 specifically includes:

[0016] Traversing the image files in the image file set, obtaining the label values ​​of Patient ID, StudyInstance UID and Series Instance UID in the image files, and filtering out image files in which any label value does not exist;

[0017] The image files are grouped according to Patient ID to generate a Patient ID folder; each group of image files in the Patient ID folder is grouped according to Study Instance UID to generate a Study Instance UID folder; each group of images in the Study Instance UID folder is grouped according to Series Instance UID to obtain a Series Instance UID folder, the grouped image files are archived according to Patient ID, Study Instance UID and Series InstanceUID to generate a nested folder, and the sequence association relationship of each image file in the nested folder is determined, and the DICOM object and the sequence association relationship are stored in the first data table.

[0018] Preferably, in step S3, based on the first SeriesInstance UID tag value of the structure file in the structure file set, the corresponding structure file is stored in the corresponding SeriesInstance UID file, specifically including:

[0019] Traverse the structure file set, obtain the first Series Instance UID tag value in each structure file, and search the first data table for the same Series Instance UID according to the first Series Instance UID tag value; if so, store the structure file in the corresponding Series Instance UID file, and build a structure sequence association relationship of the structure file and store it in the second data table; if not, do not archive it.

[0020] Preferably, in step S3, a structure file corresponding to the plan file in the plan file set is obtained to determine the second Study Instance UID tag value in the plan file. If it is determined that the plan file is not stored, the plan file is stored in the corresponding Series Instance UID file based on the second Study Instance UID tag value, specifically including:

[0021] Obtain the tag value RP1 of the Referenced SOP Instance UID in the Referenced Structure Set Sequence set of the plan file in the plan file set; if it is determined that RP1 is not empty, then search for the corresponding structure file RS in the second data table based on RP1, and search for the first sequence association result S1 based on the structure file RS; if it is determined that RP1 is empty or S1 is empty, then obtain the second Study Instance UID tag value in the plan file, and search for the second sequence association result S2 of the same Study Instance UID in the first data table based on the second StudyInstance UID tag value;

[0022] If the second sequence association result S2 is determined to be empty, the corresponding plan file will not be archived;

[0023] If it is determined that the first sequence association result S1 / the second sequence association result S2 is not empty, obtain the SOP Instance UID tag value RP3 in the plan file. If based on RP3 and S1 / S2, determine whether there are identical records in the third data table, if not, save the plan file in the corresponding Series Instance UID file, and build the plan sequence association relationship and store it in the third data table.

[0024] Preferably, in step S3, the third StudyInstance UID tag value of each dose file in the dose file set is obtained, and if it is determined that the dose file is not stored, the dose file is stored in the corresponding Series Instance UID file based on the third Study Instance UID tag value, specifically including:

[0025] Traverse the dose file collection, obtain the label value RD1 of the Referenced SOP Instance UID in the Referenced RT Plan Sequence in each dose file, and the value label RD2 of the Referenced SOP Instance UID in the Referenced Structure Set Sequence; search for the sequence association relationship S based on RD1 or RD2, and obtain the third Study Instance UID label value in the dose file. If the dose file is not stored based on the third Study Instance UID label value and the sequence association relationship S, then save the dose file in the corresponding Series Instance UID file.

[0026] Preferably, searching for the sequence association relationship S based on RD1 or RD2 specifically includes:

[0027] If it is determined that RD2 is not empty, then the third sequence association relationship S3 is searched in the second data table based on RD2;

[0028] If the third sequence association relationship S3 is empty or RD2 is empty, and RD1 is not empty, then based on RD1, the Study Instance UID tag value RP4 of the associated plan file is searched in the third data table; if RP4 is not empty, then the fourth sequence association relationship S4 is searched in the third data table according to RP4;

[0029] If the third sequence association relationship S3 is empty or RD2 is empty, and RD1 is empty, or if it is empty, or if the fourth sequence association relationship S4 is empty, then obtain the third Study Instance UID tag value in the dose file, and search for the fifth sequence association relationship S5 based on the third StudyInstance UID tag value;

[0030] If it is determined that the dose file is not stored according to the third Study Instance UID tag value and the sequence association relationship S, the dose file is stored in the corresponding Series Instance UID file, specifically including:

[0031] If it is determined that the third sequence association relationship S3 or the fourth sequence association relationship S4 or the fifth sequence association relationship S5 is not empty, obtain the SOP Instance UID tag value RD4 in the dose file, and determine whether the same record already exists in the fourth data table based on RD4 and the third sequence association relationship S3 or the fourth sequence association relationship S4 or the fifth sequence association relationship S5. If not, save the dose file in the folder corresponding to the Series Instance UID, and store the dose sequence association in the fourth data table.

[0032] In a second aspect, an embodiment of the present invention provides an archiving system for multiple types of DICOM files, including:

[0033] A parsing module, which obtains a DICOM object and parses the DICOM object according to the file type of the DICOM object to obtain an image file set, a structure file set, a plan file set and a dose file set;

[0034] An image file archiving module, which classifies the image files in the image file set based on the label values ​​of Patient ID, Study Instance UID and Series Instance UID, and generates a nested folder representing the serial association relationship of the patient examination;

[0035] The structure file archiving module stores the corresponding structure file into the corresponding Series Instance UID file based on the first Series Instance UID tag value of the structure file in the structure file set;

[0036] The plan file archiving module obtains the structure file corresponding to the plan file in the plan file set to determine the second Study Instance UID tag value in the plan file. If it is determined that the plan file is not stored, the plan file is stored in the corresponding Series Instance UID file based on the second StudyInstance UID tag value;

[0037] The dose file archiving module obtains the third Study Instance UID tag value of each dose file in the dose file set. If it is determined that the dose file is not stored, the dose file is stored in the corresponding Series Instance UID file based on the third Study Instance UID tag value.

[0038] In a third aspect, an embodiment of the present invention provides 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 method for archiving multiple types of DICOM files as described in the embodiment of the first aspect of the present invention are implemented.

[0039] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for archiving multiple types of DICOM files as described in the embodiment of the first aspect of the present invention.

[0040] The embodiment of the present invention provides a method and system for archiving multiple types of DICOM files to solve the problems of complicated operation, low accuracy and disadvantageous for automatic image processing when archiving multiple types of DICOM files. The method and system are mainly used in the field of medical image processing, such as target area delineation, dose assessment and tracking, etc., which need to process and use multiple types of DICOM files at the same time, and can simplify the archiving operation, improve the automation degree of image processing and subsequent operations, and improve efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0042] Figure 1 A flowchart of a method for archiving multiple types of DICOM files according to an embodiment of the present invention;

[0043] Figure 2 A schematic diagram of DICOM object parsing according to an embodiment of the present invention;

[0044] Figure 3 is a schematic diagram of image file classification according to an embodiment of the present invention;

[0045] Figure 4 A schematic diagram of structured file storage according to an embodiment of the present invention;

[0046] Figure 5 A schematic diagram of plan file storage according to an embodiment of the present invention;

[0047] Figure 6 A schematic diagram of dosage file storage according to an embodiment of the present invention;

[0048] Figure 7 FIG. 4 is a schematic diagram of a physical structure according to an embodiment of the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] In the embodiments of the present application, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone.

[0051] The terms "first" and "second" in the embodiments of the present application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a system, product or device comprising a series of parts or units is not limited to the listed parts or units, but optionally also includes parts or units that are not listed, or optionally also includes other parts or units inherent to these products or devices. In the description of the present application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0052] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0053] In the prior art, DICOM image files are not classified and stored, resulting in cumbersome operations when archiving multiple types of DICOM files, low accuracy and unfavorable for automated image processing when target delineation, dose assessment and tracking need to be processed and used simultaneously.

[0054] Therefore, the embodiment of the present invention provides a method and system for archiving multiple types of DICOM files to solve the problems of cumbersome operation, low accuracy and disadvantageous for automatic image processing when archiving multiple types of DICOM files. It is mainly used in the field of medical image processing, such as target area delineation, dose assessment and tracking, which require simultaneous processing and use of multiple types of DICOM files, and can simplify the archiving operation, improve the automation of image processing and subsequent operations, and improve efficiency. The following will be explained and introduced through multiple embodiments.

[0055] Figure 1 The present invention provides a method for archiving multiple types of DICOM files, which can be applied to the field of medical image processing, such as target area delineation, dose assessment and tracking, in scenarios where multiple types of DICOM files need to be processed and used simultaneously, including:

[0056] Step S1, obtaining a DICOM object, and parsing the DICOM object according to the file type of the DICOM object to obtain an image file set, a structure file set, a plan file set, and a dose file set;

[0057] DICOM refers to the Digital Medical Image Transfer Protocol, a set of standardized protocols for medical image processing, storage and transmission. It includes file formats and corresponding transmission protocols. Each DICOM file consists of three parts: file header, pixel data, and related information entities. Each specific information value is stored in the form of a tag (TAG), and the specific information content can be found according to the corresponding tag.

[0058] DICOM includes four DICOM RT object standards, namely RT Structure set, RT Plan, RT Dose and RT Image. Specifications for radiotherapy image transmission requirements.

[0059] The range of RT images includes images and portal images obtained from cone beam projection imaging devices such as X-ray simulation positioning machines and portal imaging devices. It can be used for images generated by calculation under the same geometric parameters, such as digitally reconstructed radiographic images (DRR), or images digitized from imaging films. The difference between RT images and general images is that they can be superimposed with some characteristic curves and imaging parameter information, such as the opening of the collimator, the position of the beam trimming device, the contour of the patient's organs, and the contour of the target area.

[0060] RT images are specifications for patient anatomy and related data transmission requirements obtained from devices such as CT, virtual simulation workstations or treatment planning systems. Its scope includes information related to patient anatomy, such as regions of interest (ROI), landmarks, isocenter positions and dose reference points, which are usually determined by devices such as CT, virtual simulation workstations or treatment planning systems, and can also include audio interpretation.

[0061] RT plan is a specification for the transmission requirements of RT treatment plan. Its scope includes geometric parameters and dose data of in vitro or close-range treatment processes, such as beam angles, collimator opening, beam trimmers, channels and radiation sources for close-range treatment. RT plan entities can be created by virtual simulation workstations first, and then supplemented by treatment planning systems before being transmitted to recording and verification systems or treatment equipment. RT object instances usually refer to the coordinate system and patient anatomical structure defined by RT structure set instances. RT record It is a specification for the transmission requirements of radiotherapy record objects. Its scope includes teletherapy information objects, close-range treatment information objects and radiotherapy comprehensive record information objects, which are data obtained from actual treatment equipment. These three information objects are simplifications of their treatment record information object definitions (IODs), and also include corresponding storage service object (SOP) classes to ensure that these IODs can be used on networks and storage media. Treatment record IODs are records of each treatment in the entire course of treatment, and can also perform dose calculations and dose measurements to show the cumulative effect of treatment. Provides quality assurance of radiotherapy plans.

[0062] RT dose is the specification of RT dose distribution transmission requirements. Its scope includes radiotherapy dose distribution data calculated by the treatment planning system, such as 1D, 2D or 3D dose distribution, isodose lines and dose volume histogram (DVH). It can also include audio annotation and application-defined lookup table.

[0063] In this embodiment, Figure 2 As shown in, firstly read the relevant information entity of the file, that is, read the DICOM object, if it is determined that the DICOM object is a multi-frame DICOM image, then convert the DICOM object into a single-frame DICOM image;

[0064] If it is determined that the file type of the DICOM object is image, calling an image file parsing method to parse the DICOM object;

[0065] If it is determined that the file type of the DICOM object is rtstruct, calling a structure file parsing method to parse the DICOM object;

[0066] If it is determined that the file type of the DICOM object is rtplan, calling the plan file parsing method to parse the DICOM object;

[0067] If it is determined that the file type of the DICOM object is rtdose, a dose file parsing method is called to parse the DICOM object.

[0068] Step S2, classifying the image files in the image file set based on the label values ​​of Patient ID, Study Instance UID and Series Instance UID, and generating a nested folder representing the serial association relationship of the patient examination;

[0069] In this embodiment, Figure 3 As shown in , the image files in the image file set are traversed to obtain the label values ​​of the Patient ID, Study Instance UID and Series Instance UID in the image files, and the image files in which any label value does not exist are filtered out;

[0070] The image files are grouped by Patient ID to generate a Patient ID folder; each group of image files in the Patient ID folder is grouped by Study Instance UID to generate a Study Instance UID folder; each group of images in the Study Instance UID folder is grouped by Series Instance UID to obtain a Series Instance UID folder, and the grouped image files are archived by Patient ID, Study Instance UID and Series InstanceUID to generate a nested folder. According to the classification result, the patient examination sequence association relationship of Patient ID->Study Instance UID->Series Instance UID (hereinafter referred to as the sequence association relationship) is obtained, and the sequence association relationship of each image file in the nested folder is determined, and the DICOM object and the sequence association relationship are stored in the first data table DB1.

[0071] Step S31: based on the first Series Instance UID tag value of the structure file in the structure file set, the corresponding structure file is stored in the corresponding Series Instance UID file; Figure 4 As shown in, the structure file set is traversed to obtain the first Series Instance UID tag value RS1 in each structure file, and a search is performed in the first data table DB1 to determine whether there is a result with the same Series Instance UID according to the first SeriesInstance UID tag value RS1; if so, the structure file is stored in the corresponding Series Instance UID file, and a structure sequence association relationship of the structure file is constructed and stored in the second data table; if not, no archiving is performed.

[0072] Step S32: Obtain a structure file corresponding to the plan file in the plan file set to determine the second Study Instance UID tag value in the plan file; if it is determined that the plan file is not stored, store the plan file in the corresponding Series Instance UID file based on the second Study Instance UID tag value;

[0073] In this embodiment, Figure 5As shown in, obtain the tag value RP1 of the Referenced SOP Instance UID in the ReferencedStructure Set Sequence set of the plan file in the plan file set; if it is determined that RP1 is not empty, then search the corresponding structure file RS in the second data table based on RP1, and according to step S2, search the first sequence association result S1 based on the structure file RS; if it is determined that RP1 is empty or S1 is empty, then obtain the second StudyInstance UID tag value in the plan file, and search the second sequence association result S2 of the same Study Instance UID in the first data table based on the second Study Instance UID tag value;

[0074] If the second sequence association result S2 is determined to be empty, the corresponding plan file will not be archived;

[0075] If it is determined that the first sequence association result S1 / the second sequence association result S2 is not empty, obtain the SOP Instance UID tag value RP3 in the plan file. If based on RP3 and S1 / S2, determine whether there are identical records in the third data table, if not, save the plan file in the corresponding Series Instance UID file, and build the plan sequence association relationship and store it in the third data table.

[0076] Step S33: Obtain the third Study Instance UID tag value of each dose file in the dose file set. If it is determined that the dose file is not stored, store the dose file in the corresponding SeriesInstance UID file based on the third Study Instance UID tag value.

[0077] In this embodiment, Figure 6 As shown in , the dose file collection is traversed to obtain the label value RD1 of the Referenced SOP Instance UID in the Referenced RTPlan Sequence and the value label RD2 of the Referenced SOP Instance UID in the Referenced StructureSet Sequence in each dose file; according to step S2, the sequence association relationship S is searched based on RD1 or RD2, and the third Study Instance UID label value in the dose file is obtained. If it is judged that the dose file is not stored according to the third Study Instance UID label value and the sequence association relationship S, the dose file is stored in the corresponding Series Instance UID file.

[0078] The searching of the sequence association relationship S based on RD1 or RD2 specifically includes:

[0079] If it is determined that RD2 is not empty, then the third sequence association relationship S3 is searched in the second data table based on RD2;

[0080] If the third sequence association relationship S3 is empty or RD2 is empty, and RD1 is not empty, then based on RD1, the Study Instance UID tag value RP4 of the associated plan file is searched in the third data table; if RP4 is not empty, then the fourth sequence association relationship S4 is searched in the third data table according to RP4;

[0081] If the third sequence association relationship S3 is empty or RD2 is empty, and RD1 is empty, or if it is empty, or if the fourth sequence association relationship S4 is empty, then obtain the third Study Instance UID tag value in the dose file, and search for the fifth sequence association relationship S5 based on the third StudyInstance UID tag value;

[0082] If it is determined that the dose file is not stored according to the third Study Instance UID tag value and the sequence association relationship S, the dose file is stored in the corresponding Series Instance UID file, specifically including:

[0083] If it is determined that the third sequence association relationship S3 or the fourth sequence association relationship S4 or the fifth sequence association relationship S5 is not empty, obtain the SOP Instance UID tag value RD4 in the dose file, and determine whether the same record already exists in the fourth data table based on RD4 and the third sequence association relationship S3 or the fourth sequence association relationship S4 or the fifth sequence association relationship S5. If not, save the dose file in the folder corresponding to the Series Instance UID, and store the dose sequence association in the fourth data table.

[0084] The embodiment of the present invention further provides an archiving system for multi-type DICOM files, based on the archiving method for multi-type DICOM files in the above embodiments, comprising:

[0085] A parsing module, which obtains a DICOM object and parses the DICOM object according to the file type of the DICOM object to obtain an image file set, a structure file set, a plan file set and a dose file set;

[0086] An image file archiving module, which classifies the image files in the image file set based on the label values ​​of Patient ID, Study Instance UID and Series Instance UID, and generates a nested folder representing the serial association relationship of the patient examination;

[0087] The structure file archiving module stores the corresponding structure file into the corresponding Series Instance UID file based on the first Series Instance UID tag value of the structure file in the structure file set;

[0088] The plan file archiving module obtains the structure file corresponding to the plan file in the plan file set to determine the second Study Instance UID tag value in the plan file. If it is determined that the plan file is not stored, the plan file is stored in the corresponding Series Instance UID file based on the second StudyInstance UID tag value;

[0089] The dose file archiving module obtains the third Study Instance UID tag value of each dose file in the dose file set. If it is determined that the dose file is not stored, the dose file is stored in the corresponding Series Instance UID file based on the third Study Instance UID tag value.

[0090] Based on the same concept, the embodiment of the present invention also provides a schematic diagram of an entity structure, such as Figure 7 As shown, the server may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the steps of the archiving method of multiple types of DICOM files as described in the above embodiments. For example, it includes:

[0091] Step S1, obtaining a DICOM object, and parsing the DICOM object according to the file type of the DICOM object to obtain an image file set, a structure file set, a plan file set, and a dose file set;

[0092] Step S2, classifying the image files in the image file set based on the label values ​​of Patient ID, Study Instance UID and Series Instance UID, and generating a nested folder representing the serial association relationship of the patient examination;

[0093] Step S3, based on the first Series Instance UID tag value of the structure file in the structure file set, the corresponding structure file is stored in the corresponding Series Instance UID file; the structure file corresponding to the plan file in the plan file set is obtained to determine the second Study Instance UID tag value in the plan file. If it is determined that the plan file is not stored, the plan file is stored in the corresponding Series Instance UID file based on the second Study Instance UID tag value; the third Study Instance UID tag value of each dose file in the dose file set is obtained. If it is determined that the dose file is not stored, the dose file is stored in the corresponding Series Instance UID file based on the third Study Instance UID tag value.

[0094] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. 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, and the computer software product is stored in a storage medium, including a number of instructions for 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.

[0095] Based on the same concept, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores a computer program, which includes at least one code segment, and the at least one code segment can be executed by a main control device to control the main control device to implement the steps of the archiving method of multiple types of DICOM files as described in the above embodiments. For example, it includes:

[0096] Step S1, obtaining a DICOM object, and parsing the DICOM object according to the file type of the DICOM object to obtain an image file set, a structure file set, a plan file set, and a dose file set;

[0097] Step S2, classifying the image files in the image file set based on the label values ​​of Patient ID, Study Instance UID and Series Instance UID, and generating a nested folder representing the serial association relationship of the patient examination;

[0098] Step S3, based on the first Series Instance UID tag value of the structure file in the structure file set, the corresponding structure file is stored in the corresponding Series Instance UID file; the structure file corresponding to the plan file in the plan file set is obtained to determine the second Study Instance UID tag value in the plan file. If it is determined that the plan file is not stored, the plan file is stored in the corresponding Series Instance UID file based on the second Study Instance UID tag value; the third Study Instance UID tag value of each dose file in the dose file set is obtained. If it is determined that the dose file is not stored, the dose file is stored in the corresponding Series Instance UID file based on the third Study Instance UID tag value.

[0099] Based on the same technical concept, an embodiment of the present application also provides a computer program, which, when executed by a main control device, is used to implement the above method embodiment.

[0100] The program may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor.

[0101] Based on the same technical concept, the embodiment of the present application further provides a processor, which is used to implement the above method embodiment. The above processor can be a chip.

[0102] The various embodiments of the present invention can be combined arbitrarily to achieve different technical effects.

[0103] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. 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 computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. 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 available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidStateDisk), etc.

[0104] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for archiving multiple types of DICOM files, characterized in that: include: Step S1, obtaining a DICOM object, and parsing the DICOM object according to the file type of the DICOM object to obtain an image file set, a structure file set, a plan file set, and a dose file set; Step S2: classify the image files in the image file set based on the tag values ​​of Patient ID, Study Instance UID and Series Instance UID, and generate a nested folder representing the serial association relationship of the patient examination; the step S2 specifically includes: Traversing the image files in the image file set, obtaining the label values ​​of Patient ID, StudyInstance UID and Series Instance UID in the image files, and filtering out image files in which any label value does not exist; The image files are grouped by Patient ID to generate a Patient ID folder; each group of image files in the Patient ID folder is grouped by Study Instance UID to generate a Study Instance UID folder; each group of images in the Study Instance UID folder is grouped by Series Instance UID to obtain a SeriesInstance UID folder, the grouped image files are archived by Patient ID, Study Instance UID and Series Instance UID to generate a nested folder, and the sequence association relationship of each image file in the nested folder is determined, and the DICOM object and the sequence association relationship are stored in a first data table; Step S3, based on the first Series Instance UID tag value of the structure file in the structure file set, the corresponding structure file is stored in the corresponding Series Instance UID file; the structure file corresponding to the plan file in the plan file set is obtained to determine the second Study Instance UID tag value in the plan file. If it is determined that the plan file is not stored, the plan file is stored in the corresponding Series Instance UID file based on the second Study Instance UID tag value; the third Study Instance UID tag value of each dose file in the dose file set is obtained. If it is determined that the dose file is not stored, the dose file is stored in the corresponding Series Instance UID file based on the third Study Instance UID tag value.

2. The method for archiving multi-type DICOM files according to claim 1, characterized in that: The step S1 specifically includes: Reading a DICOM object, and if it is determined that the DICOM object is a multi-frame DICOM image, converting the DICOM object into a single-frame DICOM image; If it is determined that the file type of the DICOM object is image, calling an image file parsing method to parse the DICOM object; If it is determined that the file type of the DICOM object is rtstruct, calling a structure file parsing method to parse the DICOM object; If it is determined that the file type of the DICOM object is rtplan, calling the plan file parsing method to parse the DICOM object; If it is determined that the file type of the DICOM object is rtdose, a dose file parsing method is called to parse the DICOM object.

3. The method for archiving multi-type DICOM files according to claim 1, characterized in that: In the step S3, based on the first Series Instance UID tag value of the structure file in the structure file set, the corresponding structure file is stored in the corresponding Series Instance UID file, which specifically includes: Traverse the structure file set, obtain the first Series Instance UID tag value in each structure file, and search the first data table for the same Series Instance UID according to the first Series Instance UID tag value; if so, store the structure file in the corresponding Series Instance UID file, and build a structure sequence association relationship of the structure file and store it in the second data table; if not, do not archive it.

4. The method for archiving multi-type DICOM files according to claim 3, characterized in that: In the step S3, a structure file corresponding to the plan file in the plan file set is obtained to determine the second Study Instance UID tag value in the plan file. If it is determined that the plan file is not stored, the plan file is stored in the corresponding Series Instance UID file based on the second Study Instance UID tag value, specifically including: Obtain the tag value RP1 of the Referenced SOP Instance UID in the Referenced Structure Set Sequence set of the plan file in the plan file set; if it is determined that RP1 is not empty, then search for the corresponding structure file RS in the second data table based on RP1, and search for the first sequence association result S1 based on the structure file RS; if it is determined that RP1 is empty or S1 is empty, then obtain the second Study Instance UID tag value in the plan file, and search for the second sequence association result S2 of the same Study Instance UID in the first data table based on the second StudyInstance UID tag value; If the second sequence association result S2 is determined to be empty, the corresponding plan file will not be archived; If it is determined that the first sequence association result S1 / the second sequence association result S2 is not empty, obtain the SOP Instance UID tag value RP3 in the plan file. If based on RP3 and S1 / S2, determine whether there are identical records in the third data table, if not, store the plan file in the corresponding Series Instance UID file, and build the plan sequence association relationship and store it in the third data table.

5. The method for archiving multi-type DICOM files according to claim 4, characterized in that: In the step S3, the third Study Instance UID tag value of each dose file in the dose file set is obtained. If it is determined that the dose file is not stored, the dose file is stored in the corresponding Series Instance UID file based on the third Study Instance UID tag value, specifically including: Traverse the dose file collection, obtain the label value RD1 of the ReferencedSOP Instance UID in the Referenced RT Plan Sequence in each dose file, and the value label RD2 of the ReferencedSOP Instance UID in the Referenced Structure Set Sequence; search for the sequence association S based on RD1 or RD2, and obtain the third Study Instance UID label value in the dose file. If the dose file is not stored based on the third Study Instance UID label value and the sequence association S, then store the dose file in the corresponding Series Instance UID file.

6. The method for archiving multiple types of DICOM files according to claim 5, characterized in that: Searching for a sequence association relationship S based on RD1 or RD2 specifically includes: If it is determined that RD2 is not empty, then searching the second data table for a third sequence association relationship S3 based on RD2; If the third sequence association relationship S3 is empty or RD2 is empty, and RD1 is not empty, then based on RD1, the Study Instance UID tag value RP4 of the associated plan file is searched in the third data table; if RP4 is not empty, then the fourth sequence association relationship S4 is searched in the third data table according to RP4; If the third sequence association relationship S3 is empty or RD2 is empty, and RD1 is empty, or if it is empty, or if the fourth sequence association relationship S4 is empty, then obtain the third Study Instance UID tag value in the dose file, and search for the fifth sequence association relationship S5 based on the third Study Instance UID tag value; If it is determined that the dose file is not stored according to the third Study Instance UID tag value and the sequence association relationship S, the dose file is stored in the corresponding Series Instance UID file, specifically including: If it is determined that the third sequence association relationship S3 or the fourth sequence association relationship S4 or the fifth sequence association relationship S5 is not empty, obtain the SOP Instance UID tag value RD4 in the dose file, and determine whether the same record already exists in the fourth data table based on RD4 and the third sequence association relationship S3 or the fourth sequence association relationship S4 or the fifth sequence association relationship S5. If not, save the dose file in the folder corresponding to the Series Instance UID, and store the dose sequence association in the fourth data table.

7. A multi-type DICOM file archiving system, characterized in that: include: A parsing module, which obtains a DICOM object and parses the DICOM object according to the file type of the DICOM object to obtain an image file set, a structure file set, a plan file set and a dose file set; The image file archiving module classifies the image files in the image file set based on the label values ​​of Patient ID, Study Instance UID and Series Instance UID, and generates a nested folder representing the serial association relationship of the patient examination; specifically includes: Traversing the image files in the image file set, obtaining the label values ​​of Patient ID, StudyInstance UID and Series Instance UID in the image files, and filtering out image files in which any label value does not exist; The image files are grouped by Patient ID to generate a Patient ID folder; each group of image files in the Patient ID folder is grouped by Study Instance UID to generate a Study Instance UID folder; each group of images in the Study Instance UID folder is grouped by Series Instance UID to obtain a SeriesInstance UID folder, the grouped image files are archived by Patient ID, Study Instance UID and Series Instance UID to generate a nested folder, and the sequence association relationship of each image file in the nested folder is determined, and the DICOM object and the sequence association relationship are stored in a first data table; The structure file archiving module stores the corresponding structure file into the corresponding Series Instance UID file based on the first Series Instance UID tag value of the structure file in the structure file set; The plan file archiving module obtains the structure file corresponding to the plan file in the plan file set to determine the second Study Instance UID tag value in the plan file. If it is determined that the plan file is not stored, the plan file is stored in the corresponding Series Instance UID file based on the second StudyInstance UID tag value; The dose file archiving module obtains the third Study Instance UID tag value of each dose file in the dose file set. If it is determined that the dose file is not stored, the dose file is stored in the corresponding Series Instance UID file based on the third Study Instance UID tag value.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for archiving multiple types of DICOM files according to any one of claims 1 to 6 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 method for archiving multiple types of DICOM files as claimed in any one of claims 1 to 6 are implemented.