A non-standard DICOM file conversion method and system

By converting non-standard DICOM files to standard DICOM formats, the data integration and exchange problems caused by diversified file formats in the medical industry are solved, and a more efficient medical image data management and informatization process is achieved.

CN119274757BActive Publication Date: 2025-03-14DIGITAL HEALTH CHINA TECHNOLOGIES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411801700.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-14
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

The diversified file formats in the medical industry have led to the challenges of data integration, management and cross-platform exchange. Traditional file formats are difficult to meet the professionalism, standardization and security needs of image data in the medical field.

Method used

Provide a conversion method and system for non-standard DICOM files. By obtaining non-standard DICOM files, loading and judging file format, obtaining pixel information or binary character value arrays, creating a DcmDataset storage structure of standard DICOM files, and storing the information in the corresponding TAG, and finally saving the file in the standard DICOM format.

Benefits of technology

Package diversified image data in hospitals into DICOM format, promote data management, integration and cross-platform exchange, improve the level of medical image data management, promote the medical informatization process, and ensure medical quality and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119274757B_ABST
    Figure CN119274757B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for converting non-standard DICOM files. The method obtains and loads non-standard DICOM files, determines different file formats of non-standard DICOM files by using the suffix names obtained after loading, and uses different classes for analysis and storage according to the determined and classified formats, thereby packaging diversified image data such as BMP, JPG, PDF, and video files in hospitals into DICOM format for access. Non-standard DICOM format medical files are created, transmitted, stored, processed, and displayed in a standard DICOM format after being combined with patient information, thereby facilitating the management, integration, and cross-platform exchange of these process file assets, improving the management level of medical image data, promoting the process of medical informatization, and ensuring medical quality and safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of medical file application processing, and in particular relates to a conversion method and system for non-standard DICOM files. Background Art

[0002] With the rapid development of the medical industry and the continuous innovation of medical imaging technology, the amount of imaging data generated by hospitals has shown explosive growth. These imaging data, including but not limited to static images in BMP and JPG formats, medical reports in PDF format, and video files, play an indispensable role in clinical diagnosis, treatment plan formulation, and patient management. However, while the diversity of file formats brings convenience to medical work, it also brings challenges to data integration, management, and cross-platform exchange.

[0003] As an international standard for medical imaging and related information, DICOM not only supports a wide range of imaging data formats, but also contains rich metadata, such as patient information, examination details, image attributes, etc., so that imaging data can be created, transmitted, stored, processed and displayed in a standardized way. This format not only ensures the quality and security of imaging data, but also promotes data exchange and sharing between different medical systems, providing a solid foundation for medical collaboration, telemedicine and big data analysis.

[0004] Given the importance of medical imaging data and its unique attribute requirements (such as image quality, information integrity, standardization, etc.), traditional file formats such as BMP and JPG are convenient for general image processing, but lack patient information, examination details, image attributes, etc., and it is difficult to meet the medical field's needs for highly professional, standardized and secure imaging data. Although PDF can effectively integrate text and images, it lacks functions optimized for medical imaging data, such as patient label information, doctor information, hospital information, etc. Video files are more used for dynamic observation, but they also require unified standards to ensure data consistency and interoperability. Therefore, there is a lack of file conversion methods to package diverse imaging data such as BMP, JPG, PDF, video files in hospitals into DICOM format for storage and access. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the present application provides a method and system for converting non-standard DICOM files.

[0006] In a first aspect, the present application proposes a method for converting a non-standard DICOM file, comprising the following steps:

[0007] Get non-standard DICOM files;

[0008] Loading the non-standard DICOM file, and determining the file format of the non-standard DICOM file according to the suffix obtained after loading;

[0009] When the file format is a static image format, the pixel information of the static image is obtained through the image pixel loading mechanism. When the file format is a non-image format, the non-image format file is loaded through the FileStream class and the binary character value array is obtained.

[0010] Create a new DcmDataset storage structure for a standard DICOM file, put the pixel information into the DcmDataset storage structure, assign it to the first TAG for storage, put the binary character value array of the non-image format file into the DcmDataset storage structure in the OB data format, and assign it to the second TAG for storage;

