opiSetBackground | R Documentation |
Generic function for setting background of the chosen OPI
implementation that is set with chooseOpi()
opiSetBackground(...)
compass.opiSetBackground(lum = NA, color = NA, fixation = NA, tracking_on = NA)
display.opiSetBackground(
lum = .OpiEnv$Display$background_lum,
color = .OpiEnv$Display$background_color,
fixation = .OpiEnv$Display$fixation,
fix_cx = .OpiEnv$Display$fix_cx,
fix_cy = .OpiEnv$Display$fix_cy,
fix_sx = .OpiEnv$Display$fix_sx,
fix_sy = .OpiEnv$Display$fix_sy,
fix_color = .OpiEnv$Display$fix_color
)
daydream.opiSetBackground(
eye,
lum = 10,
color = "white",
fixation = "None",
fix_cx = 0,
fix_cy = 0,
fix_sx = 2,
fix_sy = 2,
fix_color = "green"
)
imo.opiSetBackground(
bgl = 30,
tgl = 1,
tgldb = 25,
tglx = 0,
tgly = 0,
bgr = 30,
tgr = 1,
tgrdb = 25,
tgrx = 0,
tgry = 0
)
kowaAP7000.opiSetBackground(lum = NA, color = NA, fixation = NA)
octo600.opiSetBackground(
bgColor = NA,
fixType = NA,
fixColor = NA,
fixIntensity = 255
)
octo900.opiSetBackground(
lum = NA,
color = NA,
fixation = NA,
fixIntensity = NA
)
PhoneHMD.opiSetBackground(
bgeye,
bglum = 10,
bgcol = "white",
fixeye,
fixtype = "none",
fixcx = 0,
fixcy = 0,
fixsx = 2,
fixsy = 2,
fixtheta = 0,
fixlum = 100,
fixcol = "green"
)
simG.opiSetBackground(col, gridCol)
simH.opiSetBackground(col, gridCol)
simH_RT.opiSetBackground(col, gridCol)
simNo.opiSetBackground(col, gridCol)
simYes.opiSetBackground(col, gridCol)
... |
Implementation specific parameters. See details. |
lum |
Luminance level in cd/m^2 |
color |
Stimulus color |
fixation |
fixation target |
tracking_on |
|
fix_cx |
fixation x position in degrees of visual angle. Default is 0 |
fix_cy |
fixation y position in degrees of visual angle. Default is 0 |
fix_sx |
fixation horizontal size in degrees of visual angle. Default is 1 |
fix_sy |
fixation vertical size in degrees of visual angle. Default is 1 |
fix_color |
fixation color |
eye |
eye |
bgl |
left eye background luminance in dB Default is 25 |
tgl |
left eye fixation target. Default is 1 |
tgldb |
left eye fixation target luminance in dB. Default is 20 |
tglx |
left eye fixation target x-position in degrees. Default is 0. |
tgly |
left eye fixation target y-position in degrees. Default is 0. |
bgr |
right eye background luminance in dB. Default is 25 |
tgr |
right eye target type. Default is 1 |
tgrdb |
right eye target luminance in dB. Default is 20 |
tgrx |
right eye fixation target x-position in degrees. Default is 0. |
tgry |
right eye fixation target y-position in degrees. Default is 0. |
bgColor |
Background color |
fixType |
fixation type |
fixColor |
fixation color |
fixIntensity |
fixation point intensity |
bgeye |
eye where to display the background, can be left, right, or both |
bglum |
background luminance |
bgcol |
background color. Either a color name that R can understand or a vector with R, G, B, and alpha channels |
fixeye |
eye for the fixation target, can be left, right, or both |
fixtype |
the target of the fixation |
fixcx |
fixation x position in degrees of visual angle. Default is 0 |
fixcy |
fixation y position in degrees of visual angle. Default is 0 |
fixsx |
fixation horizontal size in degrees of visual angle. Default is 1 |
fixsy |
fixation vertical size in degrees of visual angle. Default is 1 |
fixtheta |
angle of rotation of the fixation targert in degrees. Default is 0 |
fixlum |
fixation luminance |
fixcol |
fixation color. Same specifications as background color |
col |
DESCRIPTION for OPI implementations based on simulations |
gridCol |
DESCRIPTION for OPI implementation based on simulations |
opiSetBackground(fixation=NA, tracking_on=NA)
fixation
=c(x,y,t) where
x
is one of -20, -6, -3, 0, 3, 6, 20 degrees.
y
is 0 degrees.
t
is 0 for a spot fixation marker at c(x,y)
, or 1 for a
square centred on one of (-3,0)
, (0,0)
, (+3,0)
.
tracking_on
is either 0 (tracking off) or 1 (tracking on).
Note: tracking will be relative to the PRL established with the fixation marker used at setup (call to OPI-OPEN), so when tracking is on you should use the same fixation location as in the setup.
DETAILS
Returns NULL if succeeded, otherwise an implementation-dependent error as follows.
A list contining error
which is NULL
for success, or some string description for fail.
Changes the background and the fixation marker.
Returns NULL or an error string.
DETAILS
Always returns NULL
-1 to be implemented
-2 O600 sent back an error; bad background parameters
-3 O600 sent back an error; bad fixation parameters
NULL Success
-1 indicates opiInitialize
has not been called.
-2 indicates could not set the background color.
-3 indicates could not set the fixation marker.
-4 indicates that all input parameters were NA.
Sets background for left, right, or both eyes in PhoneHMD.
opiSetBackground(TODO)
opiSetBackground(eye, lum=10, color="white", fixation="Cross", fix_cx=0, fix_cy=0, fix_sx=2, fix_sy=2, fix_lum=10, fix_color="green")
lum
background luminance in cd/\mbox{m}^2
is set to nearest grey value in lut
from opiInitialize
. Default is 10 cd/\mbox{m}^2
color
color of the background. It can be 'white'
(default) or 'green'
.
fixation
can only be 'Cross'
at the moment.
fix_cx
, fix_cy
fixation (x, y) position in degrees of visual angle.
fix_sx
, fix_sy
dimensions of fixation target in degrees of visual angle.
fix_lum
luminance of the fixation target in cd/\mbox{m}^2
is set to nearest grey value in lut
from opiInitialize
. Default is 15 cd/\mbox{m}^2
.
fix_color
color of the fixation target. It can be 'white'
or 'green'
(default).
opiSetBackground(lum, color, fixation)
lum
and color
are dependant for the Kowa AP-7000. A white
background must be 10 cd/\mbox{m}^2
, and a yellow background must
be 100 cd/\mbox{m}^2
.
If lum
is 10 and color
is not set, then
.OpiEnv$KowaAP7000$BACKGROUND_WHITE
is assumed.
If lum
is 100 and color
is not set,
then .OpiEnv$KowaAP7000$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
* .OpiEnv$KowaAP7000$FIX_CENTER
, fixation marker in the centre.
* .OpiEnv$KowaAP7000$FIX_CENTRE
, fixation marker in the centre.
* .OpiEnv$KowaAP7000$FIX_AUX
, fixation marker is ???.
* .OpiEnv$KowaAP7000$FIX_MACULA
, fixation marker is a circle(?).
* .OpiEnv$KowaAP7000$FIX_AUX_LEFT
, fixation marker is as for AUX but only lower left.
This function has no effect.
opiSetBackground(lum=NA, color=NA, fixation=NA, fixIntensity=NA)
lum
is intensity of the background and can be one of
* .OpiEnv$O900$BG_OFF
, which turns background off.
* .OpiEnv$O900$BG_1
, background of 1.27 cd/\mbox{m}^2
.
* .OpiEnv$O900$BG_10
, background of 10 cd/\mbox{m}^2
.
* .OpiEnv$O900$BG_100
, background of 100 cd/\mbox{m}^2
.
color
can be one of the following choices.
* .OpiEnv$O900$MET_COL_WW
for white-on-white
* .OpiEnv$O900$MET_COL_RW
for red-on-white
* .OpiEnv$O900$MET_COL_BW
for blue-on-white
* .OpiEnv$O900$MET_COL_WY
for white-on-yellow
* .OpiEnv$O900$MET_COL_RY
for red-on-yellow
* .OpiEnv$O900$MET_COL_BY
for blue-on-yellow
fixation
is one of
* .OpiEnv$O900$FIX_CENTRE
or .OpiEnv$O900$FIX_CENTER
* .OpiEnv$O900$FIX_CROSS
* .OpiEnv$O900$FIX_RING
\code{fixIntensity} is a percentage between 0 and 100. 0 is off, 100 the brightest.
Note if you specify fixation
you also have to specify fixIntensity
.
opiSetBackground(bgeye, bglum = 10, bgcol = "white", fixeye = eye, fixtype = "Cross", fixlum = 100, fixcol = "green", fixcx = 0, fixcy = 0, fixsx = 2, fix_sy = 2)
bgeye
eye for the background. Can be "R", "L", or "B" for right, left, or both
bglum
background luminance in cd/\mbox{m}^2
is set to nearest grey value in lut
from opiInitialize
. Default is 10 cd/\mbox{m}^2
bgcol
color of the background. Default is white
fixeye
eye for the background. Takes the same values as eye
(default)
fixtype
fixation target
fixcx
, fixcy
fixation (x, y) position in degrees of visual angle
fixsx
, fixsy
dimensions of fixation target in degrees of visual angle
fixtheta
angle of rotation of the fixation target
fixlum
luminance of the fixation target. Default is 100 cd/\mbox{m}^2
fixcol
color of the fixation target. Default is green
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.
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.
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.
DETAILS
DETAILS
chooseOpi
## Not run:
# Set up a Display and wait for a key press in it.
chooseOpi("Display")
if (!is.null(opiInitialize(width = 1680, height = 1050, ppi = 128, viewdist = 25)))
stop("opiInitialize failed")
opiSetBackground()
opiSetBackground(lum = 100, color = "white", fixation = "Circle")
opiSetBackground(lum = 100, color = "white", fixation = "Cross", fix_color = "red",
fix_cx = 2, fix_cy = 5, fix_sx = 1, fix_sy = 2)
opiClose()
## End(Not run)
## 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=.OpiEnv$O900$FIX_CENTRE)))
stop("opiSetBackground failed")
if(!is.null(opiSetBackground(fixation=.OpiEnv$O900$FIX_RING, fixIntensity=0)))
stop("opiSetBackground failed")
if(!is.null(opiSetBackground(color=.OpiEnv$O900$MET_COL_BY)))
stop("opiSetBackground failed")
if(!is.null(opiSetBackground(lum=.OpiEnv$O900$BG_100, color=.OpiEnv$O900$MET_COL_RW)))
stop("opiSetBackground failed")
opiClose()
## End(Not run)
chooseOpi("SimGaussian")
if (!is.null(opiInitialize(sd=2)))
stop("opiInitialize failed")
if (!is.null(opiSetBackground(col="white",gridCol="grey")))
stop("opiSetBackground failed, which is very surprising!")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.