Volume Viewer

Overview

     This function allows you to view your data in a way so that a sense of the entire volume is obtained in a single image. This is contrast to the default method of looking at a volume through 2-D slices of the volume. The way this function works is by creating projections of your 3-D volume. By making several of these projections at different angles around a tilt axis and incrementally stepping through them, a better perception of the three-dimensional aspect of your data is obtained.
     The main menu controls an interactive projection window. The mouse and dials are used to rotate, translate and zoom in and out about the areas of interest. Projections can be made using various methods described below. A projection series can also be saved using the "make a movie" option.
 

Topics

Overview | Basic Steps | Options | Preload Region | Scaling |
Flipped View | Making a Movie | Erase Function | Mouse and Dials |
VolViewNet
 

Related Topics

 3DModel



 

Basic Steps

Open

    Enter a 3-D data stack either as a window number or file name. A file can be selected by using the file selection popup or by just entering it by hand. If a window number is to be entered, an initial scaling can be estimated by scaling the input window before the window number is entered. Don't worry about it too much though because the scaling can be adjusted later while looking at the projected image.
 

Out Window

    This is the window number of the output interactive projection window.  It cannot be a filename and is set by default to the next available window.
 

Flipped Data Window

     The program has an option to flip the data so that you can see it from another angle in the form of a data stack. The only reason you would want to enter a window number here is if you already have a flipped window which you want the program to know about so that it can show you the selected region in the flipped view.
 

Wave

     Select the wave(s) of data you want to view. You should be able to view multiple waves. If the reaction is slow when turning or translating, you might want to fiddle with the Sampling.
 

Time

     If you have multiple time data, the time entered as the starting time will be used for the interactive projections. If you make a movie, a series will be made for each time from start to end times.
 

Options

     The Options pulldown contains some extra functions to aid in viewing the data. Each function is described in full below.  The one option you might want to make use of before opening the output window is the "set preload region" option. If you have a huge data set. You might want to load only a portion of it at any one time to avoid so much memory swapping. You will likely want to use the scale input option soon after opening your output window as well.
 

Select Region

    Click on the Select Region function button then enter the input window to select the region. The region selected defines the input center  and the output size. You can also define these by entering them directly. When the view is turned around, it is like you have a window moving around the center point. This means your view cube can be cut out at any angle instead of just the initial input selected region.  Graphics will be drawn to the input window to show the current chunk of data being viewed. This differs from the old volume viewer which had the window staying still while the cube of data rotated. With the current method, the depth of the projection is uniform and is defined by the output z size. When a region is selected using the input window, the view angle is reset to 0,0,0.
 

Input Center

      By default, the input center will be the center of the input data volume. The center can be modified in three different ways. 1) Enter the x y z position directly into the Input Center field. 2) Use the Select Region button and select a box in the input window, which defines the center, or 3) Use the Mouse and Dials to translate your view.
 

Output Size

      By default the output size is the size of the entire input data set.  The output size can be modified either by using the Select Region button in the input window or by entering the x y z size directly into this field.  The x and y sizes determine the width and hieight of the output window and the z size determines the number of voxels factored into the projection.
 

Zoom Factor

    Zoom can be used to help with orientation when zooming out, and to improve resolution when zooming in. Zoom can be changed by entering a value by hand or by using dial 0 on the dial box.
 

Projection Method

      Select a method with which to generate your projections. There are currently five different methods. A good way to think about how these projections are created is to imagine parallel rays that shoot through your 3-D data volume. The different methods here represent the different ways that are used to sum up the values of those voxels that the ray encounters as it traverses through your 3-D data volume.

   Additive - Every voxel that a ray encounters is simply summed up to get the final value

   Maximum Intensity - Every voxel that a ray encounters is evaluated for its intensity value. The maximum intensity  value is the resulting value.
   Progressive - This function is similar to the RGB/Opacity method but opacity is calculated from the intensities for  each wavelength. In contrast, the RGB/Opacity uses a blended opacity made from all the wavelengths together in the BlendColors function.

  RGB/Opacity - Use this when your volume has been run through the function BlendColors and an opacity wavelength has been made. The benefit of using this function in conjunction with BlendColors is that you can see when a structure in one wave is in front of a structure in another wave.

The evaluation of the opacity for each voxel that a ray encounters is given by the equation:

 new running total = {[(256-opacity) * (old running total)] + [(intensity)*(opacity)]}/256

