Sie sind auf Seite 1von 53

A web-based visualization tool for the qCSF

vision test
Ein webbasiertes Visualisierungswerkzeug fr den qCSF-
Sehtest

Bachelorarbeit

im Rahmen des Studiengangs


Medizinische Ingenieurwissenschaften
der Universitt zu Lbeck

vorgelegt von
Lina Schad

ausgegeben und betreut von


Prof. Dr.-Ing. Erhardt Barth

mit Untersttzung von


Dr.-Ing. Michael Dorr

Die Arbeit ist im Rahmen einer Ttigkeit bei der Firma Adaptive
Sensory Technology GmbH entstanden.

Lbeck, den 25. Oktober 2017


Erklrung

Ich versichere an Eides statt, die vorliegende Arbeit selbststndig und nur unter Benut-
zung der angegebenen Hilfsmittel angefertigt zu haben.

Lbeck, den 25. Oktober 2017


Abstract

There are a range of diseases which affect the vision of a patient who is hit by the dis-
ease. Within this range are diseases which impair the contrast sensitivity of a patient
firstly, before there can be measured a loss in visual acuity in general. These include
amblyopia, multiple sclerosis, optic neuritis and some more. Because of this it is nec-
essary to measure and examine the patients contrast sensitivity function (CSF). This
function defines the relationship of spatial frequency and contrast sensitivity. Earlier
tests for measuring the CSF were time-consuming and labourious or the testing param-
eters were shortened and hence not that precise. Therefore they were not practicable
for daily use, respectively not suitable in some regards. To overcome these obstacles
the quick contrast sensitivity function (qCSF) method was developed. The qCSF uses a
Bayesian adaptive algorithm to rapidly and precisely estimate the CSF. For reasons
of clarity the obtained data has to be graphically interpreted. Therefore this thesis de-
scribes the design and the implementation of a tool to visualize the results of the qCSF.

Kurzfassung

Es gibt eine Reihe von Krankheiten, die die Sehkraft der betroffenen Patienten beein-
trchtigen. Dabei gibt es einige Krankheiten, die nicht direkt die Sehschrfe verringern,
sondern sich zuerst auf die Fhigkeit der Kontrastempfindlichkeit auswirken. Dazu
zhlen zum Beispiel Amblyopia, Multiple Sklerose, optische Neuritis und einige mehr.
Aus dem Grund der verminderten Kontrastempfindlichkeit ist es interessant und wich-
tig die Kontrastsensitivittsfunktion (contrast sensitivity function (CSF)) zu messen und
zu kontrollieren. Bereits vorhandene Tests waren zu zeitaufwndig um fr den alltgli-
chen Gebrauch anwendbar zu sein oder sie hatten reduzierte Testparameter, so dass sie
nicht mehr przise genug waren fr einige Anwendungszwecke. Deshalb wurde die
Methode der sogenannten quick contrast sensitivity function (qCSF) entwickelt. Die qCSF
nutzt einen lernfhigen Bayesschen Algorithmus um die CSF schnell und genau abzu-
schtzen. Um die bersichtlichkeit der Ergebnisse des qCSF Tests zu steigern mssen
diese in eine graphische Darstellung berfhrt werden. Deshalb war das Ziel dieser Ar-
beit, eine Option bereitzustellen um diese Anforderung zu erfllen. Aus diesem Grund
beschftigt sich die Arbeit mit dem Design und der Implementierung eines Visualisie-
rungswerkzeugs fr die Ergebnisse des qCSF Tests.

v
vi
Contents

1. Introduction 1
1.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2. Outline of the Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2. Essentials 5
2.1. Human Vision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.1. Structure of the Eye . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.2. Emergence of a Picture . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.3. Overview of Selected Eye Diseases . . . . . . . . . . . . . . . . . . 10
2.2. Quick Contrast Sensitivity Function . . . . . . . . . . . . . . . . . . . . . 12

3. Implementation 19
3.1. Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1.1. Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1.2. Graphical User Interface . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2. Design Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2.1. Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2.2. C++ Libraries and Frameworks for Developing Web Applications
in Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2.3. Calculation of Mean Data . . . . . . . . . . . . . . . . . . . . . . . 27

4. Future Enhancements 29

5. Acronyms 31

Bibliography 33

List of Figures 37

Appendices 39

A. Figures 41

vii
1. Introduction

In this chapter a motivation for the topic of vision testing and in particular the quick
contrast sensitivity function is provided. Following this, an outline of the thesis is given.

1.1. Motivation

Vision is one of the most important senses of an individual. Because of this fact it is
highly necessary to carefully monitor the vision of every individual. By monitoring
the vision it is more likely to detect vision impairing illnesses earlier and the process
of impairments can be documented. Resulting from this the treatment can be better
adjusted for the individual.

Visual acuity of a patient is often measured with the Snellen visual acuity chart. This is
a test where the visual acuity is determined by showing the patient a white board with
black letters on it in a number of rows. On each row the letters decrease in size. The first
row starts with one big letter. Then the patient is asked to tell the investigator which let-
ters are shown. But this test cannot cover a range of parameters, which are essential to
everyday visual function (Stamper, 1984), not even under the strictest standardized
conditions. Still, as mentioned before, these parameters are highly important to the
common visual function. Among those parameters are, for instance, color perception,
low-contrast object detection, as well as motion detection and the ability to see under
low illumination. Especially the low-contrast object detection is highly interesting for
discovering a number of eye diseases. This is because of the higher accuracy of the
contrast sensitivity function (CSF) compared to the usual testing of the visual acuity. The
preceding paragraph followed the explanation of Stamper, 1984; Ginsburg, 1984; Faye,
2005.

The CSF characterizes the ability to see objects under different contrast conditions. Clas-
sical it is examined with sine-wave gratings of differing spatial frequency and contrast.
As mentioned before the CSF of an affected patient is a very helpful part of the diag-
nostic method for a number of diseases, because there is often a loss in the measured
contrast sensitivity before there is an actual loss of visual acuity. But the available tests
for measuring the CSF have a number of problems. They are time-consuming and
hence not that usable under clinical conditions. Other tests which are constructed to

1
1. Introduction

overcome this restriction are not that precise or have a lack of flexibility and/or reliabil-
ity. These problems cause the overall estimation of those tests to be fairly poor. There
are different tests which try to make the measuring achievable, but all of them have to
take a compromise in one or another direction. So there was a need for a test which
would have the ability of keeping the time requirement small and be workable in a clin-
ical surrounding. Acting on this necessity, the quick contrast sensitivity function (qCSF)
was developed (Lesmes et al., 2010).

The qCSF method is an improved test for measuring the CSF. It was developed because
of the above-mentioned problems of those. With the difference that it is using bandpass
filtered sloan letters instead of the sine-wave gratings. The qCSF vision test uses a
Bayesian adaptive estimation for cutting down the number of trials for a run. This
is achieved through an estimation of the likely outcomes of the next trial in order to
choose the most informative stimulus. The parameters are then used in the next trial
and the estimation is executed once more. These operations are repeated until the test
is done and the qCSF is defined.

In further consequence there was a need for a graphical interpretation for the qCSF. This
need results from a number of factors. The main one is the workability, because there
are 2000 single data points in each obtained data file. Obviously it is easier to work with
a graph which represents the whole function than to work with, and possibly have to
compare, single data points. Another of the factors is the capabilities for the physician
when working with qCSF. With a graphical interpretation the clarity is much higher,
which leads to a great work simplification. It is also easier to educate the patient about
their vision, which can be close to the trials as well. When the physician explains the
patient his or her contrast sensitivity function, it is more comprehensible when seeing a
graph than having to deal with the data. This is because the plain data may be opaque
for the patient, due to the unfamiliarity of the patient with data like this. Besides there
is another advantage to the patient, because the comparison of the actual data with
previously obtained data is easily done and possible deviations are clearly visible. Also
a graphical interpretation renders a better general evaluation possible. This leads to a
greater opportunity of qCSF being useful for studies and research.

Until now the visual interpretation of the gained information was tedious. It was done
by sampling the data points to a graph via MATLAB. This was time consuming since
the data points had to be transferred to MATLAB and then the graph had to be plotted
manually as well. Because of this high effort there was a requirement for a solution
which would cut off this task. Besides that reason, there was another important one.
The user of the test, which would be a physician or a study researcher, was not able
to plot the graph himself without knowledge of MATLAB. So for the usability for ex-
ternal users it was highly necessary to have a simple tool for the visualization of the
information provided by the completed test.

2
1.2. Outline of the Thesis

The implementation is chosen to be web-based because a web application provides a


number of benefits for the provider. With the use of cloud computing the application
has a great availability and there is the option to use the paying model software as a
service. This paying model allows the user to control the cost for the application by
choosing when, respectively how often, to use the application. Besides these benefits
the implementation based on the web gives other advantages, such as a reduction of
energy because the server, used for storing data and running the application, is used
by more than one application. As a consequence the expenses are lower. The required
management capabilities are reduced as well, because the owner of the application does
not need to maintain the server himself.

1.2. Outline of the Thesis

