timv (Tiled IMage Viewer)

What is timv, anyway?

timv, the Tiled IMage Viewer, is a tool that displays any image readable by the ImageMagick library upon a tiled display. The user has a variety of options on whether to scale the image to fit the display or retain its aspect ratio, blit or fade the image in nicely, and whether the display should be treated as a single monitor or as the seperate screens it is made of. The user can load any number of files at once, and browse through those images using multiple means.


How does timv do all that?

Despite seeming to be a very simple piece of software, timv operates using several other free APIs, including:

timv uses the ImageMagick library to load images into memory, OpenGL to display the pixels on the screen in a window created via GTK+ that gets its configuration data from a file created by the packaged configuration tool (which creates a human-readable text file), and synchronizes loading in parallel and the swapping of display buffers with MPICH. It uses Java to provide a simple GUI for the selection of images and how to display them. Here's a nice graphic to illustrate it all:


Tell me more about those options.

Here is a sample view of the Java interface to timv:

The large edit area on the right gives basic information about what's happening. If there is an error displaying an image on the display, this is the first place to look, in case there was no timv server running (could not connect), or some other random network error.

General options:

  • The Server Host: option tells the loader what host to connect to after you select files to load.
  • Clicking on the Load File... button does what you would expect. You can load any number of files by simply selecting them in the file chooser dialog that pops up.
  • Paste options:

  • Pasting via a Blit operation simply loads the image onto the screen as fast as possible,, i.e. no fading or other effects are used.
  • Pasting via Fade uses a nice 1 second fade from the image currently loaded to the new image. Try it, it's nice.
  • Fit options:

  • A Full fit causes timv to stretch/reduce the image to fit the entire display, skewing the aspect ratio as needed.
  • An Aspect fit indicates that timv will stretch/reduce the image to fit its largest dimension on the display, using a black border to fill in the empty space.
  • Display options:

  • If the display is Single, or unified, the tiled mural is treated as one display. This means that any image is displayed over the entire display area.
  • If the display is Seperate, the image is displayed in full on each tile, using the above fit option.
  • Scrolling options: (currently being implemented)

  • The meaning of None is rather obvious.
  • If User is selected, the entire image is loaded, but is not stretched or reduced to fit the display. Instead, the user can select the region currently viewed on the tiled display. This is useful for extremely large images with high resolution data.
  • Given all of this information, you see that we've just loaded /scratch/s1/cdonner/c2.pnm, and we want the image to fade in, keeping the aspect ratio, over the entire single display, with no scrolling.

    Hint: if you look closely, you can see the message starts with 1100. Looking at the radio buttons on the left, you can guess at the protocol used. In fact, you can even telnet localhost 40408 and send in load strings yourself! Try not to wreak too much havok.


    What's that black timv_server window that pops up?

    You mean this? Well, it's not black in this picture... this is in fact the image loaded in the above example!

    The timv_server window is actually a preview of what image you have loaded. It fades when the tiled display fades, and it shows the fitting option as well (you can see how this image was aspect fitted to the window). You can resize the window yourself, and it will stretch the image accordingly. But despite its simple appearance, this window is loaded with options.

    If you have more than one image loaded, either by selecting multiple files from the java GUI, or because you selected files more than one time (try hitting that Load file... button more than once!), you can cycle through them using this window. This is great for slide shows, presentations, or just impressing your friends with your hi-res vacation pictures.

    To move to the next image of those you have loaded, either left click on the window, or use the right or down arrow keys. To move to the previous image, either right click, or use the left or up arrow keys. The next image will display using the options you selected at load time (fade, aspect fit, etc). Alternatively, you can use the middle mouse button to get a list of all loaded files; you may then directly move to the one you want.

    IMPORTANT!!!
    This is the window you use to quit timv. Just hit 'q', 'Q' or escape while the window is active (or simply close the GTK+ window) and, unless it has crashed or some other evil event has occurred, it should clean up after itself.


    This is all nice, but where can I get timv?

    Note: On SDSC Linux machines, timv is already installed in /usr/local/apps/timv, with the executable in the bin directory.

    timv is publicly available right here. Just remember you need all of the above packages to compile it. timv has been tested on a linux cluster, but the java interface should run just about anywhere. Just note that each machine in your tiled display cluster must be able to access the file, and that path name should be identical in the java interface as well as the server.

    To run timv, just run the timv script included:
    $ ./timv

    Just in case you were curious, timv actually loads two components. First it starts java to load the GUI interface, and then loads the timv_server. When timv dies (either from being killed or from a clean exit, the java window is NOT killed, nor does it need to be. You may actually have multiple interfaces loaded, they only connect to the server when files are actually selected in the file chooser.


    Note: This software and documentation was authored by a poor, starving (and did I mention humble?) grad student. As such, they may contain errors, omissions, and be otherwise wildly inaccurate and/or unstable. Please bear this in mind as you direct your comments, suggestions, flames, etc. to the address below.

    Credits:
    Craig Donner
    Copyright (c) 2002, 2003, SDSC