Tutorial on ParaView

From bone.wiki
Revision as of 19:46, 21 June 2010 by Enodwell (talk | contribs)
Jump to navigation Jump to search

Purpose

This is a tutorial that will demonstrate how to use ParaView to examine AIM file.

This tutorial was done on OS-X, but should be essentially similar for Windows or Linux, with some minor differences.

Prerequisites

You'll need ParaView built with the bonelab extensions. You should be able to find in on the server mike . On OS-X, click on this link: afp://mike.kin.ucalgary.ca/Data0/Software/ParaView_with_extensions/ . On Windows, enter \\mike\Data0\Software\ParaView_with_extensions in an Explorer address bar. In either case, you'll need to be on the university network.

You can find the data file used in this tutorial, SAWBONE51_BC_CSTR.AIM on the server mike at /Data0/Tutorials/ParaView_and_vtkski .

Background Material

  • There is a book on ParaView floating around the lab that will be useful if you want to learn more.

Model Overview

The file SAWBONE51_BC_CSTR.AIM contains a scan of bone with a screw in it. The data has been processed so that the screw has material type 127, and the bone 126.

Examining the AIM file with ParaView

Open ParaView. Click File->Open, and browse to SAWBONE51_BC_CSTR.AIM . Click OK. Our custom version of ParaView with bonelab extensions is able to open AIMs, but it may inquire about the file type, as shown in the following dialog. Just select "AIM File" and proceed.

File:Open data with.png

Click the Apply button in the Object Inspector. You should see the following, which is so far only the outline of the bounds of the data.

File:Paraview open aim.png

In order to convert this data, which is a 3D matrix with position information (called an "Image" in VTK and ParaView) to something that can be rendered, a number of different filters can be used. We are going to use the Threshold filter. You can find this at the menu item Filters->Common->Threshold . There is also a button for it on the toolbar. Click it. Now in the Object Inspector, set the Lower Threshold to 1. (If you keep the default value of 0, you just end up rendering a box with the size of the bounds of the data.) Now hit Apply.

File:ParaView Threshold AIM.png

We still don't see much! Why not? Well, this is such a large data set, that ParaView has decided to render just the outline for now, to save time. To see the object, go to the Display tab of the Object Inspector, scroll down to the Style box, and change the Representation to Surface. Voila!

File:ParaView Change Representation.png

You can click and drag on the image to rotate it. You can also right-click and hold down shift and control, with different effects. We are now going to show only the screw, which can be identified as material 127. Make sure the Threshold filter is selected, then select the Properties tab in the Object Inspector, and set both Lower and Upper Threshold to 127, as shown. Also in the Display tab, I have scrolled to the Color box, and clicked on "Set Solid Color" to make the screw blue.

File:ParaView Blue Screw.png

Now we are going to show the bone as well. Make sure that SAWBONES51_BC_CSTR.AIM is selected in the Pipeline browser, then click on the Threshold button to create a second Threshold filter. Change its Lower and Upper Thresholds to 126, then click Apply.

File:ParaView screw and bone.png