Specvis definition and usage

Specvis is a desktop application designed for visual field examination in humans written in the Java programming language ensuring unrestricted portability on any personal computer or laptop. It has an intuitive and easy to use graphical user interface and does not require special computer or programming skills. We have made Specvis freely available as an open-source application based on GNU GPLv3 license available at Download section; it can be downloaded and used without charge, and allows unrestricted modification. Similar to other ASPs, Specvis displays a single, specific, light stimulus at different locations on the computer screen, in order to assess a luminance threshold across the visual field. A comprehensive description of the application is given below.

Source code, requirements and availability

Specvis was written in the Java programming language and requires installation of the Java Runtime Environment (JRE) in version 8u74 or above. The latest version of JRE can be downloaded from the Download section.

After JRE installation or checking the JRE version by typing in the terminal or command window ‘java -version’, the current version of Specvis can be downloaded from Download section. Note that the webpage also contains other useful materials to download. In addition, the News section serves as a board where all key information associated with Specvis is published, e.g. descriptions of new releases, conference reports, and studies. The Tutorials section contain video materials describing elements of the application and help instructions to begin using Specvis. The Share Your Idea, Support and Contact sections allows the user to ask any question about the application, its related content, as well as reporting problems encountered when using Specvis, e.g. issues with launching, crashes, and errors. The website is also linked with a GitHub repository where the complete Specvis source code is located. The repository will always contain the latest version of Specvis. The source code and the application itself are released under the terms of GNU General Public License in version 3 as published by the Free Software Foundation. Software covered by this license is and will be free and open-source. In general, this license ensures, that everyone can use the software and modify it, however, each new release is also covered by the same license, so the freedom and capacity of the software remains preserved.

Description of the downloaded package and first launch of the application

The Specvis website *.zip file contains three files and two directories. These are: ‘Specvis.jar’, ‘patients.s’, and ‘screenLuminanceScales.s’. The directories are: ‘Results’ and ‘Settings’.

Specvis.jar is an executable *.jar file used to run Specvis application, and is a package aggregating the compiled application’s source code and all related content, such as external libraries, images, and data. Depending on the operating system and set options running the application can be done in two ways: 1) simply double click on the Specvis.jar file; 2) type ‘java –jar Specvis.jar’ in the terminal or command window while in the file location.

The second file ‘patient.s’ serves as a type of text database and contains information about the patients added to Specvis. Each row of this file is dedicated to a single patient and can hold the following information: unique ID number (P_yyyyMMdd_xxxx; P stands for patient and xxxx is a string of four random lower-/uppercase letters and numbers), personal information, and any additional information.

The screenLuminanceScales.s file is similar in structure to the above patients.s file and serves as a text database. Each row is dedicated to a single scale. In addition to ID information and the Scale name, the file contains data from six brightness luminance measurements and any ‘Additional information’ about the scale. Similar to adding a new patient, a new scale creation generates an individual unique ID number for the scale (S_yyyyMMdd_xxxx; where S stands for scale).

The Results and Settings directories serve as a storage for patient visual field examination results and Specvis settings respectively. It is important not to move, modify or delete any of the aforementioned *.zip archive files or directories. The whole package can be moved to a new location but the relative positions of each file must remain the same together in one folder. All Specvis content and its dependencies are embodied into one single executable *.jar file which is not installable, and can be run directly from external media such as pendrive.

Patient management and loading the settings

After launching Specvis it is possible within the very first window (Fig 1), to choose the patient, edit their personal information, and preview their results from previous visual field examinations (Fig 2) or enter new data. It is necessary to select the patient’s eye to be tested and, optionally, choose any existing settings template previously saved in *.sset file format (to save settings see below). Loading the settings will set all the parameters in all Specvis windows where options for the procedure can be set (Figs 3-8).

Fig 1. The initial Specvis window. After launching Specvis, this first window will be displayed and the user can add, choose or edit patient details, as well as preview their previous results. It is also possible to load a default template for settings if the user does not wish to do this manually.

Fig 2.The window in which user can preview the results from patient's visual field examination. The user can manipulate with the graphical map by changing its isofactor and interpolation. It is also possible to export map in a form of 2D value matrix and analyze it in other programming languages such as Python or Matlab.

Fig 3. Window for optional adjustment of screen and luminance scales. The user can adjust settings for the chosen screen as well as configure and set luminance scales for the stimulus or background.

Fig 4. Window used for optional adjustments of the stimulus and background. The user can adjust settings for the stimulus and background, as well as preview the stimulus distribution on the previously chosen screen.