In this thesis, I have implemented a web-based visualization tool for the qCSF vision
test. For being well grounded in the topic of qCSF and vision in general I will give a
description of the essentials in chapter 2 firstly. The essentials include aspects of human
vision, such as the structure of the eye, the emergence of a picture and an overview of
selected eye diseases, as well as contrast sensitivity function and quick contrast sensitivity
function themselves. The explanation of the implementation is elucidated in chapter 3.
This explanation consists of a description of the design and the graphical user interface
of the tool. Besides I discuss a number of design considerations in this chapter subse-
quent to the description of the implementation. The design considerations are aspects
of web applications, a comparison of several C++ libraries and frameworks which are
meant for developing web applications and the calculation of the mean values of the
uploaded data. Eventually in chapter 4 I will give an outlash on possible enhancements
of the implementation.

3
1. Introduction

4
2. Essentials

In this chapter there are explications of the essentials, which are needed for the topic
of the quick contrast sensitivity function. In the beginning human vision is discussed.
This includes the structure of the eye and the process of a picture being emerged. After-
wards there are pictured some diseases, which are affecting the vision or, more precisely,
the contrast sensitivity function. Finally the contrast sensitivity function and hereon con-
structing the qCSF is explained.

2.1. Human Vision

This section focuses on human vision. Firstly a detailed description of the structure of
the eye is provided. Besides the procedure of the emerging of a picture is discussed.
Eventually an overview of selected eye diseases, which are affecting the CSF, is pro-
vided.

2.1.1. Structure of the Eye

This part of the section addresses the structure of the eye, as mentioned before. There
is a description of the individual parts of the eye, how they are composed in different
sections of the eye and what their purpose is. The description follows the description
of Atchinson et al., 2000; Schiebler et al., 2007; Helmholtz, 1867; Grehn, 2012d; Grehn,
2012a.

The structure of the human eye can be divided into three layers. Cornea and sclera
form the outer layer. The cornea is situated anterior and the sclera is situated posterior.
The sclera is a fibrous tissue which is white in color and opaque. Mainly its function
is protective and it keeps the eyes shape. The cornea is transparent and is let in the
sclera almost flush with the surface. It is a major part of the optical system because it
has the highest refraction of the eye, which is namely 43 m1 . Sclera and cornea are
both approximately spherical but differ in radius of curvature slightly.

The middle layer is the uveal tract. This tract consists of three components. Posterior is
the choroid, then there is the ciliary body following towards the front. Anterior, at the

5
2. Essentials

very front, the iris is located. Choroid and ciliary body are in charge of nourishing the
photoreceptors of the retina. Despite the photoreceptors extracting nutrients out of the
bloodstream of the choroid, the utilization of the transported oxygen is not very high.
This is caused by the high bloodstream, which is necessary because of the second duty
of the choroid. It is not only feeding the photoreceptors but is also keeping the tem-
perature of the eye at a constant level. The ciliary body produces the aqueous humor.
The aqueous humor is flowing from the posterior chamber to the anterior chamber (see
fig. 2.1). On its way it is nourishing the lens as well as the cornea. Eventually, the
aqueous humor is draining off through Schlemms canal. The circular canal is leading
the aqueous humor, via a number of drain channels, towards the veins. A part of the
ciliary body is constituted of muscles and this part provides accommodation, which is
described in more detail in the next paragraph, by contraction, which is transferred to
the zonule fibers.

The iris controls the incidence of light into the eye by changing the size of its aperture.
The aperture is small when there is a high intensity of light and it widens when the
intensity is reduced. If something has to be seen at a small distance, the aperture is
also smaller. This causes the depth of acuity to rise. The iris and ciliary body also form,
together with the lens, the accommodative apparatus. This apparatus is the part of
the eye which empowers the eye to be able to view objects clearly nearby and in the
distance. For viewing objects nearby the ciliary body contracts, as a result the zonule
fibers slacken. Consequently the curvature of the lens increases and this causes a higher
refractivity. Allowing distance vision, the ciliary body relaxes, which causes the zonule
fibers to tension. Hence the lens flattens and the refractivity decreases. The lens is
glassy and biconvex, whereby the anterior surface is not as much curved as the poste-
rior surface. In the middle its diameter amounts to about 10 mm and its height to about
4 mm and it is birefringent. The refraction of the lens is about 20 m1 which is not high
compared to the refraction of the cornea. But the lens is as well highly elastic and this
leads to a changing shape and likewise the refraction is changing when accommodat-
ing.

The inner layer of the eye is the retina. The retina is an advanced part of the brain.
It consists of three layers, the outer layer with the photoreceptors, the middle layer
with the bipolar cells and the inner layer with the ganglion cells. The layer containing
the photoreceptors is build up by approximately 127 million rods and cones, whereby
the rods are constituting the mayor part of it with about 120 million and there are just
about 6 to 7 million cones. Rods and cones have almost the same structure, but they
differ in size very much. Besides the cones are equipped with three different visual
pigments. These visual pigments have absorption maxima for blue (420 nm), green
(530 nm) and red (560 nm). The visual pigments allow the ability of the photopic vision.
This is the vision during the day, when there is light enough and colors can be seen.
The information received from the photoreceptors is passed to the ganglion cells by the
bipolar cells. The axons of the ganglion cells are defining, together with a membrane,
the retina from the vitreous body. All ganglion cells join up at the papilla and they

6
2.1. Human Vision

constitute, from this point on, the optic nerve. The optic nerve is a part of the central
nervous system.

Figure 2.1.: A view of the structure of the eye, represented as a sagittal cut of the eye
bulb. The image is from Huppelsberg et al., 2005.

At the center of the retina there is an area called macula lutea. The macula lutea has the
highest spatial resolution. In the center of the macula lutea there is a recess called fovea
centralis. The fovea centralis does not contain any vessels. Besides there are just cones
in this area and the concentration of those is higher in this area than in the remaining
retina. Those characteristics cause the point of the sharpest vision of the whole retina
to be located at the fovea centralis. The optical axis proceeds through the middle of the
lens and the cornea, as well as through the fovea centralis.

Similar to the structure of the whole eye the inner part of the eye can be divided into
three parts, the chambers. First there is the anterior chamber, it contains the aqueous
fluid and is located in between the cornea and the iris. The second chamber is the
posterior chamber, which also contains aqueous fluid, but is located between the iris,
the lens and the ciliary body. Through this chamber the zonule fibers proceed. The
last chamber is the vitreous chamber. This chamber is located between the lens and
the retina. It contains a mass, which is sheer and does not contain any pigment. This
chamber is also called vitreous body.

7
2. Essentials

2.1.2. Emergence of a Picture

This section deals with the process of the emergence of a picture in human vision. First
an introduction to the fundamentals of physical optics is made. On this basis, the details
of the process are explained.

For understanding how a picture emerges it is necessary to consider the characteris-


tics of light. Visible light belongs to the variety of forms of electromagnetic radiation
energy. They are all just differing in their wavelength . Visible light has the range
of wavelength from 400 nm to 800 nm. This is a fairly small part of the, today known,
range of wavelength, which is reaching from gamma radiation with wavelengths from
3 107 nm to the technical alternating current with wavelengths up to 3 104 km
(Trautwein et al., 2014; Bannwarth et al., 2013).

In history there were two main theories about the nature of light. On the one hand
there was Christiaan Huygens (1629-1695) and on the other hand Sir Isaac Newton
(1643-1727). Huygens mainly developed the theory about light being a wave. Huygens
supposed that light is a motion, which scatters from the light emitting object to the eyes.
Furthermore he compares light with sound and he transferred the knowledge about
sound to light. He assumed that when light needs time for being transmitted to the
eyes the nature of light has to be a wave. The waves are traveling and each point, which
emits light, is the origin for a new spherical wave (Shapiro, 1973; Bannwarth et al., 2013).
Newtons theory of light was that it is some kind of matter. It was his conviction that
light consists of small material particles. According to Newtons theory these small
material particles are catapulted out of their sources with a very high velocity. They
continue to move with this high velocity because they are not subdued to the earths
gravitational pull and they move on linear tracks. These tracks are the light rays by the
belief of Newton (Reiner, 2002). For a long time it seemed that just one of those theories
could be universal and the only one. But the consensus today is that both theories are
necessary for being able to work with all of the phenomena relating to light. Because of
that the nature of light is today called the wave-particle duality (Trautwein et al., 2014;
Fritsche, 2013a).

For the process of the emergence of a picture a few phenomena have to be examined.
Initially light is emitted from a source. Mostly the emission happens because an atom is
being excited. When the atom is excited it is on a higher energy level than it would be at
its ground state, their origin atomic shell. Whereas the ground state of an atom is their
origin atomic shell according to the Rutherford-Bohr model and the higher energy level
is the next atomic shell which is further afar from the atomic nucleus also according to
the Rutherford-Bohr model. The atoms are not able to keep the condition of excitation
for long, so they fall back to the ground state, the level of highest stability. In the process,
they have to emit the previously absorbed energy. Typically this happens through the
emission of electromagnetic radiation, which shows up as visible light. Only with the

8
2.1. Human Vision

particle nature of light it is possible to explain this phenomenon (Trautwein et al., 2014;
Fritsche, 2013a).

