IM

How to use spyglass

Note (9/1/2016): Although the Spyglass software no longer exists,
the idea of slicing through a 3D *sds.HDF file format data set is still useful.

Opening a file | Using Transparency | Opening an binary or ascii file | Making a animation | How to use Transform

The data set used in the following section of the tutorial is a data file from a CT scan of a turbine-fan. A CT scan was to detect cracks or imperfection in the turbine fan. We will investigate the 3D gradients in density using Dicer and point out some of the major features of Dicer. For more about the turbine-fan data set.

Click to DOWNLOAD fan_64_sds.hdf.

Open the fan_64_sds.hdf file in Spyglass Dicer.

When you open the HDF file fan_64_sds.hdf, the table below requests additional information before the 3D figure can be drawn.
  • Click on 'Survey' to have Dicer scan the data for the maximum and minimum values. When using your data set, make sure these values match what you anticipate they will be - otherwise you may have a problem with your file format.
  • Click on 'Use Survey' to set the min and max to the scanned values.
  • Click on Zoom and make the Pixels increase to around 100, or higher (a good viewing size), for each dimension . For this example the following pixel sized were used: 128 for Dim0, 128 for Dim1, and 124 for Dim2.
  • Click on 'OK' and the table will be replaced with what appears to be an empty room.
  • The figure first appears empty until we click on one of the orthogonal plane icons.
  • Move the mouse into the viewing area.
  • Click and hold down the mouse button.
  • Move the dotted plane until the desired location is obtained. The information in the plane is drawn when the mouse button is released. The plane can be moved again by using the tongs.

    If the first three planes are located up against the two walls and the floor, we see only the shaft on the left most wall.

    Additional planes can be drawn in a similar fashion. Typically, as each new plane is chosen, we gain new information which affects how we choose the next plane or to modify the location of previous planes. However, we start to lose information with too many planes. In this instance, the transparency feature is helpful.

    Choosing three or more planes gives the viewer sufficient information to interpret, analyze and, perhaps, discover new information. Here we show the location of embedded flaws near the center line "rotation axis" of the turbine shaft. From a fracture mechanics viewpoint, the location and size of these flaws may or may not be significant. Still, we can use this information as input to a finite element computer program where we can complete the analysis.

    Dicer possesses many more features which can be learned at this point by trial and error. We will introduce you to just a few more. After this exercise we encourage you to experiment on your own with other data sets.

    One of the most useful features is transparency. Information is lost by drawing too many planes. We can select a particular color representing a given numerical value of physical significance. For example, the physically significant quantity removed here was air.

    You have probably noticed that the turbine fan blade is not oriented as originally defined. Interestingly, the HDF file created by the FORTRAN program m_sds_hdf.f was changed by the order that the data was written to file fan_64_sds.hdf . However, if we view the data stored in the file fan_64.bin (which was created by the C program from the same ASCII file fan_64.ascii) we will observe the data in yet another orientation.

    We will also take this opportunity to show you two other ways to load binary data into Dicer. (To load an ascii file into Dicer you must first convert it to binary using Spyglass Data Utility).

    Click to DOWNLOAD fan_64.bin or fan_64.ascii.

    Start Dicer and open the file fan_64.bin in folder 64.

  • Choose 'byte' from the Data Type box with your mouse and change dimensions on Dim0, Dim1, and Dim2 to 62, 64, and 64 respectively. Recall that the data in the file fan_64.ascii was generated in the opposite order. Also notice the short, long, and floating point binary data choices.
  • Click on 'OK' and the same File Parameter table appears as before.
  • Configure this table the same before.
  • Now lets try something different. Lets fill up the entire volume instead of choosing a few planes.

    From the menu along the top bar:
    - under file: load all data
    - under paint: transparency
    - under special: solid fill

  • Choose the solid icon and with the mouse select the far left wall to map out the desired plane dimensions. Press "9" without releasing the mouse button. Pull the plane to the right to define the volume. This procedure requires some practice. When you release the mouse button the volume should fill with color: purple is the lowest density "air".

  • Select the screen icon and erase away the "air" (purple-dark blue).
  • Another convenient way to load binary byte data without choosing the array dimensions is to append the filefan_64.bin with the array dimensions. That is, rename the file to fan_64.bin(62x64x64) and information in the filename is used automatically to load the dimensions of the file the user goes immediately to the File Parameter table.

    The FINAL Dicer feature we will show you is how to generate and play back an animation sequence.

    Start Dicer the same as before.
  • Open file fan_64.bin(62x64x64).
  • Click OK on generic file format table and the File Parmeter table appears.
  • Configure this table the same as before.
  • Choose two horizontal planes: one at the very top and one at the bottom (see below.)
  • Choose 'Select All' under Objects in the main menu and the table below appears.
  • Choose 'Save Image Sequence' -> 'Slices' under File in the main menu and the table, shown below, appears.
  • In the 'Total number of frames:' box type in 10 frames total, choose PICS file, and click on Generate.
  • When the sequence is completed, the table on the next page appears and requests a filename.

    Do not change the Output File Name.
  • Click on Save.
  • Choose Open from File in the main menu to play back open Dicer Animator.
  • Open the file fan_64.bin(62x64x64)-pics from the 64 folder. The animation should appear in the upper left corner.
  • Select 'Forward' under 'Actions' of the main menu to play the animation

    Procedure:
    Learning about Transform.

    You will now learn how to use Spyglass Transform for the analysis and interpretation of two-dimensional (2D) data sets. We will introduce you to some of the many features in Transform. For this introduction we will choose the 30th plane from the hdf file fan_64_sds.hdf .

    Start Tranform:

    • Import the 3D file fan_64_sds.hdf.
    • Select the Y-Z plane.
    • Change the Slice Number to 30
    • Click on 'OK'.

    A table of numbers, shown below, will appear. To expand this table:
  • Drag the lower right corner to the right side of the screen.
  • Choose 'Generate Image' from 'Image' in the main menu. The image and expanded table are shown below.
  • Typically you would create a rasher-image-set (ris) hdf file for your 2D data set, but here we chose to show you how to extract a 2D plane form a 3D hdf data set. You can also load the other binary data sets in the same folder. The newest version of Transform also allows you to open ASCII data type files. Also available from NCSA are two public domain software graphic tools, Image 3.0 and Datascope, which have similar features.

    Notice that the highlighted numbers in the table match the rectangular box (see arrow) in the grayscale image. You can expand the table as large as you CRT can accommodate. With this tool you can recover your data quantitatively. You can also generate contour, line graph, wireframe-surface, shaded-surface, and color-bar. Try each type of graphic tool. This Tile feature is consistent with Tufte's definition of good graphic practice using "small multiples".

    The figure above was generated by choosing 'Line Graph' from 'Image' in the main menu. Pick a cluster of numbers in the table where there is a small gradient (continuous change) in density and you will notice that in the same grayscale region you will not be able to see any gradient. However, the human eye can not see all 256 shades of gray mapped to the CRT, hence we need these other tools to reveal significant information.

    Next we will contour plot from the same data.

    • Select 'Contours' from 'Image' in the main menu and a table appears as shown below. There are a number of options but the parameter that always needs to be changed is the number of contours levels.
    • Change the number of contour levels to 20.
    • Choose the dashed lines for zero options and click on 'OK' and the contour image of the same data appears below.

    Notice that the same rectangular region appears for comparison with the other graphs and for comparison we have changed the color table from grayscale to rainbow. You can label these lines with their numerical equivalent.

    Next we can create an interactive wireframe plot. Although this plot at first appears to be rather course, the trade-off here is for speed of plotting. Once you find the view point of interest you can increase the resolution as desired by choosing higher resolution in the lower right box. Below we show only two of the many choices. The figure below on the left first appears when you hold down the mouse button and rotates with the movement of the mouse. When you let go of the mouse button the wire-frame image at the right appears.

    For higher resolution we chose the 'Hi-res Framed Color Surface Plot'.

    The final figure show the result of choosing the 'Tile' under 'Window' of the main menu.

    The main body of the Spyglass tutorial section was taken from Exersize#6 for ESM5984 class, here at Virginia Tech.




    Last revised July 18, 1996
    http://www.sv.vt.edu/class/surp/surp96/laughlin/stat/3D_tutor/3D_tutor.html