VisTrails Home

SciVisFall2008/Assignment 4

From VisTrailsWiki

Jump to: navigation, search

This is your fifth assignment for CS 5630/6630.

The assignment is due at midnight on December 10th, 2008. You will need to use the CADE handin functionality to turn in your assignment. The class account is "cs5630".

This assignment was successfully tested in release 1.2.1rev1336. It should work fine in releases >=1.2.1rev1336. Check your release before starting your work and upgrade it if necessary.

The purpose of this assignment is to make sure you understand (and experiment with) the basic concepts involved in the visualization of large graphs.

As usual, as you work on the assignment, we encourage you to read the available documentation on both python and VTK. Remember that VisTrails allows you to easily access the VTK documentation. To see the documentation of a VTK module in the Modules panel, just right click on its name and choose View Documentation in the context menu. Analogously, you can right click on a method's name in the Methods panel to see it's documentation. Some of the problems will require you to use VTK modules you might not have previously seen. These are indicated in the problems.

Contents

General Hints

InfoVis capabilities in VTK are new (ie., unstable) and some of the features do not work too well, or crash (We recommend saving often). Thus, this assignment will be somewhat limited in what we can do.

Another complication is depending on which version of VisTrails you use, you will have a different version of VTK and both of them are outdated. However, the exercises can be solved using what is available on your version of VisTrails. We tried the exercises on both Windows and Mac. Please choose the file specific for your OS. Linux users, you might try any of the files and see what it works for your version of VTK. If none of them work, contact the teach-list that we will help you to get it started.

Also check the InfoVis examples and Testing files on the vtk website, but again remember that the VTK version shipped with VisTrails is quite older than the documentation that is online. You will probably have to make a few adjustments on your pipelines in order to work.


Data

The data for the two problems of this assignment are in two files: Assignment4.vt (Windows version or Mac Intel version or Mac PPC version) and movie_actors.txt

  • Assignment4.vt is the VisTrails file to be used as starting point
  • movie_actors.txt is a file containing some of IMDB movies and actors

Exercise 1: VTK Class Hierarchy Visualization

The goal of this exercise is to compare different InfoVis graph layout strategies. The graph we will be visualizing is the VTK class hierarchy, generated on-the-fly using a PythonSource and Python's introspection capabilities. The node Tree Map in the provided vistrails file will display the VTK Classes as a 'somewhat' interactive Tree Map (hovering the mouse will show the classes names).

(a) Replace the tree map with a graph layout (see vtkGraphLayout). Be sure to keep the labels on the resulting tree (Windows users: see vtkLabeledDataMapper, Mac users: see vtkDynamic2DLabelMapper). Tag the final version of this visualization as Problem 1a

(b) Modify the function that builds the tree in the PythonSource so it also keeps track of the level of each node in the tree. Store it in a similar way it's done for the class names and use it later on the pipeline to create a colormap and apply it to your tree. Tag the final version of this visualization as Problem 1b

(c) Also in the PythonSource, for each class in the hierarchy an attribute called libname is being computed. This represents the group where each class is located. IO, Filtering and Infovis are examples of these libraries. Based on (b), modify the PythonSource so the libname is used for computing the color code instead of the node level. Tag the final version of this visualization as Problem 1c and in the notes answer the following question: "Is there any subclass that is assigned to a library different than the library containing its superclass?"

(d) Experiment with other different graph layout strategies. On the Windows version is very limited but you can display at least two of them side-by-side on the spreadsheet. Choose the one you like best (or dislike least) and in the notes, comment on why you chose the layout you did. Tag the final version of this visualization as Problem 1d

Grads only

(e) Create a new graph based on the vtk class hierarchy such that each libname is now represented as a node in the tree and is connected to its classes. One way to do this is by creating a root node called VTK, adding all the libnames as its children and then adding each class to its corresponding library. Tag the final version of this visualization as Problem 1e

Exercise 2: General Graph Visualization

Generate a visualization for the IMDB data being downloaded in the download node on the provided vistrails file. It's a very dense network. Try to make the visualization as complete as possible so you can answer as many questions about the data. You might want to use also some of the plotting techniques. Tag the final version of this visualization as Problem 2 and in your notes explain what you did and what kind of questions does your visualization help to answer.

Examples showing how to generate a vtkGraph:

Personal tools