[0011] The patient's tag information is obtained, and the tag information is inserted into the standard image TAG or custom TAG of the standard DICOM file. Finally, the DcmDataset storage structure is saved as a standard DICOM file to complete the format conversion of the non-standard DICOM file.

[0012] In some optional implementations of some embodiments, when the file format is a static image format, the pixel information of the static image is obtained through the picture pixel loading mechanism; when the file format is a non-image format, the non-image format file is loaded through the FileStream class, and a binary character value array is obtained, including:

[0013] For static image formats, load the static image through the Bitmap class and obtain the characters corresponding to the complete pixels;

[0014] For non-image formats, the FileStream class is used to open the non-image format file, and then the binary data of the non-image format file is obtained through Stream.Read, and stored in a corresponding character array to obtain the binary character value array.

[0015] In some optional implementations of some embodiments, the DcmDataset storage structure of the newly created standard DICOM file, the pixel information is placed in the DcmDataset storage structure, and is assigned a first TAG for storage, and the binary character value array of the non-image format file is placed in the DcmDataset storage structure in OB data format, and is assigned a second TAG for storage, including:

[0016] Put the pixel information into the DcmDataset storage structure and assign it to the standard image TAG: 0x7FE00010-PixelData;

[0017] Put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, through the custom TAG: 0x7f010001.

[0018] In some optional implementations of some embodiments, obtaining the patient's tag information, inserting the tag information into a standard image TAG or a custom TAG of a standard DICOM file, and finally saving the DcmDataset storage structure as a standard DICOM file to complete the format conversion of the non-standard DICOM file include:

[0019] Obtaining patient tag information corresponding to the non-standard DICOM format file, including patient examination information, doctor information, and hospital information;

[0020] Write the patient examination information, doctor information and hospital information into the newly created standard DICOM file to be saved in the form of key:value key-value pairs, where the TAG value corresponds to the standard image TAG or custom TAG

[0021] In the second aspect, the present application proposes a non-standard DICOM file conversion system, including a non-standard file acquisition module, a file classification module, a file processing module, a data storage module and a format conversion module;

[0022] The non-standard file acquisition module is used to acquire non-standard DICOM files;

[0023] The file classification module is used to load the non-standard DICOM file and determine the file format of the non-standard DICOM file according to the suffix obtained after loading;

[0024] The file processing module is used to obtain pixel information of a static image through a picture pixel loading mechanism when the file format is a static image format, and to load the non-image format file through a FileStream class when the file format is a non-image format, and obtain a binary character value array;

[0025] The data storage module is used to create a DcmDataset storage structure of a standard DICOM file, put the pixel information into the DcmDataset storage structure, assign it to the first TAG for storage, put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, and assign it to the second TAG for storage;

[0026] The format conversion module is used to obtain the patient's tag information, insert the tag information into the standard image TAG or custom TAG of the standard DICOM file, and finally save the DcmDataset storage structure as a standard DICOM file to complete the format conversion of the non-standard DICOM file.

[0027] In some optional implementations of some embodiments, the file processing module includes: a static image processing unit and a non-image processing unit;

[0028] The static image processing unit is used to load the static image through the Bitmap class for the static image format and obtain the characters corresponding to the complete pixels;

[0029] The non-image processing unit is used to use the FileStream class to open the non-image format file for the non-image format, and then obtain the binary data of the non-image format file through Stream.Read, store it in a corresponding character array, and obtain the binary character value array.

[0030] In some optional implementations of some embodiments, the data storage module includes a static image storage unit and a non-image storage unit;

[0031] The static image storage unit is used to put pixel information into the DcmDataset storage structure and assign the value to the standard image TAG: 0x7FE00010-PixelData;

[0032] The non-image storage unit is used to put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, through the custom TAG: 0x7f010001.

[0033] In some optional implementations of some embodiments, the data storage module includes an information acquisition unit and an information storage unit.

[0034] The information acquisition unit is used to acquire the patient tag information corresponding to the non-standard DICOM format file, including patient examination information, doctor information and hospital information;

