HIPS Viewer   For Apple OS X Systems

Contents

Contents
About HIPS
About HIPS Viewer
Instructions
   GUI Control Panel
   Command Line Flags
Bugs
Changes History
Getting Help
Installation
Download
License and Copyright
Acknowledgments


About HIPS

HIPS is a general-purpose software package for image processing that runs in the UNIX environment on virtually any hardware platform and version of UNIX. Mike Landy is the primary author of HIPS. The HIPS system is sold by SharpImage Software. For more additional information on HIPS visit the HIPS home page.

 


About HIPS Viewer

HIPS Viewer displays image files stored in the HIPS image file format on Mac OS X. HIPS Viewer was written by Allen Ingling and is currently distributed and maintained by Allen, separately from the HIPS system.

HIPS Viewer was developed with Xcode and written in Objective C using Apple's Cocoa framework. It relies on HIPS C libraries to parse command line flags and load HIPS image files into memory.

HIPS Viewer is launched either from the Unix command line or from the OS X Finder. It displays both animation files and static images. It is useful both for perusing HIPS image files to inspect image content and to display stimuli during an experiment. To peruse a file, open it into a preview window, where images appears in a window on the OS X desktop. To present HIPS images for controlled experimental stimulus displays, open the file into a full-screen window, which takes over the OS X desktop, occluding all other windows and concealing the menu bar and dock.

SharpImage Software offers an add-on viewer package including xvanim and sunanim for use in X window and (obsolete) sunview environments, respectively. The xvanim viewer builds on OS X and operates with Apple's X11 server, but HIPS Viewer provides these improvements over xvanim:

  1. Offers a full-screen gamma-corrected display mode for presentation of stimuli.
  2. Gathers subject key presses during experiments
  3. Presents stimuli at full 24-bit pixel depth.
  4. Synchronizes frame presentation to vertical blank and uses a double-buffered display.

 

figure 1b. HIPS Viewer in preview mode.
The Control Panel window is visible and the stimulus display window coexists with the OS X desktop. A stimulus frame (depicting two white and two black gaussian blobs on a gray background) exactly fills the stimulus window.

figure 1b. HIPS Viewer in full-screen mode.
The stimulus window expands to fill the entire display, occluding the OS X menu bar, dock, and the HIPS Viewer control panel. HIPS Viewer is operable only by using keyboard controls.
 


Instructions

You may launch HIPS Viewer from either the OS X desktop or from the Unix command line. To Launch HIPS Viewer from the OS X desktop, just double-click on the HIPS Viewer application icon. To launch HIPS Viewer from the command line, open an OS X Terminal window and call hv from the command line.

The HIPS Viewer control panel is convenient for perusal of images generate by the HIPS system but cannot be controlled programmatically for the purpose of presenting sequences of trials in an experiment. Instead, to present HIPS stimuli in experiments invoke hv from a shell script. The "hv" command is the commmand-line name for HIPS Viewer.

To the extent useful, the same controls are available redundantly, both as flags passed on the the command line and buttons on the control panel interface. However, there is no consistent, one-to-one correspondence between command line flags and controls on the HIPS control panel; Some controls specifiable using flags on the command line are of no practical utility when interacting with the GUI interface, such as the exit flag, which quits the viewer automatically after playing a movie. Likewise, some controls provided by the GUI control panel are not available as command line flags.

Both display modes, fullseen and preview, are available when launching HIPS Viewer by either invocation method, calling hv from the command line or double-clicking the HIPS Viewer application icon in the Finder. In practice, interacting with the control panel is usually easier in preview mode, because in full-screen mode the stimulus display window occludes the control panel, at lest on computers with only a single connected display.

 

GUI Control Panel

Upon launch, HIPS Viewer presents the control panel as shown in figure 2, unless Hips Viewer is launched from the command line in full-screen mode. Though the primary use of the control panel is to start, stop and step movie play, it also controls many other aspects of movie display such as the XY resolution of the full-screen display, the choice of display when multiple displays are connected to your computer, and whether to synchronize frame updates to the vertical blank. The control panel interface should be self-explanatory.

