Learn R Programming

Open Perimetry Interface (OPI)

The OPI package (Open Perimetry Interface) is used to both simulate and execute visual field testing algorithms (perimetry algorithms) on machines that can create visual stimuli. The simulation can be done solely with this package. Controlling machines, be they standard displays, phones, tablets, etc or commercial perimeters requires the OPI Monitor Java package. Use of commercial machines usually requires permission from the manufacturer and some other relevant third party software or key.

Why should I use it?

You should use this package for implementing, developing, testing and using visual psychophysics test procedures particularly (but not limited to) those used for clinical visual field testing (perimetry).

How do I use it?

The package supports 5 R functions that work across multiple platforms:

  • opiInitialize() For creating a connection to a machine or simulated subject.
  • opiSetup() For setting parameters like fixation markers, background colors, luminance, etc.
  • opiPresent() For presenting visual stimuli and getting a response.
  • opiClose() For closing a connection with a machine or simulated subject.
  • opiQuery() For getting information about a machine or simulated subject.

The machine or simulation that the set of functions operate upon is selected using the chooseOPI() function.

How do I get it?

The OPI package is free from CRAN and includes all code needed for simulation and use on machines such as standard displays (ie your computer monitor).

To use the

  • Octopus 900 machine, you should contact Haag-Streit to seek permission.
  • imoVifa/Tempo machine, contact CREWT (Japan)or Topcon Healthcare Inc (USA) to seek permission.
  • Compass or Maia machine, contact iCare to seek permission.
  • Kowa AP7000 machine, contact Kowa to seek permission.

Note the reason for requiring permission from commercial partners of the OPI for use on their machines is for medico-legal reasons related to the accreditation of the machines as medical devices by regulating bodies in different countries.

If you do not have contact details with the companies, email Andrew Turpin and he can put you in touch with the right person.

Other resources

OPI www page

OPI github

Copy Link

Version

Install

install.packages('OPI')

Monthly Downloads

488

Version

3.0.4

License

Apache License (>= 2)

Maintainer

Andrew Turpin

Last Published

April 9th, 2025

Functions in OPI (3.0.4)

MOCS

Method of Constant Stimuli (MOCS)
dbTocd

Convert perimetric dB to cd/\(\mbox{m}^2\)
chooseOPI

chooseOPI selects an OPI machine to use.
KTPsi

An implementation of Kontsevich and Tyler \(\Psi\) algorithm.
QUESTP

QUEST+
RtDbUnits

Response times to white-on-white Goldmann Size III targets for 12 subjects in dB units
ZEST

ZEST
cdTodb

Convert cd/\(\mbox{m}^2\) to perimetric dB.
RtSigmaUnits

Response times to white-on-white Goldmann Size III targets for 12 subjects in sigma units
OPI-package

OPI: Open Perimetry Interface
kowa.presentKinetic

Present kinetic on Kowa AP7000 (internal use)
octo900.presentStatic

Present static on O900 (internal use)
kowa.presentTemporal

Present temporal stim on Kowa AP7000 (internal use)
fourTwo.start

4-2 Staircase
octo900.presentTemporal

Present Temporal stimuli on O900 (internal use)
open_socket

Open a socket on ip and port.
degTopix

Convert degrees to pixels for machine 'machine'
.opi_env

Global environment for OPI to hold machine specific constants, etc.
kowa.presentStatic

Present static on Kowa AP7000 (internal use)
opiClose_for_ImoVifa

Implementation of opiClose for the ImoVifa machine.
opiClose_for_PhoneHMD

Implementation of opiClose for the PhoneHMD machine.
opiClose

Calls opiClose_for_MACHINE as appropriate.
octo900.presentKinetic

Present Kinetic stimuli on O900 (internal use)
opiClose_for_KowaAP7000

Implementation of opiClose for the Kowa AP7000 machine.
opiClose_for_Octopus900

Implementation of opiClose for the Octopus900 machine.
opiClose_for_SimNo

opiClose_for_SimNo
opiInitialise_for_Display

Implementation of opiInitialise for the Display machine.
FT

Full Threshold
opiClose_for_Display

Implementation of opiClose for the Display machine.
opiInitialise_for_KowaAP7000

Implementation of opiInitialise for the Octopus900 machine.
opiClose_for_SimHenson

opiClose_for_SimHenson
opiClose_for_Compass

Implementation of opiClose for the Compass machine.
opiClose_for_MAIA

Implementation of opiClose for the MAIA machine.
opiClose_for_SimYes

opiClose_for_SimYes
opiInitialise_for_PicoVR

Implementation of opiInitialise for the PicoVR machine.
opiInitialise_for_ImoVifa

Implementation of opiInitialise for the ImoVifa machine.
opiInitialise_for_PhoneHMD

Implementation of opiInitialise for the PhoneHMD machine.
opiInitialise_for_SimHenson

opiInitialise_for_SimHenson
opiInitialise_for_SimGaussian

opiInitialize_for_SimGaussian
opiInitialise_for_MAIA

Implementation of opiInitialise for the ImoVifa machine.
opiClose_for_SimGaussian

