Reader DICOM VTK and ITK
Reader DICOM VTK and ITK
Reader DICOM VTK and ITK
and ITK
SUN Mengmeng, WU Shuicai*
Collage of Life Science and Bioengineering, Beijing University of Technology, Beijing 100124, China
E-mail˖smm_sunmengmeng@163.com
Abstract:To display and process images in different DICOM formats,this article introduces a new method of integrating ITK,
VTK and QT to process the images in DICOM format, and a software was designed based on the three tools . The results indicate
that this software can read and display DICOM images with different suffixes and can process medical images simply.
Key Words:DICOM,Image Processing, ITK, VTK, QT
1 INTRODUCTION scientific research and software development[4].HAO
Weilin[1]have used them to read and display DICOM
As the development of hospital information system and
images. These toolkits do not provide the
picture archiving and communication system,Digital
GUI(Graphical User Interface), which is not
Imaging and Communications in Medicine (DICOM)
convenient for users. WEN Tiexiang[5] have designed
exists as a standard for handling,storing, printing,
a platform using MFC as GUI, but it didn’t support
and transmitting information in medical imaging. The
cross-platform. Qtis a cross-platform graphical user
DICOM files include not only the information of
interface developed by TrollTech in 1991. It provides
images, but also contain a lot of medical information[1].
the application developers all the functions needed by
Due to the complexity of DICOM format, ordinary
building state-of-the-art graphical user interface. Qt is
program can’t read and display images of DICOM
easy to expand, and allows real component
format. How to read and process an image in DICOM
programming. Qt provides a safety type called
format by programming is important for further image
signals/slots to replace the callback, and this makes
processing and image visualization.
cooperation among the various components of work is
Many companies,such as SIEMENS, Philips and GE,
very simple, the user interface development is very
have designed many softwaresspecialized for their
easily. Qt becomes very popular because of its support
medical equipment to display DICOM images. Those
for cross-platform, object-oriented with rich API. This
softwares are not available to public and only support
paper integrate QT, ITK and VTK to develop a
standard format and internal format in theircompanies.
software of image processing with a practical GUI, and
Moreover, some softwares can only read some DICOM
it can read all kinds of DICOM images with different
images with special suffix.For example, Irfanview can
suffixes. The process of development is simple without
only display images with suffix as *.DCM and *.IMA.
underlying development. Our work is a fundamental
Those above-mentioned softwaresabove are developed
step for further image processing.
from bottom using C++ or some other advanced
programming language. The progress is complicated 2 METHODS
and insufficient for encapsulation and further
2.1 Circumstance and tools
processing.
Visualization Toolkit (VTK,www.vtk.org)[2]and We developed the software in Windows7 operating
Insight Segmentation and Registration Toolkit ( ITK, system based onITK, VTK and Qt.
www.itk.org)[3]are the most notable algorithm toolkits 2.2Integrating ITK, VTK and QT in visual studio
aimed to provide an open algorithm library for 2008
____________________________________
978-1-4673-5887-3/13/$31.00 ©2013 IEEE
2.2.1 Integrate ITK and VTK you want to a single slot, and a signal can be
ITK and VTK are both work in pipeline, so it’s easy to connected to as many slots as you need. It is even
integrate them using the type cast files provided by the possible to connect a signal directly to another signal.
library of themselves. The header files we used are This will emit the second signal immediately
shown as follows: whenever the first is emitted. Signals and slots make
"itkVTKImageToImageFilter.h" up a powerful component programming mechanism as
"itkImageToVTKImageFilter.h". shown in Fig 2.
The flow chart of integrating ITK and VTK is shown
in Fig 1. First, read data using ITK reading function,
second, convert data type supported by ITK to the one
supported by VTK with or without image processing,
and last, display the data using vtkImageViewer in
VTK.
information. After adjusting the image through the b.Set the title of each row.
above method, some disturbances of environment can c.Write the information of tag into the first row of
be removed. QTableView. The settings of other rows are similar.
DICOM images store 16-bits per sample (65,535 d. Set the title and size of QTableView and make the
levels) usually, sothe gray value ranges of DICOM widget not editable.
images should be normalized to 0 to 255 because of
2.6 Image processing
the restrictions of the recognition ability of the human
eyes and the performance of the display device[7]. The functions we used this part in ITK are shown in
We used itkIntensityWindowingImageFilter here to Table 1.
map the gray value to an appropriate boundary before Table 1.Functions in image processing
displaying the image.
Module Functions
2.4.2 Display Image
Median filter itkMedianImageFilter
Class named vtkConnectorType was used to input
Curvature filter itkMinMaxCurvatureFlowImageFilter
image data read by ITK. Coordinated system in ITK is
Edges detection itkCannyEdgeDetectionImageFilter
different from VTK, so we used class vtkImageFlip to
Image corrosion itkGrayscaleErodeImageFilter
invert Y axis. After that the data was input
Image dilation itkGrayscaleFunctionDilateImageFilter
vtkImageViewer2.
2.6.1 Image Smoothing
2.5 DICOM header information
Image smoothing is helpful for enhancing and
2.5.1 Get DICOM header information characterizing fundamental image constituents, i.e.,
A single DICOM file contains both aheader (which salient edges, and in the meantime for diminishing
stores information about the patient's name, the type of insignificant details. Image smoothing can make
scan, image dimensions), as well as all of the image adjacent pixels look more similar[8].
data (which can contain information in three This paper used two smoothing methods, median filter
dimensions). The first 794 bytes are used for a and a curvature driven image denoisingalgorithm. The
DICOM format header, which describes the image median filter in ITK is itkMedianImageFilter and the
dimensions and retains other text information about other is itkMinMaxCurvatureFlowImageFilter.
the scan. The size of this header varies depending on 2.6.2 Edge detection
how much header information is stored. The image Edge detection is the name for a set of mathematical
data follows the header information (the header and methods which aim at identifying points in a digital
the image data are stored in the same file).DICOM image at which the image brightness changes sharply
dataset is composed by a series of data elements or, more formally, has discontinuities. The points at
according to the label (tag) order from small to large. which image brightness changes sharply are typically
Data elements include tag, labelID, length of the value organized into a set of curved line segments termed
and the range of the value. edges. Edges detection is a fundamental tool in image
We get the DICOM header information though setting processing, machine vision and computer vision,
the function as follows. particularly in the areas of feature detection and
GDCMImageIO ->GetMetaDataDictionary(); feature extraction. There are a lot of edge detection
2.5.2 Display the DICOM header information kernels, such as Canny, Sobel, Roberts and Prewitt.
The widget in Qt we used to display the header This paper takesCanny kernel as an example to
information is QTableView. We show the information introduce the edge detection. The filter we used in ITK
in three rows: tag, labelID and value. is itkCannyEdgeDetectionImageFilter.
There are Settings about QTableView as follows: 2.6.3 Image morphology
a.Set the ItemModle. Image corrosion and dilation is an important basis of
morphological image processing. Corrosion can suffix. They are all CT images. The results are
remove the image noise and certain structure of an shown in Fig 5.
image,and dilation can fill the gap and empty of the
image.
This paper used itkGrayscaleErodeImageFilter for
corrosionand itkGrayscaleFunctionDilateImageFilter
for dilation in ITK.
3EXPERIMENTAL RESULTS
3.1 Interface of the software (a) (b)
The interface of the software is shown in Fig 4 and Fig Fig 5. DICOM images with different suffixes: (a) Image with suffix
5 shows the menu bar of the interface. as *IMA; (b) DICOM image without suffix.
(a) (b)
convenient to add further functions.
This software can only show and process 2D images,
so we will add functionsabout 3D images to the
software in the future study. This paper only
fulfillssome simple image processing and this is the
foundationof further processing. We can add image
registration and image segmentation to the software,
(a) (b) which are the hot points at present.
Fig 8. Images after smoothing: (a) Image after median filtering;
REFERENCES
(b)Image after using MinMaxCurvatureFlowImageFilter.
[1] HAO Weilin, DU Jianjun, LIU Youjun. The image
3.5 Image morphology
displaying and information obtaining of DICOM files
Images after morphological transformation are shown based on ITK and VTK[J]. Beijing Biomedical
in Fig 9. We can find that image erosion can remove Engineering, 27(2): 151-155.
the information of scanner and image dilation can fill [2] GUO Shengwen. Realization of Integrated Medical
the holes in the image. Image Visualization System[J]. Chinese Journal of
MedicalPhysics, 23 (5): 333-336.
[3] Ibanez, L.,Schroeder, W.,Ng, L., etc. The ITK software
guide: the insight segmentation and registration
toolkit[J]. Kitware Inc, 2003, 5.
[4] Tian, J.,Xue, J.,Dai, Y., etc. A novel software platform
for medical image processing and analyzing[J].
. Information Technology in Biomedicine, IEEE
(a) (b) Transactions on, 2008, 12 (6): 800-812.
Fig 9.Images after morphological transformation: (a) Image after [5] WEN Tiexiang,YANG Feng.Integration of Medical
dilation; (b) Image after erosion. Image Processing System Based on ITK, VTK and
MFC[J]. Information of Medical Equipment, 2007, 22
3.6 Edges detection using Canny kernel
(5): 1-3.
Image after edges detection using Canny kernel is [6] Blanchette, J.,Summerfield, M. C++ GUI programming
shown in Fig 10. with Qt 4[M]. Prentice Hall.
[7] Han, F.,Yang, J.,Liu, Y., Hong Zhao. Research on
Preprocessing Algorithm for PET-CT Image
Registration[A], In Optoelectronics and Image
Processing (ICOIP), 2010 International Conference
on[C], 2010: 266-269.
[8] Gonzalez, R. C.,Woods, R. E.,Eddins, S. L. Digital
image processing using MATLAB[M]. Gatesmark
Fig 10. Image after edges detection using Canny kernel.
Publishing Knoxville: 2009.