where current = current opacity of the voxel
old running total = total light reaching current voxel that coming from previous voxels
new running total = light emitted by current voxels (includes contribution both from current voxel itself as well as all previous voxels and the relative contribution from these two sources are determined from the opacity
256 = highest value for the opacity (256 = totally opaque, 0 = totally transparent)

 opacity = intensity in the progressive method otherwise it
is given by the additional opacity wavelength

An Example ... (not completed yet)
First, let's pretend that the highest value for the light is 10 and not 256 in order to do this in our head. Now, let's say you are currently calculating the second voxel in the path of the ray. The first voxel has a value of opacity 5, so the old running total is 0.5 with an R value of 1. Now the current opacity is 1 and current R = 2 so the calculation for a new running total will give you .65.

   Slicer -lets you cut into the data volume always showing the data right at the slice, instead of projecting the pixels behind it into the image
 

Sampling

      Sampling is used when rotating and translating images to try to keep the response from being unbearably slow.  When the mouse button is released, the best quality image is calculated with no sampling. When a new output size is set, the sampling is automatically set in xy and z to values that have been determined by trial and error to be reasonable, but one will likely want to play with these to get the best comprimize between image quality and speed. The number in the pulldown is simply how often voxels are counted. ie: 2 = every other voxel is calculated in.
 

Current Angle

    This field is used to input the current view angle, and to report the current  the angle as it is changed using the Mouse and Dials,
 

Stereo

    Toggle on the stereo button to see the projections in stereo pairs. Depending on if you are using the hardware stereo (wall eyed) or just crossing your eyes, the stereo angle will be set differently. Use -6.0 for wall eyed. 6.0 for cross.eyed. When the stereo view is on, the cursor becomes a stereo cursor.  A window will pop up beside the Priism panel which reports the current position of the stereo cursor in real space. There are two functions that currently make use of the stereo cursor:   the Erase function in the Options menu, and 3DModel.  Please see Mouse and Dials for info on control of the stereo cursor.
 

Status

     This field reports the current status of reads and processing.
 

Do it

     Hitting the Do it button will open up the interactive window. Once the window is open you can start using the Mouse and Dials to check out your volume.



 

Options

Preload Region

     The interactive window works by loading (and scaling) usually a bigger chunk of data then is viewed at any one time. Then the user can translate around to the various structures in this bigger data set without time being taken to load and scale each new area. By default, the whole data set is loaded in. If your data set is huge, you may want to load a smaller portion of the dataset.  Use the "Select Load Region"  button to select the region to load, the same way as is done in the main menu for the initial view region. The starting XYZ position and total XYZ size of the region to load are reported in this menu. These values can be entered directly in these fields if desired instead of selecting a box in the input window. When the correct values are set, hit "Load".  Your new load region is set.



 

Scaling

     The scale menu lets you fine tune the scaling for your viewed projection. Scaling is done by setting the minimum value selected as opacity zero and the maximum value as opacity 255. The range in between can be linear or not.  After the data is scaled, these values between 0 and 255 are used to generate the projected image. The advantage of scaling this way is that you can view clearly a region of interest and not have the background data diluting out the intensity range. A menu similar to the Scale program found on the Monitor pulldown, shows a histogram of the input data, and lets you slide the min and max position around, redisplaying the new scaling in the projection window with each release of the button.

Wave: Toggle on the wave that you want to rescale, this is the wave number from the input window.
Scl: The four values in the this field are the same as in the scale program: the first two values are min and max
         the third value determines mapping of values in between the min and max. To make this non-linear, grab
         the curve with the mouse somewhere other than on a dot and you will change the shape of the curve. The
         third value will be updated with the corresponding value. Or just enter the value you want into the field.
         the fourth value when set to zero, maps intensities above the max to 255, if 1, values above max are mapped
         to zero.
Histogram: A histogram of the data in the selected wave is shown to aid in determining the background cutoff
           To rescale, just slide left dot to the desired min position, the right dot to the max position. and change the
           shape of the curve if you want mapping of values in between  to be non-linear,
Graph MinMax: The values in this box show the minimum and maximum values shown in the graph.
Rescale all: With a big data set, reading and rescaling the entire data set each time the scale is adjusted
      might be painfully slow. So instead, the area that is updated with the new scale is just big enough so that the
      selected view region rotatedin any direction will show the new scaleing. If you have found the scaling you
      want and are going to be translating to other portions of the data, then use this button to update the entire data set.



 

Flipped View

       Selecting this from the pulldown, opens a new window and creates a flipped view of the input data. This stack of two-D sections has been rotated 90 degrees around the X axis. This is just to give you another perspective of the data. It is helpful to see the z direction of the data when trying to select a good region to examine. The Flipped Data Window field will be updated with the window number opened by this function. When a region is selected, both the input window and the flipped view will have graphics drawn to show the currently selected region.



 

Mouse and Dials

       The Mouse and Dials are used to orient your view of the data, and to control and select with the 3d_cursor when in stereo mode.
 

   Mouse control

        The Left mouse button is reserved for Selecting, either by the erase function, (in the Options pulldown) or by
          an outside program that is using the Stereo Cursor, such as 3DModel.

        The Middle mouse is used for Rotation - with the mouse in the projection window, click the middle mouse
             button and hold the button downwhile dragging in the direction you want to turn the data. You can also drag
             the middle mouse that same way in the input window  to rotate the data if the Hot Key <o> is toggled on.

         The Right mouse is used for Translation - with the mouse in the projection window, click the right mouse
            button and hold the button down while dragging in the direction you want  to translate. The <o> Hot Key also
            works for translation in the input window.

        When the view is being rotated or translated, in order to make the response fast enough, sub sampling is used.
           The sub sampling is done only while the button is held down. When the button is released, the better quality
            image is calculated.
 

         Hot Keys
             There are two keyboard keys that are used to modify the behavior of the mouse. When either of these is
              toggled on, the cooresponding on/off indicator in the main menu is turned on.
              1) "o"  - orient using input wid - this toggle modifies the behavior of the middle and right mouse buttons
                  in the input window. If it is toggled on, the middle and right mouse can be used to rotate and translate
                  using the rotating graphics in the input window. If it is toggled off, the middle and right buttons revert
                  back to their normal function in a data stack window which is to decrease and increase current section.

              2) "z" - rotate/translate in z. When toggled on, if the mouse is dragged vertically with the middle button
                   pressed, the image is rotated around the z axis. With the right button pressed, the image is translated
                   along the z axis.

                   The Stereo Cursor also changes it's action using the "z" key. With it toggled on, dragging the mouse
                    vertically with either no button pressed, or with the left button pressed, the cursor depth is changed.

   Dial Box


        Volume Viewer and the Stereo Cursor also make use of a dial box. The dials are numbered 0 - 7 from the bottom
         left to the top right. Then the following controls are assigned to each dial. Rotations and Translation axes are
         are relative to the current view angle of the projection window.
 
 

  0 : Zoom Image
  1: 3d_cursor depth control
  2: rotate about the z axis
  3: translate along the z axis
  4: rotate about the y axis
  5: translate along the y axis
  6: rotate about the x axis
  7: translate along the x axis

      Note: When changing view with dials, the sampling is used just as it is with the mouse to increase response time.
         Unlike the mouse which has the button release as a signal that rotating or translating is finished, the dials
         don't have as obvious of a signal. In the current implementation, when dial motion is finished, the image is not
         automatically updated with the higher quality image. For now, just keep in mind if you want to see the better
         image after using a dial, click the middle or right mouse button to redraw the higher quality image.



 