opiClose_for_SimGaussian
opiClose_for_PicoVR

Implementation of opiClose for the PicoVR machine.
opiPresent

Calls opiPresent_for_MACHINE as appropriate.
opiInitialise_for_SimYes

opiInitialise_for_SimYes
opiKineticStimulus

For backwards compatibility. Used by Octopus900 and KowaAP7000.
opiInitialise_for_SimHensonRT

opiInitialise_for_SimHensonRT
opiPresent_for_Display

Implementation of opiPresent for the Display machine.
opiClose_for_O600

Implementation of opiClose for the O600 machine.
opiInitialise

Calls opiInitialise_for_MACHINE as appropriate.
opiPresent_for_Compass

Implementation of opiPresent for the Compass machine.
opiPresent_for_SimHensonRT

opiPresent_for_SimHensonRT
opiInitialise_for_SimNo

opiInitialise_for_SimNo
opiPresent_for_SimHenson

opiPresent_for_SimHenson
opiPresent_for_SimGaussian

opiPresent_for_SimGaussian
opiPresent_for_SimNo

opiPresent_for_SimNo
opiQueryDevice_for_O600

Implementation of opiQueryDevice for the O600 machine.
opiPresent_for_O600

Implementation of opiPresent for the O600 machine.
opiQueryDevice_for_MAIA

Implementation of opiQueryDevice for the ImoVifa machine.
opiInitialise_for_Compass

Implementation of opiInitialise for the ImoVifa machine.
opiClose_for_SimHensonRT

opiClose_for_SimHensonRT
opiQueryDevice_for_ImoVifa

Implementation of opiQueryDevice for the ImoVifa machine.
opiPresent_for_Octopus900

Implementation of opiPresent for the Octopus090 machine.
opiInitialise_for_O600

Implementation of opiInitialise for the O600 machine.
opiSetup

Calls opiSetup_for_MACHINE as appropriate.
opiQueryDevice_for_KowaAP7000

Implementation of opiQueryDevice for the Kowa AP7000 machine.
opiSetup_for_Compass

Implementation of opiSetup for the Compass machine.
opiInitialise_for_Octopus900

Implementation of opiInitialise for the Octopus900 machine.
opiSetup_for_ImoVifa

Implementation of opiSetup for the ImoVifa machine.
opiSetup_for_KowaAP7000

opiSetBackground
opiPresent_for_PhoneHMD

Implementation of opiPresent for the PhoneHMD machine.
opiPresent_for_KowaAP7000

Implementation of opiPresent for the KowaAP7000 machine.
opiPresent_for_ImoVifa

Implementation of opiPresent for the ImoVifa machine.
opiSetup_for_SimNo

opiSetup_for_SimNo
opiSetup_for_SimYes

opiSetup_for_SimYes
opiSetup_for_MAIA

Implementation of opiSetup for the MAIA machine.
opiPresent_for_PicoVR

Implementation of opiPresent for the PicoVR machine.
opiPresent_for_MAIA

Implementation of opiPresent for the MAIA machine.
opiSetup_for_O600

opiSetup for the O600 machine.
opiSetup_for_Display

Implementation of opiSetup for the Display machine.
opiQueryDevice_for_Display

Implementation of opiQueryDevice for the Display machine.
opiQueryDevice_for_Compass

Implementation of opiQueryDevice for the ImoVifa machine.
opiQueryDevice_for_Octopus900

Implementation of opiQueryDevice for the Octopus900 machine.
opiPresent_for_SimYes

opiPresent_for_SimYes
opiQueryDevice_for_SimHensonRT

opiQueryDevice_for_SimHensonRT
opiQueryDevice_for_SimHenson

opiQueryDevice_for_SimHenson
opiSetBackground

Deprecated. Use opiSetup().
opiQueryDevice_for_PhoneHMD

Implementation of opiQueryDevice for the PhoneHMD machine.
opiQueryDevice_for_SimNo

opiQueryDevice_for_SimNo
opiSetup_for_PicoVR

Implementation of opiSetup for the PicoVR machine.
opiQueryDevice_for_SimYes

opiQueryDevice_for_SimYes
opiStaticStimulus

For backwards compatibility. Used by Octopus900 and KowaAP7000.
opiSetup_for_Octopus900

Implementation of opiSetup for the Octopus900 machine.
opiQueryDevice

Calls opiQueryDevice_for_MACHINE as appropriate.
opiTemporalStimulus

For backwards compatibility. Used by Octopus900 and KowaAP7000.
opiQueryDevice_for_PicoVR

Implementation of opiQueryDevice for the PicoVR machine.
pixTodeg

Convert pixels to degrees for machine 'machine'
opiSetup_for_PhoneHMD

Implementation of opiSetup for the PhoneHMD machine.
opiQueryDevice_for_SimGaussian

opiQueryDevice_for_SimGaussian
opiSetup_for_SimHenson

opiSetup_for_SimHenson
opiSetup_for_SimGaussian

opiSetup_for_SimGaussian
opiSetup_for_SimHensonRT

opiSetup_for_SimHensonRT