From now on the discussion follows the descriptions of Bannwarth et al., 2013; Harten,
2014; Fritsche, 2013b; Trautwein et al., 2014; Demtrder, 2013. When the emitted light
reaches the eye, firstly it encounters and passes the cornea. The cornea is needed be-
cause of the focal distance of the eye, without a lens or the cornea, would be too long
for light to be correctly imaged on the retina. Therefore the curvature of the cornea is
higher than the curvature of the sclera and it projects from the sclera as well. Behind the
cornea the light has to pass the iris. The aperture of the iris is controlled by the brain ac-
cording to the intensity of light. It is impossible to influence this adaption deliberately.
Next the light ray hits the lens and as a result the lens regulates the total refractivity
of the optical system using its flexibility. Eye lenses belong to the converging lenses.
Converging lenses collect rays at a so called focal point after they pass through the lens.
So the rays are collected at the focal point behind the lens and they cross at this point.
Because of this the object, the source of the light rays, is projected onto the retina upside
down (see fig. 2.2). The phenomenon of refraction, at the lens, can only be explained
with the theory of light being a wave. After passing the lens and crossing in the focal
point the light has to permeate the inner and the middle layer of the retina to reach the
layer containing the photoreceptors. It is possible that the light rays are passing those
layers without getting murky because of scattering, because some cells are working like
optical fibers. When the light rays reach the layer of the retina containing the photore-
ceptors, they are detected by the rods and cones. Then the information is submitted
towards the brain.

Figure 2.2.: A projection of an object in the eye. The image is from http://www.peoi.
org/Courses/Coursesen/psy3/ch/ch4b.html, effective 29/01/2015.

9
2. Essentials

2.1.3. Overview of Selected Eye Diseases

This section gives an overview of different eye diseases which are related to the contrast
sensitivity function. There is a survey about symptoms and appearance of amblyopia,
multiple sclerosis, optic neuritis, diabetic retinopathy and glaucoma.

Amblyopia

Amblyopia is a visual impairment that is not caused by morphological or functional


factors and shows up as a loss in spatial vision. Often it is a consequence of strabis-
mus during childhood and it is a common cause for diminished vision in children. It
appears in about 2 % of the whole human population. Likewise it happens to be the
most frequent form of one-sided blindness in adulthood. The period when children
are at risk of developing amblyopia, is between birth and approximately 6 to 7, but the
period may continue up to 10 years of age. Individuals with amblyopia suffer from re-
duced visual acuity, which may appear symmetrical or asymmetrical. Amblyopic eyes
especially lack in contrast sensitivity, spatial orientation and accommodation. (Steffen,
2012; Wilson et al., 2009; Wright et al., 2006; Hou et al., 2010).

Multiple Sclerosis

The disease multiple sclerosis (MS) is a chronic inflammatory disease. It affects the cen-
tral nervous system and is mostly striking up in early adulthood. In about 20 % of the
cases MS begins with an optic neuritis (see section 2.1.3 for details). Presumably MS is
a autoimmune reaction on components of myelin. During the process of MS there is a
breakdown of myelin sheath and a formation of lesions. Patients affected by MS suffer
from a range of different eye diseases, with optic neuritis leading in prevalence. These
diseases are symptomatic of MS. Almost every patient has to suffer from this disease
at least once. Other eye diseases out of the range are, for instance, the Argyll Robertson
pupil, the uveitis, an inflammation of the papilla, the vasculitis of the retina and the
intranuclear ophthalmoplegia with lesions on both sides. Some of the affected patients
suffer from visual impairments in CSF but not all of them. There are different groups
among the patients with visual impairments. The affected patients are categorized, be-
cause some patients have a loss of contrast sensitivity for all spatial frequencies, some
for just the high or medium and high spatial frequencies and some have a loss of con-
trast sensitivity for just the low spatial frequencies. Those groups who show losses for
defined parts of the spatial frequencies had good results for the Snellen test. The test
was not able to recognize the deteriorated vision(Berger et al., 2013; Green et al., 2010;
Grehn, 2012b; Regan et al., 1977).

10
2.1. Human Vision

Optic Neuritis

Optic neuritis is an inflammation of the optic nerve. There may be both nerves affected
or just one of them. Optic neuritis may appear in combination with an infection in
childhood, but when it appears in adulthood it raises the suspicion of the presence
of multiple sclerosis. The major consequence of optic neuritis is a, mostly temporary,
loss of vision. The visual acuity is highly affected in optic neuritis. It deteriorates in
individual time lapses, it may vary from minutes to days from patient to patient. The
seriousness of the deterioration varies from normal visual acuity to a total loss also. It
may need up to 6 months until the visual acuity is fully recovered, but in general the
highest improvement is within 2 to 3 weeks. Patients may also suffer from a range
of defects of the field of vision. The optic neuritis results in a reduction of contrast
sensitivity and color vision. Often the reduction of the contrast sensitivity is equal to
the loss of visual acuity or it is even worse than that. Besides the impaired eye is not as
sensitive in respect of brightness as a normal eye is (Grehn, 2012f; Chan, 2007).

Diabetic Retinopathy

Diabetic retinopathy is concerning almost every patient who is suffering from diabetes
mellitus. Because of the steadily increasing number of people with diabetes mellitus
affection, it is the most common reason for blindness in the industrial countries. During
diabetic retinopathy a microangiopathy occurs, this is an illness of the smallest blood
vessels, where debris are found in those. In diabetic retinopathy mostly the smallest
blood vessels are affected. As a consequence a neoformation of those vessels is initiated,
this means that those vessels are formed newly, and this causes the vessels to be more
diaphanous, so the permeability is increased. Which in turn leads to edema of the retina
and also an exudative destruction, i.e. blood components leak into the surrounding
tissue, of the parenchyma, the specific tissue of the eye. The diabetic retinopathy can
be detected early by using the quick contrast sensitivity function vision test, because it
examines the contrast sensitivity of the patient. A loss in contrast sensitivity can be
identified much earlier than an actual loss of visual acuity of an individual who suffers
from this disease (Aiello et al., 2005; Grehn, 2012e; Regan et al., 1984).

Glaucoma

The terminus Glaucoma is a subsumption of a number of different diseases. All those


diseases have in common that there is damage to the papilla and the field of vision.
Glaucoma can be easily divided into two types, the open angle and the closed angle.
Mostly whites are suffering from open angle glaucoma, about 90 %, and Asians and
Inuit are contracting closed angle glaucoma much more frequently. Mostly glaucoma

11
2. Essentials

is developed because of a raised intraocular pressure, but it may appear without raised
intraocular pressure also. The consequence of a glaucoma is an excavation of the papilla.
The axons of the ganglion cells of the retina are disappearing. About 1.1 million axons
are existing. Typically, patients notice degraded vision only when about 200 000 to
300 000 axons are impaired. This interference is showing up as a failure of the field of
vision. But some patients notice other afflictions before the aforementioned threshold
of ruined axons. They report afflictions such as blurred vision or discomfort while
reading. It is proven that there is a loss in contrast sensitivity in glaucoma patients, but
mainly the visual acuity is fairly good. This is in accordance with the detection of being
able to characterize the perceived loss of visibility of the patient best with the contrast
sensitivity function (Kraushar et al., 2008; Grehn, 2012c; Stamper, 1984; Faye, 2005; Ross
et al., 1984).

2.2. Quick Contrast Sensitivity Function

The focus in this section is on the contrast sensitivity function (CSF) and the quick contrast
sensitivity function (qCSF). The section begins with a description of the CSF, the base for
the qCSF, and then continues with an explanation of the qCSF.

The quick contrast sensitivity function is based on the contrast sensitivity function, as men-
tioned before. The CSF is a characterization of the ability to see objects under different
levels of contrast. By way of comparison the Snellen test, mostly used for measuring
the visual acuity, uses a fixed contrast for the background and the letters. This fixed
contrast is the highest possible contrast, the letters are black with a minimum in lumi-
nance and the background is white with a maximum in luminance. The only variable
part of this test is the size of the letters, so this is an one-dimensional test. Whereas
the CSF uses a second dimension, the changing contrast. So when using 100 steps of
contrast the CSF is a hundred times more complex than the Snellen test.

The CSF characterizes the contrast sensitivity of an individual. The function is classi-
cally measured with so called gratings. A grating is a sequence of bars with alternating
luminance. For a clarification there is an illustration of three different gratings provided
in fig. 2.3 on the next page. In this figure the (A) grating is a square-wave with a high
contrast. The bars of this grating are well-defined, whereby the white bars have very
high luminance and the dark bars have very low luminance. In the classical tests for
measuring the CSF sine-wave gratings are used instead of square-wave gratings. Two
different sine-wave gratings can be seen in fig. 2.3. Grating (B) has a high contrast,
the amplitude of the underlying function is high. The grating (C) has a lower contrast,
the amplitude of this underlying function is smaller than the amplitude of the function
from grating (B).

12
2.2. Quick Contrast Sensitivity Function

Figure 2.3.: Three types of gratings. Gratings are used for measuring the contrast sen-
sitivity function. (A): high-contrast square-wave grating (B): high-contrast
sine-wave grating (C): low-contrast sine-wave grating The image is from
Neuringer, 2000.