Fig 5. Window for adjusting fixation and other options. In this window the user sets the fixation point characteristics, measure its luminance, and set its position on the screen. At this level, the user can also choose and adjust the fixation monitor technique, as well as the procedural algorithm that will be used in the visual field examination test. Keyboard configuration can also be changed here.

Fig 6. Window for adjusting Blindspot fixation monitor technique settings.

Fig 7. Window for adjusting Fixation point change fixation monitor technique settings.

Fig 8. Window for adjusting settings of message displayed to the patient after fixation loss.

Screen settings and configuration of the luminance scales

After selection of patient’s eye for examination, it is possible to go to the next Specvis scene (Fig 3), where screen and luminance scales settings adjustments are required. Application provides several predefined scales which can be used in tests by default. Nevertheless, Specvis should be configured before use with new hardware setup and different light conditions.

Specvis uses patient’s visual field degrees of arc to express values of the distance, inclination and size. In order to display elements on the chosen screen appropriately, the program has to calculate two thing: 1) the range of the patient’s visual field occupied by the screen and 2) the number of screen pixels / 1° of arc. This is done by providing information about the screen width and height, and the distance between the patient and screen (all values are expressed in mm). In an ideal situation, the distance from the screen reflects the distance measured from the cornea to the center of the screen. Specvis calculates the visual field occupied by the screen in the horizontal and vertical planes separately as follows:

where x = patient distance from the screen, y = screen width or height (depending on whether the horizontal or vertical calculation is being made), and 2θ = the patient’s visual field occupied by the screen expressed in degrees of arc. Based on the screen resolution, Specvis then calculates the number screen pixels / 1° of arc horizontally and vertically (i.e. screen resolution / 2θ).

Screen models differ from each other with respect to hardware, thus individual technical specifications result in different minimum and maximum possible luminance levels for the display (a max luminance of 150 cd/m2 vs. 200 cd/m2). Additionally, each model has its own software options for setting the minimum and maximum luminance in part due to adjustments to brightness, contrast and gamma, or other values, thus direct access to the information about luminance values of the screen are not possible without photometer measurements.

Specvis estimates the minimum luminance required for the detection of a specific stimulus throughout the examined visual field. In contrast to Specvis, perimeters are an integrated hardware system where stimulus luminance is known. Specvis has no direct access to information about luminance values and therefore, it is necessary to configure the application for the screen and light conditions being used. This is performed in two steps. Firstly, the luminance in cd/m2 is measured with a photometer in a six square patterns with a predefined background color, hue and saturation. Brightness is increased in each square from 0 to 20, 40, 60, 80 and 100% and measured with the photometer. Secondly, Specvis then fits a second degree polynomial to the luminance values resulting in the function:

which is calculated for all brightness values, i.e. 0-100, resulting in a vector of fitted luminance values of the length equal to 101. The quality of the fit is defined by the chi-squared statistic and SD. It can be assumed that the element of a specific color expressed on the hue-saturation-brightness (HSB) space has a certain luminance value, this makes it possible to examine visual field sensitivity on the luminance scale regardless of the chosen hardware, and make the results comparable between different hardware configurations. It is possible to use Specvis without photometer, but it is than impossible to interpret visual field sensitivity results in the luminance domain.

This configuration can be done via the Specvis window dedicated to the creation of a new luminance scale (Fig 9). After providing a name for a newly created scale and choosing its hue and saturation, the six luminance measurements described above are obtained and any additional useful information inputted, e.g. screen model, configuration of settings, type of photometer, and ambient light conditions. It is now possible to check how good scale is by checking its quality of fit (Fig 10); it is also possible to edit the scale later. Note that Specvis uses separate luminance scales for the stimulus and background displays. That is why it is necessary to choose existing scales or to create new scales for the stimulus and background. Only after the creation and/or choosing a scale is it possible to proceed further.

Fig 9. Window for creating new luminance scale.

Fig 10. Window for previewing the quality of fit for the chosen luminance scale. The user can check the chosen luminance scale for goodness of fit, in the context of how accurate is the relation between luminance expressed in cd/m2 and brightness expressed in the HSB space. The quality of the scale can be assessed based on the chi-squared statistic and its significance (p-value), as well as the standard deviation (SD).

Stimulus and background options

Specvis allows the user to freely adjust stimulus options and the background (Fig 4). It is possible to choose from two different shapes of the stimulus, i.e. Ellipse or Polygon. The Polygon shape used in conjunction with the Stimulus inclination (°) can create a stimulus in form of inclined stripes or a simple square, while the Ellipse shape creates a simple dot-like Goldmann stimulus as used in various types of ASP. There is the possibility to Stimulus size and its display time can be changed, as well the inter-stimuli interval, either constant or random. Beside these basic settings, the luminance range for the stimuli in order to measure visual field sensitivity. For example, setting Stimulus maximum and minimum brightness (%) to 100 and to 11 respectively, will only look for the luminance threshold within this range at in a given location despite the chosen procedure. Stimulus density displayed on the screen can also be adjusted using the Distance between stimuli XY (°) parameter in order to reduce or increase the accuracy of the visual field examination. It is also possible to set the background brightness for its individual luminance scale.

