Docs @ Psychtoolbox Wiki : LoadNormalizedGammaTable

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

Revision [14387]

Last edited on 2011-12-18 16:11:44 by DocBot
Additions:
You need to pass the new hardware gamma table 'table' as a 'nrows' rows by 3
columns matrix. Each row corresponds to a single color index value in the
framebuffer and contains the Red- green- and blue values to use for output.
Column 1 is the red value, column 2 is the green value and column 3 is the blue
value. Values have to be in range between 0.0 (for dark pixel) and 1.0 (for
maximum intensity). Example: table(127,1)=0.67 would mean that the red color
value 127 should be displayed with 67% of the maximum red-gun intensity,
table(32, 3)=0.11 means that blue color value 32 should be displayed with 11% of
the maximum blue-gun intensity. The range of values 0-1 gets mapped to the
hardware with the accuracy attainable by the hardwares DAC's, typically between
8 and 10 bits.
The required number of rows 'nrows' is typically 256 for consumer graphics
cards.
On OS-X you can also pass 512, 1024, 2048, ..., 65535 rows instead of 256 rows,
the Bits""++"" box. On Linux with some pro-graphics cards, e.g., some NVidia
QuadroFX cards, you can pass more than 256 rows, similar to OS/X.
If you provide the index of an onscreen window as 'ScreenNumber' and you set the
(optional) flag 'loadOnNextFlip' to 1, then update of the gamma table will not
happen immediately, but only at execution of the [[Screen]]('[[Flip]]',
Deletions:
You need to pass the new hardware gamma table 'table' as a 256 rows by 3 columns
matrix. Each row corresponds to a single color index value in the framebuffer
and contains the Red- green- and blue values to use for output. Column 1 is the
red value, column 2 is the green value and column 3 is the blue value. Values
have to be in range between 0.0 (for dark pixel) and 1.0 (for maximum
intensity). Example: table(127,1)=0.67 would mean that the red color value 127
should be displayed with 67% of the maximum red-gun intensity, table(32, 3)=0.11
means that blue color value 32 should be displayed with 11% of the maximum
blue-gun intensity. The range of values 0-1 gets mapped to the hardware with the
accuracy attainable by the hardwares DAC's, typically between 8 and 10 bits. On
OS-X you can also pass 512, 1024, 2048, ..., 65535 rows instead of 256 rows,
the Bits""++"" box. If you provide the index of an onscreen window as 'ScreenNumber'
and you set the (optional) flag 'loadOnNextFlip' to 1, then update of the gamma
table will not happen immediately, but only at execution of the [[Screen]]('[[Flip]]',


Revision [14311]

Edited on 2011-10-24 16:19:45 by DocBot
Additions:
'windowPtrOrScreenNumber'.
You need to pass the new hardware gamma table 'table' as a 256 rows by 3 columns
matrix. Each row corresponds to a single color index value in the framebuffer
and contains the Red- green- and blue values to use for output. Column 1 is the
red value, column 2 is the green value and column 3 is the blue value. Values
have to be in range between 0.0 (for dark pixel) and 1.0 (for maximum
intensity). Example: table(127,1)=0.67 would mean that the red color value 127
should be displayed with 67% of the maximum red-gun intensity, table(32, 3)=0.11
means that blue color value 32 should be displayed with 11% of the maximum
blue-gun intensity. The range of values 0-1 gets mapped to the hardware with the
accuracy attainable by the hardwares DAC's, typically between 8 and 10 bits. On
OS-X you can also pass 512, 1024, 2048, ..., 65535 rows instead of 256 rows,
although this only makes sense for a few selected applications, e.g., setup for
the Bits""++"" box. If you provide the index of an onscreen window as 'ScreenNumber'
and you set the (optional) flag 'loadOnNextFlip' to 1, then update of the gamma
table will not happen immediately, but only at execution of the [[Screen]]('[[Flip]]',
e.g., the Bits""++"" box. It can also be used to load clut's for color lookup table
animation. Read the section about 'EnableCLUTMapping' in the 'help PsychImaging'
for info on how to enable and use color lookup table animation.
On GNU/Linux, the optional 'physicalDisplay' parameter selects the video output
to which the gamma table should be applied in multi-display mode. On Linux a
screen can output to multiple video displays, therefore this parameter allows to
setup individual gamma tables for each display. The default setting is -1, which
means to apply the (same) gamma table to all outputs of the given screen.
On MacOS-X and Linux, this function takes arbitrary gamma-tables which makes it
suitable for CLUT animation, although you should rather avoid CLUT animation, or
use the PsychImaging(...'EnableCLUTMapping'...) method instead. CLUT animation
nowadays is almost always the wrong approach. If you really need it, the
PsychImaging based method provides cross-platform compatibility and reliable
timing.
On Microsoft Windows, only tables with monotonically increasing values are
considered valid. Other tables get rejected by the operating system -- there's
nothing we can do about this incredibly wise decision of the Microsoft system
designers :( , so this is not suitable for CLUT animation, but only for
linearizing or calibrating display devices. The function returns the old gamma
table as optional return argument.
Deletions:
'windowPtrOrScreenNumber'. You need to pass the new hardware gamma table 'table'
as a 256 rows by 3 columns matrix. Each row corresponds to a single color index
value in the framebuffer and contains the Red- green- and blue values to use for
output. Column 1 is the red value, column 2 is the green value and column 3 is
the blue value. Values have to be in range between 0.0 (for dark pixel) and 1.0
(for maximum intensity). Example: table(127,1)=0.67 would mean that the red
color value 127 should be displayed with 67% of the maximum red-gun intensity,
table(32, 3)=0.11 means that blue color value 32 should be displayed with 11% of
the maximum blue-gun intensity. The range of values 0-1 gets mapped to the
hardware with the accuracy attainable by the hardwares DAC's, typically between
8 and 10 bits. On OS-X you can also pass 512, 1024, 2048, ..., 65535 rows
instead of 256 rows, although this only makes sense for a few selected
applications, e.g., setup for the Bits""++"" box. If you provide the index of an
onscreen window as 'ScreenNumber' and you set the (optional) flag
'loadOnNextFlip' to 1, then update of the gamma table will not happen
immediately, but only at execution of the [[Screen]]('[[Flip]]',
e.g., the Bits""++"" box.
On MacOS-X, this function takes arbitrary gamma-tables which makes it suitable
for fast CLUT animation. On Microsoft Windows, only tables with monotonically
increasing values are considered valid. Other tables get rejected by the
operating system -- there's nothing we can do about this incredibly wise
decision of the Microsoft system designers :( , so this is not suitable for CLUT
animation, but only for linearizing or calibrating display devices. The function
returns the old gamma table as optional return argument.


Revision [9549]

Edited on 2009-04-28 06:20:50 by DocBot
Additions:
%%(matlab;Usage)Screen('LoadNormalizedGammaTable', windowPtrOrScreenNumber, table [, loadOnNextFlip] [, physicalDisplay]);%%
Load the gamma table of the specified screen or window
'windowPtrOrScreenNumber'. You need to pass the new hardware gamma table 'table'
as a 256 rows by 3 columns matrix. Each row corresponds to a single color index
value in the framebuffer and contains the Red- green- and blue values to use for
output. Column 1 is the red value, column 2 is the green value and column 3 is
the blue value. Values have to be in range between 0.0 (for dark pixel) and 1.0
(for maximum intensity). Example: table(127,1)=0.67 would mean that the red
color value 127 should be displayed with 67% of the maximum red-gun intensity,
table(32, 3)=0.11 means that blue color value 32 should be displayed with 11% of
the maximum blue-gun intensity. The range of values 0-1 gets mapped to the
hardware with the accuracy attainable by the hardwares DAC's, typically between
8 and 10 bits. On OS-X you can also pass 512, 1024, 2048, ..., 65535 rows
instead of 256 rows, although this only makes sense for a few selected
applications, e.g., setup for the Bits""++"" box. If you provide the index of an
onscreen window as 'ScreenNumber' and you set the (optional) flag
'loadOnNextFlip' to 1, then update of the gamma table will not happen
flag of 2 will load the provided table not into the hardware tables of your
default. In this case, the 'windowPtrOrScreenNumber' argument (which then must
be a real screen number, not a window index) selects among physically present
display devices, instead of logical devices. This is important if you want to
assign different gamma-tables to multiple displays in a 'clone' or 'mirror mode'
configuration, as there is only one logical display, but multiple physical
displays, mirroring each other. Please note that screen numbering is different
for physical vs. logical displays. For a list of physical display indices, call
[[Screen]]('Screens', 1);
Deletions:
%%(matlab;Usage)Screen('LoadNormalizedGammaTable', ScreenNumber, table [, loadOnNextFlip] [, physicalDisplay]);%%
Load the gamma table of the specified screen. You need to pass the new hardware
gamma table 'table' as a 256 rows by 3 columns matrix. Each row corresponds to a
single color index value in the framebuffer and contains the Red- green- and
blue values to use for output. Column 1 is the red value, column 2 is the green
value and column 3 is the blue value. Values have to be in range between 0.0
(for dark pixel) and 1.0 (for maximum intensity). Example: table(127,1)=0.67
would mean that the red color value 127 should be displayed with 67% of the
maximum red-gun intensity, table(32, 3)=0.11 means that blue color value 32
should be displayed with 11% of the maximum blue-gun intensity. The range of
values 0-1 gets mapped to the hardware with the accuracy attainable by the
hardwares DAC's, typically between 8 and 10 bits. On OS-X you can also pass 512,
1024, 2048, ..., 65535 rows instead of 256 rows, although this only makes sense
for a few selected applications, e.g., setup for the Bits""++"" box. If you provide
the index of an onscreen window as 'ScreenNumber' and you set the (optional)
flag 'loadOnNextFlip' to 1, then update of the gamma table will not happen
flat of 2 will load the provided table not into the hardware tables of your
default. In this case, the 'ScreenNumber' argument selects among physically
present display devices, instead of logical devices. This is important if you
want to assign different gamma-tables to multiple displays in a 'clone' or
'mirror mode' configuration, as there is only one logical display, but multiple
physical displays, mirroring each other. Please note that screen numbering is
different for physical vs. logical displays. For a list of physical display
indices, call [[Screen]]('Screens', 1);


Revision [9156]

Edited on 2008-11-05 06:01:36 by DocBot
Additions:
""<div class="subfct" id="Screen">""===[[LoadNormalizedGammaTable Screen('LoadNormalizedGammaTable')]]===
Deletions:
""<div class="subfct" id="Screen" style="background-color:#eee; padding:1em; border-width:1px; border-style:solid; border-color:#ddd; margin-bottom: 2em;border-top: 5px solid #999999;">""===[[LoadNormalizedGammaTable Screen('LoadNormalizedGammaTable')]]===


Revision [7040]

Edited on 2008-07-10 16:08:42 by DocBot
Additions:
""<div class="subfct" id="Screen" style="background-color:#eee; padding:1em; border-width:1px; border-style:solid; border-color:#ddd; margin-bottom: 2em;border-top: 5px solid #999999;">""===[[LoadNormalizedGammaTable Screen('LoadNormalizedGammaTable')]]===
ReadNormalizedGammaTable<<""</div>""
Deletions:
===[[LoadNormalizedGammaTable Screen('LoadNormalizedGammaTable')]]===
ReadNormalizedGammaTable<<


Revision [5216]

Edited on 2008-06-15 20:04:30 by DocBot
Additions:
%%(matlab;Usage)Screen('LoadNormalizedGammaTable', ScreenNumber, table [, loadOnNextFlip] [, physicalDisplay]);%%
graphics driver doesn't support sync to vertical retrace). A 'loadOnNextFlip'
flat of 2 will load the provided table not into the hardware tables of your
graphics card, but into the hardware tables of special display devices, like
e.g., the Bits""++"" box.
On MacOS-X, the optional 'physicalDisplay' flag can be set to 1, zero is the
default. In this case, the 'ScreenNumber' argument selects among physically
present display devices, instead of logical devices. This is important if you
want to assign different gamma-tables to multiple displays in a 'clone' or
'mirror mode' configuration, as there is only one logical display, but multiple
physical displays, mirroring each other. Please note that screen numbering is
different for physical vs. logical displays. For a list of physical display
indices, call [[Screen]]('Screens', 1);
On MacOS-X, this function takes arbitrary gamma-tables which makes it suitable
for fast CLUT animation. On Microsoft Windows, only tables with monotonically
increasing values are considered valid. Other tables get rejected by the
operating system -- there's nothing we can do about this incredibly wise
decision of the Microsoft system designers :( , so this is not suitable for CLUT
animation, but only for linearizing or calibrating display devices. The function
returns the old gamma table as optional return argument.
Deletions:
%%(matlab;Usage)Screen('LoadNormalizedGammaTable', ScreenNumber, table [, loadOnNextFlip]);%%
graphics driver doesn't support sync to vertical retrace). On MacOS-X, this
function takes arbitrary gamma-tables which makes it suitable for fast CLUT
animation. On Microsoft Windows, only tables with monotonically increasing
values are considered valid. Other tables get rejected by the operating system
-- there's nothing we can do about this incredibly wise decision of the
Microsoft system designers :( , so this is not suitable for CLUT animation, but
only for linearizing or calibrating display devices. The function returns the
old gamma table as optional return argument.


Revision [4980]

Edited on 2008-04-26 21:23:05 by DocBot
Additions:
%%(matlab;Usage)Screen('LoadNormalizedGammaTable', ScreenNumber, table [, loadOnNextFlip]);%%
<<=====See also:=====
ReadNormalizedGammaTable<<
Deletions:
%%(matlab;Usage)[[Screen]]('LoadNormalizedGammaTable', ScreenNumber, table [, loadOnNextFlip]);%%
""<<"" ""==""""==""See also:ReadNormalizedGammaTable""==""""==""""<<""


Revision [4951]

Edited on 2008-04-26 20:20:39 by DocBot
Additions:
===[[LoadNormalizedGammaTable Screen('LoadNormalizedGammaTable')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)[[Screen]]('LoadNormalizedGammaTable', ScreenNumber, table [, loadOnNextFlip]);%%
for a few selected applications, e.g., setup for the Bits""++"" box. If you provide
immediately, but only at execution of the [[Screen]]('[[Flip]]',
old gamma table as optional return argument.
""<<"" ""==""""==""See also:ReadNormalizedGammaTable""==""""==""""<<""
Deletions:
===[[LoadNormalizedGammaTable]]===
==ScreenFunctions==
Usage:
Screen('LoadNormalizedGammaTable', ScreenNumber, table [, loadOnNextFlip]);
for a few selected applications, e.g., setup for the Bits++ box. If you provide
immediately, but only at execution of the Screen('Flip',
old gamma table as optional return argument.
ScreenFunctions


Revision [2544]

The oldest known version of this page was created on 2008-03-15 23:19:15 by DocBot
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0964 seconds