If the full-screen display window is activated on the same display as the control panel, then it will occlude the control panel, preventing the user from clicking on the interface controls. When the control panel is covered by the full-screen movie window, HIPS Viewer is controllable only by using the keyboard shortcuts shown in table 1. If you get into trouble because you have opened the full-screen window and forgotten that the F key sequence will close the full-screen window, then recall that HIPS Viewer conforms to the Macintosh convention of exiting on the Q key combination.

Figure 2: The HIPS viewer control panel:
Shown immediately after launching HIPS Viewer. Note that some options, such as the movie play buttons, are disabled until after a HIPS movie has been loaded.

 

key combination mnemonic action
Q quit Quit Hips Viewer.
F fullscreen Toggle full-screen mode.
L   Jump to end of movie.
U   Jump to beginning of movie.
J   Step forward a frame.
K   Step backward a frame.
G go Play the movie.
Table 1: keyboard controls.
Keyboard controls are convenient in preview mode but essential for interacting with HIPS Viewer in full-screen mode, where the stimulus window occludes the control panel.


   Command Line

To launch HIPS Viewer from the command line enter "hv", which stands for HIPS Viewer. The path to hv within the Hips Viewer application bundle is: "Hips Viewer/Contents/MacOS/hv". See figure 3a for examples of how to launch HIPS Viewer from the command line. When invoked from the command line with no arguments, the viewer acts exactly as when launched from the finder, first presenting the control panel as shown in figure 2.

Optionally, a file name and flags may be passed when invoking hv (Figure3b). Table 2 defines command line flags specific to the HIPS Viewer. Note that all flags are ignored unless a file name is given.

As mentioned previously, the command line mode is particularly useful for controlling HIPS Viewer from shell scripts, where file names and command flags may be specified programmatically. Figure 3b shows and example of launching a HIPS file in HIPS Viewer with flags.

 

prompt: HIPS\ Viewer.app/Contents/MacOS/hv &

[1] 4637

prompt:

Figure 3a: Example of launching HIPS Viewer from the OS X Terminal Unix command line:
At the Unix prompt call hv. If you have not included the path into the HIPS Viewer application bundle in your shell's executable path then you need to enter the full path, as shown in this example. Remember to escape the space in "HIPS Viewer" with the backslash. The shell responds with the PID of the new hv process and a new shell prompt. The HIPS Viewer control panel shown in Figure 2 should appear on the desktop.

prompt: HIPS\ Viewer.app/Contents/MacOS/hv -displayname last -palindrome MyHIPSMovieFile &

[1] 4637

prompt:

Figure 3b: Example of launching HIPS viewer from the OS X Terminal Unix command line with arguments:
Here we specify command flags and a file name when launching the viewer. The particular flags given in this example specify that the full-screen window be opened on the display without the menu bar ( if your computer has multiple display) and to play the movie forward then back. See table 2 for definitions of command flags.

 

flag argument type argument values description default comments
displaynumber integer 0, ... (number of connected displays -1) specifies upon which display to open the full-screen window. 0 is the display with the menu bar. Ignored in preview mode.   mutually exclusive with displayname
displayname string first, middle, last specifying a display by name instead of number. Useful when writing portable shell scripts for unknown numbers of connected displays.   mutually exclusive with displaynumber
palindrome bool
-
play forward then back    
loop integer 1,2,3... loop movie play n times.    
forward bool - play movie forward    
reverse bool - play movie in reverse    
exit integer 0,1,2 3 exit n seconds after movie play stops    
exitonkey bool   exit as soon as a key is pressed    
background string black, white, gray, mean, edgemean in full-screen mode, specify the background for the window.   mutually exclusive with preview
getkeys bool   gather keypresses.    
preview bool   open the movie in preview window instead of a full-screen window    
  Table 2: command line flags to hv, the Hips Viewer.

 


