Professional Documents
Culture Documents
Chapter 1
LITERATURE SURVEY
Intensive studying of related areas was undertaken to get the clear concepts of the
1.1 Motivation
The survey of the following concepts has clearly made the working on the project
much easier. It has led to a tremendous amount of enthusiasm in gaining the knowledge
of a system which has gained importance in the field of Medical Images. The whole
project is more inspiring since it is linked to the lives of the many patients and provides
patient coordination.
In the project the PACS system mainly deals with the Medical Image management
system and the display of the image in the same manner as acquired, from the place of
acquisition to the destination system. In order to transfer the large sized medical images,
the image must be compressed first and transferred using a suitable protocol. Hence there
is need to study the storage size of the Medical Images and different compression
standard to reduce the large sized Images and the Protocol which supports the format.
The size of large Medical images often exceeds the display area of the user's
individual pixels. The semantic content, or structural information, is not preserved in the
representation. As a result, images cannot be revised. Digital images result from either
real world capture or computer generation. They can be captured from the real world
1
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
through scanning or the use of a digital camera. Computer generation can be performed
with the use of a paint program, screen capture, or the conversion of a graphic into a
bitmap image.
The motivation for the compression of Medical images is illustrated through the
use of Table1.2.1. This Table shows the storage size, transmission bandwidth, and
transmission time needed for various types of uncompressed images. It is clear from these
values, that images require much storage space, large transmission bandwidths, and long
transmission times. With the present state of technology, the only solution is to compress
images before their storage and transmission. Then, at the receiver end, the compressed
scale
The JPEG standard has been in use for almost a decade now. It has proved a
valuable tool during all these years, but it cannot fulfill the advanced requirements of
today. JPEG uses the Discrete Cosine Transform (DCT)-based method. With the
continual expansion of multimedia and Internet applications, the needs and requirements
of the technologies used grew and evolved. Today’s digital imagery is extremely
demanding, not only from the quality point of view, but also from the image size aspect.
Current Medical image size covers orders of magnitude, ranging from the size of less than
100 Kb to high quality scanned images of approximate size of 40 Gb. The JPEG 2000
image coding system is optimized not only for efficiency, but also for scalability and
integral part of the Internet, and JPEG2000 is a powerful new tool that provides power
capabilities for designers and users of networked image applications. After compression
there was a need to transfer the image. The JPEG2000 standard uses the JPIP Protocol for
image browsing. As PACS system involves compression of the Medical Images &
transmission on the Web, the JPEG2000 technique fulfills the need of the system.
1.3 Preamble
integrated system of digital products and technology allowing for acquisition, storage,
diagnostic and clinical workstations. A PACS includes interfaces with the hospital
information system (HIS) and radiology information system (RIS). A web server,
The medical images are stored in an independent format. The most common
format for image storage is DICOM (Digital Imaging and Communications in Medicine).
The goal of the project is to compress the medical images using the JPEG2000
format. The JPEG2000 uses the wavelet transform for compression & retrieval of the
compressed image, which is then stored in the server & the compressed images are
transferred over the network for viewing through the JPIP protocol.
3
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
PACS replaces hard-copy based means of managing medical images, such as film
Despite the increase in the use of image modalities that allow the accomplishment
of cuts us part, such as the computerized cat scan (CT), the ultrasound (US) and the
magnetic resonance (MR), which, in general way, supply images in digital format, the
carried through in a radiology department. With this system it does not have reduction of
time or work, they continue existing problems and still add bigger risk of errors is
associated.
The success of any healthcare service is dependent on the efficient use and sharing
of patient information. The problem statement is, “Diagnostic images are frequently lost,
misplaced, and unread. The diagnostic images and information is not available anywhere,
the cost involved is also more, which involves decrease in the customer service and
efficiency”. There was a requirement for image processing, handling, and display,
the Medical Images are compressed, manipulated & Metadata are added to the Diagnosed
portion of the image & then stored, which will be transferred from the place of acquisition
from the storage system, to the station for further diagnosis’s using “Implementation of
4
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
certain situations, however, the particular manner in which the images are made available
to physicians and their patients introduces obstacles to timely and accurate diagnosis of
disease. These obstacles generally relate to the fact that each manufacturer of a medical
imaging system uses different and proprietary formats to store the images in digital form.
This means, for example, that images from a scanner manufactured by General Electric
Corp. are stored in a different digital format compared to images from a scanner
modalities such as ultrasound and MRI are stored in formats different from each other. In
create a situation where straightforward processing of the image data results in images
which transfer across the Internet too slowly, lose diagnostic information, or both. One
such limitation is the bandwidth of current Internet connections which, because of the
large size of medical images, result in transfer times which are unacceptably long. The
problem of bandwidth can be addressed by compressing the image data before transfer,
but compression typically involves loss of diagnostic information. In addition, due to the
size of the images the time required to process image data from an original format to a
format which can be viewed by Internet browsers is considerable, meaning that systems
designed to create web pages "on the fly" introduce a delay of seconds to minutes while
the person requesting to view the images waits for the data to be processed. Workstations
allow images to be reordered or placed "side-by-side" for viewing but again an Internet
5
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
system would have to create new web pages "on the fly" which would introduce further
delays. Finally, diagnostic interpretation of medical images requires the images are
parameters can be adjusted by the person viewing the images but control of image
brightness and contrast are not features of current Internet standards (http of html).
Chapter 2
6
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
computer network systems for the storage, retrieval, and display of radiologic images.
PACS are electronic medical image management systems. They consist of image display
systems, archiving systems, networks, and interfaces, presenting one unified system to the
user.
The images are acquired, compressed, archived and retrieved over a network for
diagnosis and review by physicians. These images can be interpreted and viewed at
workstations, which can also double as archive stations for image storage. The
7
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
technologies, along with the advancement of the DICOM and HL7 standards have put
PACS along side radiology information systems (RIS) as an ideal solution for managing
radiological images.
One of the main benefits that PACS provides is the ability to provide a timely
delivered and efficient access to images, interpretations and related data throughout the
organization. This helps to ease consultations between physicians who can now
simultaneously access the same images over networks, leading to a better diagnosis
process. It is also beneficial to physicians in emergency situations, as they need not wait
for long periods in order to view a patient’s radiological images as these are instantly
available on the network when ready. Another feature of PACS is the ability to digitally
enhance the images, providing more detailed and sharper images. This improves
The high costs of PACS has led to vendors offering mini-PACS, which is a cheap
alternative for organizations that cannot afford the cost of a full PACS system or those
system but would rather start off with something small. While PACS are considered to be
(radiology, emergency room, or orthopedics). Mini-PACS are easy to maintain and cheap
to repair, and they can gradually be upgraded to a fully functioning hospital wide PACS.
tomography and plain X-rays. Small-scale systems that handle images from a single
8
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
Image Database
Workstation Workstation
Review-station Review-station
modality (usually connected to a single acquisition device) are sometimes called mini-
PACS.
diagnostic and clinical workstations. A PACS includes interfaces with the hospital
information system (HIS) and radiology information system (RIS). A web server,
containing the images. This server is connected to one or more clients via a LAN a local
area network. The PACS is connected to an interface engine and receives orders for
diagnostic studies, which it then matches to image sets coming into the PACS from the
digital modalities (CT, CR, and MR, etc.) via DICOM (a digital imaging communications
9
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
standard) in order to ensure that all images are associated with the right patient. To
process these order messages successfully, the PACS must receive from the RIS
electronically signed reports from the RIS, which it then archives with the images so that
reports and images may be retrieved and displayed concurrently. For scanning image
films into the system, printing image films from the system and interactive display of
digital images. PACS workstations offer means of manipulating the images (crop, rotate,
2.3 Storage
distributed architecture. In centralized storage system all the acquired images are forward
subsystems or file servers. Each server has its own short-term storage unit (usually a
small RAID), one or more image acquisition modalities, and several diagnostic/review
workstations. Each of these architectures has its own advantages and disadvantages.
However distributed storage architecture has been found suitable for large-scale PACS
Storage Media: PACS storage devices should hold gigabytes of data with
providing storage media that can hold many images and have quick access time. A PACS
needs at least two levels of archive (short-term and long-term). Images should be
retrievable from the short-term archive in 2 seconds. Images from the long-term archive
10
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
Examples of storage media that can be used for PACS archiving include:
images.
• Write once read many (WORM) in the optical disk library, which constitute the
permanent archive.
• Recently developed digital versatile discs (DVD-ROM) for low cost permanent
archive.
11
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
V2, proprietary digital and early DICOM storage interfaces. Such interfaces allowed for
the exportation of image information into the PACS. The “double entry” problem that of
entering one set of patient information into the RIS and an incorrect variant of that same
information into the modality was not significantly addressed by first or second
converters”) made use of DICOM modality worklist interfaces to rationalize the RIS and
modality patient information. However, such interfaces were the exceptions to the rule.
solved by the widespread implementation of the DICOM standard and the availability of
interface problem facing third generation PACS is that of truly solving the “double entry”
problem and improving workflow. Although most, if not all, modalities manufactured
today support the DICOM standard, they support only the DICOM storage SOP portion
SOP or DICOM detached study management SOP, which are required to solve the
“double entry” problem; even fewer modalities manufactured today support the DICOM
modality performed procedure step SOP, which is used to track the status of image
acquisition workflow.
address these informatics problems. Such devices will have to provide for the acquisition
of images, the rationalization of the patient information with the RIS patient information,
and the reporting of modality workflow status. These interfaces will provide a complete
12
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
DICOM interface to the modality. In the case of some modalities, these interfaces will be
The best examples of such modality interfaces can be found in the world of
associate records from the worklist with the digitized images provide image quality
control, transmit the digitized images to multiple destinations, print images to both local
The Integrated Medical Application (IMA) gives the physician access to medical
services and functionality from a single graphical desktop. The desktop offers services for
the local and remote access to electronic patient records of hospitals, specialist clinics,
and general practitioners. The distributed patient records within a hospital or practice are
information about the local multimedia patient documents. In addition to basic data such
as document type, location and creation date, the record provides information concerning
the document structure. The information supplied by the meta-record from each practice
and hospital can be combined to form the complete, virtual patient record. The
management and access to each record and each document is carried out by the Open
Each local implementation of the record may be different, depending on the facilities of
the local environment, but each presents the same external interface to the outside. This
mechanism enables the scalable integration over a wide area of all patient documents.
The central components of the IMA provide functionality for the transparent
access of local and remote documents obtained through selected meta-records services,
the navigation in the patient record, the visualization of multimedia documents, and the
13
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
processing of images. Other tools that have been integrated in the graphical desktop
communications services such as email, text processing, desktop conferencing, and access
• Images can be easily shared between reading radiologists, other physicians and
medical records.
• Web servers can be used to most cost-effectively share images with other
departments, even referring physicians across town. They can access the images
• Hardcopy films or paper printouts can be made when needed for traditional
Images can be archived at secure locations using database servers manages the
transfer, retrieval and storage of images and relevant information, the archive provides
14
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
2.6 Network
Topology refers to the way the network is laid out physically or logically. Two or more
devices connect to a link, and then two or more links form a topology. Five basic
remote locations for diagnosis and consultation and other Hospital information systems
like HIS/RIS.
The most commonly used network technologies in building PACS networks are:
• The Ethernet based on IEEE standard 802.3, Carrier Sense Multiple Access with
Collision Detection (CSMA/CD) protocol. Suitable for LANs and can operate at
10Mbits/Sec on half-inch coaxial cable, twisted pair wire or fiber optic cables.
• FDDI can be used for medium speed communication. Runs on optic fiber at
• ATM: Can be used to combine LAN and WAN application. ATM is a Virtual
circuit- oriented packet switching network with transmission speed ranging from
Conceptually three main types of networks are used to transport radiology images:
• A LAN linking imaging devices, data storage units and display devices within one
departmental area.
15
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
distribution and viewing of medical images, such as CT scans, MRIs, and ultrasound.
set of standards for handling, storing and transmitting information in medical imaging. It
includes a file format definition and a network communications protocol. This protocol is
can be exchanged between two entities that have the capability to receive the information
and network hardware from multiple vendors into a picture archiving and communication
system. The different machines, servers and workstations come with DICOM
conformance statements which clearly state the DICOM classes supported by them.
DICOM has been widely adopted by hospitals and is making inroads in smaller
applications like dentist's and doctor's offices. DICOM is categorized into two different
transmissions; DICOM Store and DICOM Print. DICOM Store is a format to send to a
normally to print an "X-Ray" film. Most vendors require individual licenses to perform
these types of transmissions. This standard provides the sender image quality control over
Despite of the diversity of sources for digital medical imaging (CR, Digital X-Ray
detectors, MRI, CT, PET, SPECT, Ultrasound, etc.) all modalities are usually encoded in
16
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
DICOM format. DICOM stands for Digital Image and Communications in Medicine and
computer applications for the processing of medical image studies, and has eased the set
The standard makers were used to feel big confidence while giving data
interchange and communication support because they pushed the clients to buy
computerized equipment) with another user that was using a radiotherapy planification
system. Then we might have rewritten all the software code in the planification system so
it would be aloud to read the picture. The same would happen if we wanted to update the
TAC system with the picture from the planification system. DICOM was created to solve
17
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
data.
options.
Standard.
e. It introduces explicit Information Objects not only for images and graphics
the network.
o image transmission,
18
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
For each modality, DICOM precisely defines the data elements that are required,
optional (i. e. may be omitted) or required under certain circumstances (only if contrast
media was used). This powerful flexibility is at the same time, however, one crucial
weakness of the DICOM standard because practical experience shows that image objects
are frequently incomplete. In such objects, required fields are missing or contain incorrect
values. These problems can lead to subsequent problems when exchanging data.
The DICOM network services are based on the client/server concept. In case two
DICOM applications want to exchange information, they must establish a connection and
19
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
Only if both applications agree on a common set of parameters, the connection can
and will be established. In addition to the most basic DICOM service "image
transmission" (or in DICOM terminology: "Storage Service Class") there are number of
advanced services, e. g:
• The DICOM image archive service ("Query/ Retrieve Service Class") allows to
the images, modality etc.) and to selectively download images from this archive.
• The DICOM print service ("Print Management Service Class") allows to access
In addition to the exchange of medical images over a network, media exchange has
become another focus which has been integrated into the DICOM standard. Fields of
application are for example the storage or cardiac angiography films in cardiology or the
storage of ultrasound images. In order to make sure that DICOM storage media are really
define
20
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
• images from which modalities may be present on the medium (e. g. 'only X-Ray
Angiography images'),
• which encoding formats and compression schemes may be used (e. g. only
• Which storage medium is to be used (e. g. 'CD-R with ISO file system').
Apart from the image files, each DICOM medium contains a so-called "DICOM
directory". This directory contains the most important information (patient name,
modality, unique identifiers etc.) for all images which are captured on the medium. With
the necessary help of this directory, it is possible to quickly browse or search through all
images on the medium without having to read the complete image files - which would for
A single DICOM file contains both a header (which stores information about the
patient's name, the type of scan, image dimensions, etc), as well as all of the image data
(which can contain information in three dimensions). DICOM image data can be
compressed (encapsulated) to reduce the image size. Files can be compressed using lossy
DICOM files consist of a header with standardized as well as free-form fields and
a body of image data. A single DICOM file can contain one or more images, allowing
storage of volumes and/or animations. Image data can be compressed using JPEG
Standard.
DICOM differs from other data formats in that it groups information together into
a data set. That is, an X-Ray of your chest is in the same file as your patient ID, so that
21
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
the image is never mistakenly separated from your information. It also mandates the
presence of a media directory, the DICOMDIR file that provides index and summary
(sometimes 8.3). This is a common source of problems with media created by developers
that did not read the specifications carefully. This is a historical requirement to maintain
substantially greater information about each file than any filename could, so there is less
22
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
Chapter 3
WAVELET TRANSFORM
The transform of a signal is just another form of representing the signal. It does
not change the information content present in the signal. The Wavelet Transform provides
coming of the Short Time Fourier Transform (STFT), which can also be used to analyze
non-stationary signals. While STFT gives a constant resolution at all frequencies, the
wavelets are localized waves. They have their energy concentrated in time or space and
are suited to analysis of transient signals. While Fourier Transform and STFT use waves
The wavelet analysis is done similar to the STFT analysis. The signal to be
23
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
function in STFT, and then the transform is computed for each segment generated.
However, unlike STFT, in Wavelet Transform, the width of the wavelet function changes
with each spectral component. The Wavelet Transform, at high frequencies, gives good
time resolution and poor frequency resolution, while at low frequencies, the Wavelet
x(t) is the signal to be analyzed. y(t) is the mother wavelet or the basis function. All the
wavelet functions used in the transformation are derived from the mother wavelet through
X W
_1 _ _
√
_t τ_- _
(Tτ . s = ) | s |∫ x ( y *t ) s d t
(3.2.1)
The mother wavelet used to generate all the basis functions is designed based
on some desired characteristics associated with that function. The translation parameter τ
relates to the location of the wavelet function as it is shifted through the signal. Thus, it
corresponds to the time information in the Wavelet Transform. The scale parameter s is
(expands) or compresses a signal. Large scales (low frequencies) dilate the signal and
provide detailed information hidden in the signal, while small scales (high frequencies)
compress the signal and provide global information about the signal. The Wavelet
Transform merely performs the convolution operation of the signal and the basis function.
The above analysis becomes very useful as in most practical applications, high
frequencies (low scales) do not last for a long duration, but instead, appear as short bursts,
while low frequencies (high scales) usually last for entire duration of the signal.
24
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
CWT using computers and is obtained by sampling the time-scale plane. The sampling
rate can be changed accordingly with scale change without violating the Nyquist
criterion. Nyquist criterion states that, the minimum sampling rate that allows
reconstruction of the original signal is 2ω radians, where ω is the highest frequency in the
signal. Therefore, as the scale goes higher (lower frequencies), the sampling rate can be
The Wavelet Series is just a sampled version of CWT and its computation may
consume significant amount of time and resources, depending on the resolution required.
The Discrete Wavelet Transform (DWT), which is based on sub-band coding, is found to
yield a fast computation of Wavelet Transform. It is easy to implement and reduces the
time signals were devised. Similar work was done in speech signal coding which was
developed which was named pyramidal coding. Later many improvements were made to
In CWT, the signals are analyzed using a set of basis functions which relate to
each other by simple scaling and translation. In the case of DWT, a time-scale
representation of the digital signal is obtained using digital filtering techniques. The
signal to be analyzed is passed through filters with different cutoff frequencies at different
scales.
We can classify wavelets into two classes: (a) orthogonal and (b) biorthogonal.
25
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
The coefficients of orthogonal filters are real numbers. The filters are of the same length
and are not symmetric. The low pass filter, G0 and the high pass filter, H0 are related to
each other by
The two filters are alternated flip of each other. The alternating flip automatically
gives double-shift orthogonality between the low pass and high pass filters, i.e., the scalar
∑G[k] H[k-2l] = 0,
where k, lЄZ. Perfect reconstruction is possible with alternating flip. Also, for perfect
reconstruction, the synthesis filters are identical to the analysis filters except for a time
reversal. Orthogonal filters offer a high number of vanishing moments. This property is
useful in many signal and image processing applications. They have regular structure
In the case of the biorthogonal wavelet filters, the low pass and the high pass filters do not
have the same length. The low pass filter is always symmetric, while the high pass filter
could be either symmetric or anti-symmetric. The coefficients of the filters are either real
numbers or integers.
For perfect reconstruction, biorthogonal filter bank has all odd length or all even
length filters. The two analysis filters can be symmetric with odd length or one symmetric
and the other anti-symmetric with even length. Also, the two sets of analysis and
synthesis filters must be dual. The linear phase biorthogonal filters are the most popular
26
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
There are a number of basis functions that can be used as the mother wavelet for
Wavelet Transformation. Since the mother wavelet produces all wavelet functions used in
the transformation through translation and scaling, it determines the characteristics of the
resulting Wavelet Transform. Therefore, the details of the particular application should be
taken into account and the appropriate mother wavelet should be chosen in order to use
the Wavelet Transform effectively. Figure 4.5.1 illustrates some of the commonly used
wavelet functions. Haar wavelet is one of the oldest and simplest wavelet. Therefore, any
discussion of wavelets starts with the Haar wavelet. Daubechies wavelets are the most
popular wavelets. They represent the foundations of wavelet signal processing and are
used in numerous applications. These are also called Maxflat wavelets as their frequency
responses have maximum flatness at frequencies 0 and π. This is a very desirable property
in some applications.
Figure 3.5.1: Wavelet families (a) Haar (b) Daubechies4 (c) Coiflet1 (d) Symlet2 (e) Meyer
27
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
The Haar, Daubechies, Symlets and Coiflets are compactly supported orthogonal
wavelets. These wavelets along with Meyer wavelets are capable of perfect
reconstruction. The Meyer, Morlet and Mexican Hat wavelets are symmetric in shape.
The wavelets are chosen based on their shape and their ability to analyze the signal in a
particular application.
low pass filter is denoted by G0 while the high pass filter is denoted by
H0. At each level, the high pass filter produces detail information, d[n],
while the low pass filter associated with scaling function produces
spanning only half the frequency band. This doubles the frequency
Ho 2
d1[n]
Ho 2
X[n] d2[n]
2
Ho
Go 2
d3[n] Go 2
Go 2
a1[n]
the time resolution as the entire signal is now represented by only half
the number of samples. Thus, while the half band low pass filtering
removes half of the frequencies and thus halves the resolution, the
With this approach, the time resolution becomes arbitrarily good at high
frequencies, while the frequency resolution becomes arbitrarily good at low frequencies.
The filtering and decimation process is continued until the desired level is reached. The
maximum number of levels depends on the length of the signal. The DWT of the original
29
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
signal is then obtained by concatenating all the coefficients, a[n] and d[n], starting from
the last level of decomposition. Figure4.6.2 shows the reconstruction of the original
d1[n]
2 H1
2 H1
d2[n]
d3[n] H1 X[n]
2 2 G1
2 G1
2 G1
a3[n]
Figure 3.6.2: Three-level Wavelet reconstruction tree.
signal from the wavelet coefficients. Basically, the reconstruction is the reverse process of
decomposition. The approximation and detail coefficients at every level are upsampled by
two, passed through the low pass and high pass synthesis filters and then added. This
process is continued through the same number of levels as in the decomposition process
to obtain the original signal. The Mallat algorithm works equally well if the analysis
synthesized from the wavelet coefficients. To achieve perfect reconstruction the analysis
and synthesis filters have to satisfy certain conditions. Let G0(z) and G1(z) be the low pass
analysis and synthesis filters, respectively and H0(z) and H1(z) the high pass analysis and
synthesis filters respectively. Then the filters have to satisfy the following two conditions
30
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
The first condition implies that the reconstruction is aliasing-free and the second
condition implies that the amplitude distortion has amplitude of one. It can be observed
that the perfect reconstruction condition does not change if we switch the analysis and
synthesis filters.
There are a number of filters which satisfy these conditions. But not all of them
give accurate Wavelet Transforms, especially when the filter coefficients are quantized.
calculating the Signal to Noise Ratio (SNR) of the signal. Some applications like pattern
recognition do not need reconstruction, and in such applications, the above conditions
There is a wide range of applications for Wavelet Transforms. They are applied in
different fields ranging from signal processing to biometrics, and the list is still growing.
Wavelet Transforms are used to compress the fingerprint pictures for storage in their data
bank. The previously chosen Discrete Cosine Transform (DCT) did not perform well at
high compression ratios. It produced severe blocking effects which made it impossible to
follow the ridge lines in the fingerprints after reconstruction. This did not happen with
Wavelet Transform due to its property of retaining the details present in the data.
In DWT, the most prominent information in the signal appears in high amplitudes
and the less prominent information appears in very low amplitudes. Data compression can
be achieved by discarding these low amplitudes. The wavelet transforms enables high
wavelets for image compression is one the hottest areas of research. The Wavelet
31
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
Transforms have been chosen for the JPEG 2000 compression standard. Figure 3.7.1
Wavelet
Input Signal Transform Inverse Wavelet Output Signal
Processing Transform
Chapter 4
IMPLEMENTATION OF JPEG2000
algorithm. At low bit rates (i.e. high compression ratios) most of the coefficients
produced by a sub-band transform (such as the wavelet transform) will be zero, or very
close to zero. This occurs because "real world" images tend to contain mostly low
does occur (such as edges in the image) this is particularly important in terms of human
perception of the image quality, and thus must be represented accurately in any high
By considering the transformed coefficients as a tree (or trees) with the lowest
frequency coefficients at the root node and with the children of each tree node being the
32
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
spatially related coefficients in the next higher frequency sub-band, there is a high
probability that one or more sub-trees will consist entirely of coefficients which are zero
or nearly zero, such sub-trees are called zero-trees. Due to this, we use the terms node and
the child coefficients of the node in the tree where that coefficient is located. We use
children to refer to directly connected nodes lower in the tree and descendants to refer to
all nodes which are below a particular node in the tree, even if not directly connected.
In zero-tree based image compression scheme such as EZW and SPIHT, the intent
is to use the statistical properties of the trees in order to efficiently code the locations of
the significant coefficients. Since most of the coefficients will be zero or close to zero, the
spatial locations of the significant coefficients make up a large portion of the total size of
magnitude (or magnitudes of a node and all its descendants in the case of a tree) is above
compressed representation of an image which progressively adds finer detail. Due to the
structure of the trees, it is very likely that if a coefficient in a particular frequency band is
insignificant, then all its descendants (the spatially related higher frequency band
EZW uses four symbols to represent (a) a zero-tree root, (b) an isolated zero (a
coefficient which is insignificant, but which has significant descendants), (c) a significant
positive coefficient and (d) a significant negative coefficient. The symbols may be thus
iterations through a dominant pass and a subordinate pass, the threshold is updated
(reduced by a factor of two) after each iteration. The dominant pass encodes the
33
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
significance of the coefficients which have not yet been found significant in earlier
iterations, by scanning the trees and emitting one of the four symbols. The children of a
coefficient are only scanned if the coefficient was found to be significant, or if the
coefficient was an isolated zero. The subordinate pass emits one bit (the most significant
bit of each coefficient not so far emitted) for each coefficient which has been found
significant in the previous significance passes. The subordinate pass is therefore similar to
bit-plane coding.
There are several important features to note. Firstly, it is possible to stop the
compression algorithm at any time and obtain an approximation of the original image, the
greater the number of bits received, the better the image. Secondly, due to the way in
N THRESHOLD
THRESHOLD = > FINAL
THRESHOLD/2 THRESHOLD
Y
DISPLAY
algorithm can be run at the decoder to reconstruct the coefficients, but with the decisions
being taken according to the incoming bit stream. In practical implementations, it would
be usual to use an entropy code such as arithmetic code to further improve the
performance of the dominant pass. Bits from the subordinate pass are usually random
Embedded Zero tree algorithm is a simple yet powerful algorithm having the
property that the bits in the stream are generated in the order of their importance. The first
greater than the threshold. In a hierarchical sub-band system, every coefficient is spatially
related to a coefficient in the lower band. Such coefficients in the higher bands are called
(ns). If a coefficient is insignificant and all its descendants are insignificant as well, then
it is coded as ‘zero tree root’ (ztr). If a coefficient is insignificant and all its descendants
are not insignificant, then it is coded as ‘insignificant zero’ (iz).The algorithm involves
In the dominant pass, the initial threshold is set to one half of the maximum pixel
value. Subsequent passes have threshold values one half of the previous threshold. The
coefficients are then coded as ps, ns, iz or ztr according to their values. The important part
35
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
is that if a coefficient is a zerotree root, then the descendants need not be encoded. Thus
In the subordinate pass, those coefficients which were found significant in the
dominant pass are quantized based on the pixel value. In the first pass, the threshold is
half of the maximum magnitude, so the interval is divided into two and the subordinate
pass codes a 1 if the coefficient is in the upper half of the interval and codes a 0 if the co-
efficient is in the lower half of the interval. Thus if the number of passes is increased the
precision of the co-efficient is increased. This is the first algorithm that is implemented in
encoding algorithm used for lossless data compression. The term refers to the use of
a variable-length code table for encoding a source symbol (such as a character in a file)
where the variable-length code table has been derived in a particular way based on the
estimated probability of occurrence for each possible value of the source symbol. It was
the 1952 paper "A Method for the Construction of Minimum-Redundancy Codes".
Huffman coding uses a specific method for choosing the representation for each
symbol, resulting in a prefix code (sometimes called "prefix-free codes", that is, the bit
string representing some particular symbol is never a prefix of the bit string representing
any other symbol) that expresses the most common characters using shorter strings of bits
than are used for less common source symbols. Huffman was able to design the most
efficient compression method of this type: no other mapping of individual source symbols
to unique strings of bits will produce a smaller average output size when the actual
36
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
symbol frequencies agree with those used to create the code. A method was later found to
do this in linear time if input probabilities (also known as weights) are sorted.
The technique works by creating a binary tree of nodes. These can be stored in a
regular array, the size of which depends on the number of symbols, n. A node can be
either a leaf node or an internal node. Initially, all nodes are leaf nodes, which contain
the symbol itself, the weight (frequency of appearance) of the symbol and optionally, a
link to a parent node which makes it easy to read the code (in reverse) starting from a leaf
node. Internal nodes contain symbol weight, links to two child nodes and the optional link
to a parent node. As a common convention, bit '0' represents following the left child and
bit '1' represents following the right child. A finished tree has up to n leaf nodes and n −
1 internal nodes. A Huffman tree that omits unused symbols produces the most optimal
code lengths. The process essentially begins with the leaf nodes containing the
probabilities of the symbol they represent, then a new node whose children are the 2
nodes with smallest probability is created, such that the new node's probability is equal to
the sum of the children's probability. With the previous 2 nodes merged into one node
(thus not considering them anymore), and with the new node being now considered, the
procedure is repeated until only one node remains, the Huffman tree.
The simplest construction algorithm uses a priority queue where the node with lowest
probability is given highest priority:
1. Create a leaf node for each symbol and add it to the priority queue.
37
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
ii. Create a new internal node with these two nodes as children and
with probability equal to the sum of the two nodes' probabilities.
3. The remaining node is the root node and the tree is complete.
Since efficient priority queue data structures require O(log n) time per insertion, and a
tree with n leaves has 2n−1 nodes, this algorithm operates in O(n log n) time.
If the symbols are sorted by probability, there is a linear-time (O(n)) method to create
a Huffman tree using two queues, the first one containing the initial weights (along with
pointers to the associated leaves), and combined weights (along with pointers to the trees)
being put in the back of the second queue. This assures that the lowest weight is always
kept at the front of one of the two queues:
2. Enqueue all leaf nodes into the first queue (by probability in increasing
order so that the least likely item is in the head of the queue).
i. Dequeue the two nodes with the lowest weight by examining the
fronts of both queues.
ii. Create a new internal node, with the two just-removed nodes as
children (either node can be either child) and the sum of their weights as
the new weight.
iii. Enqueue the new node into the rear of the second queue.
4. The remaining node is the root node; the tree has now been generated
The probabilities used can be generic ones for the application domain that are
based on average experience, or they can be the actual frequencies found in the text being
compressed. (This variation requires that a frequency table or other hint as to the
38
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
encoding must be stored with the compressed text; implementations employ various tricks
to store tables efficiently.)
Arithmetic coding produces slight gains over Huffman coding, but in practice
these gains have seldom been large enough to offset arithmetic coding's higher
computational complexity and patent royalties.
4.2.3 Applications
Arithmetic coding is a compression technique that encodes data (the data string)
by creating a code string which represents a fractional value on the number line between
0 and 1. The coding algorithm is symbol wise recursive; i.e., it operates upon and encodes
(decodes) one data symbol per iteration or recursion. On each recursion, the algorithm
39
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
successively partitions an interval of the number line between 0 and 1, and retains one of
the partitions as the new interval. Thus, the algorithm successively deals with smaller
intervals, and the code string, viewed as a magnitude, lies in each of the nested intervals.
The data string is recovered by using magnitude comparisons on the code string to
recreate how the encoder must have successively partitioned and retained each nested
subinterval. Arithmetic coding differs considerably from the more familiar compression
The notion of compression systems captures the idea that data may be transformed
into something which is encoded, then transmitted to a destination, then transformed back
into the original data. Any data compression approach, whether employing arithmetic
coding, Huffman codes, or any other coding technique, has a model which makes some
The code itself can be independent of the model. Some systems which compress
waveforms (eg, digitized speech) may predict the next value and encode the error. In this
model the error and not the actual data is encoded. Typically, at the encoder side of a
compression system, the data to be compressed feed a model unit. The model determines
1) the event to be encoded, and 2) the estimate of the relative frequency (probability) of
the events. The encoder accepts the event and some indication of its relative frequency
A simple model is the memoryless model, where the data symbols themselves are
encoded according to a single code. Another model is the first-order Markov model,
which uses the previous symbol as the context for the current symbol. Consider, for
example, compressing English sentences. If the data symbol (in this case, a letter) “q” is
the previous letter, we would expect the next letter to be “u.” The first-order Markov
40
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
model is a dependent model; we have a different expectation for each symbol (or in the
example, each letter), depending on the context. The context is, in a sense, a state
i.e., the memoryless model. Data compression results from encoding the more frequent
symbols with short code-string length increases, and encoding the less-frequent events.
Most of the data compression methods in common use today fall into one of two
camps: dictionary based schemes and statistical methods. In the world of small systems,
dictionary based data compression techniques seem to be more popular at this time.
It has only been in the last ten years that a respectable candidate to replace
coding completely bypasses the idea of replacing an input symbol with a specific code.
Instead, it takes a stream of input symbols and replaces it with a single floating point
output number. The longer (and more complex) the message, the more bits are needed in
the output number. It was not until recently that practical methods were found to
implement this on computers with fixed sized registers. The output from an arithmetic
coding process is a single number less than 1 and greater than or equal to 0. This single
Character Probability
---------
number can be uniquely decoded to create the --------
exact stream of symbols that went into its
SPACE 1/10
A 1/10
construction. In order to construct the output number, the symbols being encoded have to
B 1/10
E to them. For example,
have a set probabilities assigned 1/10 if we are going to encode the
G 1/10
41
I 1/10
L 2/10
S 1/10
T 1/10
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
random message "BILL GATES" we would have a probability distribution that looks like
this:
Once the character probabilities are known, the individual symbols need to be
assigned a range along a "probability line", which is nominally 0 to 1. It does not matter
which characters are assigned which segment of the range, as long as it is done in the
same manner by both the encoder and the decoder. The nine character symbol set use here
Each character is assigned the portion of the 0-1 range that corresponds to its
probability of appearance. Note also that the character "owns" everything up to, but not
including the higher number. So the letter 'T' in fact has the range 0.90 - 0.9999....
The most significant portion of an arithmetic coded message belongs to the first
symbol to be encoded. When encoding the message "BILL GATES", the first symbol is
"B". In order for the first character to be decoded properly, the final coded message has to
42
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
be a number greater than or equal to 0.20 and less than 0.30. What we do to encode this
number is keep track of the range that this number could fall in. So after the first character
is encoded, the low end for this range is 0.20 and the high end of the range is 0.30.
After the first character is encoded, we know that our range for the output number
is now bounded by the low number and the high number. What happens during the rest of
the encoding process is that each new symbol to be encoded will further restrict the
possible range of the output number. The next character to be encoded, 'I', owns the range
0.50 through 0.60. If it was the first number in the message, we would set low and high
range values directly to those values. But 'I' is the second character. So what we do
instead is say that 'I' owns the range that corresponds to 0.50-0.60 in the new subrange of
0.2 - 0.3. This means that the new encoded number will have to fall somewhere in the
50th to 60th percentile of the currently established range. Applying this logic will further
restrict our number to the range 0.25 to 0.26. The algorithm to accomplish this for a
End of While
output low
Following this process through to its natural conclusion with our chosen message looks
like this:
43
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
So the final low value, 0.2572167752 will uniquely encode the message "BILL
Given this encoding scheme, it is relatively easy to see how the decoding process
will operate. We find the first symbol in the message by seeing which symbol owns the
code space that the encoded message falls in. Since the number 0.2572167752 falls
between 0.2 and 0.3, we know that the first character must be "B". We then need to
remove the "B" from the encoded number. Since we know the low and high ranges of B,
we can remove their effects by reversing the process that put them in. First, we subtract
the low value of B from the number, giving 0.0572167752. Then we divide by the range
of B, which is 0.1. This gives a value of 0.572167752. We can then calculate where that
The algorithm for decoding the incoming number looks like this:
Do
44
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
Note that we have conveniently ignored the problem of how to decide when there
are no more symbols left to decode. This can be handled by either encoding a special
EOF symbol, or carrying the stream length along with the encoded message.
The decoding algorithm for the "BILL GATES" message will proceed something like
this:
possible numbers with every new symbol. The new range is proportional to the
predefined probability attached to that symbol. Decoding is the inverse procedure, where
45
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
Chapter 5
SOFTWARE IMPLEMENTATION
MEX-files are dynamically linked subroutines that the MATLAB interpreter can
• Large pre-existing C and Fortran programs can be called from MATLAB without
46
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
MEX-files are subroutines produced from C or Fortran source code. They behave
just like M-files and built-in functions. While M-files have a platform-independent
We can call MEX-files exactly as we would call any M-function. For example, a
MEX-file called conv2.mex on your disk in the MATLAB datafun toolbox directory
performs a 2-D convolution of matrices. conv2.m only contains the help text
documentation. If we invoke the function conv2 from inside MATLAB, the interpreter
looks through the list of directories on MATLAB’s search path. It scans each directory
looking for the first occurrence of a file named conv2 with the corresponding filename
extension or .m. When it finds one, it loads the file and executes it. MEX-files take
precedence over M-files when like-named files exist in the same directory. However, help
>>documentation
text mex -setup is still read from the .m file.
Please choose your compiler for building external interface (MEX) files:
5.1.2 Running Mex Files
Would you like mex to locate installed compilers [y]/n? y
SelectThe
a compiler:
following commands are followed to compile mex files used in a matlab
[1] Digital Visual Fortran version 6.0 in C:\Program Files\Microsoft Visual Studio
code.
[2] Lcc C version 2.4 in C:\MATLAB7\sys\lcc
[3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio
[0] None
Compiler: 2
Location: C:\MATLAB7\sys\lcc
Then to run a mex file, the file name is preceded by the keyword mex and
appropriate extention is used. For example, to run the mex file dominant_pass_c we use
48
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
49
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
50
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
51
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
52
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
53
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
54
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
5.8 Decompression :
55
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
Chapter 6
RESULT
In this project we have compressed an image using the JPEG2000 Compression
technique. This process includes obtaining the wavelet coefficients of the image and then
encoding the resulting co-efficient using EZW algorithm, we then Huffman and
The Figure below compares the uncompressed original image and the compressed
(a) (b)
56
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
Chapter 7
CONCLUSION
Transform coding forms an integral part of compression techniques. The
advantage of using a transform is that it packs the data into a lesser number of
coefficients. The main purpose of using the transform is thus to achieve energy
techniques. DCT closely resembles the optimal transform in terms of performance. The
DCT based compression techniques are efficient. However, it has its own shortcomings.
While good compression is achieved by this method, it does not achieve high
compression with lesser distortions. In order to achieve this Wavelet transforms are used
in latest standards.
In this project, an Embedded Zero-tree Wavelet Encoder was developed for JPEG
2000 image and its performance is studied. It can be seen that EZW has a marginally
better performance than the JPEG like encoder. The EZW scheme is marginally better
57
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
Chapter 8
FUTURE SCOPE
It can be seen that for very small block sizes and very large block sizes the visual
distortions are more pronounced. In case of smaller images the distortions may be due to
the size of the header details needed to be added for each block, which would be
significant compared to the information of the block itself. In case of large block size the
initial threshold is high and hence needs a lot of passes to achieve significant amount of
visual quality.
performance, usually higher than that of EZW with arithmetic coding, but in some cases
substantially higher. The algorithm utilizes the same low complexity binary arithmetic
coding engine. Together with careful design of the bit-plane coding primitives, this
enables comparable execution speed to that observed with the simpler EZW without
arithmetic coding. The coder offers additional advantages including memory locality,
58
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
BIBLIOGRAPHY
[3] M. Boliek, S. Houchin, G. Wu, “JPEG 2000 Next Generation Image Compression
Algorithm”, 2002.
59
IMPLEMENTATION OF MINI-PACS IN HEALTH CARE SYSTEMS
60