Making a Movie

      The movie function creates an output file that can be saved to disk. Instead of using the interactive window, a fixed number of projection images are written. The following parameters from the input window are used by this function:   1). Input Window  2) Selected Waves 3) Selected Times 4). Input Center 5). Output Size 6). Projection Method.

      The following extra parameters are entered using the Projection Series Menu:

Save
    Use the File Selection popup opened by the Save button or enter the output filename directly.

Starting Angle
    Enter the X,Y,Z angle for the first image of the projection series. If you have already been using the interactive window and currently have the window at the angle you would like to start with, the starting angle will already be set to that angle.

Angle Increment
     Enter the increment in the X, Y, and Z angles from one projection to the next. If you want to create a stereo pair series, then the Y angle increment should be set to 6 or -6.

Num. Projections
     Enter the total number of projections for one wave, time set. If a single wave and single time is processed, then
      the total number of projections created will equal the number entered, but with multiple waves or times the
      resulting number of images will be a multipie of this. ie.  With 3 times sets, and num projections set to 5, the
      angle will be incremented 5 times for each time, starting over at the original angle for the next time set. The
      resulting output file will contain 3 time sets containing 5 sections each.



 

Erase Function

     The erase function, opened from the options pulldown, gives you the ability to erase away structures that are blocking the view of the structure of interest. You can effectively dig your way into the area you want to see. The left mouse button is pressed as the cursor is dragged through the region to be erased. With the projection window, in stereo mode, the Stereo Cursor is used. The function also opens a window with a stack of 2d sections so that you can erase in 2d as well and see the results with two kinds of view.