Specvis calculates the dB range for the minimum and maximum stimulus luminance, in line with the currently utilized perimetric systems that use dB values to express visual field sensitivity levels. This allows comparison across techniques way as well as inter- and intra-patient Specvis comparisons. Specvis calculates the dB range based on the following formula:

where L_max = the maximum possible stimulus luminance in cd/m2 that can be used in the visual field examination; L_T = the minimum possible stimulus luminance in cd/m2, but also = the luminance threshold below which the stimulus is not perceived at a given location; ∆L = the ratio of L_max to L_T expressed in dB.

Regardless of the perimetry type used, stimuli are displayed on a hemispherical surface and the examined eye is positioned at the geometric center of this surface, so that all locations are equidistant from the eye. This is not the case with flat screens for which the elements are spread equally on the screen and distance expressed in pixels, but are not equally spread across the patient’s visual field. This is accomplished by turning on the ‘Correction for the sphericity of the field of view’, which results in spreading screen elements equally in relation to the patient’s visual field, and the distance between elements is expressed in degrees of arc. This functionality is based on the following formula:

where the variable x = the distance in mm between the patient and screen; β = the distance in degrees of arc from the center of the screen (in practice from the fixation point) to the displayed element; D = a corrected distance in mm to the element. Because screen display elements using pixels it is necessary to convert mm to pixels according to the formula:

where y = screen width or height in mm (depending on whether horizontal or vertical correction for sphericity is used); R = the screen resolution; D = a corrected distance in mm to the element; P = D expressed in pixels. Finally, the examiner can preview the distribution of all procedure elements (Fig 11) and verify them.

Fig 11. Distribution preview of all procedure elements. S = predefined stimulus location; F = predefined fixation point location; M = assumed blind spot location.

Adjusting fixation and other options

The last obligatory window before starting the visual field examination test contains adjustments for fixation and other options (Fig 5). Specvis allows for a basic setting of fixation point characteristics such that color, size and location on the screen can be adjusted making it possible to examine the whole visual field. However, it is necessary to emphasize, that the position of the fixation point should be always perpendicular to the position of the cornea of the tested eye. When examining both eyes simultaneously, the fixation point position should be perpendicular to the middle of a line connecting the corneas. Fixation point color is separated from stimuli and background luminance scales, therefore if it is necessary to know the luminance value of the fixation point of a given color, this must be measured individually.

In order to ensure reliability and accuracy of the visual field examination, patients should maintain their gaze on the fixation point during the test. The MM700 controls patient fixation by using the Heijl-Krakau technique, based on the random presentation of a specific stimulus at the location of optic disc, which in the case of the MM700 is 15° temporal and 3° inferior from the fixation point. If the patient responds to this stimulus, it is assumed that the eye has moved off the fixation point.

Specvis utilizes two different methods for controlling patient fixation. One, called Blindspot, is similar to that used in the MM700, i.e. a false positive in response to presumed optic disc stimulation. The user can modify the characteristics of the control stimulus (specific stimulus displayed in presumed optic disc location), such as size, brightness, presentation frequency, and the position on the screen (Fig 6). The control stimulus shares the luminance scale with ordinary stimuli (displayed outside optic disc location). If the patient responds to the control stimulus, Specvis assumes that the eye has moved off the fixation point.

The second method for controlling patient fixation, called Fixation point change, is based on changes in the characteristics of the fixation point. During the visual field examination the appearance of the fixation point periodically changes in the domain of size and color. The patient’s task is to respond to the presented stimuli and to the fixation point changes, and a failure to respond to fixation point changes indicates that the eye has moved off the fixation point. The examiner can configure the appearance of the changed fixation point with respect to size, color, luminance, and frequency of changes in the appropriate window (Fig 7).

Specvis also provides feedback messages to the patient when they lose fixation (Fig 8). This function is available for both of the fixation control techniques. In the settings window for this function the user can change the displayed text, its location, color, and font size. When the examination is performed with dual screens, i.e. allowing the examiner to also view the test in progress, fixation loss information is also available to the examiner.

The keyboard configuration can also be changed and keys defined for three Specvis action. The patient should only use the ‘Answer to stimulus’ button, while the ‘Pause procedure’ and ‘Cancel procedure’ should be used only by the examiner. Pause and resume functions have no effect on the data, however, the cancel function will cause the loss of all currently recorded data.

