Occurity is a fully-featured patient visual acuity test software designed for use on the RaspBerry Pi hardware platform. It enables you to built an affordable visual acuity test system using a few pieces of hardware and basically any remote control. If you do not have the option to buy the infrared receiver, it can also be used with a keyboard.
Occurity is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Occurity is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
In order to install a system using Occurity you need the following hardware:
- A Raspberry Pi (3B+ or later is recommended)
- At least an 8 GB SD flash card
- A Raspberry Pi case (Recommended, but you might have plans to built it into a monitor)
- A Raspberry Pi power supply
- A monitor with at least 300 cd/m² brightness (preferably 350 cd/m²)
- A Flirc infrared reciever (Optional)
- A remote control that works with flirc. Most do (Optional)
Note that Occurity can be installed on any ordinary Debian-derived PC as well (Ubuntu is recommended as this is the OS used to develop Occurity).
Occurity displays correctly on any monitor using any resolution provided the following two requirements are met:
- The physical length of the ruler must be set correctly in the Occurity Preferences dialog.
- The physical distance from the patients eyes to the monitor must be set correctly in the Occurity Preferences dialog.
To test if the monitor you are using reports its resolution correctly to the Occurity software, please set the width of the ruler as described above, temporarily set the patient distance to 600 cm and measure the exact width of the Sloan optotype sumbols at chart size 0.1 and 0.25. At 0.1 the width must be exactly 87 mm and at 0.25 the width must be exactly 35 mm. If this is correct your monitor will work with Occurity.
To test if your monitor scales the distance correctly, you should also check the sizes at 400 cm patient distance. Here the width of a Sloan optotype symbol must be 58 mm at 0.1 and 23 at 0.25.
DISCLAIMER!!! This is only a guideline: Using a lux meter pushed up against the monitor surface, you should have a readout of about 277 lux. Hence the need for a monitor that is capable of a high brightness level.
- Asus VG248QE
- LG AKB75095344
- Samsung AA59-00818A
In theory most remote controls you might have lying around should work with the disclaimer that there are some remotes that use dual-output signals which makes them hard to use with the flirc interface. Only way to know is to just try.
Note! The Flirc infrared reciever emulates a keyboard. For the remote to work, you need to install the Flirc software on a supported OS and configure the buttons on your remote to correspond with these keyboard keys.
- Latest Raspberry Pi OS Install it on your Pi SD card and plug it into your Pi.
I recommend applying the following settings on your Pi system to optimize it for use with Occurity.
- Raspberry menu->Preferences->Appearance Settings
- Desktop
- Layout: No Image
- Color: Black
- Remove marking in "Wastebasket"
- Taskbar
- Size: Small
- Position: Bottom
- Color: Black
- Test color: White
- Desktop
Open a File Manager. In Edit->Preferences->Volume Management remove checkmark from "Show available options for removable media"
- Right-click the panel and choose
Panel Settings
. Go toNotifications
and remove checkmark inShow notifications
.
Run sudo raspi-config
in a terminal and set the following options:
- 1 System Options->S5 Boot / Auto login->B4 Desktop Autologin
- 1 System Options->S6 Network at Boot->No
- 1 System Options->S7 Splash Screen->Yes (You can set this to 'No' if you don't want to expose your support for the Raspberry Pi platform)
- 2 Display Options->D2 Underscan->No
- 2 Display Options->D3 Screen Blanking->No
- 6 Advanced Options->A2 GL Driver->Enable (Not relevant on RPi4)
- 6 Advanced Options->A8 Glamor->Enable (Not relevant on RPi4)
Add the following line to the bottom of the file:
@/home/pi/occurity/Occurity
Remove the following line to stop the screensaver from starting:
@xscreensaver -no-splash
Occurity will now autostart when the user logs in. You should also consider commenting the lxpanel
line to stop the panel from being loaded. But be aware that this will make it harder to launch software. To remedy this it is recommended to first copy the lxterminal.desktop
shortcut to /home/USER/Desktop
before rebooting. This will place a terminal icon on the desktop for easy access.
Note that disabling the panel will also complicate wifi connections as the tray icon for connecting to access points will no longer be available. You can of course always re-enable the panel by re-adding the lxpanel
command to /etc/xdg/lxsession/LXDE-pi/autostart
.
To allow the use of the apt*
commands through the Occurity Job Runner scripting language (activated with j
on the keyboard), it is necessary to allow the pi
(or whichever user will run Occurity) user to manipulate packages without having to enter a password. This can be achieved by creating /etc/sudoers.d/pi
(or whichever username will be running Occurity) and inserting the following:
pi ALL = NOPASSWD : /usr/bin/apt-get
Run the following commands in a terminal on the Pi to install the prerequisites needed for Occurity to function correctly.
$ sudo apt update
$ sudo apt install qtbase5-dev libqt5svg5-dev qtmultimedia5-dev libqt5multimedia5-plugins
$ sudo apt remove gstreamer1.0-plugins-bad
The gstreamer1.0-plugins-bad
package might not be installed already. But try removing it to be sure. Having it installed is known to break h.264 video playback needed by the Occurity attention video player.
Open a terminal on the Pi and run the following commands. Be sure to substitute LATEST
with the version number of the latest Occurity release (eg. 0.7.2
). Check here for the latest version.
$ cd
$ mkdir occurity
$ cd occurity
$ wget -N https://github.com/muldjord/occurity/archive/LATEST.tar.gz
$ tar xvzf LATEST.tar.gz --strip-components 1 --overwrite
$ qmake
$ make
You should now have a /home/USER/occurity/Occurity
executable ready to run. Provided that you added Occurity to autostart as described previously, you should now be able to simply restart, and Occurity will run automatically. Note that the first time Occurity runs it has no config.ini
. It will therefore try to open up the Preferences dialog. The default pin-code is 4242
.
Occurity comes with an optotype that was created from the ground up to adhere to the design characteristics of the original Sloan optotype created by Louise Sloan in 1959. Landolt C and tumbling E optotypes are also available. Licenses are designated in the optotypes
subdirectories.
The following keyboard keys are in use when running Occurity.
q
: Enable / disable standbyj
: Open Job Runner dialog (requires pin-code, documented here)p
: Open Preferences dialog (requires pin-code, documented here)s
: Restart current attention videod
: Play / pause current attention videof
: Stop attention videog
: Play next attention video
up
: Change to next row with bigger sizedown
: Change to next row with smaller sizeleft
: Move entire row to the leftright
: Move entire row to the rightPgUp
: Skip n number of rows bigger (configure n in preferences)PgDn
: Skip n number of rows smaller (configure n in preferences)c
: Enable / disable crowdingm
: Switch between single and multisymbol from the selected row. Use left / right to move between themr
: Randomize symbols from selected rowa
: Enable / disable attention animation (if one is defined for the chart in charts.xml)
left / right
: Switch between SVG layers defined in charts.xml
The most important Occurity settings can be configured through the Preferences dialog. The dialog is opened by pressing p
on a connected keyboard. Note that a pin-code must be entered to open Preferences. This is to avoid users inadvertently changing settings that could compromise the quality of the visual acuity results (default is 4242
).
Options that aren't available in the Preferences dialog can be changed by opening the config.ini
file in a text editor. For a complete description of all available options go here.
Occurity comes with a number of default charts. All charts can easily be customized through the charts.xml file. Go here for a complete description of the format.
- Added on-screen touch controls
- Added
startingChart
config variable to allow setting initially displayed chart - Added all charts to combo in preferences to allow setting
startingChart
config variable - Added
fadetimings
andfadelevels
attributes to<chart>
xml node - Splash screen now fades in
- Optotype symbols can now be optionally configured to fade in and out
- Rename VisuTest to Occurity
- Added category to jobs
- Changed
update
tojob
everywhere - Added custom MessageBox that works well with the remote control and keyboard controls
- Preferences dialog can now be closed with
p
- Updater dialog can now be closed with
j
- Fixed bug where
updateSrcPath
andupdateDstPath
weren't cleared when running two updates one after the other - Fixed bug where an excluded path copy would result in all subsequent paths not being investigated
- Added attention gif animation option to
optotype
chart. Show / hide witha
. Set withanimation="file.gif"
- Added fullscreen attention video. Controls: Previous video
s
, Play / Paused
, Stopf
, Next videog
. Loads all .mp4 videos from the definedvideosFolder
. Default is./videos
. Be aware that the Raspberry Pi might struggle with Full-HD videos, so lower resolutions are recommended - Added option to skip multiple lines on
optotype
charts usingw
ands
. Configure number of lines in Preferences - Added pincode dialog to preferences. Pincode can be set in config.ini with
pinCode=0000
- Changed mainSettings to reference instead of pointer
- Added scriptable updater allowing more update types than one
- Now shows job file contents in the output view
- Added a plehtora of commands that can be used in job files. All documents in
jobs/README.md
- Implemented randomize row with
r
key
- Moved reset timer to mainwindow instead of each chart
- MAJOR: Added
optotype
chart type. This chart type obsoletes the oldfont
chart and uses SVG's directly instead of requiring a ttf font. All SVG's should be calibrated as 100 pixels = 1 arc minute at a 6 meter patient distance. - Added crowding rectangle for all optotype charts using
c
key. - Now uses a 500 pixel width ruler in preferences to determine pixel to mm ratio.
- Now sizelocks between all charts instead of just in the same group.
- Crowding and single mode now follows chart changes.
- Added
T
to Sloan font - Added
HOTV
charts to charts.xml on numkey 7 - Updated deprecated Qt5 functions
- Now remembers size for all charts on same button even when switching between back and forth between charts on different buttons
- Fixed bug where chart resize would use letterrow from old size instead of switching to letters from size inherited from other chart on same button
- Added auto-hibernation after x minutes of inactivity
- Improved hibernation handling overall
- Now supports size locking between charts on same number key
- Added splash screen
- Updated icons
- Added chart size reset timer
- Added automated release and update scripts
- Initial release
- Added SVG chart type support
- Implemented red/green color customization