[0035] The information storage unit is used to write the patient examination information, doctor information and hospital information into a newly created standard DICOM file to be saved in the form of key: value key-value pairs for storage, wherein the TAG value corresponds to the standard image TAG or the custom TAG.

[0036] In a third aspect, the present application proposes an electronic device, comprising 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 above method when executing the computer program.

[0037] In a fourth aspect, the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0038] Beneficial effects of the present invention:

[0039] The hospital's various imaging data such as BMP, JPG, PDF, video files, etc. are packaged into DICOM format for storage and access. For non-standard DICOM format medical files, they will be created, transmitted, stored, processed and displayed in standard DICOM format after being combined with patient information, which will facilitate the management, integration and cross-platform exchange of these process file assets, improve the level of medical imaging data management, promote the process of medical informatization, and ensure medical quality and safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is the overall flow chart of the present invention.

[0041] Figure 2 It is a schematic diagram of the system module of the present invention. DETAILED DESCRIPTION

[0042] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein; on the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0043] In the first aspect, the present application proposes a method for converting non-standard DICOM files, such as Figure 1 As shown, the following steps are included:

[0044] S100: Acquisition of non-standard DICOM files;

[0045] Among them, valuable non-standard DICOM format files such as clinical diagnosis and patient management are ready to be processed;

[0046] S200: Loading the non-standard DICOM file, and determining the file format of the non-standard DICOM file according to the suffix obtained after loading;

[0047] Load the file and determine whether the file is a static image (BMP, JPG, PNG) by the file extension;

[0048] S300: when the file format is a static image format, pixel information of the static image is obtained through the image pixel loading mechanism; when the file format is a non-image format, the non-image format file is loaded through the FileStream class, and a binary character value array is obtained;

[0049] In some optional implementations of some embodiments, when the file format is a static image format, the pixel information of the static image is obtained through the picture pixel loading mechanism; when the file format is a non-image format, the non-image format file is loaded through the FileStream class, and a binary character value array is obtained, including:

[0050] For static image formats, load the static image through the Bitmap class and obtain the characters corresponding to the complete pixels;

[0051] For non-image formats, the FileStream class is used to open the non-image format file, and then the binary data of the non-image format file is obtained through Stream.Read, and stored in a corresponding character array to obtain the binary character value array.

[0052] Purpose: The purpose of obtaining pixel information is to store it in the image pixel TAG:0x7FE00010 node in the standard DICOM format. The 0x7FE00010 node of the standard DICOM is used to store the continuous data composed of each pixel value corresponding to the MXN of the image, so that these static image files can be displayed in the form of standard DICOM format.

[0053] Detailed steps: For standard BMP, JPG, and PNG formats, use the Bitmap.GetPixel method in the System.Drawing standard library in C# development to obtain the actual byte character value of each point in a MXN-sized image;

[0054] The specific implementation is as follows:

[0055] Get non-standard DICOM format files.

[0056] The relevant code for getting the byte[] of the static image pixel is as follows:

[0057] public static byte[] GetPixels(Bitmap bitmap)

