Additions:
""<div class="subfct" id="Screen">""===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
Deletions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of LoadClut.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m">beta</a> | view WebSVN <a href=
"http://svn.berlios.de/wsvn/osxptb/trunk/Psychtoolbox/PsychBasic/LoadClut.m?op=log">changelog</a> of trunk branch</span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/LoadClut.m</code>
</div>
""
Additions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of LoadClut.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m">beta</a> | view WebSVN <a href=
"http://svn.berlios.de/wsvn/osxptb/trunk/Psychtoolbox/PsychBasic/LoadClut.m?op=log">changelog</a> of trunk branch</span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/LoadClut.m</code>
</div>
""
Deletions:
""<div class="subfct" id="Screen">""===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
Additions:
""<div class="subfct" id="Screen">""===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
Deletions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of LoadClut.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m">beta</a> | view WebSVN <a href=
"http://svn.berlios.de/wsvn/osxptb/trunk/Psychtoolbox/PsychBasic/LoadClut.m?op=log">changelog</a> of trunk branch</span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/LoadClut.m</code>
</div>
""
Additions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of LoadClut.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m">beta</a> | view WebSVN <a href=
"http://svn.berlios.de/wsvn/osxptb/trunk/Psychtoolbox/PsychBasic/LoadClut.m?op=log">changelog</a> of trunk branch</span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/LoadClut.m</code>
</div>
""
Deletions:
""<div class="subfct" id="Screen">""===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
Additions:
""<div class="subfct" id="Screen">""===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
Deletions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of LoadClut.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m">beta</a> | view in <a href=
"http://svn.berlios.de/wsvn/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m?view=markup">WebSVN with changelog</a></span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/LoadClut.m</code>
</div>
""
Additions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of LoadClut.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m">beta</a> | view in <a href=
"http://svn.berlios.de/wsvn/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m?view=markup">WebSVN with changelog</a></span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/LoadClut.m</code>
</div>
""
Deletions:
""<div class="subfct" id="Screen">""===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
Additions:
""<div class="subfct" id="Screen">""===[[LoadCLUT Screen('LoadCLUT')]]===
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;">""===[[LoadCLUT Screen('LoadCLUT')]]===
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;">""===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
Deletions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of LoadClut.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m?view=markup">WebSVN with changelog</a></span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/LoadClut.m</code>
</div>
""
Additions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path </span> <span class="counter">Retrieve current version of LoadClut.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychBasic/LoadClut.m?view=markup">WebSVN with changelog</a></span>
</div>
<div class="code">
<code>Psychtoolbox/PsychBasic/LoadClut.m</code>
</div>
""
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;">""===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
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;">""===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
Deletions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""
See also: [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
%%(php;Path)Psychtoolbox/PsychBasic/LoadClut.m%%
Additions:
http://www.crsltd.com/catalog/bits""++""
Deletions:
<http://www.crsltd.com/catalog/bits++>
Additions:
<http://www.crsltd.com/catalog/bits++>
Deletions:
""http://www.crsltd.com/catalog/bits++""
Additions:
""http://www.crsltd.com/catalog/bits++""
Deletions:
http://www.crsltd.com/catalog/bits++
Additions:
http://www.crsltd.com/catalog/bits++
Deletions:
http://www.crsltd.com/catalog/bits""++""
Additions:
http://www.crsltd.com/catalog/bits""++""
See also: [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
Deletions:
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
Additions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
%%(php;Path)Psychtoolbox/PsychBasic/LoadClut.m%%
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;">""===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
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;">""===[[LoadCLUT Screen('LoadCLUT')]]===
LoadNormalizedGammaTable ReadNormalizedGammaTable<<""</div>""
Deletions:
===[[LoadCLUT Screen('LoadCLUT')]]===
LoadNormalizedGammaTable ReadNormalizedGammaTable<<
Additions:
===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<
Deletions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
%%(php;Path)Psychtoolbox/PsychBasic/LoadClut.m%%
Additions:
===[[LoadClut]]===
==[[Psychtoolbox]] › [[PsychBasic]]==
[err]=LoadClut(windowPtrOrScreenNumber,clut,[startEntry],[bits])
Load the hardware color lookup table (CLUT) of a video screen. It uses
[[Screen]]('LoadCLUT'), as appropriate, to leave the hardware CLUT
containing the numbers you provide in "clut", with no transformation.
There *are* restrictions: On Microsoft Windows you can't use CLUTs for
animation, as the operating system requires all CLUTs to contain mono-
tonically increasing entries. Psychtoolbox currently has no way of
detecting the resolution of your graphics cards DAC, so unless you
explicitely provide the DAC resolution in the optional parameter 'bits',
it will always assume a 8-Bit DAC. This assumption is safe, but it does
not allow you to automatically take advantage of higher resolution DACs.
Apart from that, all pixelSizes are supported. It should works with all
graphics cards on MacOS-X, Windows and Linux. Fully supports 8-or-more-bit
DACs.
We *strongly* suggest that all users use [[Screen]]('LoadNormalizedGammaTable')
in new code. Its values range between 0.0 and 1.0 and are independent
of DAC size, the system automatically maps the range 0.0 - 1.0 to the
range really available on your graphics card, so no need for you (or for
Psychtoolbox) to know the resolution of your graphics cards DAC. You will
always automatically benefit from the highest possible resolution of your
graphics card.
=== FUNCTION ARGUMENTS: ===
The err return argument is only here for backwards compatibility to
the old Psychtoolbox. It always will be empty.
"clut", the user-supplied color table, should be a clutSizex3 matrix.
Each row in the "clut" matrix is loaded into an RGB entry in the
hardware CLUT. The values of the matrix elements should be integers in
the range 0 to 2^bits-1.
The maximum clut size is 256 rows, but you can pass less rows if you only
want to change a portion of the hardware CLUT.
"startEntry" is optional and determines which hardware CLUT entry to
load first. Entries are numbered from 0 up. The default is 0. The first
element of "clut", i.e. clut(1), will be loaded into hardware entry
"startEntry".
"bits" specifies how many bits you want to write to the CLUT. Typically
it will be 8 bits, which is the default value. If you set it to
some other value, the range of allowable entries scales accordingly.
Thus if you use a 10-bit CLUT, then each entry should be between 0 and
1023, etc.
=== GRAPHICS CARDS WITH MORE-THAN-8-BIT DACS: ===
Some ATI Radeon's have 10-bit DACs. The BITS""++"" adapter from Cambridge
Research Systems has 14-bit DACs.
http://www.crsltd.com/catalog/bits""++""/
See also [[Screen]] subfunctions 'LoadCLUT', 'LoadNormalizedGammaTable',
'ReadNormalizedGammaTable'
%%(php;Path)Psychtoolbox/PsychBasic/LoadClut.m%%
Deletions:
===[[LoadCLUT Screen('LoadCLUT')]]===
==[[Psychtoolbox]] › [[Screen]].{mex*,dll} subfunction==
%%(matlab;Usage)oldclut = Screen('LoadCLUT', ScreenNumber [, clut] [, startEntry=0] [, bits=8]);%%
Load or query the hardware gamma table of the specified screen. If you pass a
new 'clut' hardware gamma table, then 'clut' needs to be a matrix with 1 to
(256-startEntry) rows and 3 columns. Each row corresponds to a single color
index value and contains the Red- green- and blue values to use for output of a
pixel of that color. If you provide 'startEntry' then the hardware clut is
overwritten by your table starting at color index 'startEntry' instead of
starting at index 0. You are free to provide a clut with only a few rows if you
only want to update a subset of the color indices in the hardware clut. Column 1
is the red value, column 2 is the green value and column 3 is the blue value
that you want to load into the hardware clut for a specific index. Values in the
table have to be in range between 0 (for dark pixel) and 'max' (for maximum DAC
output intensity), where 'max' depends on the number of bits that the RAMDAC of
your graphics hardware supports. Psychtoolbox currently has no way of knowing
the bit-resolution of your RAMDAC, so you have to provide it in the optional
argument 'bits'. If you don't provide a 'bits' setting, it defaults to a safe
default of 8-Bits. Some examples for 'bits' vs. 'max': 8 bits (default) --> max
= 255. 9 bits --> max=511. 10 bits --> max=1023. 12 bits --> max = 4095. On
MacOS-X and Linux, this function takes arbitrary clut-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 function is not suitable
for CLUT animation, but only for linearizing or calibrating display devices.
PLEASE NOTE: LoadCLUT is only provided to keep old code from OS-9 PTB and old
Windows PTB working. It is just a wrapper around 'LoadNormalizedGammaTable'. Use
'LoadNormalizedGammaTable' for new code. That function is independent of DAC
resolution as it takes values in a normalized range between 0.0 and 1.0 and
always gives you the highest possible resolution for your gamma table, despite
not knowing the real DAC resolution. This function returns the old CLUT as
optional return argument. If you don't pass a clut, then it only returns the old
CLUT.
<<=====See also:=====
LoadNormalizedGammaTable ReadNormalizedGammaTable<<
Full history for this page cannot be displayed within a single page, click
here to view more.