Out
     Enter the window number or filename for creating a stack of 2d_sections with the erased data. If you want to open
     a 2d window to erase in, enter the window number and hit the open button. Any eraseing you have already done
     using the projection window will show up in the opened window. Now any eraseing done in the 2d or 3d window
      will be reflected in the other. When you are finished eraseing, if you want to save the erased dataset to a file of
      section data, you can enter a filename here then hit open/save.
 

mask_on
     As you are eraseing, you may want to just see what the data just looked like before you erased it. You can just
      toggle the erase mask on and off to view the data with and without the eraseing.

mask mode
      There are three settings for how the data can be viewed using the erase mask.

      Normal -  Both the projection window and the 2d-section window show no data on the areas that have been erased.

      Invert2d - In this mode, the projection window shows the erased data as erased, but the 2d-window is inverted so
                        that the pixels that have been erased show data, and the pixels not erased are blank.

      Invert3d - Just the opposite of Invert2d. Now the projection window is inverted so data is only shown in the areas
                        that have been erased. And now the 2d window handles the mask normally showing the data that has
                        not been erased.

draw mode
      Three are three setting for what happens when you drag on the image with the left mouse button pressed.

     Off - This just disables the mouse from erasing in case you are using the left mouse button with some other
                program at the same time.

     Erase - the erase mask updates each position hit as erased.

     Restore - data is restored at each position hit.

      When mask mode is set to invert2d or invert3d, the inverted window shows the opposite effect upon dragging
      the mouse in that window. ie. if the draw mode was erase, drawing in the inverted window, would look like
      restoring in that window. The underlying mask though, is still updated that it was an erase.

diameter
      Set the diameter of the eraser in pixels. In the 2d window, eraseing only occurs in the section you are working
      in, so the diameter only applies to the x and y direction. In the projection window, eraseing is done in three
      dimensions. The difference in pixel spacing between the x and z directon is taken into account to determine how
      thick the eraser should be in the z direction.

current group number
      You can break up your erasing session into groups of completed work. if you are happy with the eraseing you've
       done so far, you can increment the group number so that if you mess up and want to start over, you won't have
        to throw away so much work. Another reason for using different groups is when you have multiple waves.
        You may want to apply a group of erases to one wave, another group of erases to another wave, and a third
         group of erases to both waves. There are up to 7 groups allowed.

apply to wave(s)
        Toggle on the waves that you want the current group of erases to be applied to. Once you start eraseing
         you can't change the waves to apply to this group. If you want to change the waves, start another group.

restore
      When this button is pressed, the pixels that were erased in the current group are restored.



 

VolViewNet


       This is a separate program that looks and works much like VolumeViewer, but the calculations for projections are done using parallel processors. This is useful when trying to view larger volumes that would have a slow reaction time on the regular VolumeViewer. To try this program, run your normal Priism session, then start this program by typeing in the following on the command line:

VolViewNet  [ remote machine name ] [nprocessors] [machine file]

- remote machine name- for now, can be either of the two head nodes on the alphas:ds1031 or ds1032
- nprocessors-number of nodes to use for the processing
- machine file - (optional) this is a list of the processors to use (a default list is on the head node). You could also use the list in the CONFIG directory called ds.hosts or some other list you have.
 

VolViewNet currently does not handle the Erase function or the Stereo Cursor, but all other functionality should work similarly. One other difference in VolViewNet is in using the dials, when you stop turning a dial, the higher quality image is drawn. There is also an added method of viewing which is Lighting. Keep in mind that this method is very sensitive to scaling, so you'll probably need to work with the scaling function to get good images.

Dial Response:  Because every dial motion event will send a message across the network to the parallel processors, it is possible for the number of dial events to get backed up, leaving some images still to be drawn after you stopped turning the dial. Basically the higher the number, the more of these events will be thrown out, resulting in a larger angle between successive images. You just have to play with it to get the best reaction time for each different size volume.