Bugs

    1. HIPS Viewer has not yet been tested with color image files.
    2. Gamma correction is unimplemented.
    3. Switching back to preview window mode after switching to full-screen mode does not work.
    4. The choice of keys for the play buttons could be improved. Perhaps we should use "H", "J", "K", and "L" because they correspond to step forward and reverse keys in VI. Or maybe the function keys.
    5. The "default" column in the table of command line flags on this web page is not filled in.

Changes History

 

Version 0.8.2 - 1 October 2004

  1. Fixed the blit time sampling. Clicking on the "View" button to display sampled blit times crashed HIPS Viewer.
  2. The control panel did not appear when "hv" was invoked with no arguments. Fixed.
  3. hv ignored the -preview flag. Fixed.
  4. Could only open one movie at a time. Multiple instances of HipsViewer can be launched from the command line in preview mode.
  5. Clicking the open file button when a movie was already open did nothing. Fixed.
  6. The play button did not turn into a pause button while a move was playing. Fixed.
  7. Palindrome mode played past the beginning of the movie. Fixed.
  8. Added a credit for Tony in the about window for alpha testing.
  9. Updated the control panel image on this web page to match new control panel.
  10. Updated the control keys table on this web page.
  11. Set embedded version numbers to match current release. (Wrong in 0.8 release).
  12. Added installation instructions to this web page.
Version 0.8 - 16 September 2004
  1. Added feature to exit on first keypress.
  2. Added "About" window.
  3. Added the preview window.
  4. Corrected spelling of "palindrome."
  5. Created a crude HIPS Viewer icon derived from the SharpImage Software logo (by editing in GIMP).
  6. Registered the creator code "HIPV" with Apple for the HIPS Viewer application. Necessary for the icon.
  7. Changed the icons on the play control buttons to match appearence and behavior of Apple's QuickTime player.
  8. Fixed a bug where the player sometimes tried to play past the last movie frame.
  9. Changed the name of the desktop application for "Hips Viewer" from "ccanim".
  10. Changed the name of the command line application to "hv" from "ccanim".

     


Getting Help

For questions about HIPS Viewer, its web page, feature requests, suggestions and bug reports contact Allen Ingling.

For questions concerning the HIPS image processing system visit the HIPS home page.

 


Installation

To install HIPS Viewer, download and decompress the HipsViewer .zip archive. Drag Hips Viewer into the Applications folder on your computer. The path should be /Applications/HIPS Viewer.


Download

Most Recent Version:

HIPS Viewer 0.8.2 released 1 October 2004

Application Package:
Requires OS X 10.3.5 or greater.
Requires HIPS
Download HipsViewer_V082.zip

Source Code Package:
Requires OS X 10.3.5 or greater.
Requires HIPS

Requires Xcode Version 1.5 or greater.
Download HipsViewerSource_V082.zip

 

Older Versions:

HIPS Viewer 0.8 released 16 September 2004

Application Package:
Requires OS X 10.3.5 or greater.
Requires HIPS
Download HipsViewer_V08.zip

Source Code Package:
Requires OS X 10.3.5 or greater.
Requires HIPS

Requires Xcode Version 1.5 or greater.
Download HipsViewerSource_V08.zip

 


License and Copyright

HIPS Viewer source code authored by Allen Ingling is copyright New York University.

HIPS Viewer links against HIPS C libraries controlled by SharpImage Software.

For information on HIPS license terms contact SharpImage Software.



Acknowledgments

Mike Landy is the primary author of the HIPS system.

HIPS Viewer was developed under the direction of Tony Movshon, who provided feedback during development. Tony also ported HIPS to the Macintosh, convincing gcc to build HIPS for OS X, including HIPS C libraries to which HIPS Viewer links.

Mike offered feedback and feature suggestions on an early version of the viewer.

HIPS Viewer was developed at the New York University, Center for Neural Science by Allen Ingling, whose salary is funded by the National Eye Institute Vision Core Grant 25-92341-F0259

Allen Ingling. 31 August 2004
last updated 1 October 2004 by Allen Ingling