Additions:
You can use the RemapMouse() function to correct GetMouse() positions
for potential geometric distortions introduced by this function.
You can use the RemapMouse() function to correct GetMouse() positions
for potential geometric distortions introduced by this function.%
You can use the RemapMouse() function to correct GetMouse() positions
for potential geometric distortions introduced by this function for
"mode" zero.
You can use the RemapMouse() function to correct GetMouse() positions
for potential geometric distortions introduced by this function for
"mode" zero.
You can use the RemapMouse() function to correct GetMouse() positions
for potential geometric distortions introduced by this function.
Use of geometry correction will break the 1:1 correspondence between
framebuffer pixel locations (x,y) and the mouse cursor position, ie. a
mouse cursor positioned at display position (x,y) will be no longer
pointing to framebuffer pixel (x,y). If you want to know which
pixel in your original stimulus image corresponds to a specific
physical display pixel (or mouse cursor position), use the function
RemapMouse() to perform the neccessary coordinate transformation.
Additions:
On graphics hardware that supports this, a 16 bit signed integer
framebuffer will be created. Such a framebuffer can store intermediate
color values in the normalized range [-1.0 ; +1.0] with a precision of
15 bits per component. Only positive values between 0.0 and 1.0 are
displayable in the end though. If the graphics hardware does not support this,
a 16 bit unsigned integer framebuffer is tried instead. Such a framebuffer
allows for 16 bits of precision per color component. However, many graphics
cards do not support alpha-blending on such a framebuffer, and
intermediate out-of-range values (smaller than zero or bigger than one) aren't
supported either. Such values will be clamped to the representable [0.0 ; 1.0]
range instead. Additionally this mode is only supported on some graphics
The main sad reason this switch exists is because some graphics hardware or
graphics drivers do not support floating point precision textures and
framebuffers due to some ridiculous patent restrictions, but they do
support a 16 bit signed or unsigned integer precision format. The switch
is basically a workaround for the broken patent systems of many countries.
Deletions:
This allows for 16 bits of precision for complex drawing. This allows
to use a similar precision as the 'FloatingPoint32Bit' mode for
high-precision display devices, but at a higher speed and lower memory
requirements. However, alpha-blending is not supported, intermediate
out-of-range values (smaller than zero or bigger than one) aren't
supported either. Additionally this mode is only supported on ATI
Additions:
* 'EnableCLUTMapping' Enable support for old-fashioned clut animation /
clut mapping. The drawn framebuffer image is transformed by applying a
color lookup table (clut). This is not done via the hardware gamma
tables as in the good ol' days, but by application of the clut via
image processing. Hardware gamma tables don't provide well defined
timing on modern hardware, therefore they aren't suitable anymore.
You can update the clut to be applied at the next [[Screen]]('[[Flip]]');
via the command [[Screen]]('LoadNormalizedGammatable', windowPtr, clut, 2);
'clut' needs to be a clutSize-by-3 matrix, with 'clutSize' slots and
one column for each of the red, green and blue color channels.
=== Setup command: ===
By default, a clut of 256 slots with (R,G,B) values is used, but you
can provide the optional 'clutSize' parameter to use clut's with more
slots. The maximum number depends on your GPU, but 2048 are typically
supported even on very low-end cards.
If you set 'highprecision' to 1, the clut will resolve values at more
than 8 bit per color channel on modern hardware. This usually only
makes sense if you also use a more than 8 bpc framebuffer with more
than 256 slots as clutSize.
Usage: PsychImaging('AddTask', whichView, 'EnableCLUTMapping' [, clutSize=256][, highprecision=0]);
Example: PsychImaging('AddTask', 'AllViews', 'EnableCLUTMapping');
Additions:
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychGLImageProcessing/PsychImaging.m">beta</a> | view WebSVN <a href=
"http://svn.berlios.de/wsvn/osxptb/trunk/Psychtoolbox/PsychGLImageProcessing/PsychImaging.m?op=log">changelog</a> of trunk branch</span>
Deletions:
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychGLImageProcessing/PsychImaging.m">beta</a> | view in <a href=
"http://svn.berlios.de/wsvn/osxptb/beta/Psychtoolbox/PsychGLImageProcessing/PsychImaging.m?view=markup">WebSVN with changelog</a></span>
Additions:
Usage: PsychImaging('AddTask', 'General', 'EnableDataPixxC48Output', mode);
See the section below about 'EnableBits""++""Color""++""Output' for the meaning
of the mandatory "mode" parameter.
Usage: PsychImaging('AddTask', 'General', 'EnableBits""++""Color""++""Output', mode);
"mode" is a mandatory numeric parameter which must be 0, 1 or 2. In
Color""++"" mode, the effective horizontal display resolution is only half
the normal horizontal resolution. To cope with this, multiple different
methods are implemented to squeeze your stimulus image horizontally by
a factor of two. The following options exist:
0 = This is the "classic" mode which was used in all Psychtoolbox
versions prior to 22nd September 2010. If you want to keep old code
working as is, select 0. In this mode, your script will only see a
framebuffer that is half the true horizontal resolution of your
connected display screen. Each drawn pixel will be stretched to cover
two pixels on the output display device horizontally. While this
preserves the content of your stimulus image exactly, it means that the
aspect ratio of all displayed text and stimuli will be 2:1. Text will
be twice as wide as its height. Circles or squares will turn into
horizontal ellipses or rectangles etc. You'll need to do extra work in
your code if you want to preserve aspect ratio properly.
Example: A fine vertical grid with alternating vertical white and black
lines would display as expected, but each white or black stripe would be
two pixels wide on the display instead of one pixel wide.
1 = Subsample: Your framebuffer will appear at the same resolution as
your display device. Aspect ratio of drawn stimuli/text etc. will be
correct and as expected. However, every 2nd column of pixels in your
stimulus (ie., all odd-numbered x-coordinates 1,3,5,7,...) will be
completely ignored, only even columns are used!
Example: A fine vertical grid with alternating vertical white and black
lines would display as a purely white image, as only the white pixels
in the even columns would be used, whereas the black pixels in the odd
columns would be ignored.
2 = Average: Your framebuffer will appear at the same resolution as
your display device. Aspect ratio of drawn stimuli/text etc. will be
correct and as expected. However, each pair of adjacent even/odd pixel
columns will be averaged before output. Stimulus pixels 0 and 1 will
contribute the mean color for display pixel 0. Pixels 2 and 3 will be
averaged into display pixel 1 and so on. Visually this gives the most
pleasing and smooth results, but if adjacent even/odd pixels don't have
the same color value, you'll obviously get an output color that is
neither the color of the even pixel nor the odd pixel, but the average
of both.
Example: A fine vertical grid with alternating vertical white and black
lines would display as a 50% gray image, as the alternating white and
black columns would be averaged into the average of white and black,
which is 50% gray.
Deletions:
Usage: PsychImaging('AddTask', 'General', 'EnableDataPixxC48Output');
Usage: PsychImaging('AddTask', 'General', 'EnableBits""++""Color""++""Output');
Additions:
"http://svn.berlios.de/wsvn/osxptb/beta/Psychtoolbox/PsychGLImageProcessing/PsychImaging.m?view=markup">WebSVN with changelog</a></span>
Deletions:
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychGLImageProcessing/PsychImaging.m?view=markup">WebSVN with changelog</a></span>
Additions:
* 'InterleavedColumnStereo' [[Ask]] for stereo display in interleaved mode.
buffers by interleaving their content: Even columns are filled with
content from the left buffer, odd columns are filled with content from
the right buffer, i.e., Col 0 = Left col 0, Col 1 = Right Col 0, Col 2
= Left col 1, Col 3 = Right col 1, ....
This mode is useful for driving some auto-stereoscopic displays. These
use either some vertical parallax barriers or vertical lenticular
lense sheets. These direct light from even columns to one eye, light
from odd columns to the other eye.
Usage: PsychImaging('AddTask', 'General', 'InterleavedColumnStereo', startright);
If 'startright' is zero, then even columns are taken from left buffer. If
'startright' is one, then even columns are taken from the right buffer.
= Left row 1, Row 3 = Right row 1, ....
Deletions:
= Left row 1, Row 3 = Right row1, ....
Additions:
view channels - or to a single monoscopic display. Should you find
that things don't work as expected, you might try 'AllViews' instead
of 'FinalFormatting' - There are subtle differences in how they
process your instructions, which may matter in some corner cases.
Deletions:
view channels - or a single monoscopic display.
Additions:
* 'UseDataPixx' Tell Psychtoolbox that additional functionality for
displaying the onscreen window on a VPixx Technologies DataPixx device
should be enabled.
This command is implied by enabling a DataPixx video mode by one of the
commands for the DataPixx in the following sections.
'UseDataPixx' mostly prepares use of a variety of subfunctions in the
DataPixxToolbox ("help DataPixxToolbox") and in the PsychDataPixx()
high-level driver ("help PsychDataPixx").
* 'EnableDataPixxL48Output' Setup Psychtoolbox for L48 mode of the VPixx
Technologies DataPixx device. This loads the graphics hardwares gamma
table with an identity mapping so it can't interfere with DPixx video
processing. It also sets up automatic generation of control signals to
support the features of DPixx that are available via the functions in
PsychDataPixx(). You will be able to upload new CLUT's into the DPixx
by use of the [[Screen]]('LoadNormalizedGammaTable', window, clut, 2);
command. CLUT updates will be synchronized with [[Screen]]('[[Flip]]') commands.
Please note that while L48 CLUT mode works even with very old
graphics hardware, this is a pretty cumbersome way of driving the
DPixx. On recent hardware, you will want to use M16 or C48 mode
(see below). That allows to draw arbitrarily complex stimuli with as
many colors as you want and PTB will take care of conversion into the
M16 or C48 format for DataPixx.
Usage: PsychImaging('AddTask', 'General', 'EnableDataPixxL48Output');
* 'EnableDataPixxM16Output' Enable the high-performance driver for M16
mode of the VPixx Technologies DataPixx device. This is the fastest and
most elegant way of driving the DPixx box with 16 bit luminance output
precision. See "help DataPixx" for more information. Selecting this
mode implies use of 32 bit floating point framebuffers, unless you
specify use of a 16 bit floating point framebuffer via
'FloatingPoint16Bit' explicitely. If you do that, you will not be able
to use the full 16 bit output precision, but only approximately 10 bits.
Usage: PsychImaging('AddTask', 'General', 'EnableDataPixxM16Output');
If you want to make use of the color overlay plane in M16 mode, then
Usage: PsychImaging('AddTask', 'General', 'EnableDataPixxM16OutputWithOverlay');
See the explanation of color overlays in the section
'EnableBits""++""Mono""++""OutputWithOverlay' - behaviour of color overlays is
identical for the CRS Bits""++"" and the VPixx DataPixx.
* 'EnableDataPixxC48Output' Enable the high-performance driver for the
C48 mode of VPixx technologies DataPixx box. This is the fastest and
most elegant way of driving the DataPixx box with 16 bit per color
channel output precision. See "help DataPixx" for more information.
Selecting this mode implies use of 32 bit floating point framebuffers,
unless you specify use of a 16 bit floating point framebuffer via
'FloatingPoint16Bit' explicitely. If you do that, you will not be able
to use the full 16 bit output precision, but only approximately 10 bits.
Usage: PsychImaging('AddTask', 'General', 'EnableDataPixxC48Output');
overlayWin = PsychImaging('GetOverlayWindow', window);
[overlaywin, overlaywinRect] = PsychImaging('GetOverlayWindow', win);
- Will return the handle to the 'overlaywin'dow associated with the
given 'win'dow, if any. Will abort with an error message if the 'win'dow
doesn't have an associated overylay window.
Currently, only the CRS Bits+ box in Mono""++"" mode and the VPixx DataPixx
box in M16 mode does support overlays. Other output drivers don't support
such a feature. See "help BitsPlusPlus" for subfunction
'GetOverlayWindow' for more explanations of the purpose and properties of
overlay windows. The explanations apply to the DPixx device as well if it
is opened in videomode 'M16WithOverlay'.
[imagingMode, needStereomode] = PsychImaging('FinalizeConfiguration');
Deletions:
overlayWin = BitsPlusPlus('GetOverlayWindow', window);
imagingMode = PsychImaging('FinalizeConfiguration');
Additions:
* 'EnableDualPipeHDROutput' Enable EXPERIMENTAL high-performance driver
for HDR display devices which are composites of two separate displays.
EXPERIMENTAL proof-of-concept code with no real function yet!
This is meant for high-precision luminance or color output. It implies
use of 32 bpc floating point framebuffers unless otherwise specified by
other calls to PsychImaging().
The pair of specially encoded output images that are derived from
content of the onscreen window shall be output to both, the display
associated with the screen given to PsychImaging('OpenWindow',...); and
on the screen with the index 'pipe1Screen', using appropriate encoding
to drive the HDR device or similar composite device.
Usage: PsychImaging('AddTask', 'General', 'EnableDualPipeHDROutput', pipe1Screen [, pipe1Rectangle]);
Optionally you can pass a 'pipe1Rectangle' if the window with the
pipe1 image shall not fill the whole 'pipe1Screen', but only a
subregion 'pipe1Rectangle'.
Usage: PsychImaging('AddTask', 'General', 'MirrorDisplayTo2ndOutputHead', mirrorScreen [, mirrorRectangle]);
...); but also (as a copy) on the screen with the index 'mirrorScreen'.
Optionally you can pass a 'mirrorRectangle' if the window with the
mirror image shall not fill the whole 'mirrorScreen', but only a
subregion 'mirrorRectangle'.
Deletions:
Usage: PsychImaging('AddTask', 'General', 'MirrorDisplayTo2ndOutputHead', mirrorscreen);
...); but also (as a copy) on the screen with the index 'mirrorscreen'.
Additions:
Some models of the ATI Fire series (2008 models and later) and some
models of the NVidia Quadro series (2008 models and later) as well as
some of the very latest NVidia Geforce GPU's may support this as well
with some drivers on some operating systems under some circumstances.
If such a combination is present in your system, then Psychtoolbox will
request native support frm the standard drivers, ie., it won't need to
use our own homegrown box of tricks to enable this.
Additions:
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of PsychImaging.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychGLImageProcessing/PsychImaging.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychGLImageProcessing/PsychImaging.m?view=markup">WebSVN with changelog</a></span>
</div>
<div class="code">
<code>Psychtoolbox/PsychGLImageProcessing/PsychImaging.m</code>
</div>
""
Deletions:
%%(php;Path)Psychtoolbox/PsychGLImageProcessing/PsychImaging.m%%
Additions:
* 'InterleavedLineStereo' [[Ask]] for stereo display in interleaved mode.
* 'UseVirtualFramebuffer' [[Ask]] for support of virtual framebuffer, even if
* 'UseFastOffscreenWindows' [[Ask]] for support of fast Offscreen windows.
* 'FloatingPoint16Bit' [[Ask]] for a 16 bit floating point precision
* 'FixedPoint16Bit' [[Ask]] for a 16 bit integer precision framebuffer.
* 'FloatingPoint32Bit' [[Ask]] for a 32 bit floating point precision
* 'FloatingPoint32BitIfPossible' [[Ask]] PTB to choose the highest precision
* 'NormalizedHighresColorRange' [[Ask]] PTB to use a normalized range of
Deletions:
* 'InterleavedLineStereo' Ask for stereo display in interleaved mode.
* 'UseVirtualFramebuffer' Ask for support of virtual framebuffer, even if
* 'UseFastOffscreenWindows' Ask for support of fast Offscreen windows.
* 'FloatingPoint16Bit' Ask for a 16 bit floating point precision
* 'FixedPoint16Bit' Ask for a 16 bit integer precision framebuffer.
* 'FloatingPoint32Bit' Ask for a 32 bit floating point precision
* 'FloatingPoint32BitIfPossible' Ask PTB to choose the highest precision
* 'NormalizedHighresColorRange' Ask PTB to use a normalized range of
Additions:
* 'NormalizedHighresColorRange' Ask PTB to use a normalized range of
color and luminance intensity levels in the interval [0; 1], ie. values
between zero and one for minimum and maximum intensity. Also ask for
unclamped colors -- intermediate results are allowed to take on
arbitrary values, e.g., also negative values. All [[Screen]]() 2D drawing
commands should operate at maximum color/luminance precision.
This is just a convenience shortcut for [[Screen]]('ColorRange', win, 1, 0);
with the added benefit of allowing to specify the background clear
color in normalized 0-1 range as well. This command is implied by use
of any of the high precision display device drivers (for attenuators,
Bits+ box etc.). It is only needed if you want to create the same
visual results on a 8 bit standard framebuffer without needing to
change your code.
Usage: PsychImaging('AddTask', 'General', 'NormalizedHighresColorRange');
* 'DisplayColorCorrection' Select a method for color correction to apply to
stimuli before output conversion and display. You have to specify a
color correction method 'methodname' to apply as parameter, see "help
PsychColorCorrection" for an overview of supported color correction
methods and their adjustable parameters. The imaging pipeline will be
set up to support the chosen color correction method. After you've
opened the onscreen window, you can use the different subcommands of
PsychColorCorrection() to change parameters of the color correction
algorithm at runtime.
Usage: PsychImaging('AddTask', whichView, 'DisplayColorCorrection', methodname);
Example: PsychImaging('AddTask', 'FinalFormatting', 'DisplayColorCorrection', 'SimpleGamma');
This would apply a simple power-law gamma correction to all view
channels of a stereo setup, or the single view of a monoscopic setup.
Later on you could use the methods of PsychColorCorrection() to
actually set the wanted gamma correction factors.
Please note that we use the channel 'FinalFormatting' instead of
'AllViews' as we'd usually do. Both specs will work, but a selection
of 'FinalFormatting' will lead to faster processing in many cases, so
this is preferred here if you want to apply the same setting to all
view channels - or a single monoscopic display.
* 'EnablePseudoGrayOutput' Enable the high-performance driver for the
rendering of up to 1786 different levels of gray on a standard - but
well calibrated - color monitor and 8 bit graphics card. This is done
by applying an algorithn known as "Pseudo-Gray" or "Bit stealing".
Selecting this mode implies use of 32 bit floating point
will not quite be able to use the full 10.8 bit output precision, but
only approximately 10 bits. The expected range of luminance values is
between 0 and 1. See "help CreatePseudoGrayLUT" for further
explanation.
Usage: PsychImaging('AddTask', 'General', 'EnablePseudoGrayOutput');
* 'EnableGenericHighPrecisionLuminanceOutput'
Setup Psychtoolbox for conversion of high precision luminance images
into a format suitable for special high precision luminance display
devices. This is a generic support routine that uses LUT based
conversion.
Usage: PsychImaging('AddTask', 'General', 'EnableGenericHighPrecisionLuminanceOutput', lut);
* 'EnableVideoSwitcherSimpleLuminanceOutput'
Setup Psychtoolbox for conversion of high precision luminance images
into a format suitable for driving the "VideoSwitcher" high precision
luminance display device which was developed by Xiangrui Li et al.
This implements the simple converter, which only needs the
Blue-To-Red-Ratio of the device as input parameter and performs
conversion via a closed-form formula without any need for lookup
tables. This is supposed to be fast.
See "help VideoSwitcher" for more info about the device and its
options.
Usage: PsychImaging('AddTask', 'General', 'EnableVideoSwitcherSimpleLuminanceOutput' [, btrr] [, trigger]);
- The optional 'btrr' parameter is the Blue-To-Red-Ratio to use. If the
parameter is left out, the btrr value will be read from a global
configuration file.
- The optional 'trigger' parameter can be zero for "No trigger", or 1
for "Use trigger as configured". By default, trigger is off (""==""0).
Enabled, one can use the VideoSwitcher('SetTrigger', ...); function to
configure when and how a trigger signal should be emitted. Trigger
signals are simply specific pixel patterns in the green output channel.
That channel is recognized by the VideoSwitcher as a trigger signal
control channel.
* 'EnableVideoSwitcherCalibratedLuminanceOutput'
Setup Psychtoolbox for conversion of high precision luminance images
into a format suitable for driving the "VideoSwitcher" high precision
luminance display device which was developed by Xiangrui Li et al.
This implements the simple converter, which only needs the
Blue-To-Red-Ratio of the device as input parameter and performs
conversion via a closed-form formula without any need for lookup
tables. This is supposed to be fast.
See "help VideoSwitcher" for more info about the device and its
options.
Usage: PsychImaging('AddTask', 'General', 'EnableVideoSwitcherCalibratedLuminanceOutput' [, btrr] [, lut] [, trigger]);
- The optional 'btrr' parameter is the Blue-To-Red-Ratio to use. If the
parameter is left out, the btrr value will be read from a global
configuration file.
- The optional 'lut' paramter is a 257 elements vector of luminance
values, which maps blue channel drive indices to luminance values. This
lut needs to be acquired via a calibration procedure by use of a
photometer. If 'lut' is left out, the table will be read from a global
configuration file.
- The optional 'trigger' parameter can be zero for "No trigger", or 1
for "Use trigger as configured". By default, trigger is off (""==""0).
Enabled, one can use the VideoSwitcher('SetTrigger', ...); function to
configure when and how a trigger signal should be emitted. Trigger
signals are simply specific pixel patterns in the green output channel.
That channel is recognized by the VideoSwitcher as a trigger signal
control channel.
"DisplayUndistortionBezier", read "help DisplayUndistortionBezier". The
recommended method for most cases is 'DisplayUndistortionBVL', read
"help DisplayUndistortionBVL" for help.
After the window has been opened you can call the following commands any
time at runtime:
PsychImaging('RestrictProcessingToROI', window, whichChannel, ROI);
- Restrict the processing area of viewChannel 'whichChannel' of onscreen
window 'window' to the rectangular subarea defined by 'ROI'. See the
explanation above for subtask 'RestrictProcessing'. This does exactly the
same but allows a dynamic change of the restricted area at any point
during your experiment script.
PsychImaging('UnrestrictProcessing', window, whichChannel);
- Remove a restriction of the processing area of viewChannel
'whichChannel' of onscreen window 'window' to a previously defined
subarea. Can be called anytime during your scripts execution.
PsychImaging('PostConfiguration', windowPtr [, clearcolor]);
Deletions:
"DisplayUndistortionBezier", read "help DisplayUndistortionBezier"
PsychImaging('PostConfiguration', windowPtr);
Additions:
==[[Psychtoolbox]] › [[PsychGLImageProcessing]]==
* 'UseVirtualFramebuffer' Ask for support of virtual framebuffer, even if
it isn't strictly needed, given the remaining set of requirements. Most
of the tasks require such a framebuffer - it gets enabled anyway. In a
few cases, e.g., to simplify your code (no need for special cases), it
may be useful to activate such a framebuffer even if it isn't strictly
needed. This option activates a minimal buffer with 8 bits per color
cmponent fixed point precision.
Usage: PsychImaging('AddTask', 'General', 'UseVirtualFramebuffer');
* 'FixedPoint16Bit' Ask for a 16 bit integer precision framebuffer.
This allows for 16 bits of precision for complex drawing. This allows
to use a similar precision as the 'FloatingPoint32Bit' mode for
high-precision display devices, but at a higher speed and lower memory
requirements. However, alpha-blending is not supported, intermediate
out-of-range values (smaller than zero or bigger than one) aren't
supported either. Additionally this mode is only supported on ATI
hardware. It is a special purpose intermediate solution - more accurate
than 16 bit floating point, but less capable and less accurate than 32
bit floating point. If you need higher precision, choose 'FloatingPoint32Bit'.
Usage: PsychImaging('AddTask', 'General', 'FixedPoint16Bit');
older hardware may cause a significant decrease in drawing performance,
or alpha blending may not work at all at this precision! If you'd like
to have both, the highest precision and support for alpha-blending,
specify 'FloatingPoint32BitIfPossible' instead. PTB will then try to
use 32 bit precision if this is possible in combination with alpha
blending. Otherwise, it will choose 16 bit precision for drawing &
blending, but 32 bit precision at least for the post-processing.
* 'FloatingPoint32BitIfPossible' Ask PTB to choose the highest precision
that is possible on your hardware without sacrificing functionality like,
e.g., alpha-blending. PTB will choose the best compromise possible for
your hardware setup.
Usage: PsychImaging('AddTask', 'General', 'FloatingPoint32BitIfPossible');
If you want to make use of the color overlay plane in Mono""++"" mode, then
call the function like this:
Usage: PsychImaging('AddTask', 'General', 'EnableBits""++""Mono""++""OutputWithOverlay');
=== Then you can query the window handle of the overlay window via: ===
overlayWin = BitsPlusPlus('GetOverlayWindow', window);
'overlayWin' is the handle to the overlay window associated with the
overlay of onscreen window 'window'. The overlay window is a standard
offscreen window, so you can do anything with it that you would want to
do with offscreen windows. The only difference is that the window is a
pure index window: It only has one "color channel", which can be written
with color values between 0 and 255. Values 1 to 255 get mapped to the
corresponding color indices of the Bits""++"" overlay plane: A zero value is
transparent -- Content of the onscreen window is visible. Positive
non-zero color values map to the 255 indices available in overlay mode,
these get mapped by the Bits""++"" CLUT to colors. You can define the
mapping of indices to CLUT colors via the
[[Screen]]('LoadNormalizedGammaTable', window, clut, 2); command.
Updates of the overlay image are synchronized to [[Screen]]('[[Flip]]')
updates. If you draw into the overlay window, the changed overlay image
will become visible at [[Screen]]('[[Flip]]') time -- in sync with the changed
onscreen window content. The overlay plane is not automatically cleared
to background (or transparent) color after a flip, but its content
persists across flips. You need to clear it out manually via a
[[Screen]]('FillRect') command.
* 'AddOffsetToImage' Add a constant color- or intensity offset to the
drawn image, prior to all following image processing and post
processing operations:
Outimage(x,y) = Inimage(x,y) + Offset. If the framebuffer is in a color
display mode, the same offset will be added to all three color
channels.
Usage: PsychImaging('AddTask', whichView, 'AddOffsetToImage', Offset);
Example: PsychImaging('AddTask', 'AllViews', 'AddOffsetToImage', 0.5);
Deletions:
==[[Psychtoolbox]] › PsychGLImageProcessing==
older hardware may cause a significant decrease in drawing performance.
* 'EnablePseudoGrayOutput' Enable the high-performance driver for the
rendering of up to 1768 different levels of gray on a standard - but
well calibrated - color monitor and 8 bit graphics card. This is done
by applying an algorithn known as "Pseudo-Gray" or "Bit stealing".
Selecting this mode implies use of 32 bit floating point
will not quite be able to use the full 10.8 bit output precision, but
Usage: PsychImaging('AddTask', 'General', 'EnablePseudoGrayOutput');
Additions:
=== Subcommands and their meaning: ===
configure:
actions:
=== The following commands are only for specialists: ===
%%(php;Path)Psychtoolbox/PsychGLImageProcessing/PsychImaging.m%%
Deletions:
Subcommands and their meaning:
=== configure: ===
=== actions: ===
The following commands are only for specialists:
Additions:
===[[PsychImaging]]===
==[[Psychtoolbox]] › PsychGLImageProcessing==
with the pipeline, use the low-level [[Screen]]('HookFunction', ...)
=== configure: ===
=== actions: ===
* 'EnableBits""++""Bits""++""Output' Setup Psychtoolbox for Bits""++"" mode of the
Cambridge Research Systems Bits""++"" box. This loads the graphics
with Bits""++"" T-Lock system. It also sets up automatic generation of
Bits""++"" T-Lock codes: You will be able to upload new CLUT's into the
Bits""++"" by use of the [[Screen]]('LoadNormalizedGammaTable', window, clut, 2);
command. CLUT updates will be synchronized with [[Screen]]('[[Flip]]')
Bits""++"" CLUT mode works even with very old graphics hardware, this is a
pretty cumbersome way of driving the Bits""++"". On recent hardware, you
will want to use Mono""++"" or Color""++"" mode (see below). That allows to
PTB will take care of conversion into the Color""++"" or Mono""++"" format for
Bits""++"".
Usage: PsychImaging('AddTask', 'General', 'EnableBits""++""Bits""++""Output');
* 'EnableBits""++""Mono""++""Output' Enable the high-performance driver for the
Mono""++"" mode of Cambridge Research Systems Bits""++"" box. This is the
fastest and most elegant way of driving the Bits""++"" box with 14 bit
will not be able to use the full 14 bit output precision of Bits""++"", but
Usage: PsychImaging('AddTask', 'General', 'EnableBits""++""Mono""++""Output');
* 'EnableBits""++""Color""++""Output' Enable the high-performance driver for the
Color""++"" mode of Cambridge Research Systems Bits""++"" box. This is the
fastest and most elegant way of driving the Bits""++"" box with 14 bit
will not be able to use the full 14 bit output precision of Bits""++"", but
Usage: PsychImaging('AddTask', 'General', 'EnableBits""++""Color""++""Output');
yet. You'll have to call [[Screen]]('OpenWindow', windowPtr, ......,
with the same parameters that you'd pass to [[Screen]]('OpenWindow', ....);
Deletions:
===PsychGLImageProcessing===
with the pipeline, use the low-level Screen('HookFunction', ...)
configure:
actions:
* 'EnableBits++Bits++Output' Setup Psychtoolbox for Bits++ mode of the
Cambridge Research Systems Bits++ box. This loads the graphics
with Bits++ T-Lock system. It also sets up automatic generation of
Bits++ T-Lock codes: You will be able to upload new CLUT's into the
Bits++ by use of the Screen('LoadNormalizedGammaTable', window, clut, 2);
command. CLUT updates will be synchronized with Screen('Flip')
Bits++ CLUT mode works even with very old graphics hardware, this is a
pretty cumbersome way of driving the Bits++. On recent hardware, you
will want to use Mono++ or Color++ mode (see below). That allows to
PTB will take care of conversion into the Color++ or Mono++ format for
Bits++.
Usage: PsychImaging('AddTask', 'General', 'EnableBits++Bits++Output');
* 'EnableBits++Mono++Output' Enable the high-performance driver for the
Mono++ mode of Cambridge Research Systems Bits++ box. This is the
fastest and most elegant way of driving the Bits++ box with 14 bit
will not be able to use the full 14 bit output precision of Bits++, but
Usage: PsychImaging('AddTask', 'General', 'EnableBits++Mono++Output');
* 'EnableBits++Color++Output' Enable the high-performance driver for the
Color++ mode of Cambridge Research Systems Bits++ box. This is the
fastest and most elegant way of driving the Bits++ box with 14 bit
will not be able to use the full 14 bit output precision of Bits++, but
Usage: PsychImaging('AddTask', 'General', 'EnableBits++Color++Output');
yet. You'll have to call Screen('OpenWindow', windowPtr, ......,
with the same parameters that you'd pass to Screen('OpenWindow', ....);
PsychGLImageProcessing