[0058] {

[0059] byte[] bytes = new byte[bitmap.Width * bitmap.Height *3];

[0060] int wide = bitmap.Width;

[0061] int i = 0;

[0062] int height = bitmap.Height;

[0063] for (int y = 0; y < height; y++)

[0064] {

[0065] for (int x = 0; x < wide; x++)

[0066] {

[0067] var srcColor = bitmap.GetPixel(x, y);

[0068] bytes[i] = srcColor.R;

[0069] i++;

[0070] bytes[i] = srcColor.G;

[0071] i++;

[0072] bytes[i] = srcColor.B;

[0073] i++;

[0074] }

[0075] }

[0076] return bytes;

[0077] Chinese logical language:

[0078] 1. First, create a byte array according to the image file size. Its size is the length x width x 3 of the bmp file, where 3 is the number of channels of the color image. If it is grayscale, you don’t need to multiply by 3.

[0079] 2. Traverse the width and height of the original image through the bitmap structure. bitmap.GetPixel obtains the RGB value of a single pixel of the original image and puts them into the bytes array respectively.

[0080] For other non-static file formats such as PDF and video, you can use FileStream to open a raw file, and then use Stream.Read to get the file binary data and store it in a corresponding byte character array, which contains all the contents of the file.

[0081] The specific implementation is as follows:

[0082] Get binary file streams such as PDF and video:

[0083] FileStream stream = new FileStream(FilePath, FileMode.Open,System.IO.FileAccess.Read, FileShare.ReadWrite);

[0084] byte[] bArray = new byte[stream.Length];

[0085] stream.Read(bArray, 0, (int)stream.Length);

[0086] Chinese logical language:

[0087] 1. Use FileStream to load binary files such as PDF and AVI into memory;

[0088] 2. Create a new byte array bArray and use stream.Read to get the byte data stream of the file and store it into bArray.

[0089] S400: Create a DcmDataset storage structure of a standard DICOM file, put the pixel information into the DcmDataset storage structure, assign it to the first TAG for storage, put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, and assign it to the second TAG for storage;

[0090] In some optional implementations of some embodiments, the DcmDataset storage structure of the newly created standard DICOM file, the pixel information is placed in the DcmDataset storage structure, and is assigned a first TAG for storage, and the binary character value array of the non-image format file is placed in the DcmDataset storage structure in OB data format, and is assigned a second TAG for storage, including:

[0091] Put the pixel information into the DcmDataset storage structure and assign it to the standard image TAG: 0x7FE00010-PixelData;

[0092] Put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, through the custom TAG: 0x7f010001.

[0093] Detailed steps: First, create a DataSet type in the DICOM standard format. DataSet is composed of multiple key-value pairs, including the corresponding KEY TAG (field name) and value. By adding the corresponding key value key: (TAG:0x7FE00010) and assigning its corresponding value: value to the obtained MXN pixel value buffer, all pixels of the non-DICOM file can be inserted into the field bit 0x7FE00010 required by the standard DICOM. Other software or platforms can obtain the pixel value of each bit of the image by parsing this field to display the image;

[0094] For non-static image format files, such as PDF, AVI and other format files, add the corresponding key value key:(TAG:0x7f010001) and assign its corresponding value: value to the binary stream buffer of the obtained file.

[0095] The specific implementation is as follows:

[0096] Insert the binary of the static image into the pixel information into TAG: 0x7FE00010 - pixel data:

[0097] byte[] pixels = GetPixels(bitmap);

[0098] MemoryByteBuffer buffer = new MemoryByteBuffer(pixels);

[0099] DicomDataset dataset = new DicomDataset();

[0100] DicomPixelData pixelData = DicomPixelData.Create(dataset, true);

[0101] pixelData.BitsStored = 8;

[0102] pixelData.SamplesPerPixel = 3;

[0103] pixelData.HighBit = 7;

[0104] pixelData.PixelRepresentation = 0;

[0105] pixelData.PlanarConfiguration = 0;

[0106] pixelData.AddFrame(buffer);

[0107] Chinese logical language:

[0108] 1. Use the GetPixels method to get the pixel array pixels of the original image;

[0109] 2. Use MemoryByteBuffer to convert it into MemoryByteBuffer type; 3. Create a newDicomDataset, key-value structure;

[0110] 4. Create a new DicomPixelData.Create,Pixel DATA pixel TAG;

[0111] 5. Set the number of channels, whether there is a signed attribute, the highest bit and other attribute information; 6. Finally, use AddFrame to write the image buffer to the corresponding tag value.

[0112] Insert non-image format file binary into custom TAG: 0x7f010001: dataset .PutOB(0x7f010001,bb);

[0113] Chinese logical language:

[0114] 1. Write the value character array bb obtained in PDF, AVI and other formats into key-private custom tag0x7f010001.

[0115] S500: Acquire the patient's tag information, insert the tag information into the standard image TAG or custom TAG of the standard DICOM file, and finally save the DcmDataset storage structure as a standard DICOM file to complete the format conversion of the non-standard DICOM file.

[0116] In some optional implementations of some embodiments, obtaining the patient's tag information, inserting the tag information into a standard image TAG or a custom TAG of a standard DICOM file, and finally saving the DcmDataset storage structure as a standard DICOM file to complete the format conversion of the non-standard DICOM file include:

[0117] Obtaining patient tag information corresponding to the non-standard DICOM format file, including patient examination information, doctor information, and hospital information;

[0118] Write the patient examination information, doctor information and hospital information into a newly created standard DICOM file to be saved in the form of key:value key-value pairs, where the TAG value corresponds to the standard image TAG or the custom TAG;

[0119] Detailed steps: First, obtain the patient information, doctor information, and hospital information corresponding to the original non-standard DICOM format file. This information is associated with these files and can be provided in the database or the system that generates these data;

[0120] After obtaining this information, write it into the DICOM file to be saved in the form of key: value pairs, such as name key:0x00100010vaule: Zhang San. The specific TAG value has been specified in the DICOM standard and can be written according to the corresponding field.

[0121] The specific implementation is as follows:

[0122] Insert patient label information, doctor information, hospital information:

[0123] dataset .Add(DicomTag.SpecificCharacterSet, "ISO_IR100");

[0124] dataset .Add(DicomTag.PhotometricInterpretation, PhotometricInterpretation.Rgb.Value);

[0125] dataset .Add(DicomTag.Rows, (ushort)bitmap.Height);

[0126] dataset .Add(DicomTag.Columns, (ushort)bitmap.Width);

[0127] dataset .Add(DicomTag.BitsAllocated, (ushort)8);

[0128] dataset .Add(DicomTag.PatientID, PatInfo.PatId);

[0129] dataset .Add(DicomTag.AccessionNumber,PatInfo.AccessNo);

[0130] dataset .Add(DicomTag.PatientName, PatInfo.PatName);

[0131] dataset .Add(DicomTag.PatientSex, PatInfo.PatSex);

[0132] dataset .Add(DicomTag.PatientAge, PatInfo.PatAge);

[0133] dataset .Add(DicomTag.PatientBirthDate,PatInfo.BirthDate);

[0134] dataset .Add(DicomTag.StudyID, PatInfo.Studyid);

[0135] dataset .Add(DicomTag.BodyPartExamined,PatInfo.CheckClass);

[0136] dataset .Add(DicomTag.Modality, PatInfo.Modality);

[0137] dataset .Add(DicomTag.ModalitiesInStudy,PatInfo.Modality);

[0138] dataset .Add(DicomTag.StudyDate, PatInfo.sStudyDate);

[0139] dataset .Add(DicomTag.StudyTime, PatInfo.sStudyTime);

[0140] dataset.Add(DicomTag.SeriesNumber, "1");

[0141] dataset.Add(DicomTag.StudyInstanceUID, UpDicomInfo.StudyInstanceUID);

[0142] dataset.Add(DicomTag.SeriesInstanceUID, UpDicomInfo.SeriesInstanceUID);

[0143] dataset.Add(DicomTag.SOPInstanceUID, strInstanceTMP + "." + AInstanceNumber.ToString());

[0144] dataset.Add(DicomTag.SOPClassUID, UpDicomInfo.SopClassUID);

[0145] dataset.Add(DicomTag.InstanceNumber, AInstanceNumber.ToString());

[0146] dataset.Add(DicomTag.PixelSpacing, "");

[0147] dataset.Add(DicomTag.SeriesDate, PatInfo.sStudyDate);

[0148] dataset.Add(DicomTag.SeriesTime, PatInfo.sStudyTime);

[0149] dataset.Add(DicomTag.CreationDate, "");

[0150] dataset.Add(DicomTag.Manufacturer, "Device Name");

[0151] Save and generate a standardized DICOM format file

[0152] It should be noted that in the original text, there is an error in line 11 where it says "strInstanceTMP+ "." AInstanceNumber.ToString()", which should be "strInstanceTMP + "." + AInstanceNumber.ToString()" in the corrected translation.DicomFile dicomfile = new DicomFile(dataset);

[0153] dicomfile.Save(@"c:\Standard DICOM.dcm");

[0154] Chinese logical language:

[0155] 1. Create a DataSet type in DICOM standard format. DataSet is composed of many key-value pairs, including the corresponding KEY TAG (field name) and value;

[0156] 2. First, obtain the patient information, doctor information, and hospital information corresponding to the original non-standard DICOM format file. This information is associated with these files and can be provided in the database or the system that generates these data;

[0157] 3. After obtaining this information, write it into the DICOM file to be saved in the form of key: value pairs, such as name key:0x00100010vaule: Zhang San. The specific TAG value has been formulated in the DICOM standard, and it can be written according to the corresponding field;

[0158] 4. Finally, save the DataSet to the standard DICOM file to be generated.

[0159] In the second aspect, the present application proposes a non-standard DICOM file conversion system, such as Figure 2 As shown, it includes a non-standard file acquisition module, a file classification module, a file processing module, a data storage module and a format conversion module;

[0160] The non-standard file acquisition module is used to acquire non-standard DICOM files;

[0161] The file classification module is used to load the non-standard DICOM file and determine the file format of the non-standard DICOM file according to the suffix obtained after loading;

[0162] The file processing module is used to obtain pixel information of a static image through a picture pixel loading mechanism when the file format is a static image format, and to load the non-image format file through a FileStream class when the file format is a non-image format, and obtain a binary character value array;

[0163] The data storage module is used to create a DcmDataset storage structure of a standard DICOM file, put the pixel information into the DcmDataset storage structure, assign it to the first TAG for storage, put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, and assign it to the second TAG for storage;

[0164] The format conversion module is used to obtain the patient's tag information, insert the tag information into the standard image TAG or custom TAG of the standard DICOM file, and finally save the DcmDataset storage structure as a standard DICOM file to complete the format conversion of the non-standard DICOM file.

[0165] In some optional implementations of some embodiments, the file processing module includes: a static image processing unit and a non-image processing unit;

[0166] The static image processing unit is used to load the static image through the Bitmap class for the static image format and obtain the characters corresponding to the complete pixels;

[0167] The non-image processing unit is used to use the FileStream class to open the non-image format file for the non-image format, and then obtain the binary data of the non-image format file through Stream.Read, store it in a corresponding character array, and obtain the binary character value array.

[0168] In some optional implementations of some embodiments, the data storage module includes a static image storage unit and a non-image storage unit;

[0169] The static image storage unit is used to put pixel information into the DcmDataset storage structure and assign the value to the standard image TAG: 0x7FE00010-PixelData;

[0170] The non-image storage unit is used to put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, through the custom TAG: 0x7f010001.

[0171] In some optional implementations of some embodiments, the data storage module includes an information acquisition unit and an information storage unit.

[0172] The information acquisition unit is used to acquire the patient tag information corresponding to the non-standard DICOM format file, including patient examination information, doctor information and hospital information;

[0173] The information storage unit is used to write the patient examination information, doctor information and hospital information into a newly created standard DICOM file to be saved in the form of key: value key-value pairs for storage, wherein the TAG value corresponds to the standard image TAG or the custom TAG.

[0174] In a third aspect, the present application proposes an electronic device, comprising 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 above method when executing the computer program.

[0175] In a fourth aspect, the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0176] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0177] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0178] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0179] In the embodiments provided in the present disclosure, it should be understood that the disclosed apparatus / computer equipment and methods can be implemented in other ways. For example, the apparatus / computer equipment embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of the apparatus or unit, which may be electrical, mechanical or other forms.

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

