File: iViewXShowCalBMP.m

package info (click to toggle)
psychtoolbox-3 3.0.19.14.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,796 kB
  • sloc: ansic: 176,245; cpp: 20,103; objc: 5,393; sh: 2,753; python: 1,397; php: 384; makefile: 193; java: 113
file content (43 lines) | stat: -rw-r--r-- 1,058 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
function iViewXShowCalBMP


bmps={

'5pt1024x768off0x0sc25x25c.bmp',
'5pt1024x768off0x0sc50x50c.bmp',
'5pt1024x768off0x0sc75x75c.bmp',
'5pt1024x768off0x0sc100x100c.bmp',

'5pt1024x768off0x0sc25x25x.bmp',

'9pt1024x768off0x0sc25x25c.bmp'
'9pt1024x768off0x0sc50x50c.bmp',
'9pt1024x768off0x0sc75x75c.bmp',
'9pt1024x768off0x0sc100x100c.bmp',
};

% we could generate names based on specifications

imnr=5;

if imnr>length(bmps)
    error('Image nr does not exist');
end

filedir='calbmps';

if strcmp(computer, 'MAC2')==1 % OS9
    impath=[filesep filedir filesep bmps{imnr} ]
	w = Screen(max(Screen('Screens')), 'OpenWindow', 0); % open screen
	Screen(w, 'PutImage', imread(impath)); % read in image and put image on screen
else
	impath=[filedir filesep bmps{imnr} ]
	w=Screen('OpenWindow', max(Screen('Screens')), 0); % open screen
	Screen('PutImage', w, imread(impath)); % read in image and put image on screen
    Screen('Flip',w);
end

while KbCheck; end % flush for a key press

while ~KbCheck; end % wait for a key press
Screen('CloseAll'); % close screen