Set background using OPI.

Share:

Description

Generic function for setting background of the chosen OPI implementation that is set with chooseOpi().

Usage

1

Arguments

...

Implementation specific parameters. See details.

Details

Octopus900

opiSetBackground(lum, color="white", background=NA, fixation=NA, fixIntensity=50)

Allowable lum and color are defined in the .Octopus900Env environment.

  • lum is intensity of the background and must be one of

    • .Octopus900Env$BG_OFF, which turns background off.

    • .Octopus900Env$BG_1, background of 1.27 cd/m^2.

    • .Octopus900Env$BG_10, background of 10 cd/m^2.

    • .Octopus900Env$BG_100, background of 100 cd/m^2.

  • color can be one of the following choices.

    • .Octopus900Env$MET_COL_WW for white-on-white

    • .Octopus900Env$MET_COL_RW for red-on-white

    • .Octopus900Env$MET_COL_BW for blue-on-white

    • .Octopus900Env$MET_COL_WY for white-on-yellow

    • .Octopus900Env$MET_COL_RY for red-on-yellow

    • .Octopus900Env$MET_COL_BY for blue-on-yellow

  • fixation is one of

    • .Octopus900Env$FIX_CENTRE or .Octopus900Env$FIX_CENTER

    • .Octopus900Env$FIX_CROSS

    • .Octopus900Env$FIX_RING

  • fixIntensity is a percentage between 0 and 100. 0 is off, 100 the brightest.

SimHenson and SimGaussian

opiSetBackground(col, gridCol)

col is the background color of the plot area used for displaying stimuli, and gridCol the color of the gridlines. Note the plot area will only be displayed if opiInitialize is called with a valid display argument.

Octopus600

This function has no effect.

KowaAP7000

opiSetBackground(lum, color, fixation,)

lum and color are dependant for the Kowa AP-7000. A white background must be 10 cd/m^2, and a yellow background must be. 100 cd/m^2. If lum is 10 and color is not set, then .KowaAP7000Env$BACKGROUND_WHITE is assumed. If lum is 100 and color is not set, then .KowaAP7000Env$BACKGROUND_YELLOW is assumed. If both lum and color is set, then lum is ignored (a warning will be generated if lum is incompatible with color).

fixation is one of

  • .KowaAP7000Env$FIX_CENTER, fixation marker in the centre.

  • .KowaAP7000Env$FIX_CENTRE, fixation marker in the centre.

  • .KowaAP7000Env$FIX_AUX, fixation marker is ???.

  • .KowaAP7000Env$FIX_MACULA, fixation marker is a circle(?).

  • .KowaAP7000Env$FIX_AUX_LEFT, fixation marker is as for AUX but only lower left.

Value

Returns NULL if succeeded, otherwise an implementation dependant error as follows.

Octopus900

-1 indicates opiInitialize has not been called.

-2 indicates could not set the background color.

-3 indicates could not set the fixation marker.

Author(s)

Andrew Tuprin <aturpin@unimelb.edu.au>

References

Please cite: A. Turpin, P.H. Artes and A.M. McKendrick "The Open Perimetry Interface: An enabling tool for clinical visual psychophysics", Journal of Vision 12(11) 2012.

http://perimetry.org/OPI

See Also

chooseOpi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
chooseOpi("SimGaussian")
if (!is.null(opiInitialize(sd=2, display=c(-30,30,-30,30))))
    stop("opiInitialize failed")
if (!is.null(opiSetBackground(col="white",gridCol="grey")))
    stop("opiSetBackground failed, which is very surprising!")

## Not run: 
chooseOpi("Octopus900")
oi <- opiInitialize(eyeSuiteJarLocation="c:/EyeSuite/",
        eyeSuiteSettingsLocation="c:/Documents and Settings/All Users/Haag-Streit/",
        eye="left")
if (!is.null(oi))
    stop("opiInitialize failed")
if (!is.null(opiSetBackground(fixation=.Octopus900Env$FIX_CENTRE)))
    stop("opiSetBackground failed")
if (!is.null(opiSetBackground(fixation=.Octopus900Env$FIX_RING, fixIntensity=0)))
    stop("opiSetBackground failed")
if (!is.null(opiSetBackground(color=.Octopus900Env$MET_COL_BY)))
    stop("opiSetBackground failed")
if (!is.null(opiSetBackground(lum=.Octopus900Env$BG_100, color=.Octopus900Env$MET_COL_RW)))
    stop("opiSetBackground failed")
opiClose()

## End(Not run)