A Primer of Visual Stimulus Presentation Software

The visual system has been the most widely studied sensory system in neuroscience during the last decades. A reliable and flexible visual stimulus presentation tool is one of the most important prerequisites for a thorough analysis of its sensory processing characteristics. While almost all sensory systems labs have created some home-grown solutions, these are not easily transferable from one lab to another or from one presentation platform to another. In addition, several stimuli are hard to generate with the desired accuracy in timing, color and luminance, 3D rendering or stereopsis. 
 
Vision Egg (Straw, 2008) is a more widely used software library, designed originally to probe the visual system of the fly. It is an open source and platform-independent software package built on top of Python (as the programming language) and OpenGL (for graphics instructions). For a well versed programmer, Vision Egg achieves its goals very well, providing a powerful and highly optimized system for visual stimulus presentation and interactions with hardware – including the ability to run experiments remotely across a network (via TCP/IP). While historically the Vision Egg software strongly adheres to an object-oriented model of programming this can be hard to understand for relatively inexperienced programmers. For instance, the temporal control of experiments in Vision Egg is predominantly through the use of presentation loops, whereby the user sets an object to run for a given length of time, attaches stimuli to it, assigns it to a screen, and then tells the object to “go”. This “mainloop-and-callback” mechanism of flow control has advantages where stimuli continue to run between trials. The alternative, however, of an explicit sequence of control statements can also be implemented (see Figure 2 of Straw, 2008). 
 
Table ​Table11 (adapted from Peirce, 2007) gives a comparison of various features of four well known stimulus presentation programs. Two of these (Vision Egg and PsychoPy) have very similar philosophies, are both implemented in Python, and differed originally in their low-latency real-time capabilities. The most substantive differences between them today are that Vision Egg offers relatively simple perspective corrected stimuli utilizing the 3D nature of OpenGL, while PsychoPy has an automated luminance calibration utility and interfaces more easily with certain types of hardware. Furthermore, the primary development platform of the Vision Egg is GNU/Linux, while it appears to be Windows for PsychoPy. 
 
 
 
Table 1 
 
Comparison of several frequently used software packages for visual stimulus presentation. 
 
 
 
Another interesting issue discussed shortly in Straw's paper is the feasibility of setting up a stimulus library in form of a database that could be downloaded and used with different presentation environments. As everyone who has developed databases knows, there is more involved in such a project than just storing bitmaps (or sequences thereof) of a standard number of pixels. For example, the issues of frame rate, display luminance and position calibration, and synchronization with data acquisition and other hardware would all need to be addressed. Even further, the creation of a universal language for specifying sensory stimuli would be of great interest. 
 
Altogether this paper by Straw on the Vision Egg gives a fairly technical account of many relevant hardware and software considerations, but is nevertheless a well readable primer of considerations when deciding on what visual stimulus software to choose or extend.


