|
| |
MatVis format: MatVis('function name', additional parameters...)
Function: 'spatial', 'spatialS' and 'spatialSFile'
Load the spatial patterns (images) for trial.
Parameters :
('spatial', trialNumber, imageNumber, image)
('spatialS', trialNumber, [startImageNumber stopImageNumber], image)
('spatialSFile', trialNumber, [startImageNumber stopImageNumber], 'path/filename')
image = the spatial pattern to be loaded into MatVis.
trialNumber = The particular trial/condition that is to be loaded.
[startImageNumber stopImageNumber] = When loading a sequence of spatial patterns, these are the start and stop
frames of the condition the sequence of spatial patterns are to be loaded into.
Return:
1 = indicates an internal error occurred in MatVis
0 = successful completion of command
Description:
After the trials have been defined, these spatial functions are used to load the actual patterns into each trial
buffer. Once loaded, the trial can be presented as many times as needed. The 'spatial' function loads one frame
at a time. The 'spatialS' function loads a sequence of frames where a row by columns image is stored as a matix
of row by (columns * frames). The matrix passed to MatVis can be either double precision or uint8 data types. The
'spatialSFile' function is a way to efficiently load a long sequence of images from a binary file where each pixel
is a byte long. The proper file data structure is a image, where each image is read row by row starting from the
top of the image, followed by the next image to be loaded.
Examples:
1) Load noise patterns of increasing contrast into the five frames of trial one .
for i=1:5, image = rand(100,100) * 50 * i; error=MatVis('spatial',1,i,image); end;
See Also:
spatialWindow spatialWindowS temporal trial flashImage
|