Research on DICOM Image Processing Technology

Source: Internet
Author: User

Research on DICOM Image Processing Technology

【Author】: Kou Haizhou, Department of Computer Engineering, Huaiyin Institute of Technology, huai'an 223001, Jiangsu, China

【Abstract]According to the dicom3.0 standard, the file structure and dataset are analyzed in detail, and some key technical problems and corresponding solutions are given. Finally, a medical image processing software was developed based on VC, which can display medical images and convert common image formats. This method overcomes the limitations of traditional DICOM image display software.

【Key words]DICOM standard DICOM dataset display and processing medical image decoding

A Research on the DICOM Image Processing Technology

Kou Haizhou * 1, Chen hongming1, Zhang hui1, Chen wenbin2, Zhao lijuan1

(1. Department of Computer Engineering, Huai 'a Institute of Technology, Huaian, Jiangsu 223001, China;

2. Department of reshaping cosmetology, Huian second pople's hosip.pdf, Huaian)

Abstract: According to the Information Contents and data format defined by DICOM standard, some classes corresponding to the types of medical image are defined for image information recording. a dicom Image Viewer based on VC is designed, which is able to display and process varous types of medical image. A method is thus provided, by which the problem of limitation of traditional DICOM image viewers can be solved.

Key words: DICOM; DICOM dataset; display and process; medical image decoding

DICOM (Digital Imaging communications in medicine) is an international standard for medical digital imaging and communication. DICOM was developed and developed in the United States, but has been accepted by European countries, Japan and other developed countries and regions, and has been included in national standards. In China, DICOM is the only accepted international standard for medical imaging. DICOM has become the only specification for image communication/communication in international medical imaging equipment. DICOM standards have been paid more and more attention at home and abroad, and some scientific research institutions and colleges and universities have begun to study and develop standards based on standards. Therefore, correct interpretation of DICOM standard documents is one of the key technologies for medical digital image processing and construction.

1 DICOM file data structure and encoding rules

DICOM files include digital imaging and communication. Based on the object-oriented idea, the file format develops a series of information object definitions and service object definitions. The data structure and encoding rules of the file contain the real information of digital imaging and communication [1].

1.1 The structure of the DCM file is a commonly used DICOM file name suffix. Other PACS software also uses IMG, or does not use the suffix at all, and is directly named by a series of numbers or strings. The DCM file is essentially a dataset about the information body instance, mainly including patient, examination, sequence and image information. The file structure consists of two parts: the file header and the file structure pixel data. The file header is divided into two parts: file introduction and data set, the introduction of this document is composed of 128 byte sequences all set to 00 and a 4-byte string [2]. A dataset is the most informative part of the entire file. It contains information about all information entities (patients, images, and examinations). The structure is also the most complex. The final image data of the file represents pixels, the data structure is single, so the interpretation file is actually the interpretation of the dataset.

A 1.2 DICOM dataset structure dataset consists of multiple data elements in a series. Each data element has a similar structure and is composed of tags, value descriptions, value lengths, and value ranges. Label indicates the specific meaning of the data element. Each tag can appear only once in the entire dataset (except for nesting). It consists of four bytes, namely, the group number (two bytes in the upper part) and the element number (two bytes in the lower part ). For example, 00100010 indicates that the information in the data element is the patient name. The detailed description of the label meaning is in standard 3.62004 (data dictionary. Describes the Data Types of the value fields in the data element. In most cases, it is a string of 2 bytes. It is worth noting that tags are optional, depending on the agreed transmission syntax. The value field indicates the actual information saved by the data element. It must be an even number of bytes. If it is not enough, it must be filled with 0 or spaces.

2. Reading DCM files

After understanding the structure of a file and the structure of a dataset, it is not very difficult to interpret the file. However, some key problems such as data nesting and high-level interception should be noted during reading.

2.1 data nesting when the value of a data element is 0, the value field of the data element is composed of one or more data elements, that is, the data element contains a subdataset. If a child data set has a data element with a value of 0, recursive Nesting is formed. The existence of nesting requires that the algorithm can traverse all elements in the tree data structure.

2.2 The capture of high image data usually takes two bytes to indicate one pixel, but in general, the dynamic range of the real pixel value is not enough to fully fill the two bytes. Therefore, high bytes may be used to store other information. When interpreting image data, we should intercept high positions and read low-level information. The standard stipulates that the data element labeled as 00280101 stores the maximum number of digits of the pixel data, and the data element labeled as 00280102 stores the actual number of digits of the pixel data. For some images, the stored pixel values in the image data have no practical significance and must be corrected by slope and intercept, while the slope and intercept are stored in the data elements labeled 00281053 and 00281052. Generally, these two values are 1 or 0, and the stored pixel values in the image data are equal to the actual values, so this is often ignored.

3 DICOM Image Processing

3.1 The Principles of DCM image processing document describes medical images, which reflect the degree of absorption of X-ray by human organs and tissues, and uses the color value as the image information of human organs. Currently, bitmap files commonly used by computers are composed of three basic colors: Red, green, and blue. The number of levels displayed as gray images ranges from 0 ~ Between 255; image processing on the operating platform requires processing of the value. The processing method is to use the window width when describing the data display range; to determine the data center value, use the window bit. For a value obtained by human organs, if it is smaller than a value, it can be converted to the black color of the bitmap image, that is, 0; if it is greater than a value, it can be converted to the white color of the bitmap image, that is, 255; if it is within the range of a value, it can be converted to a value of the corresponding bitmap image ~ The conversion formula between 254 [3:

G (v) = 0 V <c-w2

GMW (V + w2-c) c-w2 ≤v ≤c + W2 (*)

GM v> C + W2

V: indicates the image data, G: indicates the display value on the computer operating platform, GM: indicates the maximum value of the display, the bitmap file is 255, W: indicates the window width, and C: indicates the window position.

In this conversion relationship, the selection of the window width and window space determines the part of the image to be displayed. Each file can be obtained from the file header and processed, you can also manually change the window width and position to obtain different display effects and select a part of the body.

3.2 after correctly understanding the file structure and dataset structure, it is not difficult to interpret the document correctly. First, read the file introduction and check the file format. Then extract the transmission syntax and adopt the corresponding decoding method based on the transmission syntax. If the format is explicit, the explicit reading method is adopted, if nesting exists, the nested processing module is called. If the image data is compressed, the decompression module is called [4]. Finally, the image data is obtained and displayed using the device-independent Bitmap (device-independent bitmap, Dib, device-independent bitmap can be displayed on different machines or systems. Note that there are hundreds of data elements in the dataset. You only need to read the relatively important elements. Table 1 lists the tags of these data elements [4]. Table 1 Key Data Element labels

Because the dynamic range of image data is large (generally greater than 4096, this value depends on the image processing algorithm and the virtual memory of the computer), and the normal display can only display 256 gray level, therefore, after reading the image data, you must adjust the window width to display the data. DICOM dataset contains a lot of information, some of which are rarely used or inconsistent with the specific medical situation. Therefore, it is necessary to remove redundant information and retain the main information. Using the object-oriented approach, I designed a simplified DICOM image class structure. The patient information mainly obtains the patient's name, gender, and other information. The examination information mainly obtains the identity, serial number, and other information of the examination; the image information parameters mainly obtain the length and width of the image and the bits used for storing each pixel. The image pixel information obtains the image data information. The data structure of DICOM images is described in C language as follows:

Struct patientinfo {Patient Information Structure

String patientname;

Int age;

Bool sex;

...}

Struct studyinfo {struct check information structure

Int studyid;

Int seriesnumber;

...

}

Struct imageinfo {assets Image Information Structure

Float height, width;

Int pixel;

...}

Struct pixel {

Int pointx, pointy, pixelvalue; pixel information structure

...}

The DICOM class is defined as follows:

Class DICOM; optional DICOM image class

{

Int level;

Struct patientinfo; patient information

Struct studyinfo; explain check information

Struct imageinfo; required image information Parameters

Struct pixel; pixel image pixel information

Public;

Brief definitions of reading, writing, and processing methods for DICOM objects

};

3.3 DICOM image processing algorithm after defining the DCM File class, you can use the DCM File class to implement some practical functions, such as converting files into bitmap, JPG, and other format files [5]. The software process 1 for reading the DCM file is shown in. Figure 1 flowchart of reading a DCM File

In the vc6.0 environment, first set the memory size required for image pixel buffering, and read the image data from the branch. Then, process the data according to the formula (*) and set the image point data, perform shift processing [6]. Set the window width to H and the window bit to W. The algorithm description is as follows;

For (I = 0; I

For (j = 0; j

{T1 = * (data [I] + J * 2); T4 = T1 & 16; T3 = t1/16; t2 = * (data [I] + J * 2 + 1); t2 = t2 % 16

Pixel_value = T2 * 256 + T3 * 16 + T4/1024;

Pdibinit> image_dicom [J] [I] = pixel_value;

If (pixel_value <= win_center-win_width/2)

Pixel_value = 0;

Else if (pixel_value> = win_center + win_width/2)

Pixel_value = 255;

Else

{

Pixel_value temp = (pixel_valuew + H/2)/HF * 255;

Pixel_value = int (pixel_value temp + 0.5f );

}

Image [I] [J] = byte (pixel_value );

}

[References]
[1] Xie Changsheng, Xiong huaming, Chen Zhe. Research and Implementation of DICOM image display [J]. Computer engineering and science, (6): 38 -.

[2] Zhu Jianfeng, Wen Hao, Zhou Yu, et al.. Analysis of the Structure of the DCM file and implementation of codec [J]. China Medical Devices magazine, 247 (4.

[3] window Adjustment Technology of DICOM medical images and DiB display [J]. medical equipment, (8): 1-4.

[4] Lin Chunying, Yin junxun, Ma Lihong, and so on. interpretation of DICOM medical image files and the implementation methods of VC ++ displayed [J]. modern medical instruments and applications, (1): 1-4.

[5] Hu yangqiu, Gao Xiaorong, Gao shangkai. Design and Implementation of DICOM format conversion software for medical images [J]. Beijing Biomedical Engineering, 193 (4): 197.

[6] Zhang yousai, Chen Fumin. DICOM medical image window width conversion acceleration algorithm [J]. Computer Engineering and application, 2003, (13): 218-220.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.