Finally, the examiner selects and runs the examination procedure. Currently, there is only one procedure i.e. Basic (Fig 12), which presents stimuli in a random order at predefined locations on the screen. At each location, Specvis estimates the luminance threshold. The main purpose is to achieve a fast screening procedure designed to evaluate the general condition of the visual field. The user can modify two parameters of this procedure. The user can set the length of the tested brightness vector, which holds the range of minimum and maximum stimulus brightness values that will be individually tested at all predefined locations. Specvis starts testing from the middle of this vector and moves along it by one or two values depending on the patient response until a luminance threshold is reached at a given location. Taking into account this stepping rule, the vector length must be of a specific value, i.e.:

which for example gives 9, 13, 17, 21, etc. In the Basic procedure, the brightness vector values are spread equally but it is also possible to spread them logarithmically.

Fig 12. The scheme of the Basic procedure. During the initialization of the visual field sensitivity test, Specvis creates a vector of i equally or logarithmically spaced n brightness values from the range defined by the minimum and maximum stimulus brightness. At each stimulus location, Specvis estimates a brightness threshold. An example threshold estimation for a given stimulus location can look like: a) display the stimulus with a brightness i=5 and read the patient response; b) if the patient did not respond, discard brightness values from i=1 to i=5 inclusive and display the stimulus with a brightness i=7; c) if the patient did not respond, discard brightness values from i=6 to i=7 inclusive and display the stimulus of brightness i=9; d) if patient responded to the stimulus, display the stimulus with a brightness i=8; e) if the patient responded, discard brightness value i=9 and set value i=8 (n=75) as the estimated brightness threshold for a given stimulus location. Finally, find fitted luminance value for the threshold brightness value.

Conducting and monitoring progress of the visual field test

After setting all the necessary options, the user can move to the procedure window (Fig 13). We strongly recommend using two screens if possible while performing the examination, thus allowing the user to actively control and monitor the procedure without disturbing the patient as they view just the stimulus presentation.

Fig 13. Window for monitoring the progress of the visual test. Before clicking the Start button, which will run the visual field test, the user can verify and edit all key parameters of the procedure in a scrollable text area. In the event that the user has access to two screens, it is possible (and recommended) to use one screen for displaying the visual field test and the other to monitor the progress of the test. When the test is finished, the user can show the results to the patient and then save them and the settings used in the test in the form of a *.sset file.

During the test, Specvis calculates a false-positive response rate. This rate, along with information about fixation accuracy, may help the examiner to evaluate the reliability of the test and to indicate if repeated tests are needed. The false positive-answer rate is calculated as follows:

where F = false positives (e.g. responding to a lack of stimulus); P = positive responses; FPAR = the false-positive answer rate expressed as a percentage. The permission to respond to a given stimulus is always granted when the stimulus is presented on the screen, and ends with the patient response or the presentation of the next stimulus.

The results are saved in the Results directory in individual patient folders with the name of the patient’s ID. Each set of the results has its own dedicated folder with a randomly created name based on the template R_yyyyMMdd_xxxx, where the syntax is the same as that for the patient ID and luminance scale but with prefix R to denote these are results files.

In this procedure window it is also possible to save a Specvis settings template in a *.sset file format, so that it can be loaded during the next test from the level of the very first window that will be displayed to the user after the Specvis launch.

Copyrights © 2014-2016 Piotr Dzwiniel

After JRE installation or checking the JRE version by typing in the terminal or command window ‘java -version’, the current version of Specvis can be downloaded from Download section. Note that the webpage also contains other useful materials to download. In addition, the News section serves as a board where all key information associated with Specvis is published, e.g. descriptions of new releases, conference reports, and studies. The Tutorials section contain video materials describing elements of the application and help instructions to begin using Specvis. The Share Your Idea, Support and Contact sections allows the user to ask any question about the application, its related content, as well as reporting problems encountered when using Specvis, e.g. issues with launching, crashes, and errors. The website is also linked with a GitHub repository where the complete Specvis source code is located. The repository will always contain the latest version of Specvis. The source code and the application itself are released under the terms of GNU General Public License in version 3 as published by the Free Software Foundation. Software covered by this license is and will be free and open-source. In general, this license ensures, that everyone can use the software and modify it, however, each new release is also covered by the same license, so the freedom and capacity of the software remains preserved.

Copyrights © 2014-2016 Piotr Dzwiniel
Copyrights © 2014-2016 Piotr Dzwiniel
Copyrights © 2014-2016 Piotr Dzwiniel
Copyrights © 2014-2016 Piotr Dzwiniel

Copyrights © 2014-2016 Piotr Dzwiniel