[0181] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0182] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0183] The above are only preferred implementations of the present invention. It should be pointed out that a number of modifications and improved technical solutions made by those skilled in the art without departing from the technical solution should also be deemed to fall within the scope of protection required by the claims.

Claims

1. A method for converting non-standard DICOM files, characterized by: The following steps are involved: Get non-standard DICOM files; Loading the non-standard DICOM file, and determining the file format of the non-standard DICOM file according to the suffix obtained after loading; When the file format is a static image format, the pixel information of the static image is obtained through the image pixel loading mechanism. When the file format is a non-image format, the non-image format file is loaded through the FileStream class, and a binary character value array is obtained. For a static image format, the static image is loaded through the Bitmap class to obtain the characters corresponding to the complete pixels. For non-image formats, use the FileStream class to open the non-image format file, then use Stream.Read to obtain the binary data of the non-image format file, store it in a corresponding character array, and obtain the binary character value array; Create a new DcmDataset storage structure for a standard DICOM file, put the pixel information into the DcmDataset storage structure, and assign it to the first TAG for storage, put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, and assign it to the second TAG for storage, put the pixel information into the DcmDataset storage structure, and assign it to the standard image TAG: 0x7FE00010-PixelData; Put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, through the custom TAG: 0x7f010001; The patient's tag information is obtained, and the tag information is inserted into the standard image TAG or custom TAG of the standard DICOM file. Finally, the DcmDataset storage structure is saved as a standard DICOM file to complete the format conversion of the non-standard DICOM file.