The measuring unit used for the CSF is called cycle per degree of visual angle. One dark
and one white bar of a grating (a wave length) is called one cycle. When looking at the
grating the distance between the grating and the eye acts an important part. Because of
this fact the size of an object is measured by the visual angle. This is the angle the object
occupies on the retina. A grating has a spatial frequency of 1 cycle/degree when one
cycle is 1 cm wide at a distance of 57 cm or if one cycle is 2 cm wide and the distance
between the grating and the eye amounts to 114 cm for example. The maximum of the

13
2. Essentials

human contrast sensitivity is around approximately 3 cycles/degree to 5 cycles/degree


and it reaches the minimum at about 60 cycles/degree (Bundy et al., 1984).

The fig. A.1 on page 41 shows a chart with a sine-wave grating. The spatial frequency
is increasing logarithmically from low to high, from left to right. The contrast is de-
creasing also logarithmically from high, 100 %, to low, 0.5 %, from bottom to top. If we
assume that the ability of seeing contrast is based just on the contrast of the image, all
bars should be seen up to the same height. But the bars with middle spatial frequency
loom higher than the bars with low or high spatial frequency when the viewer has an
unaffected contrast sensitivity function. The envelope of the barely seen bars shows up
like a nearly U-shape that is inverted. This envelope depends on the individual contrast
sensitivity of the viewer. So the envelope you see in that chart is your personal contrast
sensitivity function approximately.

Measurements of contrast thresholds for a great number of different spatial frequencies


have been done for a long time already. But this procedure was highly time consuming.
Therefore the common method of measuring the grating acuity, or also the determining
fusion frequency, was to adjust a stimulation on the frequency dimension, in adjust-
ment to the patients results earlier, later on. While the stimulation was adjusted on
the frequency dimension the high grating contrast was fixated at 50 % or 100 %. This
method was enhanced by Thorn et al., 1986. This enhancement was that they commit-
ted the adapted stimulation to four grating contrast levels, in particular to 3.2 %, 10 %,
32 % and 100 %. Both of the aforementioned practices had a particular problem. The
time needed to fulfill the practice was very high. This is caused by the compromise of
enlargement of the sampling range and the resolution which is used to create a greater
versatility and examination accuracy of the results gained by accomplishing the test. In
total the examination, done with 5 to 10 spatial frequencies, warranted between 30 min
and 60 min. It was not feasible to gauge more than one contrast sensitivity function, for
instance with correction and without or for different eyes, because of this great times-
pan needed to fulfill a test. Besides there was the consequence from this enormous
amount of time that the contrast sensitivity, measured under clinical conditions, was
not as accurate and compressed. For instance the Pelli-Robson chart is used under
clinical conditions already. This chart shows letters which are constant in size, but the
contrast of the letters differs between about 100 % down to below 5 %. The step range in
this test, for the decreasing contrast is 0.15 log units (Pelli et al., 1988; Faye, 2005). The
test is actually specific enough to determine losses in general contrast sensitivity, like
occurring as a symptom of cataract, macular degeneration or diabetic retinopathy, but
there is no possibility for getting information about any potential malfunctions which
are frequency-specific. To overcome this restriction other tests use a modification of
the frequencies and a contrast of narrowband gratings. Still these test make a compro-
mise, which is in this case that those tests are printed on paper. As a consequence the
gratings have constant frequencies and the contrast levels are constant as well. These
limitations lead to a lack of flexibility and steadiness in this tests as well. Those deficits
are the reason for the quick contrast sensitivity function being developed.

14
2.2. Quick Contrast Sensitivity Function

The next paragraphs follow the description of Lesmes et al., 2010. The aim of the qCSF
was to improve the efficiency of the contrast sensitivity function. It was achieved by
adapting a higher-order function on the CSF, determining a probability density func-
tion over a margin of contrast sensitivity functions which are of the form of the previously
determined function. The next step was to enhance the previously obtained probability
density function with the Bayes Rule in accordance with the results of previous trials.
Lastly the obtained results were used to estimate the next results. This is necessary for
being able to use stimulations for the next trial which allow the results to be even more
specific. All together those characteristics present a much higher flexibility and the re-
sults of an attempt from one individual spatial frequency condition makes it possible
to stimulate sensitivity estimates better, even throughout all frequencies.

For the qCSF the contrast sensitivity function is specified with four characteristics and it
uses the shape of a truncated log-parabola. An illustration of these parameters and the
parabola is provided in fig. 2.4 on the next page. By name the characteristics are (1)
the peak gain (sensitivity), max ; (2) the peak spatial frequency, f max ; (3) the bandwidth
[. . . ] and (4) , the truncation level at low spatial frequencies (Lesmes et al., 2010).
The bandwidth is a specification for the full-width at half-maximum (in octaves)
(Lesmes et al., 2010) of the function.

The log-parabola without the truncation defines the contrast sensitivity as

! "2
log10 ( f ) log10 ( f max )
S ( f ) = log10 (max ) (2.1)
/2

with = log10 (2) and = log10 (2). In fig. 2.4 the log-parabola is represented as the
dotted line and this function is truncated at frequencies which are below the peak with
the parameter .

This type of characterization of the function, with the aforementioned four parameters
and the truncated log-parabola, has a number of benefits in comparison with other types.
Two types of characterization were introduced by Rohaly et al., 1993. They specified
the CSF by just three parameters. However those types were determined to systemical-
lydeviate from the data of the individuals contrast sensitivity function. There are other
forms with four parameters as well, but those have adjusted parameters and these can-
not be construed directly. Additionally the truncated log-parabola is able to capture the
issues of the CSF being partly symmetrical and partly asymmetrical.

The Bayesian adaptive inference is used by the quick contrast sensitivity function for de-
termine the next parameters for the contrast sensitivity function. The Bayesian adap-
tive inference was first used in psychophysics in 1983 for the one-dimensional QUEST
method (Watson et al., 1983). Since then it became more and more widespread for psy-
chophysics.

