Public Member Functions | |
| __init__ (self, libeyelink, tracker) | |
| draw_menu_screen (self) | |
| close (self) | |
| new_array (self) | |
| set_tracker (self, tracker) | |
| setup_cal_display (self) | |
| exit_cal_display (self) | |
| record_abort_hide (self) | |
| clear_cal_display (self) | |
| erase_cal_target (self) | |
| draw_cal_target (self, x, y) | |
| play_beep (self, beepid) | |
| draw_line (self, x1, y1, x2, y2, colorindex) | |
| draw_lozenge (self, x, y, w, h, colorindex) | |
| draw_title (self) | |
| get_mouse_state (self) | |
| get_input_key (self) | |
| exit_image_display (self) | |
| alert_printf (self, msg) | |
| setup_image_display (self, width, height) | |
| image_title (self, text) | |
| draw_image_line (self, width, line, totlines, buff) | |
| set_image_palette (self, r, g, b) | |
Public Attributes | |
| libeyelink = libeyelink | |
| display = libeyelink.display | |
| screen = Screen(disptype=settings.DISPTYPE, mousevisible=False) | |
| kb = Keyboard(keylist=None, timeout=0) | |
| mouse = Mouse(timeout=0) | |
| tmp_file = os.path.join(tempfile.gettempdir(), '__eyelink__.jpg') | |
| int | xc = self.display.dispsize[0]/2 |
| int | yc = self.display.dispsize[1]/2 |
| bool | extra_info = True |
| int | ld = 40 |
| fontsize = libeyelink.fontsize | |
| str | title = "" |
| bool | display_open = True |
| dict | color |
| font = pygame.font.SysFont('Courier New', 11) | |
| str | state = None |
| list | pal = None |
| tuple | size = (0,0) |
| int | last_mouse_state = -1 |
| str | bit64 = '64bit' in platform.architecture() |
| imagebuffer = self.new_array() | |
| menuscreen = Screen(disptype=settings.DISPTYPE, mousevisible=False) | |
| tracker = tracker | |
| tracker_version = tracker.getTrackerVersion() | |
| cam_img = self.new_array() | |
| bool | esc_pressed = True |
| int | scale = totlines/320. |
Protected Attributes | |
| _size | |
Implements the EyeLink graphics that are shown on the experimental PC, such
as the camera image, and the calibration dots. This class only implements
the drawing operations, and little to no of the logic behind the set-up,
which is implemented in PyLink.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.__init__ | ( | self, | |
| libeyelink, | |||
| tracker ) |
Constructor.
Arguments:
libeyelink -- A libeyelink object.
tracker -- An tracker object as returned by pylink.EyeLink().
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.alert_printf | ( | self, | |
| msg ) |
Prints alert message.
Arguments:
msg -- The message to be played.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.clear_cal_display | ( | self | ) |
Clears the calibration display
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.close | ( | self | ) |
Is called when the connection and display are shutting down.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.draw_cal_target | ( | self, | |
| x, | |||
| y ) |
Draws calibration target.
Arguments:
x -- The X coordinate of the target.
y -- The Y coordinate of the target.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.draw_image_line | ( | self, | |
| width, | |||
| line, | |||
| totlines, | |||
| buff ) |
Draws a single eye video frame, line by line.
Arguments:
width -- Width of the video.
line -- Line nr of current line.
totlines -- Total lines in video.
buff -- Frame buffer.
imagesize -- The size of the image, which is (usually?) 192x160 px.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.draw_line | ( | self, | |
| x1, | |||
| y1, | |||
| x2, | |||
| y2, | |||
| colorindex ) |
Unlike the function name suggests, this draws a single pixel. I.e.
the end coordinates are always exactly one pixel away from the start
coordinates.
Arguments:
x1 -- The starting x.
y1 -- The starting y.
x2 -- The end x.
y2 -- The end y.
colorIndex -- A color index.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.draw_lozenge | ( | self, | |
| x, | |||
| y, | |||
| w, | |||
| h, | |||
| colorindex ) |
desc:
Draws a rectangle.
arguments:
x:
desc: X coordinate.
type: int
y:
desc: Y coordinate.
type: int
w:
desc: A width.
type: int
h:
desc: A height.
type: int
colorindex:
desc: A colorindex.
type: int
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.draw_menu_screen | ( | self | ) |
desc:
Draws the menu screen.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.draw_title | ( | self | ) |
desc:
Draws title info.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.erase_cal_target | ( | self | ) |
TODO: What does this do?
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.exit_cal_display | ( | self | ) |
Exits calibration display.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.exit_image_display | ( | self | ) |
Exits the image display.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.get_input_key | ( | self | ) |
Gets an input key.
Returns:
A list containing a single pylink key identifier.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.get_mouse_state | ( | self | ) |
desc:
Gets the mouse position and state.
returns:
desc: A (pos, state) tuple.
type: tuple.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.image_title | ( | self, | |
| text ) |
Sets the current image title.
Arguments:
text -- An image title.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.new_array | ( | self | ) |
Creates a new array with a system-specific format.
Returns:
An array.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.play_beep | ( | self, | |
| beepid ) |
Plays a sound.
Arguments:
beepid -- A number that identifies the sound.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.record_abort_hide | ( | self | ) |
TODO: What does this do?
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.set_image_palette | ( | self, | |
| r, | |||
| g, | |||
| b ) |
Sets the image palette.
TODO: What this function actually does is highly mysterious. Figure it
out!
Arguments:
r -- The red channel.
g -- The green channel.
b -- The blue channel.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.set_tracker | ( | self, | |
| tracker ) |
Connects the tracker to the graphics environment.
Arguments:
tracker -- An tracker object as returned by pylink.EyeLink().
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.setup_cal_display | ( | self | ) |
Sets up the initial calibration display, which contains a menu with
instructions.
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.setup_image_display | ( | self, | |
| width, | |||
| height ) |
Initializes the buffer that will contain the camera image.
Arguments:
width -- The width of the image.
height -- The height of the image.
|
protected |
| str pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.bit64 = '64bit' in platform.architecture() |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.cam_img = self.new_array() |
| dict pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.color |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.display = libeyelink.display |
| bool pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.display_open = True |
| bool pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.esc_pressed = True |
| bool pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.extra_info = True |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.font = pygame.font.SysFont('Courier New', 11) |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.fontsize = libeyelink.fontsize |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.imagebuffer = self.new_array() |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.kb = Keyboard(keylist=None, timeout=0) |
| int pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.last_mouse_state = -1 |
| int pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.ld = 40 |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.libeyelink = libeyelink |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.menuscreen = Screen(disptype=settings.DISPTYPE, mousevisible=False) |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.mouse = Mouse(timeout=0) |
| list pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.pal = None |
| int pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.scale = totlines/320. |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.screen = Screen(disptype=settings.DISPTYPE, mousevisible=False) |
| tuple pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.size = (0,0) |
| str pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.state = None |
| str pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.title = "" |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.tmp_file = os.path.join(tempfile.gettempdir(), '__eyelink__.jpg') |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.tracker = tracker |
| pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.tracker_version = tracker.getTrackerVersion() |
| int pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.xc = self.display.dispsize[0]/2 |
| int pygaze._eyetracker.eyelinkgraphics.EyelinkGraphics.yc = self.display.dispsize[1]/2 |