A commentary on Vision Egg: an open-source library for realtime visual stimulus generation
by Andrew D. Straw The visual system has been the most widely studied sensory system in neuroscience during the last decades. A reliable and flexible visual stimulus presentation tool is one of the most important prerequisites for a thorough analysis of its sensory processing characteristics. While almost all sensory systems labs have created some home-grown solutions, these are not easily transferable from one lab to another or from one presentation platform to another. In addition, several stimuli are hard to generate with the desired accuracy in timing, color and luminance, 3D rendering or stereopsis.
Vision Egg (Straw, 2008) is a more widely used software library, designed originally to probe the visual system of the fly. It is an open source and platform-independent software package built on top of Python (as the programming language) and OpenGL (for graphics instructions). For a well versed programmer, Vision Egg achieves its goals very well, providing a powerful and highly optimized system for visual stimulus presentation and interactions with hardware -including the ability to run experiments remotely across a network (via TCP/IP). While historically the Vision Egg software strongly adheres to an object-oriented model of programming this can be hard to understand for relatively inexperienced programmers. For instance, the temporal control of experiments in Vision Egg is predominantly through the use of presentation loops, whereby the user sets an object to run for a given length of time, attaches stimuli to it, assigns it to a screen, and then tells the object to "go". This "mainloop-andcallback" mechanism of flow control has advantages where stimuli continue to run between trials. The alternative, however, of an explicit sequence of control statements can also be implemented (see Figure 2 of Straw, 2008). Table 1 (adapted from Peirce, 2007) gives a comparison of various features of four well known stimulus presentation programs. Two of these (Vision Egg and PsychoPy) have very similar philosophies, are both implemented in Python, and differed originally in their low-latency realtime capabilities. The most substantive differences between them today are that Vision Egg offers relatively simple perspective corrected stimuli utilizing the 3D Kötter nature of OpenGL, while PsychoPy has an automated luminance calibration utility and interfaces more easily with certain types of hardware. Furthermore, the primary development platform of the Vision Egg is GNU/Linux, while it appears to be Windows for PsychoPy. Another interesting issue discussed shortly in Straw's paper is the feasibility of setting up a stimulus library in form of a database that could be downloaded and used with different presentation environments. As everyone who has developed databases knows, there is more involved in such a project than just storing bitmaps (or sequences thereof) of a standard number of pixels. For example, the issues of frame rate, display luminance and position calibration, and synchronization with data acquisition and other hardware would all need to be addressed. Even further, the creation of a universal language for specifying sensory stimuli would be of great interest.
Altogether this paper by Straw on the Vision Egg gives a fairly technical account of many relevant hardware and software considerations, but is nevertheless a well readable primer of considerations when deciding on what visual stimulus software to choose or extend.
The rodent barrel cortex is one of the premier model systems for investigating sensory organization and cortical microcircuitry. In no small degree, this is because the cortical barrels, thalamic barreloids, and brainstem barrelettes can be easily visualized and referenced both to each other and to the peripheral whisker field.
The report by Haidarliu et al. (2008) concerns a relatively simple, reproducible method for visualizing two thalamic subdivisions and the border between them. The subdivisions in question are the ventrolateral (vl) and dorsomedial (dm) subdivisions of the rat ventral posteromedial (VPM) thalamic nucleus. These are two specialized vibrissa-representing compartments with distinct ascending inputs, associated with extralemniscal (VPMvl) or lemniscal (VPMdm) afferent pathways. The compartments have different output targets, and distinct response properties, related to whisker contact signals (VPMvl) and complex whisking-touch signals (VPMdm). On this basis, they have been supposed to work as parallel thalamic pathways for whisking and touch (Yu et al., 2006). A third distinguishable pathway has been reported through the dorsal part of the barreloids (Urbain and Deschenes, 2007).
In this and previous work, the authors have developed an unconventional, tilted oblique plane of section, where the shape of the two subdivisions and the border between them, although otherwise indistinct, become obvious. In this report in particular, the authors modify their original method (Yu et al., 2006) in order to allow translation of coordinates from the oblique to the coronal planes. This is a relatively simple step, at least in retrospect. As with the barrel system as a whole, however, the ability to clearly and reproducibly visualize these structures has significant practical implications. Clearly, definite identification of structure is a necessary condition for interpreting physiological recordings in the thalamus (e.g., Yu et al., 2006). These data in turn are basic to determining whether the subdivisions are primarily specialized for submodality segregation (Alloway, 2008) or for some other processing strategies; for example, the special requirements arising from the operation of a mobile sensory organ and the processing of vibrissal information during active whisking (Ahissar, 2008;Urbain and Deschenes, 2007).
The methodology for transforming coordinates and the standardization of nuclear boundaries also augments brain atlases. Atlases are now part of the modern toolkit, with the potential for enabling developmental and comparative research, including at the molecular level; but this requires the highest level of precise details and interdisciplinary transpositions.
I would like to interpose two general comments inspired by this article. First, it is remarkable that basic neural structures are still being discovered at the macroscopic level. This stands as a salutary lesson about how much, even at a basic level, remains unknown. Second, although I have empha-