15
With an additional parameter to describe the low-
frequency plateau, the truncated log-parabola can deal ods estimate the thresho
with the issues of the CSFs symmetry and asymmetry. metric function (Cobo-L
Other four-parameter descriptions, such as the difference 1997; Kontsevich & Tyle
of Gaussians, provide equivalent fits to empirical CSFs, 2008; Snoeren & Puts, 19
but their fitted parameters are not immediately interpret- complex behavioral fun
Kujala, Richardson, & L
2. Essentials able. The interpretable parameter set provided by the Lu, & Dosher, 2006; V
previously applied the B
develop methods for est
noise contrast functions
sensitivity thresholds an
tasks (Lesmes, Lu, Tran
addition to the conceptua
that follows in this s
(Movie 1) is included i
and post-trial analyses a
MATLAB code (Math
demonstration is availa
usc.edu/qMethods).

Stimulus and paramete


The qCSFs applicatio
requires two basic comp
function, p(E), defined o
CSF parameters, and (
possible grating stimuli.
accelerate CSF estimati
Figure 1. CSF parameterization. The spatial contrast sensitivity stimulus space for gra
Figure 2.4.: The four parameters of the quick contrast sensitivity function and the used
function, which describes reciprocal contrast threshold as a information gained over
log-parabola. The peak gain sensitivity max , thebypeak
function of spatial frequency, can be described
spatial frequency
four parame- max , the current sim
trial. fFor
theters:
bandwidth and
(1) the peak gain,the truncation
+ max level
; (2) the peak at low spatial
frequency, fmax; (3)frequencies
the The
CSF. parameters are: 2 to
log-parabola is represented as the dotted line. An illustration
bandwidth (full-width at half-maximum), "; and (4) the truncation for possible
20 cpd for peak frequ
triggers, according
(plateau) to sensitivity and
on the low-frequency side,spatial
%. Thefrequency,
qCSF method is provided above "; and 0.0
bandwidth,
theestimates
graph. Thethe image is from
spatial CSF Lesmes
by using et al., 2010.
Bayesian adaptive inference truncation level, %. The
to directly estimate these four parameters. 0.1% to 100% for gratin
For the use of the Bayesian adaptive inference, related to the qCSF, two specifics have to
be available. Firstly there has to be a probability density function p( ) . This function is
defined over a four-dimensional space of CSF parameters (Lesmes et al., 2010). Addi-
tionally a two-dimensional space of possible grating stimuli (Lesmes et al., 2010) has
to be available. The aim of the approach is to speed up the process of the estimation of
the parameters for the next trial. This happens by an effective examination of the stim-
ulus space for the grating stimulus that should be used in the next trial. The demand
for the examined stimuli is that they enhance the information which are achieved over
the space for the CSF parameters on each trial.

A prior probability density function pt=1 ( ) is specified before the beginning of the
test. The definition of p( ) is made over a space T which is discrete, gridded and
is composed of four-dimensional vectors = ( f max , max , , ). The space T is a rep-
resentation of CSFs which could probably be consistent with the patients CSF. The
specialization of the prior function can be based on already gained information about
the variations of the appearance of the CSF related to the specific part of the population

16
2.2. Quick Contrast Sensitivity Function

that has the same, or at least quite similar, characteristics as the individual to be tested.
In other words the prior function can be based on the psychometric function of this
specific part of the population.

After each trial t the probability density function pt ( ) is brought up to date to pt+1 ( )
with the use of Bayes Rule in combination with the patients result rt of the trial t and
the conditional probability p(rt | ). The conditional probability is defined as the prob-
ability of the obtained rt when those CSFs, which comprise the parameter space T , are
given. p(rt | ) is produced by weighting the response rates, which are defined by the
CSF vectors , over the parameter space T . The definition for the weighting is granted
in eq. (2.2).

p (r t | s t ) = p (r t , s t ) p t ( ) (2.2)

Furthermore the specialized Bayes Rule for pt+1 ( ) is given in eq. (2.3).

p t ( ) p (r t | )
p t +1 ( ) = (2.3)
p (r t )

Another proposition for an enhanced quality, in terms of the results gained from each
trial, is a specialized stimulus selection. The grating frequency and the contrast for
the stimulus for the next trial is chosen by the qCSF with the use of an one-step-ahead
search together with a criterion of minimum expected entropy (Lesmes et al., 2010).
The entropy of p( ) is defined as following:

H ( ) = p( ) log( p( )) (2.4)

The maximum of the entropy of p( ) is reached when p( ) is homogenous over the


parameter space and the minimum is reached when the CSF of the patient is totally
determined. This implies that for one set of CSF parameters an individual has p( ) = 1
and p( ) = 0 as to the rest. According to Cover et al., 2012 and Kujala et al., 2006 infor-
mation is specified as the difference between entropies. Because of this specialization a
strategy for achieving the maximum information for the CSF parameters is at the same
time a strategy that minimizes the expected entropy of p( ) . The qCSF uses such a strat-
egy for cutting short the regions of the stimulus space by avoiding the regions which
contain those stimuli which are probably not useful for the test. The strategy includes

17
2. Essentials

an efficient simulation of the next trial for all of the possible stimuli and also an efficient
evaluation of the expected effect of the likely stimuli for the next trial.

The outcome of the development of the qCSF is that just 25 trials are needed to be able
to determine a summary statistic, which is made available through the integral of the
contrast sensitivity function. To provide more accurate estimations, there has to be an
execution of 100 trials. In total those facts lead to the strong assumption that the ap-
proach of qCSF is able to cover the various requirements for measuring the contrast
sensitivity. This assumption was confirmed by Hou et al., 2010. They verified it by
testing the qCSF under clinical conditions with patients affected by amblyopia and nor-
mally sighted subjects. The result of their investigation was that with the use of qCSF
just 50 trials were needed to capture the difference of the CSF of normally sighted in-
dividuals and those who suffer from amblyopia. The equivalent number of trials of a
common test method is as much as 300. So the qCSF method can be accomplished in a
brief span, whereby nevertheless it is precise and accurate, while gauging the contrast
sensitivity function (Lesmes et al., 2010; Hou et al., 2010).

18
3. Implementation

This chapter focuses on the implementation of the visualization tool for the qCSF vision
test. It is segmented into two sections, the first section approaches the description of
the implementation and the second approaches a few design considerations.

3.1. Description

The section approaching the description of the implementation is divided into the as-
pect of the design of the implementation and the aspect of the graphical user interface.
The section starts with the design and the graphical user interface follows.

3.1.1. Design

In this part of the section we will describe the design of the implementation for the
visualization tool. We will examine the classes of the implementation and their rela-
tionships in detail.

The application has to fulfill several requirements on behalf of the practicability. It


should be possible to upload single data and multiple data compressed as a zip-file as
well. The widget is able to uncompress the file and use the multiple data internally.
This is an important part of the tool due to the necessity that the physician or superin-
tendent of the study has to be able to visualize not just the results from the current test
session but to compare those results with results from different test sessions as well. To
upload just one zip file with an automatic extraction of the single data is much more
comfortable for the user instead of having to upload a bunch of data individually. The
data has to be uploaded to generate a graphical presentation of the data. At this multi-
ple data can be uploaded to generate more than one graph in order to compare different
data. This is necessary for observing a patients progress of loss of vision for example.
It should be possible to select which data is going to be present in the graph as well.
This is required so as to do a selection of the presented data in the graph for being able
to switch between different comparisons.

19
3. Implementation

The tool is implemented in C++ and makes use of the C++ library webtoolkit (Wt). Wt is
a library that provides assistance for the development of web applications in C++. It is
fixated on widgets and applies patterns of desktop GUI development tailored to the
web (Wt: an introduction). Wt takes care of the characteristics of the implementation
which are web-specific, by providing an abstraction of those for the developer. With
Wt it is possible to implement applications which support plain HTML browsers, but
at the same time they support web crawlers as well. Those applications may be highly
interactive additionally (Wt: an introduction).

The implementation uses some of the widget types, which are part of Wt. The docu-
mentation of Wt can be found under Wt documentation. All of the following class names
are contained in the namespace Wt. The main ones are WContainerWidget, WFileUpload,
WTable and WCartesianChart. Following there is a description of the relations of the
widgets and for visualization see fig. A.2 on page 42. WContainerWidget and WTable,
directly, and WCartesianChart, indirectly, are derived from WInteractWidget. The WInter-
actWidget is an abstract widget that is able to deal with user-interface interaction. It is
itself derived from WWebWidget. WWebWidget is the parent class of WFileUpload like-
wise. It is the base class for all those widgets which are including a HTML counterpart.
Besides those widgets there are some WPushButtons. This is a class that is derived from
WInteractWidget and it is providing the developer a push button, which is allowing the
user to interact with the application.

The architecture of the classes is constructed conform to the concept of the model-view
architecture. The classes which handle the data are the ChartData struct and the Chart-
sApplication class. The WtChart class and the WtUploadFile class are the classes which
are in charge for providing the view.

The WContainerWidget is used in about every class of the implementation, except for
the ChartData struct. It is a main part of the concept as it is a widget for containing
widgets itself and managing those. With the use of a WContainerWidget as a parent
container, which is storing all other widgets, the reproduction of the single graphical
interpretation is simplified. With the WContainerWidget it is possible to arrange the
child widgets as desired, too.

The WFileUpload widget is appearing in the class named WtUploadWidget. This is a


class which is self-implemented. It is in charge of uploading the data and processing it.
For the purpose of uploading data it contains a container widget.This widget consists
of the, before mentioned, WFileUpload and a PushButton with the label Send. The
WFileUpload widget itself provides a button which is responsible for opening the data
selection dialogue. When the user interacts with the Send-button, the process of up-
loading data is initiated. When there is no data selected before an error message is
shown, which alerts the user of this circumstance. If there was data selected there are
two possible reactions. They begin both equally. The WFileUpload tries to upload the
data and reports if this process was successful. It will be unsuccessful if the data file is

20
3.1. Description

too large or the file does not exist. Next there is a message placed at the users disposal.
The content of the message depends on the report of the upload process.

When the data file was uploaded successfully, the next step of the implementation is to
check if the data file was a single data file or if it was a zip file. If the file is classified
as a zip file, a decompressing process starts. This decompression is accomplished with
the assistance of the C++ library libzip. libzip is a library that is able to read, create and
modify zip archives (libzip).

Once all data files are stored in a way that they can be read the contents are extracted.
This is done with the help of a few classes, especially the AnalysisResults class, provided
by the qCSF vision test. The result is that the data points, 2000 in number, are stored in
vectors. Those vectors are passed to a class called ChartData. This class is a structure
for defining the characteristics of the data being used for creating a chart later on. The
structure contains the x-values for the graph, which are populated with the frequencies,
the y-values, which are populated with the median sensitivities and the name of the
file.

Next the ChartData object is transmitted to the WTable widget. For each submitted data
there is a new row injected into the table. The row contains the name of the data and
a check box. The check box is responsible for storing the information whether the data
should be presented in the graph or not. The user is able to tick this check box interac-
tively.

For the case when more than one data file is being uploaded further processing of the
data takes place. A computation of the mean values of all uploaded data is made. For
this purpose the frequencies of all existing data are merged. Then an examination is
done whether a median sensitivity for all of the merged frequencies exists in every data.
If this is not the case a linear interpolation is done for providing the wanted information.
This method ensures that there is a curve in the graph which represents the actual mean
value of all provided data points.

Besides the upload and the table widget three Wt::PushButtons are provided. Those do
not belong to one of the child container widgets but to the parent one. There is a button
for the purpose of creating another parent container. This button is labeled with a +.
Next to this button, there is the one responsible for creating the graph. The label of it is
Create Chart. The last button is labeled with Quit. The aim of this button is being
able to cancel the actual view and refreshing it.

The Create Chart button initiates the visualization of the data, as mentioned before.
So when the user interacts with this button the first thing that happens is the check
boxes are being controlled whether they are ticked or not. This check is done, because
the check boxes control which of the data should be shown in the graph. Once it is
known which data has to be considered, the data points are committed to the WCarte-

21
3. Implementation

sianChart widget. This collects all the information about the data and then plots it to a
graph.

3.1.2. Graphical User Interface

In the following we will be concerned with the graphical user interface (GUI) of the im-
plementation. We will describe every part of the GUI in detail. An image of the whole
GUI of the visualization tool is provided at fig. A.4 on page 44.

The web-based visualization tool is a widget, further on called parent widget, which
is itself composed of three widgets. There is one widget which is in charge of the data
upload (see fig. 3.1). It is possible to upload single data or multiple data, which is
compressed as a zip-file.

Figure 3.1.: Picture of the upload widget. This widget enables the upload of data files
from trials.

The table widget (see fig. 3.2) directly reacts on data being uploaded. It represents the
name of the data and has a check box, which may be ticked, for each entry for data.
The aim of the widget is to provide the user an overview over the already uploaded
data. With the check box the user is able to decide which data has to be represented
in the graph and which should not by checking or unchecking it. From the second
uploaded data on the widget gets an extra entry for the mean data. The mean data is
computed from the already given data in behalf of simplifying the process of comparing
the average data with the single data.

Figure 3.2.: View of the table widget. The table widget shows the uploaded data and
allows to check or uncheck the data in terms of showing the data in the
chart.

Besides these two widgets which can be seen when starting the application, there are
three buttons initially. From left to right there is one button labeled with a plus, the
next one has the label Create Chart and the last has the label Quit (see fig. 3.3 on
the facing page). The reactions of these buttons have been described in section 3.1.1.

22
3.1. Description

Figure 3.3.: A picture of the buttons of the visualization tool. The button with a plus
creates a new parent widget, the button labeled with Create Chart creates
the chart and the Quit button restores the view.

The last widget is the chart widget (see fig. 3.4 on the next page). Eventually this one is
the widget which is representing the input of the uploaded data. As mentioned before
this widget is highly interlocked with the button Create Chart. When the internal
processing of the interaction with the button is initiated, there is a check which data
has to be present in the graph, also mentioned before. So when it is verified which data
needs to be handled, these data are passed to the chart. Afterwards the chart appears in
the graphical user interface along with a key for the different curves within the graph.

Figure 3.4.: A view of a plotted graph. On the x-axis the spatial frequencies are plot-
ted and on the y-axis the median sensitivities. On the right, a legend is
provided.

23
3. Implementation

3.2. Design Considerations

This section focuses on the design considerations of the implementation of the visual-
ization tool. It begins with a consideration of the tool being a web application. In this
context the topic of cloud computing is discussed. Besides there is a comparison of a
number of C++ libraries for developing web applications.

3.2.1. Web Application

The implementation of the visualization tool is web-based and therefore this part of
the section is dealing with an aspect of web applications. The examined aspect of web
applications is cloud computing. In the beginning there is a definition for cloud com-
puting provided. Further on the advantages and disadvantages of cloud computing are
discussed.

The subsequent definition is based on the description of cloud computing from Mell
et al., 2009. This definition for cloud computing implies that it is a term for a concept
which allows an ever-present, manageable and on-demand network access to resources,
which are shared. These resources can be made available promptly and they do not con-
sume a lot of capabilities, in terms of management or service provider assistance. The
concept consists of five characteristics. Cloud computing is an on-demand self-service,
this means that the customer can access the needed capabilities without the need of
dealing with the provider on a human level. It provides broad network access as well.
The whole resource of the provider supplies more than one customer, this is called re-
source pooling. Another characteristic of cloud computing is the rapid elasticity. This
means that it is possible to provide the customer just the capabilities that he needs. If
capabilities are not needed any longer the resource can be freed and the resource is then
available for other customers. The last part, which is characterizing cloud computing,
is the measured service. Explained with the example used before that stands for the
ability of the system noticing by itself when the customer does not need the capability
anymore, there is no need for the customer of observing his capabilities himself and the
customer just has to pay the actually used capabilities.

These characteristics provide a number of advantages, including great availability, scal-


ability and the opportunity of paying-per-use (Jones et al., 2011). Furthermore it is
possible to fulfill upcoming requirements on demand. This solution is saving energy
and as a consequence the expenses are lower. A direct advantage from the characteristic
is the cut-down of management capabilities, as mentioned before (Jaatun et al., 2009).
This brings out that there are a lot of reasons for deciding on a web-based solution.

Nevertheless cloud computing has some difficulties which have to be addressed. When
it comes to data privacy and data security there are a number of concerns. When the

24
3.2. Design Considerations

user stores data in the cloud the provider has to guarantee that no unauthorized per-
sons are able to take possession of the data. The data has to stay in its original format,
no matter if the memory location of the data has been changed internally, as well. Be-
sides these two requirements the data has to be usable whenever the user needs it. For
the data security there has to be a type of cryptographic coding and the algorithms used
for the coding have to be kept up to date, so that attackers from the outside are not able
to infringe on the cloud and the stored data (Yu et al., 2012).

3.2.2. C++ Libraries and Frameworks for Developing Web Applications in


Comparison

In the section concerning design considerations a comparison of a number of C++ li-


braries has made. It starts with an overview of the libraries Wt and fastcgi++ and the
frameworks Tntnet and TreeFrog. After the overview the comparison itself is provided.

Wt

Wt is a C++ library for developing web applications. It is based on widgets, and uses
well-tested patterns, fitted for the web, for the GUI development. For the web-specific
parts of the implementation Wt provides an abstraction of those patterns for the de-
veloper (Wt: an introduction). So the developer does not have to work with HTML but
with plain C++ instead. With Wt it is possible to implement applications which support
plain HTML browsers, but in the same time they support web crawlers as well. This is
achieved via graceful degradation or progressive enhancement (Wt: an introduction).
Those applications can be highly interactive. Wt provides quite a number of widgets,
like a table widget and different kinds of chart widgets for the user, which are ready to
use (Wt: an introduction).

fastcgi++

Another C++ library for developing web applications is fastcgi++. fastcgi++ was devel-
oped as an option to the official FastCGI developers kit. The library provides an ef-
fective management of the memory and the CPU usage. It manages multiple requests
which are received at the same time without forcing the user to handle multiple threads
by himself. Another feature of this library is an efficient text processing. It is possible
to use wide characters and convert those to utf-8 internally for the transfer to the client.
This makes the internationalization easier. With the use of fastcgi++ the user is able to
use C++ for the internal processing of requests, but the output has to be made with
HTML still (fastcgi++).

25
3. Implementation

Tntnet

Tntnet is a framework for developing web applications with C++. The framework pro-
vides the base functions for a web application server and a web template. It contains the
C++ library Cxxtools and the library Tntdb likewise. Cxxtools is a library which supplies
tools for a number of features needed for developing web applications such as serializa-
tion, multi threading, http client and server, xml and logging. The library Tntdb works
as an interface for SQL databases. Tntnet allows the developer to embed C++ code into
HTML. Nevertheless it is not possible to avoid writing HTML code totally (The Tntnet
project).

TreeFrog Framework

The TreeFrog framework is a full stack and cross-platform framework for developing
web applications. The framework enables the developer to use C++ code in the HTML
file with the ERB format. This simulates the coding with the use of the framework like
coding in a scripting language. TreeFrog is also linked with Qt which is another pow-
erful framework. This framework has a great GUI functionality but the non-GUI func-
tionality provides a lot of convenient usability features (TreeFrog Framework) tools,
such as SQL and JSON, for the developer. Still, it is not possible to use the whole fea-
tures Qt provides directly for developing web applications. There has to be HTML as a
connector (TreeFrog Framework).

Comparison

All of the presented libraries and frameworks allow the developer to use C++ for de-
veloping web applications in one way or another. But there are a number of differences
between them. The library fastcgi++ and the framework Tntnet provide some useful
features for developing web applications, such as multi threading (both) and support
for SQL (Tntnet). But those two do not encourage the developer with any feature for
the GUI design. This is a huge disadvantage of fastcgi++ and Tntnet compared to Wt
and TreeFrog when the developer wants to focus on the logical part of the implementa-
tion. TreeFrog does provide support in designing the GUI, because it is linked with Qt.
Nevertheless it is not quite easy to design the GUI of a web application with the use of
Qt and it is not possible to do this with just the use of C++. This is a disadvantage of
all the above-mentioned libraries and frameworks, except of Wt. With the use of Wt it
is possible to just use C++, and no HTML, for developing the whole web application,
because Wt renders the C++ code into HTML code internally. This is a huge advan-
tage for those developers who are familiar with C++ but not with HTML. Besides this
advantage Wt provides support for designing the GUI as mentioned before. This is re-

26
3.2. Design Considerations

alized in Wt with the use of widgets. A number of widgets with useful features, such as
tables, charts, buttons and such, for the design are provided. So with these features the
developer is able to focus on the essential part of the implementation, the logic, instead
of spending a lot of time on adjusting the design of the GUI.

3.2.3. Calculation of Mean Data

The implementation of the visualization tool involves a provision of mean data which is
calculated from the uploaded data. The mean data is provided in order that the user is
able to compare results from different sets of trials easier. This is necessary for matching
a study with one or more other studies for example.

At the first attempt I have chosen a naive approach. All of the frequencies of the pro-
vided data were merged to one vector, called total frequencies from now on, firstly. The
median sensitivities of the single data were just assigned to the entry of the total fre-
quencies which had the same value like the corresponding frequency of the single data.
So, for example, when there was in a single data a median sensitivity 1 at position 0
and the frequency at position 0 was 5 then the total frequencies vector would have been
browsed for the frequency 5. Assumed that it was found at the position 8, then the
median sensitivity would have been entered into a corresponding vector at position 8.
If there were more than one entry for the same frequency the information about the
rate of the appearance was saved and the median sensitivity was added to the already
existing value. When all median sensitivities were assigned, the entries of the merged
median sensitivities were run through and, if necessary, divided by the rate. This first
approach led eventually to a function which was visually nor functionally not the mean
function of the provided functions, like it can be seen in fig. A.5. This output is actually
not surprising when two data are given for the calculation and the data have alternat-
ing frequencies, so that every second entry of the total frequencies has just a matching
median sensitivity of the same data and the entries in between have matching median
sensitivities which are belonging to the other data.

After we tested the aforementioned approach it was clearly recognisable that another
method had to be implemented for the calculation of the mean data. My next attempt
was to use a linear interpolation. The vector total frequencies remained the same, but
the further processing changed. After merging the frequencies all data were examined,
whether all of the entries in total frequencies exist in the frequency vector of examined
data. If there is a frequency missing in a vector, this frequency is entered into the re-
garding vector assorted. Directly afterwards a corresponding median sensitivity is cal-
culated. This is achieved by a linear interpolation. That implies that the slope between
the direct neighbour points of the missing one is calculated. With the existing x-value,
the frequency, the likely location of the y-value is determined. The y-value is entered,
at the same position like the x-value in the frequency vector, into the median sensitivity

27
3. Implementation

vector with the calculated location. The outcome of this method can be seen in fig. 3.4
on page 23 or fig. A.4 on page 44.

28
4. Future Enhancements

This chapter considers some possible future enhancements of the topic of the thesis.
There will be a thematization of the disadvantages of the design, as previously men-
tioned in section 3.2. Then a consideration of how to improve the situation will take
place.

Due to the safety concerns, of the aspect of the implementation being a web application,
the further development of the web application should include an implementation of
a protection via password for the tool. This is especially highly necessary, because the
data which are uploaded by the user are medical data and medical data need to be
treated in a way no unauthorized person are able to get access to them. Wt offers a
solution for this, a so called FormBaseModel. This model provides a registration option
and an option for the login as well. The authorization uses OAuth as the base. OAuth
is an open protocol to allow secure authorization in a simple and standard method
(OAuth).

The calculation of the mean data is until now done with a linear interpolation. In future
accurate testing should take place to verify whether the chosen interpolation is working
fine or if another type of interpolation should be considered for a more precise result.
Another feature would be interesting related to the mean data, namely the option of
choosing which of the uploaded data should be calculated as the mean data. With this
option it would be possible to exclude certain data. This could be attractive for the
comparison of two data sets when just the mean data are wanted and the difference
between the mean with this certain data and without is interesting.

Regarding the whole visualization tool it will be highly necessary to implement a proper
localization, because the actual version has some labels in German and some in English.
Wt offers a solution for this via the use of XML. Every WString can be constructed with
the method WString::tr("key"). This key is a link to a so called message resource bundle.
This is a set of XML files which contain the translation from the key to the localized
string. So the localization just has to be done within the XML file and the actual code
does not to be touched at all.

29
4. Future Enhancements

30
5. Acronyms

CSF contrast sensitivity function

GUI graphical user interface

MS multiple sclerosis

qCSF quick contrast sensitivity function

Wt webtoolkit

31
5. Acronyms

32
Bibliography

[Aie+05] Lloyd P. Aiello and Jerry Cavallerano. Diabetic Retinopathy. In: Diabetes
and Cardiovascular Disease. Ed. by Michael T. Johnstone and Aristidis Veves.
Humana Press, 2005, pp. 349365. URL: http://dx.doi.org/10.1385/1-
59259-908-7%3A349.
[Atc+00] David A. Atchinson and George Smith. Optics of the Human Eye. Butterworth-
Heinemann, 2000.
[Ban+13] Horst Bannwarth, Bruno P. Kremer, and Andreas Schulz. Optik. In: Ba-
siswissen Physik, Chemie und Biochemie. Springer Berlin Heidelberg, 2013,
pp. 113145. URL: http://dx.doi.org/10.1007/978-3-642-36635-2_5.
[Ber+13] Thomas Berger, Michael Linnebank, Heinz Wiendl, and Christine Stadel-
mann. Pathologie und Immunpathogenese der Multiplen Sklerose. In:
R Springer Vienna, 2013. Chap. 2, pp. 1325. URL : http : / / dx .
Betaferon.
doi.org/10.1007/978-3-7091-1766-8_2.
[Bun+84] Alan Bundy and Lincoln Wallen. Contrast Sensitivity Function. In: Cata-
logue of Artificial Intelligence Tools. Springer Berlin Heidelberg, 1984. Chap. 44,
pp. 2424. URL: http://dx.doi.org/10.1007/978-3-642-96868-6_44.
[Cha07] Jane W. Chan. Optic Neuritis. In: Optic Nerve Disorders. Springer New
York, 2007. Chap. 1, pp. 130. URL: http://dx.doi.org/10.1007/978-0-
387-68979-1_1.
[Cov+12] Thomas M. Cover and Joy A. Thomas. Elements of information theory. John
Wiley & Sons, 2012.
[Dem13] Wolfgang Demtrder. Optische Instrumente. In: Experimentalphysik 2. Springer
Berlin Heidelberg, 2013. Chap. 11, pp. 347370. URL: http://dx.doi.org/
10.1007/978-3-642-29944-5_11.
[Fas] fastcgi++. URL: http://www.nongnu.org/fastcgipp/doc/2.1/.
[Fay05] Eleanor E. Faye. Contrast sensitivity tests in predicting visual function.
In: International Congress Series. Vol. 1282. Elsevier. 2005, pp. 521524.
[Fri13a] Olaf Fritsche. Leben ist farbig. In: Physik fr Biologen und Mediziner. Springer
Berlin Heidelberg, 2013, pp. 85104. URL: http://dx.doi.org/10.1007/
978-3-642-34666-8_5.

33
Bibliography

[Fri13b] Olaf Fritsche. Leben sieht hin. In: Physik fr Biologen und Mediziner. Springer
Berlin Heidelberg, 2013, pp. 105125. URL: http://dx.doi.org/10.1007/
978-3-642-34666-8_6.
[Gin84] Arthur P. Ginsburg. A new contrast sensitivity vision test chart. In: Amer-
ican journal of optometry and physiological optics 61.6 (1984), pp. 403407.
[Gre+10] Ari J. Green, Stephen McQuaid, Stephen L. Hauser, Ingrid V. Allen, and
Roy Lyness. Ocular pathology in multiple sclerosis: retinal atrophy and
inflammation irrespective of disease duration. In: Brain 133.6 (June 2010),
pp. 15911601. URL: http://ncbi.nlm.nih.gov/pmc/articles/PMC2877904.
[Gre12a] Franz Grehn. Anatomie, Physiologie und Pathophysiologie des Auges.
In: Augenheilkunde. Springer Berlin Heidelberg, 2012. Chap. 2, pp. 315. URL:
http://dx.doi.org/10.1007/978-3-642-11333-8_2.
[Gre12b] Franz Grehn. Augenheilkunde. Springer Berlin Heidelberg, 2012. URL: http:
//dx.doi.org/10.1007/978-3-642-11333-8.
[Gre12c] Franz Grehn. Glaukom. In: Augenheilkunde. Springer Berlin Heidelberg,
2012. Chap. 18, pp. 315339. URL: http://dx.doi.org/10.1007/978- 3-
642-11333-8_18.
[Gre12d] Franz Grehn. Linse. In: Augenheilkunde. Springer Berlin Heidelberg, 2012.
Chap. 10, pp. 149171. URL: http://dx.doi.org/10.1007/978- 3- 642-
11333-8_10.
[Gre12e] Franz Grehn. Netzhaut. In: Augenheilkunde. Springer Berlin Heidelberg,
2012. Chap. 14, pp. 213254. URL: http://dx.doi.org/10.1007/978- 3-
642-11333-8_14.
[Gre12f] Franz Grehn. Sehnerv. In: Augenheilkunde. Springer Berlin Heidelberg,
2012. Chap. 16, pp. 287304. URL: http : / / dx . doi . org / 10 . 1007 / 978 -
3-642-11333-8_16.
[Har14] Ulrich Harten. Optik. In: Physik. Springer Berlin Heidelberg, 2014. Chap. 7,
pp. 255308. URL: http://dx.doi.org/10.1007/978-3-642-53854-4_7.
[Hel67] Hermann von Helmholtz. Handbuch der physiologischen Optik. Leipzig: Leopold
Voss, 1867.
[Hou+10] Fang Hou, Chang-Bing Huang, Luis Lesmes, Li-Xia Feng, Liming Tao, Yi-
Feng Zhou, and Zhong-Lin Lu. qCSF in Clinical Application: Efficient
Characterization and Classification of Contrast Sensitivity Functions in Am-
blyopia. In: Investigative Ophthalmology & Visual Science 51.10 (Oct. 2010),
pp. 53655377. URL: http : / / www . ncbi . nlm . nih . gov / pmc / articles /
PMC3066605/.
[Hup+05] Jens Huppelsberg and Kerstin Walter. Kurzlehrbuch Physiologie. 2nd ed. Thieme,
2005, p. 345.

34
Bibliography

[Jaa+09] Martin G. Jaatun, Gansen Zhao, Chunming Rong, Ling Qian, Zhiguo Luo,
Yujian Du, and Leitao Guo. Cloud Computing: An Overview. In: Cloud
Computing. Vol. 5931. Springer Berlin Heidelberg, 2009. Chap. 63, pp. 626
631. URL: http://dx.doi.org/10.1007/978-3-642-10665-1_63.
[Jon+11] Cliff B. Jones, John L. Lloyd, Fabio Panzieri, Ozalp Babaoglu, Stefano Fer-
retti, Vittorio Ghini, and Moreno Marzolla. Distributed Computing in the
21st Century: Some Aspects of Cloud Computing. In: Dependable and His-
toric Computing. Vol. 6875. Springer Berlin Heidelberg, 2011. Chap. 30, pp. 393
412. URL: http://dx.doi.org/10.1007/978-3-642-24541-1_30.
[Kra+08] Marvin F. Kraushar, Robert F. Sanke, and Paul P. Lee. Glaucoma. In: Risk
Prevention in Ophthalmology. Springer New York, 2008. Chap. 15, pp. 163
170. URL: http://dx.doi.org/10.1007/978-0-387-73341-8_15.
[Kuj+06] Janne V. Kujala and Tuomas J. Lukka. Bayesian adaptive estimation: The
next dimension. In: Journal of Mathematical Psychology 50.4 (2006), pp. 369
389.
[Les+10] Luis A. Lesmes, Zhong-Lin Lu, Jongsoo Baek, and Thomas D. Albright.
Bayesian adaptive estimation of the contrast sensitivity function: The quick
CSF method. In: Journal of Vision 10.3 (2010).
[Lib] libzip. URL: http://www.nih.at/libzip/.
[Mel+09] Peter Mell and Tim Grance. The NIST definition of cloud computing. In:
National Institute of Standards and Technology 53.6 (2009), p. 50.
[Neu00] Martha Neuringer. Infant vision and retinal function in studies of dietary
long-chain polyunsaturated fatty acids: methods, results, and implications.
In: The American journal of clinical nutrition 71.1 (2000), 256S267S.
[Oau] OAuth. URL: http://oauth.net.
[Pel+88] Denis G. Pelli, John G. Robson, and Arnold J. Wilkins. The design of a new
letter chart for measuring contrast sensitivity. In: Clinical Vision Sciences.
Citeseer. 1988.
[Reg+84] David Regan and David Neima. Low-contrast letter charts in early dia-
betic retinopathy, ocular hypertension, glaucoma, and Parkinsons disease.
In: British journal of ophthalmology 68.12 (1984), pp. 885889.
[Reg+77] David Regan, R. Silver, and T. J. Murray. Visual Acuity and Contrast Sen-
sitivity in Multiple Sclerosis - Hidden Visual Loss: An Auxiliary Diagnostic
Test. In: Brain 100.3 (1977), pp. 563579.
[Rei02] Josef Reiner. Grundbegriffe der geometrischen Optik. In: Grundlagen der
ophthalmologischen Optik. BoDBooks on Demand, 2002. Chap. 1, pp. 512.
[Roh+93] Ann Marie Rohaly and Cynthia Owsley. Modeling the contrast-sensitivity
functions of older adults. In: JOSA A 10.7 (1993), pp. 15911599.

35
Bibliography

[Ros+84] J. E. Ross, A. J. Bron, and D. D. Clarke. Contrast sensitivity and visual


disability in chronic simple glaucoma. In: British journal of ophthalmology
68.11 (1984), pp. 821827.
[Sch+07] Theodor H. Schiebler and Horst-Werner Korf. Sinnesorgane. In: Anatomie.
Steinkopff, 2007. Chap. 14, pp. 681718. URL: http://dx.doi.org/10.1007/
978-3-7985-1771-4_14.
[Sha73] Alan E. Shapiro. "Huygens Principle". In: Kinematic optics: A study of the
wave theory of light in the seventeenth century. Vol. 11. 2-3. Springer-Verlag,
1973. Chap. 5.2, pp. 218227. URL: http://dx.doi.org/10.1007/BF00343533.
[Sta84] Robert L. Stamper. The effect of glaucoma on central visual function. In:
Transactions of the American Ophthalmological Society 82 (1984), p. 792.
[Ste12] Heimo Steffen. Schielen. In: Augenheilkunde. Springer Berlin Heidelberg,
2012. Chap. 22, pp. 383400. URL: http://dx.doi.org/10.1007/978- 3-
642-11333-8_22.
[Tnt] The Tntnet project. URL: http://www.tntnet.org/faq.html.
[Tho+86] Frank Thorn, Thomas R. Corwin, and James P. Comerford. High myopia
does not affect contrast sensitivity. In: Current eye research 5.9 (1986), pp. 635
640.
[Tra+14] Alfred X. Trautwein, Uwe Kreibig, and Jrgen Httermann. Optische Strahlung.
In: Physik fr Mediziner, Biologen, Pharmazeuten. De Gruyter, 2014. Chap. 17,
pp. 245275.
[Tre] TreeFrog Framework. URL: http://www.treefrogframework.org/documents/
introduction.
[Wat+83] Andrew B. Watson and Denis G. Pelli. QUEST: A Bayesian adaptive psy-
chometric method. In: Perception & psychophysics 33.2 (1983), pp. 113120.
[Wil+09] M. Edward Wilson, Rupal H. Trivedi, Richard A. Saunders, and David K.
Wallace. Amblyopia. In: Pediatric Ophthalmology. Springer Berlin Heidel-
berg, 2009. Chap. 4, pp. 3346. URL: http://dx.doi.org/10.1007/978-3-
540-68632-3_4.
[Wri+06] Kenneth W. Wright, Peter H. Spiegel, and Lisa S. Thompson. Visual Devel-
opment and Amblyopia. In: Handbook of Pediatric Strabismus and Amblyopia.
Springer New York, 2006. Chap. 4, pp. 103137. URL: http://dx.doi.org/
10.1007/0-387-27925-3_4.
[Wt] Wt: an introduction. URL: http://www.webtoolkit.eu/wt.
[Wtd] Wt documentation. URL: http://www.webtoolkit.eu/wt/doc/reference/
html/index.html.
[Yu+12] Huiming Yu, Nakia Powell, Dexter Stembridge, and Xiaohong Yuan. Cloud
computing and security challenges. In: Proceedings of the 50th Annual South-
east Regional Conference. ACM. 2012, pp. 298302.

36
List of Figures

2.1. View of the structure of the eye . . . . . . . . . . . . . . . . . . . . . . . . 7


2.2. A projection of an object in the eye . . . . . . . . . . . . . . . . . . . . . . 9
2.3. Three types of gratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4. The four parameters of the quick contrast sensitivity function and the used
log-parabola . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.1. Picture of the upload widget. This widget enables the upload of data
files from trials. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2. View of the table widget. The table widget shows the uploaded data and
allows to check or uncheck the data in terms of showing the data in the
chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3. A picture of the buttons of the visualization tool. The button with a plus
creates a new parent widget, the button labeled with Create Chart cre-
ates the chart and the Quit button restores the view. . . . . . . . . . . . 23
3.4. A view of a plotted graph. On the x-axis the spatial frequencies are plot-
ted and on the y-axis the median sensitivities. On the right, a legend is
provided. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

A.1. A CSF chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41


A.2. An UML diagram of the relation between the single Wt widgets used by
the implementation of the visualization tool. . . . . . . . . . . . . . . . . 42
A.3. An UML diagram of the implementation of the visualization tool. . . . . 43
A.4. The view of the total graphical user interface of the tool. The upload widget
is located on top in the middle and below of that widgets the buttons are
placed. Left of the upload widget and the buttons a table is provided
with the names of the uploaded data. The plotted graph is located at the
bottom. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
A.5. A view of a plotted graph where the calculation of the mean data is done
without an interpolation. On the x-axis are the spatial frequencies plot-
ted and on the y-axis the median sensitivities. On the right, a legend is
provided. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

37
List of Figures

38
Appendices

39
A. Figures

Figure A.1.: A CSF chart. The spatial frequency increases from low (left) to high (right)
logarithmically and the contrast drops from bottom, 100 %, to top, 0.5 %
logarithmically, too. Your own contrast sensitivity function is the envelope
of the barely seen grating. It has a inverted U-shape nearly. This image
is from http://ohzawa-lab.bpe.es.osaka-u.ac.jp/ohzawa-lab/izumi/
CSF/A_JG_RobsonCSFchart.html, effective 02/02/2015.

41
A. Figures

Figure A.2.: An UML diagram of the relation between the single Wt widgets used by
the implementation of the visualization tool.

42
Figure A.3.: An UML diagram of the implementation of the visualization tool.

43
44
A. Figures

Figure A.4.: The view of the total graphical user interface of the tool. The upload widget is located on top in the middle and
below of that widgets the buttons are placed. Left of the upload widget and the buttons a table is provided
with the names of the uploaded data. The plotted graph is located at the bottom.
Figure A.5.: A view of a plotted graph where the calculation of the mean data is done without an interpolation. On the
x-axis are the spatial frequencies plotted and on the y-axis the median sensitivities. On the right, a legend is
provided.

45

Das könnte Ihnen auch gefallen