- Volume Rendering.
Volume rendering attempts to show a scalar field as
light sources or densities with a color proportional to the scalar value at
each point.
The alogrithm does not try to construct any surfaces, but rather computes
a light distribution from each volume element.
This is sometimes refered
to as the "colored jello" technique for scalar fields. To volume render:
- Remove modules in the left branch of the program
(isosurface, showbox, selector, clipplane, switch), but leave
the color and colormap modules.
- Connect the first input of the color module to the output
of the Import module.
- Add an Options module by:
- Clicking on the Structuring Catagory at the upper-left
side of the VPE.
- Clicking on the Options item of the list in the lower-left
side of the VPE.
- Clicking to the left side of the Collect module to
place the new Options module.
- Connect the output of the color module to the options module.
- Connect the output of the options module to the collect module.
- Double-click the options module and enter the string
"color multiplier" in the first attribute field. Enter the
number 0.05 in the first value field. The color multiplier sets
the intensity range of the the volume rendering.
- Modify the color map as
shown.
The data range should be set to 0.05 to 2.0.
- Execute the program by selecting the Execute Once item from
the Execute menu.
The program should now look like
this,
(with the options dialog box open)
and
will generate a volume
image.
- Add a box around the scene.
- Add an input tab to the Collect module by selecting it with
a mouse click, then typing control-A.
- Add a Tube module by:
- Clicking on the Annotation Catagory at the upper-left
side of the VPE.
- Clicking on the Tube item of the list in the lower-left
side of the VPE.
- Clicking to the right side of the Collect module to
place the new Tube module.
- Connect the output tab of the Tube module to the new input
of the Collect.
- Connect the first output of the ShowBox module to the
input of the Tube module.
- Execute the program by selecting the Execute Once item from
the Execute menu.
The program should now look like
this,
and
will generate an
image with a bounding box.
- Put a text value next to each contour.
- Add an input tab to the Collect module by selecting it with
a mouse click, then typing control-A.
- Add a Sample module by:
- Clicking on the Realization Catagory at the upper-left
side of the VPE.
- Clicking on the Sample item of the list in the lower-left
side of the VPE.
- Clicking to the right side of the Collect module to
place the new Sample module.
- Double-click the Sample module and enter a 1 in the
"density" field of the
dialog box.
This causes the Sample module to creat just one location on
each existing coutour line.
- Add a Autoglyph module by:
- Clicking on the Annotation Catagory at the upper-left
side of the VPE.
- Clicking on the Autoglyph item of the list in the lower-left
side of the VPE.
- Clicking to the right side of the Collect module to
place the new Autoglyph module.
- Double-click the Autoglyph module and enter
"text" in the
"type" field of the
dialog box.
- Connect the output tab of the Autoglyph module to the new input
of the Collect.
- Connect the output of the Sample module to the
input of the Autoglyph module.
- Connect the output of the right-most isosurface module to the
input of the Sample module.
- Execute the program by selecting the Execute Once item from
the Execute menu.
The program should now look like
this,
and
will generate an
image with values attached to each contour line.
- Add a Colorbar.
- Add an input tab to the Collect module by selecting it with
a mouse click, then typing control-A.
- Add a ColorBar module by:
- Clicking on the Annotation Catagory at the upper-left
side of the VPE.
- Clicking on the colorbar item of the list in the lower-left
side of the VPE.
- Clicking to the right side of the Collect module to
place the new colorbar module.
- Connect the output tab of the colorbar module to the new input
of the Collect.
- Connect the first output of the colormap module to the
input of the colorbar module.
- Execute the program by selecting the Execute Once item from
the Execute menu.
The program should now look like
this,
and
will generate an
image with a color bar which relates data values to colors. The ColorBar
module has many options which may be set, including orientation, font size,
number of tick marks and data min/max.
- Reduce the field.
Sometimes you may want to reduce the data size of a field for faster rendering
or to save memory, or, occasionally, to smooth out very noisy data. The Reduce
module will average together groups of data values to produce a lower resolution
field. To reduce the field:
- Disconnect the Import module output from the left-most isosurface
module and the MaptoPlane module.
- Add a Reduce module by:
- Clicking on the Imprt/Export Catagory at the upper-left
side of the VPE.
- Clicking on the Reduce item of the list in the lower-left
side of the VPE.
- Clicking to the under the Import module to
place the new Reduce module.
- Connect the output tab of the Reduce module to the input of the
isosurface and MaptoPlane modules.
- Connect the output of the Import module to the first
input of the Reduce module.
- Execute the program by selecting the Execute Once item from
the Execute menu.
The program should now look like
this,
and
will generate an
image based on a lower resolution field. The contour lines look jaggie
because of the lower resolution.
- Data Readout using a probe.
DX supports direct interaction with an object in the image window via an module
called a "probe". This exercise is somewhat more complicated than the last
few, so the implementation description will be compressed.
- Add an input to the existing collect module.
- Add the following modules (refer to the
program for module placement):
- A Probe module from the Special catagory.
- A Construct module from the Realization catagory. Enter
a 1.0 in the data field of the Construct dialog box. This
will build a one-point field structure.
- Two Autoglyph modules from the Annotation catagory. Set the
scale field of one dialog box to 0.5 (for the Autoglyph which
is highlighted in the image above). For the Autogylph module
connected to the Map module, set the type field to
"text" .
- A Map module from the Transformation catagory. The map module
interpolates the 3D scalar field onto the the new field
created by the Construct module.
- A Color module from the Transformation catagory. Set
the "color" field in the module dialog box to
"white".
- A Collect module from the Structuring catagory.
- Connect the modules as shown in the link above.
- Select the Viewcontrol item from the Options menu in the
image window. On the Viewcontrol pop-up set the mode to "cursors".
- In the image window a box will appear. Double-click anywhere in
the box to creat the new probe location. Once created, the probe
may be dragged with the mouse. You can only drag parallel to
the projection of the principle axes .
- Execute the program by selecting the Execute Once item from
the Execute menu.
The program should now look like
this,
and
will generate an
image with a marker (glyph) for the measurement location and
the field value in text form.
- Show Isosurface Connections.
Sometimes a set of nested isosurfaces is hard to understand. A given surface
may be highlighted using this technique. Again, the
implementation description will be compressed.
- Add the following modules (refer to the
program for module placement):
- A Integer module from the Interactor catagory. While
the Integer module is still highlighted, bring the control
panel window up and choose the "add selected interactor"
item from the Edit menu, then click in the control panel
to
drop
the Integer widget. Double-click the widget and
set the range to 0 to 3 in the
dialog box.
(Since there are just four isosurfaces
in this example.)
- A Select module from the Structuring catagory. Since the isosurface
module generates a group of fields, one field per value,
the select module can pick one member of the group.
- A ShowConnections module from the Realization catagory. This
converts an object from polygonal form to a wireframe.
- A Collect module from the Structuring catagory.
- Connect the modules as shown in the program link above.
- Use the new integer widget to set a value between 0 and 3 to
highlight a single isosurface.
- Execute the program by selecting the Execute Once item from
the Execute menu.
The program should now look like
this,
and
will generate an
image with a triangle grid in the selected isosurface (in this case,
the integer widget was set to 2 to highlight the green level.)