2. The method according to claim 1, characterized in that: The step of obtaining the patient's tag information, inserting the tag information into a standard image TAG or a custom TAG of a standard DICOM file, and finally saving the DcmDataset storage structure as a standard DICOM file to complete the format conversion of the non-standard DICOM file includes: Obtaining patient tag information corresponding to the non-standard DICOM format file, including patient examination information, doctor information, and hospital information; The patient examination information, doctor information and hospital information are written into a newly created standard DICOM file to be saved in the form of key:value key-value pairs, wherein the TAG value corresponds to the standard image TAG or the custom TAG.

3. A non-standard DICOM file conversion system, characterized by: It includes non-standard file acquisition module, file classification module, file processing module, data storage module and format conversion module; The non-standard file acquisition module is used to acquire non-standard DICOM files; The file classification module is used to load the non-standard DICOM file and determine the file format of the non-standard DICOM file according to the suffix obtained after loading; The file processing module is used to obtain pixel information of a static image through a picture pixel loading mechanism when the file format is a static image format, and to load the non-image format file through a FileStream class when the file format is a non-image format, and obtain a binary character value array; The file processing module includes a static image processing unit and a non-image processing unit. The static image processing unit is used to load the static image through the Bitmap class for the static image format and obtain the characters corresponding to the complete pixels; The non-image processing unit is used to use the FileStream class to open the non-image format file for the non-image format, and then obtain the binary data of the non-image format file through Stream.Read, and store it in a corresponding character array to obtain the binary character value array; The data storage module is used to create a DcmDataset storage structure of a standard DICOM file, put the pixel information into the DcmDataset storage structure, assign it to the first TAG for storage, put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, and assign it to the second TAG for storage. The data storage module includes a static image storage unit and a non-image storage unit; The static image storage unit is used to put pixel information into the DcmDataset storage structure and assign the value to the standard image TAG: 0x7FE00010-PixelData; The non-image storage unit is used to put the binary character value array of the non-image format file into the DcmDataset storage structure in OB data format, through the custom TAG: 0x7f010001; The format conversion module is used to obtain the patient's tag information, insert the tag information into the standard image TAG or custom TAG of the standard DICOM file, and finally save the DcmDataset storage structure as a standard DICOM file to complete the format conversion of the non-standard DICOM file.

4. The system according to claim 3, characterized in that: The data storage module includes an information acquisition unit and an information storage unit The information acquisition unit is used to acquire the patient tag information corresponding to the non-standard DICOM format file, including patient examination information, doctor information and hospital information; The information storage unit is used to write the patient examination information, doctor information and hospital information into a newly created standard DICOM file to be saved in the form of key: value key-value pairs for storage, wherein the TAG value corresponds to the standard image TAG or the custom TAG.

5. 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 computer program, the steps of the method according to any one of claims 1 to 2 are implemented.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • Medical high-definition dynamic and static image storage system based on DICOM (digital imaging and communications in medicine)

    CN104333738A

  • Medical image annotation information storage and extraction method and system

    CN116844699A

  • Method for creating DICOM file from output image ofNon-DICOM medical image equipment

    KR1020030068937A

  • System and method of a converting medical imaging movie format data to dicom compatible images

    WO2005119443A2