IN4086P Introduction Exercise
To start with, let's have a look at the software you'll be using to complete the exercises in this practical (with the exception of the InfoVis exercise). ParaView is an open-source visualization application made by Kitware, which runs on Windows, Linux and OS X. It is based on VTK, the Visualization Toolkit, which is also developed by Kitware.
Getting to know ParaView
To begin, open ParaView. From a command prompt, type /usr/local/bin/paraview. The following window opens:
Visualizations in ParaView are created by using networks (pipelines) of filters. Such a pipeline starts with a source, which generates data (or loads it from disk). A series of filters then modifies the data, resulting in a different dataset at each node of the pipeline. The Pipeline Browser (top left) shows the filters and sources making up pipelines in the current visualization. Pipelines in ParaView are always tree-shaped, as each filter only takes one (main) input.
Right now, the pipeline is empty, showing only the root (our connection to the built-in server). Let's change that by adding a source. Click Sources > Superquadric to add a torus. Notice that a new node appears in the Pipeline Browser, representing the source. Clicking the node shows its properties in the Object Inspector window (bottom left). Play around a bit with the parameters; you have to click the Apply button whenever you want to see the effect of your changes.
Just showing the torus shape is not very interesting. Let's compute some data using a filter. With the SuperquadricSource selected in the Pipeline Browser, go to Filters > Alphabetical and add an Elevation filter. This filter computes the elevation for each point in our dataset. You can move the line widget around in the 3D view by dragging the end points. Again, you'll have to click Apply to see the changes. Filters will always be added below the currently selected node in the pipeline. To change a filter's input, right-click the node in the Pipeline Browser.
Adding the ElevationFilter means our points now contain data, which is stored in a Data Array. Switch to the Information tab in the Object Inspector to see the Data Arrays for the current node in the pipeline. The Information tab also shows the type of data generated by the filter. Sometimes, certain filters may not be available. This is because they can't deal with the data type at this point in the pipeline. If you run into this problem, check if a suitable conversion filter is available.
You can use the Display tab (or the toolbar) to change which array is color-mapped onto the object (and how), as well as other parameters. Another good trick is adding multiple views. The buttons near the top right of the 3D view (
) allow you to split this view. ParaView will ask you what type of view to create for the new panel, click 3D View.
Select a view (note the red border), and use the little "eye" icons in the Pipeline browser to show or hide the output of the corresponding node in the visualization. You can move views around by dragging the bar just above the visualization. Right-clicking a view allows you to link its camera to another view. You can use this, for example, to compare different visualization techniques for the same data.
When adding new filters, it is often useful to first select the view you want the output to appear in. If an incompatible view is selected, ParaView will automatically create a new view to show the output. Simply close any views you don't need if things get too cluttered.
Visualizing some real data
Ok, now let's do some real visualization. Download and unzip the data for this exercise. Then go to File > Open, browse to and open the GrandCanyon.dem dataset. This dataset contains a single scalar field, representing a height map of the Grand Canyon area in the US. You'll see ParaView automatically creates a default color-mapped visualization of the data.
Recall from the lectures the simple ways in which scalar fields can be visualized: color mapping (with continuous or discrete color scales), contouring and height mapping.
|
Create visualizations in ParaView for each of these techniques. Play with the settings to make things look better, for example, use your own color map. |
Hint: You'll need the Tetrahedralize filter to convert the image to a surface which can be deformed. You will then have to apply another filter to do the deformation. Consult the built in ParaView help for descriptions of available filters (Help -> Help. Then ParaView -> Filters Menu under the Contents tab). Don't forget to add a legend!
|
Try to combine the height mapped terrain with contours. By the end, you will need to explain the pipeline you used to the assistants. |
If things are getting slow, try using the Extract Subset filter. Set the sample rates to something higher than 1 to sub-sample your data. You can right-click any filter in the Pipeline Browser to change its input to the output of a different filter (like the sub-sampled version you just created).
Analyzing the data
The Filters > Data Analysis menu contains filters that create graphs based on your data.
|
Compute a histogram based on the data. |
Try increasing the number of bins. Note that around 40 bins the peak in the histogram starts to split.
|
Use Threshold filters to find the cause of this split. |
Presenting the result
As a final nice touch, let's create a simple animation showing your work. Click View > Animation View to show the animation controls. ParaView can be a bit slow when animating, so first we have to reduce the size of our data. Use the Extract Subset filter near the start of your pipeline to resample the data to a lower resolution.
The camera keyframe interpolation does not work in this version of !Paraview, so use the Follow Path mode: This allows you to modify a 3D spline in space, whoohoo!! See the relevant ParaView wiki page for more background info.
Play your animation by clicking the play button in the toolbar. You can increase the number of frames for a smoother animation. When you're happy with the result, you can save it using File > Save Animation. If you can't save the animation as an .avi movie, you can animate the separate frames with the animate utility. Simply open a terminal, go to the directory where you saved the animation frames and type animate *.jpg.
|
Present your final results to one of the assistants. |

