TOC PREV NEXT INDEX

Visualization Concepts



7
Using the Data Viewers


The chapter provides detailed reference information on the DataViewer editors. AVS/Express makes these editors available by default in the SingleWindowApp and MultiWindowApp start-up applications. They are included in the Uviewer series of viewers. You can use these editors to control the rendering and display of your visualization.

This chapter discusses:

7.1 Using the View Editor

You can use the View editor to control the display characteristics of the Dataviewer display window, and to add additional scenes to the DataViewer application. When it is first opened, the View Editor looks like this:

Figure G-1


You can select the following options from the View option menu:

Table G-1
Option
Tasks
General
Options
Enabling and Disabling View Options:
double buffer, timer, update, and accelerate
Output
Specifying Display Output:
controlling the image display including the use of a frame buffer and z buffer.
Create
Creating a New View:
adding a scene to the current DataViewer application

The remainder of this section discusses the View Editor tasks.

Specifying the View Renderer, Size, and Color
Selecting a Renderer

You can use the Renderer option menu to select a renderer.: The selected renderer will be used to draw the scene for the current camera. You can choose from the following options:

Renderers that are not available on your platform are grayed out in the Renderer option menu.

If your platform includes a hardware renderer, it is used as the default. Otherwise, the default is the software renderer. If your platform does not support hardware rendering facilities, only the software renderer editor options will be available.

For detailed information about the platforms and features supported by the hardware renders, see the section on Rendering Across Platforms in the Installing AVS/Express manual.

Forcing a Display Refresh

Click the Refresh bar to force the display to be redrawn. A refresh updates any changes in the data or display characteristics.

By default, the DataViewer automatically updates the display whenever the view changes, for example if you transform an object or the data changes. You can use the Update Automatically toggle on the View editor Options panel to turn off the automatic update.

For information about the Update Automatically toggle, see Enabling and Disabling View Options on page 7-5.

Specifying the Size of the Viewer Window

You can use the Width and Height text fields to change the width and height, in pixels, of the viewer window. The default value of each is 500 pixels.

If you change the dimensions of the display window in the Single-window DataViewer application, the entire window, including the editors panel, resizes to frame the new dimensions. However, reducing the height to less than 500 pixels may cause some of the editor panel controls to be cut off.

Specifying the Background Color of the Viewer Window

You can use the Background Color Editor to change the color of the background in the viewer window:

Figure G-2


You can adjust the Hue, Saturation, and Value dials to specify the hue, saturation and brightness parameters, respectively, of an HSV color space that defines the background color of the Viewer window. An HSV color space can be thought of as an inverted cone:

0.00 = red
0.16 = yellow
0.33 = green
0.50 = cyan
0.66 = blue
0.83 = magenta

0.00 = white
0.50 = partially saturated
hue
1.00 = fully saturated hue
0.00 = black
0.50 = partially darkened
hue
1.00 = full intensity hue

For the Viewer window background color, the default settings for hue, saturation, and brightness are 0.00, and the background appears black.

By default, the background color is applied the next time the view is refreshed. Use the Immediate button to apply the color immediately.

Enabling and Disabling View Options

You can choose the View editor Options command to control a set of basic display options:

Figure G-3


You use this interface to enable and disable double buffering, the timer, and automatic updates.

Selecting Double Buffering

You can use the Double Buffer option menu to enable or disable double buffering:

By default, the view is double-buffered. If you use a software renderer, the default double-buffering is the pixmap method.
Note: On the Windows version of AVS/Express, only Single and Double options are available.
Note: The two different double buffer modes (MBX or Pixmap) are only valid for the software renderer. For the hardware renderers - OpenGL, XGL, PEX or XIL - setting either MBX or Pixmap enables hardware double-buffering.

In the software renderer, 2D cameras can be rendered using any buffer mode. However, 3D cameras in the software renderer are always double buffered since the objects in them are rendered to an off-screen frame buffer and then converted and copied to the screen.

Using the Timer to Measure Performance

You can use the Timer to get a measure of the display performance of your system to compare the performance of different system configurations or graphics adapters. The Timer calculates the frames per second generated by the display while transforming a 3D object and displays the results on the View editor panel.

To use the Timer.

1. Turn the Timer toggle on.
2. Click the Transform Object and one of the transformation icons in the viewer window tool bar.
3. "Throw" the object by pointing your cursor in the viewer window, holding down the left mouse button, and moving the cursor quickly across the window.
4. The object continues the transformation operation you selected after you release the mouse.
5. After a little while, click in the window again to stop the transformation.

AVS/Express prints the total time, total number of frames generated, and the number of frames per second in the AVS/Express console window.

Controlling Automatic Updates

You can use the Update Automatically toggle to control when the viewer window display is updated. By default, Update Automatically is on, and the DataViewer automatically updates the display whenever the view changes, for example if you transform an object or the data changes.

If you turn Update Automatically off, the view is not updated. The DataViewer queues changes until you turn Update Automatically on or Click the Refresh bar on the Option editor General panel to force the display to be redrawn.

Setting Accelerate Mode

If you turn the Accelerate option on, AVS/Express attempts to speed up rendering by storing the image of static objects. When dynamic objects are changed, AVS/Express can rendered them into buffers already containing the rendered static objects - the static objects need not be re-rendered unless they are also changed. Accelerate mode can be useful if you are moving simple objects around a complex scene, for example, moving symbols around a complex map.

You can control which objects are static or dynamic by setting the Dynamic toggle on the Object editor General panel.

Note: The performance you get from Accelerate mode can vary greatly depending on the buffering techniques used by the renderers on your platform. In some configurations Accelerate may not offer significant advantages. Be sure to test for performance improvements in your environment.

For more information about measuring the display performance of your system, see Using the Timer to Measure Performance on page 7-7

Enabling Pcache for XGL

If you are using the XGL renderer on SunOS 5 systems, you can turn Pcache on to enable pcaching. Pcaching renders using a form of display list processing. For some graphics adapters, this can result in significantly improved performance. However, this method also uses more memory and is not generally recommended. Be sure to test for performance improvements in your environment.

For more information about measuring the display performance of your system, see Using the Timer to Measure Performance on page 7-7

Specifying Display Output

You can use the Output panel of the View editor, to control output from this view:



Enabling, Flipping, and Clearing Frame and Z-buffers

Turn Enable on to enable output from this view. When you enable output,

Turn Flip on to invert the contents of the view before writing it to the buffers.

Click the Clear bar to clear the output buffers of all previously stored primitives.

Setting the Frame Buffer Type

You use the Frame Buffer Type options to specify the format that AVS/Express uses to store the image in the frame buffer. The letters in each option describe the order in which the alpha (A), red (R), green (G), and blue (B) data components are stored.

For best performance, choose the format based on the type of renderer you are using:

This is also a "canonical" format that is used by all the renderers. Use this format if you want to exchange framebuffer information between renderers.
Setting the Z-buffer Type

You use the Z Buffer Type options to specify the format that AVS/Express uses to store Z-buffer data.

For best performance, choose the format based on the type of render you are using:

Creating a New View

You can use the Create panel of the View editor to add a scene to the DataViewer application:

Figure G-4


Select New Camera Type

You can use the New Camera Type options to create the new view with a 2D camera, a 3D camera, or both.

Select Object Mode

You can use the Object Mode options to choose to create the view for New objects or for the Same objects:

Figure G-5


However, you can edit the view and camera separately for each view. This allows you to create views of the same objects with different viewpoints or rendering characteristics.
If you have a current view using both the 2D and 3Dcameras, and you create a new view with only one camera but with the same objects, the new view includes only the objects in that were in the type of camera you selected. The objects in the other camera are not included in the new view.
Create View

Click the Create View bar to create the view you have specified. AVS/Express adds a choice representing the view to the Windows menu in the DataViewer menu bar. The first scene you add is given the name View#1. If you add additional views they will be numbered sequentially.

When you add a view to the SingleWindow application, the view is created in the view window and appears in place of the display of the current view. You can page the different views to the front of the window by selecting them from the Windows menu in the menu bar. You can only edit the currently selected view.

When you add a view to the MultiWindow application, the view is created in another separate viewer window. Each window may be moved and displayed separately. To edit a view, select it by clicking in the window viewer space.

7.2 Using the Transform Editor

The Transformation Editor is an interactive tool with which you modify how a transformation is performed on a selected object.

This section discusses:

When you select Transform from the Editors menu, AVS/Express displays the following editor panel:

Figure G-1


You can transform objects in the DataViewer view window interactively by using your mouse in the window, or you can specify a transform by setting explicit values. The Transform editor options support both methods:

The transformation performed depends on two other settings in the DataViewer:

Transforming View Objects, Cameras, and Lights

You select which type of object to transform by choosing the appropriate icon from the DataViewer toolbar:

Transform Modes

You can perform four different types of transforms with the mouse. You specify a transform mode to determine which type of transform the left mouse button performs on the selected object. To set the current transformation mode, click on the appropriate icon in the viewer window tool bar:

The left mouse button rotates the selected object.
The left mouse button scales the selected object.
The left mouse button moves the selected object in the XY plane.
The left mouse button moves the selected object in the Z direction.
Specifying the Interactor Behavior

Selecting the Interactor Behavior option on the Transform editor provides the following user interface:

Figure G-2


You use this dialog box to control how your mouse interactions are interpreted in the viewer window.

Using Transformations in Local Space

You can use the Local Space toggle to transform the object in its local coordinate system rather than the global coordinate system.

By default, objects are transformed in global space. When you rotate an object, for example, you are rotating the entire coordinate system of the Top view. If you then want to rotate an object locally, around its own axes, set the Local Space toggle on.

If you turn Local Space on, the objects are transformed in their local coordinate system.

Non-uniform Scaling

By default, the scaling operation in the viewer window is uniform. When you click the scale icon in the viewer window toolbar, dragging your mouse in the viewer window scales the object equally in all dimensions. Dragging the cursor up or to the right makes the object appear larger; dragging the cursor down or to the left makes it appear smaller.

When you turn Non_Uniform Scaling on, you can scale the dimensions of the view independently. Moving the cursor up and down scales the height of the object in the current view: moving the cursor up increases the height, moving it down decreases it. Moving the cursor left and right scales the width of the object in the current view: moving the cursor to the left decreases the width, moving it right increases it.

Rotate Mode

You can use the Rotation Mode options to control how AVS/Express interprets mouse interactions in the viewer window in rotation mode. You enable rotation by clicking on the rotate icon in the viewer window tool bar.

You can choose from the following options:

XY Translate Mode

You can use the XY Translate Mode options to control how AVS/Express interprets mouse interaction in the viewer window in XY translate mode. You enable XY translate mode by clicking the Translate icon in the viewer window tool bar.

You can choose from the following options:

Setting a Transformation

When you select Transform from the Transform editor options, AVS/Express, displays the following interface:

You can use this interface to specify a precise rotation instead of directly manipulating the object with your mouse. With this dialog you can:

Transform to the Top, Front, or Side

You can use the Top, Front, and Side buttons to apply a transformation that moves the selected object to the respective position:

Transform with Absolute or Relative Values

By default, the transformation you specify is relative to the object's current position. When you open the Transform panel all transformation values are 0. When you enter transformation values, they are interpreted as delta values for the current transformation.

If you set Absolute on, the transformation you specify sets a position in the object's coordinate system. When you first toggle Absolute, the panel reports the current state of the current object: where the object is, how it is rotated, scaled, and where its center is. As you enter transformation values, they are interpreted as locations in the local coordinate system.

Set X, Y, and Z Angle Rotation

You can use the X Angle, Y Angle, and Z Angle dials to specify the degrees of rotation around the respective axis.

The values at the top of the dial show the degrees of rotation to be added to the current transform. When you release the dial the appropriate rotation is added to the object transform and the dial resets to 0. You can also enter a value in the text field below each dial.

If you are in absolute mode (Absolute is on), the dial values display the current transform for the selected object. The values you enter specify absolute degrees of rotation around the respective axis. When you release the dial, the dial does not reset, but stays at the position you set, indicating the current rotation of the object.

Set Scaling Factor

You can use the Scale field to set the scaling factor for the current object.

If you are in relative mode, the scaling factor is set to 1.00. You can enter a new scaling factor to change the size of the object in the view.

If you are in absolute mode, the scaling factor indicates the scaling applied to normalize the object from the data coordinates to the view coordinates. You can enter a new scaling factor to change the scaling from world coordinates to the Top view coordinates.

Set X, Y, and Z Translation

The translate movement along the X, Y, and Z axes. The values are specified in the selected object's local coordinate space. If Top is the selected object, this corresponds to global space, and the transformation applies to all the objects in the view.

If you are in relative mode (The Absolute toggle is off), the translation you specify is relative to the objects current position. That is, the amount of translation you specify is added to the object's current translation.

If you are in absolute mode (Absolute is on), the translation you specify defines a location in the object's local space.

Transform the Rotation Center

The center of rotation and scaling along the X, Y, and Z axes. By default, the viewer rotates the selected object about its own center. You can use the Center X, Y and Z fields to specify a different center of rotation. The location is specified in the selected object' s local coordinate system.

7.3 Using the Light Editor

The Light Editor is an interactive tool with which you can manipulate the lighting in the viewer window.

This secton discusses:

About Lighting

Two types of lighting illuminate the objects in the viewer window:

By default, both types of lighting are white in color. You can set the color of each light, including the ambient light, independently.

Lights emanating from a specific location are transformable; that is, you can change their location in the same way that you change the location of any object in the viewer window. The distance of a light from an object does not affect its intensity; there is no inverse square law at work. To make a scene brighter, you turn on more lights.

In the remainder of this chapter, the term "light" means a light emanating from a specific source. References to ambient light are always explicit.

Setting the General Light Attributes

When the Light Editor is first opened, it looks like this:

Figure G-1


You can use this dialog to perform the following tasks:

The remainder of this section describes the Light Editor tasks.

Specifying the Current Light

You use the Current Light buttons to specify the light whose attributes you want to set: Light 0, Light 1, Light 2, or Light 3. Changes you make with the General or Attributes panel of the Light editor, or with the Transform editor when you select the Transform light mode, all apply only to the currently selected light.

By default, each of the four lights is a directional light located directly in front of, facing toward, and an infinite distance away from the object. Only Light 0 is on by default.

Specifying a Light Type
Directional Lights

A directional light (the default type) is a light source whose rays all point in the same direction; that is, they are parallel. The sun is the canonical directional light source. The initial settings of a directional light are as follows:

Point Lights

A point light is a light source whose rays emanate in all directions from a particular point. A bare light bulb is the canonical point light source. The initial settings of a point light are as follows:

A point light can be inside of an object.

Note: Point lights are not supported for the software renderer.
Spot Lights

A spot light is a light source whose rays emanate from a particular point and are restricted to a 90 degree cone. A flashlight is the canonical spot light source. The initial settings of a spot light are as follows:

A spot light can be inside of an object.

You can use the Attributes option on the Light editor to set the attenuation, concentration, and spread angle of a spot light.

Note: Spot lights are not supported for the software renderer.
Bi-directional Lights

A bi-directional light is a pair of directional light sources that point in exactly opposite directions. This light is implemented as two lights. The initial settings of a bi-directional light are as follows:

When you transform a bi-directional light, both lights are moved so that they remain opposite one another.

Turning a Light On and Off

You can use the Light On toggle to turn the current light on or off. When the button is selected (depressed), the light is on; when the button is not selected, the light is off. When you turn a light off, the object at which it points is shadowed; that is, no detail appears.

Resetting the Attributes of a Light

The Reset bar restores the current light to its default position and color.

Specifying the Color of a Light

You use the Current Light Color Editor to change the color of the current light:

Figure G-2


In this interface, you adjust the Hue, Saturation, and Value dials to specify the hue, saturation and brightness parameters, respectively, of an HSB color space that defines the color of the current light. You can think of an HSB color space as an inverted cone:

0.00 = red
0.16 = yellow
0.33 = green
0.50 = cyan
0.66 = blue
0.83 = magenta

0.00 = white
0.50 = partially saturated
hue
1.00 = fully saturated hue
0.00 = black
0.50 = partially darkened
hue
1.00 = full intensity hue

For a light, the default settings for hue and saturation are 0.00 and the default setting for brightness is 1.00, and the light appears bright white.

By default, changes in the color are not applied until the display is refreshed. You can set the Immediate toggle on if you want to see the effects of the new color immediately.

Specifying Spot Light Attributes

Selecting the Attributes option for a Spot light provides the following user interface:

Figure G-3


You use the sliders in this interface to specify two attenuation values, the concentration, and the spread angle of the current light.

The possible range is from 0.00 to 10.00; the default value for both Attenuation 1 and Attenuation 2 is 1.00.
The possible range is from 0.00 to 50.00; the default value is 1.00.
The possible range is from 0 to 180 degrees; the default value is 45 degrees.
Note: These attributes only apply to spot lights.They are not active for any other type of light.
Manipulating Ambient Light

Selecting the Ambient option provides the following user interface:

Figure G-4


You use this interface to turn ambient lighting on or off and to specify its color.

About Ambient Light

By default, ambient light is on in the viewer window. The ambient light provides a uniform, nondirectional, white light throughout the view. Turning on ambient light ensures that an object will always be visible, even if other lights are not illuminating its surfaces. Turning off ambient light increases the contrast between lighted and unlighted surfaces caused by directional lights.

Ambient light has no location. When the DataViewer determines how to portray an object as lit, the value of the ambient light source is always added to the other factors determining the object's lit appearance. Because the ambient light is nondirectional and from no particular source, it does not change the appearance of an object based upon the object's normals. Therefore, if the ambient light source is the only light turned on, the object may appear as a featureless profile of itself.

Turning Ambient Light On

The Light On toggle on the Ambient panel turns ambient light on or off. When the button is selected (depressed), ambient light is on; when the button is not selected, ambient light is off.

Specifying the Ambient Light Color

You specify the ambient light color in the same way that you specify color for Lights 1, 2, and 3; that is, you adjust the Hue, Saturation, and Value dials to specify the hue, saturation and brightness parameters, respectively, of an HSB color space that defines the color of ambient light. See Specifying the Color of a Light on page 7-22, for a description of an HSB color space, including examples of the values.

For ambient light, the default settings for hue and saturation are 0.00 and the default setting for brightness is 1.00, and the light appears bright white.

7.4 Using the View Object Editor

The View Object Editor is an interactive tool with which you can manipulate the basic properties of one or more of the objects in the view.

This section discusses:

When you select Object from the Editors menu in the DataViewer menu bar, AVS/Express displays the following interface:



You use this dialog box to set properties for the currently selected object.

You can choose the following options from the Object option menu:

Specifying an Object's General Attributes

Choose General from the Object option menu to display the following dialog box:



You use this dialog to

Set Object Properties Visible, Pickable, Cached, and Dynamic
Setting the Visible Property

You can use the Visible button to control whether the currently selected object is visible or not. By default, objects are visible and the Visible button is depressed. Click the button to make the object invisible. The button appears raised.

When a object is invisible it remains in the view. You cannot select it by picking it in the view, but you can select it by using the Object Selector and then edit its characteristics even though it cannot be seen.

Note that when an object is not visible, all its children objects are also not visible. For example, if you select Top and set its visibility off, all the objects in the Top hierarchy are made invisible. You cannot make them visible again until to set the visibility of Top on again.

Setting the Pickable Property

You can use the Pickable button to control whether the currently selected object is pickable. By default the object is pickable, and the Pickable button is depressed. Click the button to make the object not pickable. The button appears raised.

When an object is pickable, you can select it by pointing at it with your mouse and pressing CTRL-MB1.

Note that when an not pickable, all its children objects are also not pickable.

Setting Cached

You can use the Cached button to control whether AVS/Express should cache the currently selected object's data. By default the object is cached and the Cached button is depressed. Click the Cached button to disable caching; the button appears raised.

Caching saves a geometrical representation of the data being rendered. The method of caching depends on the renderer you are using. Caching will generally speed up rendering of the view, but note that if an object is rendered in multiple views with different renderers enabled, there are multiple caches. If the data being rendered is large, caching can use large amounts of memory.

Setting Dynamic

You can use the Dynamic button to control whether the currently selected object is marked as static or dynamic for accelerate mode rendering. You set accelerate mode by setting the Accelerate button on the View editor's Options panel.

When accelerate mode is set on for the view, the renderer(s) store the image and Z-buffer information for static-type objects. When dynamic-type objects are changed, they are re-rendered into the buffers already containing the rendered static objects - the static object need not be re-rendered unless it is also changed.

Enable the Alternate Object

You use the Alternate Object controls to enable and configure an alternate object that can be used in place of the selected object during transformation. Using a simpler object for transformations can speed-up rendering. By default, the alternate object is disabled.

To use the alternate object, set the Enable button on. When the alternate object is enabled and you directly manipulate the object in the viewer window, AVS/Express displays the object's bounding box in place of the object. You can use the bounding box to transform the object to the position you want. When you release the mouse to end the transform, AVS/Express removes the bounding box and re-displays the object in its new position.

You can use the Render Space options, Match Camera or Force 2D, to choose how the alternate object is rendered:

Set the Transform Mode

You can use the Transform Mode options to control where the transform is calculated when you are directly manipulating the object in the viewer window. You can choose the following options:

Specifying Field Conversion Methods

When you select Field Conversion from the View Object editor's option menu, AVS/Express displays the following interface:



You can use the Field Conversion dialog to control how AVS/Express converts field data representing lines and surfaces, images, or textures into rendered objects. You can use this dialog to:

Set Line and Surface Data Conversions

When you choose Line/Surface from the Type option menu of the Field Conversion editor panel, AVS/Express displays the following dialog:



You can use the dialog to

Choose a Conversion Type

If the cell type of the field you are reading into the viewer is a triangle, quad, or polyhedron, you can use the Conversion Type options to control how the surface data is converted into a triangle strip for rendering. You can choose the following options

The Optimal conversion can produces a surface representation that is smaller, but it takes more time and uses more temporary memory than the Simple method. The bytes of temporary storage needed by the optimal conversion can roughly be calculated by multiplying the number of triangles by 240. None reudces the memory usage and can improve performance when the data is changing

Enable Chunking and Set Chunk Size

You can use the Chunking button to enable and disable chunking during the conversion of field data. If chunking is on, AVS/Express converts the data in groups rather than all at once. If you set Chunking off, the whole surface is converted in one operation.

You specify the number of primitives that are rendered in one chunk by setting the Surface Chunk and Line Chunk values:

Set Image Data Conversions

When you select Image from the Type options on the Field Conversion panel, AVS/Express displays the following interface:



You use this dialog to control how field image data is rendered into an 8-bit visual. If you use a 24-bit visual, AVS/Express directly renders the colors. You can perform the following tasks:

Choosing a Dithering Technique

You can use the Dither options to choose the Cube or Ramp dithering technique:

If you choose Cube, AVS/Express converts the scalar image values to RGB color values and then dithers them.

If you choose Ramp, AVS/Express converts the datamap to a linear ramp of color values in the system palette and then uses the ramp to convert the image values directly to pixels.

Choosing an Interpolation Type

If you choose Point, AVS/Express uses point sampling to interpolate between image values. Other interpolation options include Bilinear, Bicubic, Flat, Smooth, Point/Image, Bilinear/Image and Bicubic/Image.

Handling Missing Values and Colors

You can use the lower portion of the Image editor panel to specify scalar and color values to replace missing values in the image

Figure G-1


Use the Missing Scalar Value slider to specify a value. AVS/Express uses this value to replace areas of scalar images that are "left empty" when the image is rotated.

Use the Missing Color Editor to define the components specifying a color. AVS/Express uses this color to render areas of RGB images that "left empty" when a tiled image is rendered.

For information on using the color editor, see Set an object's colors and jitter on page 7-42

If the Immediate button is set on, the view is updated continuously as you enter changes into this editor. If you set the Immediate button off, the update is delayed until you complete the operation.

*note* this option is for 2D scenes and has no effect in 3D scenes.

Setting Texture Conversions

When you select Texture from the Type options on the Field Conversion panel, AVS/Express displays the following interface:



You can use this dialog to choose the Normal method, or to choose and configure the VLTM (Vertex Level Texture Mapping) method.

For more information about VLTM, see the section on XGL Renderers in the Installing AVS/Express manual.

If you choose Normal, AVS/Express uses its standard texture mapping mechanism. You can control how this method is applied by choosing the Texture option from the Object editors option menu. See Specifying a Texture Mapping on page 7-50

If you are using a SunOS5 platform running the ZX graphics boards with the XGL renderer, you can VLTM (Vertex Level Texture Mapping). For this method, you can choose two types of triangle subdivision:

Selecting Rendering Modes

If you choose Modes from the Object option menu, AVS/Express displays the following interface:

Figure G-2


You use this interface to specify the modes used to render the polygons that make up the current object and the object's bounding box. A separate group of modes is provided for each of the following:

Point Rendering

You use the Point Rendering option menu to select the point rendering style. The following modes are available:

Line rendering

You use the Line Rendering option menu to select the line rendering style. The following modes are available:

Surface Rendering

You use the Surface Rendering option menu to select the surface rendering style. The following modes are available:

Volume Rendering

You use the Volume Rendering option menu to select the volume rendering style. The following modes are available:

Bounds Rendering

You use the Bounds Rendering option menu to select the bounds rendering style. The following modes are available:

Normals Generation

You use the Normals option menu to select whether normals will be generated for the object. The following modes are available:

If normals are explicitly included as part of the object's data, for example as geometry data, the normals will be rendered by the viewer.
Specifying View Object Properties

When you select Properties from the Object editor's option menu, AVS/Express displays the following interface:



You use this dialog to set color and jitter properties for the currently selected object, and specific properties for points and lines, surfaces, and volumes. The following tasks are define below:

Set an object's colors and jitter

You select General from the Type option menu on the Object Properties panel to

Set the primary, secondary, and tertiary colors

You can use the Primary Color, Secondary Color, and Tertiary Color options on the Object Color option menu to specify primary, secondary, and tertiary colors for different components of the current object:



AVS/Express applies the primary, secondary, and tertiary colors you specify to the points, lines, and surfaces components of the polygons that make up the object in the order in which you specify rendering modes for them. You specify the rendering modes by selecting Modes from the Object editor option menu.

For more information about setting rendering modes, see Selecting Rendering Modes on page 7-37

Specifically, the colors are assigned as follows:

For example, if you select a mode for surfaces, then for points, and then for lines, the primary color is assigned to the surfaces, the secondary color is assigned to the points, and the tertiary color is applied to the lines. The color of the surfaces is applied to the bounding box.

The HSB color space

The color scheme used to define colors for an object is an HSB color space. An HSB color space allows you to specify three parameters that define the color: the hue, the saturation, and the brightness. You can think of an HSB color space as an inverted cone:

0.00 = red
0.16 = yellow
0.33 = green
0.50 = cyan
0.66 = blue
0.83 = magenta
0.00 = white
0.50 = partially saturated hue
1.00 = fully saturated hue
0.00 = black
0.50 = partially darkened hue
1.00 = full intensity hue

For an object, the default settings for hue and saturation are 0.00 and the default setting for brightness is 1.00, and the object appears bright white.

Set object jitter offset

You use the Jitter slider to specify an offset in the object's depth position in the view. Positive jitter values bring the object forward in the view, and negative jitter values moves the object to the back.

Jitter is useful when you want to offset an object in relation to other objects in the view in order to resolve ambiguity in rendering the depth of objects that occupy the same plane. For example, you can apply a jitter to isolines you add to a surface, or to axes you add to a slice, in order to ensure that the lines are rendered without breakup.

Note: The jitter offset only changes the position of the object in view space. It does not affect the position of the object in local or global space, or transformations that you have applied to the object. Operations such as picking or clipping are still performed based on the position of the object in global space. This can cause some unexpected results. For example, in some renderers an object that is displayed in front of another object in the view because of the jitter applied to it, may be clipped before the object that appears to be behind it.
Specifying point and line properties

When you select Point/Line from the Type option menu, AVS/Express displays the following interface:



In this interface, you assign values for the properties of the points and lines in the polygons that make up the current object. These properties are applied when you select a rendering mode that displays lines or points. You can use this dialog to set the following properties:

Specifying surface properties

When you choose Surface from the Type option menu, AVS/Express displays the following interface:



You use this dialog to set the reflectance properties of the current object's surface. You can set these properties to simulate the appearance of different materials. You can perform the following tasks:.

Set the ambient light reflectance

You can use the Ambient slider to set the ambient light reflectance. The ambient light reflectance is the proportion of the available ambient light that the object reflects. The Ambient slider specifies the proportion of ambient light the object reflects; 0 is none and 1.00 is all.

Diffuse light reflectance

You can use the Diffuse slider to specify the diffuseness of the non-ambient light. The diffuse light reflectance is the proportion of the available non-ambient light that the object reflects equally in all directions. Non-ambient light emanates from directional and point light sources, which you specify with the Light Editor. This value is used in the calculations for flat and Gouraud shading.

Intensity of the specular highlights

You can use the Specular slider to specify the intensity (brightness) of the specular highlights. Specular highlights of a particular color and brightness are created when the direction of incoming light (from a directional or point light source) is "sufficiently close" to the viewing direction.

Gloss of the specular highlights

You use the Gloss slider to specify the gloss (sharpness) of the specular highlights.The gloss is the sharpness of the specular highlights. The greater the sharpness of a specular highlight, the smaller (more focused) is its size.

Transparency

You use the Transparency slider to control the transparency of the currently selected object. The value ranges between 0.00 and 1.00. As Transparency approaches 0, the object's surface gets more transparent. As Transparency approaches 1.00, the object's surface gets more opaque.

Metal

You use the Metal slider to give the surface of the object a metallic sheen by controlling the color of the specular highlights. The slider specifies the color used to render specular highlights as a combination of the color of the light source and the color of the object. Setting the value closer to 0.00 produces specular color nearer the color of the light source. Setting the value closer to 1.00 produces a specular color nearer the color of the object.

Culling mode

The Culling Mode option menu controls how the backfacing and frontfacing polygons in the current object are drawn.

Backfacing polygons are those facing away from the user and frontfacing polygons are those facing toward the user. The direction in which a polygon is facing is determined by the order of its vertices or the direction of its vertex normals.

The following culling modes are provided (availability is renderer dependent):

Specifying volume properties

When you select Volume from the Type option menu, AVS/Express displays the following interface:



You can use this dialog to control the following volume properties

Specify the volume rendering interpolation method

You use the Interpolation option menu to specify how voxel values are mapped to rays or pixels. You can choose from the following options:

For volume mode Ray Tracer (SW renderer only) the mapping from voxels is performed at each step along the ray. For volume mode BTF (OpenGL renderer only) the interpolation from voxels to pixels uses an intermediate mapping through textured slices. For more information on BTF see 'System Prerequisites - Rendering Across Platforms'.

Specify the ray tracing algorithm

When you are using the Ray Tracer volume mode (software renderer only), you can use the Algorithm option menu to specify how data or spatial values are mapped to the ray, and how the ray values are mapped to a final color for the pixel.

Distance Normalize: When you are using the Ray Tracer volume mode (SW renderer only). and the Distance to Maximum algorithm method, you can use the Distance Normalize option menu to determine how the ray ranges are normalized. You can choose from the following options:
  • Global - The ray ranges are normalized to the diameter of a sphere enclosing the volume. This means that the normalization and datamapping are the same for all rays in all views of any given dataset.
  • View - The ray ranges are normalized to the depth of the current view. This depth is the maximum extent of the data volume projected onto the viewing direction (i.e. the length of the longest ray). The depth, and hence the normalization, will vary for each different orientation of the volume.
  • Ray - The ray range is individually normalized to the length of the ray. This means that in principle, each ray has a different normalization, but in practice, large regions of the rendering will have similar length rays, especially for large flat volumes.
Enable fat rays

For volume mode Ray Tracer (SW renderer only) this flag enables a super-sampling method that traces a single ray through a 4x4 block of pixels. The resulting image is faster to render, but of lower resolution.

Specifying a Texture Mapping

When you select the Texture from the Object editor option menu, AVS/Express displays the following interface:



You can use this interface to control how a texture is applied to the currently selected object. You can set the following properties:

Setting the interpolation method

You can use the Interpolation option menu to control how the texture map is mapped to the surface of the object. You can choose from the following options:

Each successive interpolation method produces a smoother mapping of the texture to the surface, but at a higher cost to performance. The bilinear and trilinear methods are not available on all renderers.

Setting the tile method

You use the Tile option menu to control what happens when the texture map's coordinate values are outside the 0-1 range. You can choose the following options:

Setting the texture blending method

You can use the Blending option menu to control how the texture map is combined with the existing surface of the object. You can choose from the following options:

Setting the texture map type

You can use the Type option menu to choose the You can choose from the following options:

7.5 Using the Camera Editor

You view the images in the viewer window through a camera. You can manipulate the camera to control such things as the point of view, perspective rendering, clipping planes, and depth cueing.

This section discusses:

When you select the Camera option from the Editors menu, AVS/Express loads the following editor panel:

Figure G-1


You can use this panel to select the following options from Camera option menu:

The remainder of this chapter describes the Camera Editor tasks.

Understanding the camera view

You look upon a world space through a camera. The view that the camera sees comprises the contents of the viewer window.

You can think of the camera as being mounted on an adjustable tripod; the position of the tripod defines the location of the camera in world space. Initially, the camera is located at about (0,0,12) in world space, looking toward the origin along the Z axis.

Through its lens, the camera sees a view volume. By default, the view volume is a parallel (orthogonal) viewing projection: an oblong box extending from the camera's location to infinity along the Z axis. The initial view volume is a rectangular subset of world space extending from +5 to -5 X, from +5 to -5 Y, and from +100 to -100 Z in world coordinates.

The view volume travels with the camera as it is moved about world space. Therefore, the camera has its own coordinate system, sometimes called camera coordinates. The camera is always looking from the positive Z axis of camera coordinates toward the negative Z.

When using the camera, one sometimes speaks of translating the camera, scaling it (zooming in and out), and rotating it. This terminology is somewhat misleading. What is really happening is that world space is being rotated, scaled, and translated in order to fit within the camera's view volume.

You can change how the camera views the scene in the viewer window in several ways.

The camera view and world space

Note that the camera view volume's Z=0 plane can intersect world space from any angle. This intersection is called screen space or screen coordinates. When you translate objects and lights using "direct manipulation" movements with the workstation's mouse buttons, the transformables move with respect to the camera's view volume, not world, Top, or object-level coordinates. By and large, this is a distinction that you can ignore. You will usually only notice it when you use direct manipulation on objects such as the arbitrary slicer module's slice planes or the probe module's pointer. When you move the slice plane, for example, in the Z direction, the slice plane moves straight toward or away from the camera (camera's Z axis), not along the object's Z axis.

Setting the Camera General Attributes

When the Camera Editor is first opened, it looks like this:

Figure G-2


You use this dialog box to:

Pressing Reset returns all the camera parameters to their default values.

Select the camera type

You can use Camera Type option menu to choose 3D Camera or 2D Camera.

By default, the 3D Camera is located directly above and facing downwards toward the object, at a position of about 0, 0, 12 in world space.

Make a camera pickable.

To make a camera pickable or not pickable, set the Pickable button on or off. By default the camera is pickable.

When the camera is pickable you can select objects in the view by pointing at the object with your mouse, and pressing the Control key and the left mouse button.

When the camera is not pickable, all the objects in that camera cannot be picked.

You can use this option if there are objects in the view, such as annotations or legends that should not be transformed.

Enable a separate image render pass.

Set the Image Pass button on to cause AVS/Express to render the images in 2D cameras in a separate pass. If you enable a separate image pass, images are rendered "behind" the other objects in the camera.

If you set the Image Pass button off, the renderer does not make a separate image pass. All objects in the camera are rendered in the order that they were attached to the camera.

Set normalization extents

You can use the Extents options to control how AVS/Express computes the extents of the objects when normalizing the view:

Controlling the camera mapping.

You can use the Mapping options to control how the object data in the camera is mapped to the view.

Setting the auto-normalize event.

You can use the Auto Normalize options to control if and when the objects in the camera are normalized to fit in the view.

Setting the Camera Lens
Figure G-3


Specifying the lens' viewing projection

Selecting the Camera Lens button in the Camera editor displays the following user interface:

You use this interface to switch between parallel and perspective viewing projections and to set the characteristics of the projection used.

About viewing projections

By default, the camera's lens uses a parallel (orthogonal) viewing projection. A parallel viewing projection provides a view volume that can be represented as an oblong box extending from the camera's location to infinity along the Z axis.

Turning on perspective causes the lens to use a perspective viewing projection instead. With perspective turned on, the camera's view volume changes from a rectangle to a frustum (a squared-off cone). The portions of objects in front of the view volume's Z=0 plane are uniformly exaggerated in size as they approach the camera and uniformly diminished behind the Z=0 plane.

A perspective projection gives a more real-world rendering of objects than a parallel projection. You may need to turn on perspective for your eye to be able to interpret a scene.

You can modify the degree of perspective exaggeration with the Field of View slider. Perspective also affects the apparent location of the camera. The camera seems to be much closer to the object, and its clipping planes are similarly shifted inwards.

You can make a camera appear to zoom inside an object by turning perspective on, then Z translating the camera or object with the shift-middle mouse button.

Turning on perspective

The Perspective button controls whether or not the camera lens uses a perspective projection:

Using the perspective icon

You can also turn perspective on or off in the view by clicking the Perspective icon in viewer window toolbar. By default, perspective is off and the icon looks like this:

When you click on the icon, perspective is turned on in the view and the icon changes to look like this:

Applying perspective

The Camera->Perspective command toggles between perspective and parallel viewing projections for the 3D camera. When the Perspective button is selected (depressed), the perspective viewing projection is used. When the button is not selected, the parallel viewing projection is used.

In the perspective viewing projection, the portions of objects in front of the XY-plane are uniformly exaggerated in size as they approach the camera, and are uniformly diminished behind the plane, as in the following figure.



Perspective projection attempts to approximate how the human eye views an object, and therefore gives a more "real-world" rendering of the object.

In the parallel viewing projection (the default), the object size is consistent overall: as in the following figure.



A parallel viewing projection is also called an orthogonal projection.

Setting the characteristics of the viewing projection

You use the three remaining controls, the Global Scale and Viewport Size fields, and the Field of View slider, to set the characteristics of the viewing projection.

When the object in the Viewer window is scaled, the scale factor is applied before other parameters (such as front and back clip). Therefore, if you specify a scale factor other than 1.0, you will need to scale the other parameters by the same factor to get values in world coordinates.
Viewport Size is used only in parallel projections.
Field of View is used only in perspective projections.
Setting the Camera Tripod

Selecting the Tripod option from the Camera menu in the camera editor displays the following user interface:

Figure G-4


You use this interface to specify the position of the tripod on which the camera is mounted. Specifying the tripod position defines the position of the camera in world space.

Specifying the tripod's position

You specify the position of the tripod in terms of three camera position parameters called From, Up, and At.

This point contains the X, Y, Z position of the camera in world coordinates. In both parallel and perspective projections, it defines the base point for the front and back clipping planes and the depth cueing parameters. If perspective is turned on, it is the "eye" position of the camera.
This direction vector determines the direction of the vertical axis of the camera. A line that is parallel to the Up vector in world coordinates will be drawn as a vertical line in the window. It is important that this direction vector be perpendicular to From to At (the view direction) or the camera will "shear" the objects.
This point is used in conjunction with the From point to determine the view direction (Z axis) of the camera. A line in world coordinates that connects From to At will be drawn as an end-on line directly in the middle of the camera window.
Setting the position parameters

You use the grid in the interface to set the position parameters. Each parameter requires the X, Y, and Z coordinates in world space of the point or vector. Recall that the Up vector originates at the From point, which is not necessarily the origin in world space.

Setting the Camera Clipping Planes

Selecting the Clipping Planes options from the Camera editor menu displays the following interface:



You can turn clipping on or off by setting the Clipping Planes On button. You use the sliders to specify the locations of the front and back clipping planes.

About clipping

When you turn on clipping, you activate two clipping planes that truncate the view volume of the camera. Objects in front of or behind the two clipping planes are not rendered in the view window.

When clipping is enabled, objects disappear as they move either very close to the eyepoint or very far away. When clipping is disabled, the front and back clipping planes are still present but are so distant that in most cases no front/back clipping takes place. Simply put, turning clipping off puts the clipping planes very near the camera itself and turning clipping on puts the clipping planes near the scene.

The actual location of the clipping planes depends upon how the camera has been scaled and whether a perspective projection is in use (see Specifying the lens' viewing projection on page 7-58). Clipping is defined in the camera's view volume, not in world coordinates.

Turning clipping on and off

The Clipping Planes On button turns clipping on or off. When the button is selected (depressed), the clipping planes are near enough to the scene to have an effect; when the button is not selected, the clipping planes are so distant as to have no effect.

Setting the locations of the clipping planes

You set the location of the clipping planes with the Clip Plane Positions Front and Back slider bars. When the camera is first created, the clipping planes are located as follows:

The values of the slider bars can range from 0 to 100 for either clipping plane. By default they are set to -88 and 112. You should ensure that the value of Front is smaller than the value of Back, otherwise there will be an overlap and the entire contents of the view volume will be truncated.

When using both clipping and depth cueing, note that the Front clip plane position is usually smaller than Front Depth Cue and the Back clip plane position is usually larger than Back Depth Cue.

Setting the Camera Depth Cueing

Selecting the Depth Cue option from the Camera menu in the camera editor displays the following user interface:

Figure G-5


You use the Depth Cueing On button to turn depth cueing on or off. You use the sliders to specify the location of the depth cue planes and the depth cue scaling factors.

About depth cueing

Depth cueing is a visual effect that causes lines or other objects in the camera's view volume to appear to fade into the background color as they get more distant from the viewing position. This effect enhances the illusion of three-dimensional depth in the viewer window. You can adjust depth cueing by specifying where it begins and ends and how much fading is applied.

Note: The types of objects that are affected by depth cueing depends on the type of renderer you are using. The software renderer supports depth cueing of lines. The hardware renderers that come with various systems may support depth cueing of lines, polygons, and/or spheres.

Turning depth cueing on and off

The Depth Cueing On button turns clipping on or off. When the button is selected (depressed), depth cueing takes place; when the button is not selected, depth cueing does not take place.

Setting the characteristics of depth cueing

You set the characteristics of depth cueing with the Front Depth Cue, Back Depth Cue, and Depth Cue Scale slider bars.

This value specifies the distance in front of the From point in the viewing direction (towards At) where depth cueing begins. Any objects that are closer to the From point than this distance will be drawn at full intensity.

For more information about the From, At, and Up camera positions, see Setting the Camera Tripod on page 7-61

This value specifies the distance in front of the From point in the viewing direction (towards At) where the maximum depth scale is applied.
This value is the factor that is applied to locations farther from the viewer than the Front Depth Cue plane. The scaling factor controls the rate at which the color intensity is decreased from the Front Depth Cue plane to the Back Depth Cue plane.

The following figure illustrates the relationships between the depth cueing parameters and the camera's position parameters.

Figure G-6


When using both depth cueing and clipping, note that Front Depth Cue should usually be larger than Front clip plane position, and Back Depth Cue should usually be smaller than Back clip plane position.

7.6 Using The Datamap Editor

A datamap converts scalar node data or cell data values to RGB colors.

This chapter discusses:

When you first open the Datamap editor it looks like this:

Figure G-1


You use this interface to perform the following tasks

For more information about how datamaps are specified, see Understanding Datamaps

Understanding Datamaps

The datamap controls how data values in the input data are converted into the color values that are rendered in the view. You define a range of data and specify control point colors that are associated with minimum and maximum data values. If you specify a linear color range mapping, AVS/Express interpolates a range of colors between the control point colors and assigns them to the range of data values. If you specify a step mapping, AVS/Express assigns a constant color to each step you define and assigns the color to the data points that fall in the range of the step. You can also specify multiple ranges in the data and assign control point colors to each.

You use this editor to define a range, or multiple ranges of data values, and the color model (RGB or HSV) you want to use to specify color values. Then, for each range you define the size of the range (that is, the number of color steps to use in the mapping), the color map to be associated with the range, and, optionally, a mapping for alpha values to be assigned to the data values.

For example, if you define a linear datamap with a range of data values from 0 to 255 and a colormap with red as the minimum color and green as the maximum color, AVS/Express renders input data values of 0 as red, input data values of 255 as green, and calculates an interpolated color value between red and green for data values between 0 and 255. This describes the DefaultLinear colormap included in the editor:



The following figure shows the DefaultStep color map:



You set the color for each step by specifying the color of the control point at the low end of the step's range. In the example above,

You could also define a constant mapping that assigns a single color value to all the data value in a range.

Specify a Data Range

You use the following controls in the top portion of the Datamap editor panel to specify and edit the range of data you want to map.

Figure G-2


In addition, you use these controls to specify whether you want your changes to be immediately visible in the view. If you set the Immediate button on, AVS/Express updates the view as you make changes. If you set Immediate off, AVS/Express does not update the view with your changes until you signal you are done by closing the Datamap Editor.

Setting the data range and subranges

The Min and Max fields display the minimum and maximum data values in the current data set. You can create subranges within this range by using the Add Range button.

Adding a data range

If you want to specify subranges within the range defined by Min and Max, click the Add Range button. The range added is after the last range. When you define more than one range, AVS/Express enables the Current Range slider in this panel. You use this slider to select the current range you want to edit.

To delete a range, select it in the Current Range slider and click Delete Range.

Specifying the range of data to be mapped
Edit subrange data mapping

If you select Data from the Edit option menu, AVS/Express replaces the range sliders with Data Min and Data Max sliders:



You use the Data Min and Data Max sliders to specify the data values to map to the current range. You can use these sliders to precisely control rendering by limiting the data values to be mapped to this subrange of the datamap.

AVS/Express clamps the data values for this subrange to the limits you define for Data Min and Data Max. If you define a datamap range that is smaller than the range of values in the data, AVS/Express sets data values below the minimum value to the minimum color value, and data values above the maximum value to the maximum color value.

Setting the data range

The range you define using Min and Max does not need to cover the entire range of your data values. AVS/Express clamps the data values to the range or ranges you define. Specifically, if you define a datamap range that is smaller than the range of the data values, AVS/Express sets data values below the minimum value to the minimum color value, and data values above the maximum value to the maximum color value. If you have defined multiple data ranges, AVS/Express sets data values that fall between the ranges to the color of the minimum value of the range above.

Editing the range and data

To control the size of the currently selected datamap range or define a sub-range, select the range you want to edit in the Current Range slider and then choose Edit Range/Data from the Options menu. AVS/Express displays the following set of controls:

Figure G-3


You use this interface to

Set the range size

You use the Range size slider to specify the number of discrete steps AVS/Express uses to calculate colors for this range

Set subrange values

If you select Sub-range Values, AVS/Express enables the two sliders, Range Min and Range Max. You can use these sliders to define the minimum and maximum values of sub-range currently selected in the Current Range slider above. You can define a separate size for the subrange within the datamap range to provide a more precise rendering over a portion of the data.

Defining the Color Mapping

You use the following controls in the top portion of the Datamap editor panel to specify and edit the colors you want to map to the data.

Figure G-4


To define the colors that AVS/Express uses to render data in the current range, you use this interface to:

Choose the color model

By default, AVS/Express uses the HSV color model to specify color in the datamap editor. When you open the Datamap editor, the color model option menu is labeled HSV. It is located in the center of the panel, just below the datamap display.

To change color models, use the color model option menu to choose RGB. When you choose RGB, the sliders you use to set colors when you select the Edit Color option, set Red, Green, and Blue color values instead of Hue, Saturation, and Value.

Note: When you change from HSV to RGB, AVS/Express does not convert the values to maintain the same colors in the new model. The current HSV values are interpreted as RGB values.When you switch color models you will need to redefine the control point colors.
Select the current control point

To define the colors to map to the data values, you specify colors for "control points" in the data range. You choose the control point to set by selecting it on the Current Control Point slider. The number and location of the control points depends on whether you choose a Color Range Mapping option of Linear or Constant. You set this option on the Edit Color panel.

For Linear mappings, you define two points for each range. The lower control point specifies the color assigned to the minimum data values; the higher control point specifies the color assigned to the maximum data value. AVS/Express interpolates between these colors to generate a ramp of colors to assign to the data values in between. You can control the number of color values AVS/Express calculates by setting the Range Size.

For Constant mappings, one color value is assigned to each step in the range. You control the number of steps by setting Range Size. To set the color for each step in the data range, set the color for the control point associated with the step. The color is assigned to all the data values that fall within that step's range.

Edit the control point color

After you have selected the control point you want to edit, select Edit Color from the Options menu. AVS/Express displays the following editor panel:



Setting a linear color

The Color Range Mapping editor panel for a Linear mapping displays a slider for each color component: Hue, Saturation, and Value; or Red, Green and Blue. You use these sliders to define the color you want to map to the currently selected control point in the current range. AVS/Express uses the color values you assign to the control points, and the number of steps you have specified in Range Size to interpolate a set of colors for the datamap and to assign them to the data values in the range.

Setting a constant color

The Color Range Mapping editor panel for a Constant mapping displays the same sliders. However, each step in the data range is assigned a single color, and you specify a color for each step by setting its control point. AVS/Express assigns this color to all the data values within that step in the currently selected range.You set the number of steps by setting Range Size.

Defining the Current Alpha Map

To define an alpha mapping, select Edit Alpha from the Options menu. AVS/Express displays the following set of controls:

Figure G-5


By default, the Datamap editor displays the controls for a Linear alpha mapping. To define a linear mapping of alpha values, use the slider to define the alpha value you want to associate with the current control point. Select another control point to define the range. AVS/Express uses these values to interpolate alpha values for the data range.

If you want to define a constant alpha value for the entire range, select Constant from the Alpha Range Mapping option menu.

Reading Datamap Files

To read the AVS/Express pre-defined datamaps or AVS5 *.cmap files, choose Input/Output from the Options menu. AVS/Express displays the following interface:



You can use this interface to

Read default AVS/Express datamaps

When you select Read Datamap from the Action option menu, AVS/Express displays the following dialog.



You use this dialog to select an AVS/Express default datamap by name. Select the name of the datamap you want to read, and click Apply to load the datamap and leave the dialog box open, or OK to read the datamap and close the dialog box.

All the default datamaps are defined in the HSV color model.

You can choose from the following datamaps:

Read AVS/5 *.cmap files

Choose Read AVS5 Colormap from the Action option menu to read colormaps written in the AVS5 *.cmap format. AVS/Express displays a file browser that you can use to select the colormap file you want to read.

By default, the file browser opens to a default directory your AVS/Express installation directory containing a set of default *.cmap files. If you have stored colormap files in another location, you can use the file browser to navigate to them and select them by file name.

7.7 Using the Graph Editor

The Graph Editor is an interactive tool that you can use to edit the layout and data of graph objects connected to the 2D port of a UViewer or UViewer2D object.

This section discusses:

The Graph option on the Editors menu is available when you are working in a view that includes a graph object. When you select Graph from the menu, AVS/Express displays the following interface:

Figure G-1


Selecting an option from the Graph option menu displays the editor controls for those graph characteristics.

Setting the Graph Title

When you select Title from the Graph options menu, AVS/Express displays the following dialog box:

Figure G-2


The title is a text string that appears above the graph. You can use this interface to

Turn the title on and off

The Show Title button turns the display of the title on or off. When the button is selected (depressed), the title is displayed in the viewer window; when the button is not selected, the title is not displayed (the default).

Set the text and appearance of the title

You specify the title's text and appearance by selecting values for:

For example, if the X axis is 20 units long and the Y axis is 15 units long, specifying 2 for Title Height provides a line width of 3 units.
courier
helvetica
helvetica-bold
roman-complex
roman-duplex
roman-italic
roman-simplex
script-complex
script-simplex
times-bold
Please note that font names are case insensitive and that spaces and dashes are ignored; for example, "roman-italic" is identical to "Roman Italic".
Setting the Graph Properties

When you select Properties from the Graph options menu, AVS/Express displays the following interface:



You can use this interface to

Select the current graph

if you have more than one graph object in the viewer, you use the Current Graph slider bar to specify which of the graphs in the viewer window is the current graph. The graphs are numbered in the order in which they are added to the view.

The current graph is the graph to which AVS/Express applies the changes you make in the Graph editor.

Set the drawing priority

You use the Drawing Priority slider bar to set the drawing priority for a selected object in the graph. The default drawing priority for all objects in the graph is 0

All objects in a graph have a priority that determines the order in which they are drawn by the renderer. The DataViewer draws objects with higher priority last, so they appear in front of objects drawn in the same location. For example, if you select the Y ticklines and assign them a higher drawing priority than the data points in the graph, they will appear in front of the data points.

Select the graph type

You use the Graph Type list to select the graph type for the current graph. You can choose from curve (the default), bar, barlines, scatter, area, staircase, or stairarea.

Set the appearance of the data points

You specify the appearance of the data points in the graph by selecting values for the Color +, Color -, Baseline, and Legend fields.

You can use the Color +, Color -, and Baseline fields to mark a threshold in the data:

You can supply either an X11 color name, a "#rrggbb" color format, or one of three special strings: background, antibackground or transparent. For more information about setting colors, see Specifying Colors In The Graph Editor on page 7-93
Setting the Graph Style

When you select Style from the Graph options menu, AVS/Express displays the following interface:



You use this interface to specify the style characteristics of current graph. Only the characteristics that apply to the current graph's type are available. Characteristics that do not apply are grayed out.

You can set the following characteristics:

For example, if the X axis is 20 units long and the Y axis is 15 units long, specifying 2 for Line Width provides a line width of 3 units.
For example, if the distance between adjacent X values is 2 units, specifying 0,75 for Bar Width provides a bar width of 1.5 units.
Specifying Axes

You can select X Axis or Y Axis from the Graph option menu to change the layout and appearance of the graph axes. For example, selecting X Axis displays the following interface:



You use these interfaces to turn the display of the X and Y axes on and off and specify their appearance.

Turning axes on and off

The Show X Axis and Show Y Axis buttons turn the display of the axes on or off. When the button is selected (depressed), the relevant axis is displayed; when the button is not selected, the axis is not displayed (the default).

Changing the appearance of the axes

Specifying the appearance of the axes includes specifying values both for their labels and their numbering systems.

The label for the X axis appears beneath the graph and the label for the Y axis appears to the left of the graph. You specify the text and appearance of a label by selecting values for the Text field, and the Label Height and Title Height slider bars.

You specify the numerical characteristics of the axis by selecting values for the Min, Max, and Step fields, and in the Axis Scale window.

You can use these values to select a subset of the data as input for the axis. For example, you can narrow the range of 0-100 to 25-75 for a better examination of the data between these points.
Specifying Ticklines

You can select X Ticklines or Y Ticklines to control the placement and appearance of axis ticklines. For example, selecting X Ticklines displays the following interface:



You use these interfaces to turn the display of X and Y ticklines on or off, specify the drawing priority and the appearance of the ticklines, and subdivide the axis into smaller increments.

About major and minor ticklines

There are two types of ticklines: major and minor.

When you turn the display of ticklines on or off, you add both types to, or remove both type from, an axis. You cannot choose to turn one type on or off but not the other.

Turning the ticklines on and off

The Show Ticklines buttons turn the display of ticklines on or off for the relevant axis. When the button is selected (depressed), the relevant ticklines are displayed; when the button is not selected, the ticklines are not displayed (the default).

Drawing priority

You use the Drawing Priority slider bar to set the drawing priority for a selected object in the graph. The default drawing priority for all objects in the graph is 0.

All objects in a graph have a priority that determines the order in which they are drawn by the renderer. The DataViewer draws objects with higher priority last, so they appear in front of objects drawn in the same location. For example, if you select the Y ticklines and assign them a higher drawing priority than the data points in the graph, they will appear in front of the data points.

Changing the appearance of the ticklines

To specify the appearance of the ticklines, you use the Type option menu to select whether you want to edit the major or minor ticklines and then:

For information about specifying colors in the graph editor, see Specifying Colors In The Graph Editor on page 7-93.

Subdividing an axis into smaller increments

An axis is divided into increments using the Step parameter of the X Axis and Y Axis interfaces (see Changing the appearance of the axes on page 7-88). As noted previously, major ticklines mark those increments. You can subdivide the portion of an axis between major ticklines into smaller increments by specifying a value greater than zero for the Minor Tick Count slider bar. The Graph editor adds the specified number of minor ticklines between each adjacent pair of major ticklines, spacing them evenly.

Specifying the Appearance of the Legend

When you select Legend from the Graph option menu, AVS/Express displays the following interface:



You use this interface to turn the display of a legend for the graph on or off and specify its appearance. Unlike the title for the graph, you specify the position of the legend.

Turning the legend on and off

The Show Legend button turns the display of the legend on or off. When the button is selected (depressed), the legend is displayed in the viewer window; when the button is not selected, the legend is not displayed (the default).

Text and appearance of the legend

You specify the legend's text and appearance by selecting values for the Title, Columns, X Origin, and Y Origin fields; and the Title Height and Label Height slider bars.

Specifying Contour Graph Characteristics

If you select Contour from the Graph option menu, AVS/Express displays the following interface:



You use this interface to the specify the contour type, the number of classes of contours, and the range of data that each class represents.

Specifying Colors In The Graph Editor

Many DataViewer editors include commands that require a color specification. You can specify the value as an X11 color name, "#rrggbb" color format, and three strings with special meaning.

In the "#rrggbb" format, rr, gg, and bb specify the hexadecimal representations of the values for the red, green, and blue color components, respectively. For example, "#ff0000" is red.

The special strings are as follows:

The following list shows the Xll color names. Please note that X11 names are case insensitive and that spaces are ignored; for example, "lightslateblue" is identical to "Light Slate Blue".

Table G-1
aliceblue
dimgrey
lightslategrey
peachpuff
antiquewhite
dodgerblue
lightsteelblue
peru
aquamarine
firebrick
lightyellow
pink
azure
floralwhite
limegreen
plum
beige
forestgreen
linen
powderblue
bisque
gainsboro
magenta
purple
black
ghostwhite
maroon
red
blanchedalmond
gold
mediumaquamarine
roybrown
blue
goldenrod
mediumblue
royalblue
blueviolet
gray
mediumforestgreen
saddlebrown
brown
green
mediumgoldenrod
salmon
burlywood
greenyellow
mediumorchid
sandybrown
cadetblue
grey
mediumpurple
seagreen
chartreuse
honeydew
mediumseagreen
seashell
chocolate
hotpink
mediumslateblue
sienna
coral
indianred
mediumspringgreen
skyblue
cornflowerblue
ivory
mediumturquoise
slateblue
cornsilk
khaki
mediumvioletred
slategray
cyan
lavender
midnightblue
slategrey
darkgoldenrod
lavenderblush
mintcream
snow
darkgreen
lawngreen
mistyrose
springgreen
darkkhaki
lemonchiffon
moccasin
steelblue
darkolivegreen
lightblue
navajowhite
tan
darkorange
lightcoral
navy
thistle
darkorchid
lightcyan
navyblue
tomato
darksalmon
lightgoldenrod
oldlace
turquoise
darkseagreen
lightgoldenrodyellow
olivedrab
violet
darkslateblue
lightgray
orange
violetred
darkslategray
lightgrey
orangered
wheat
darkslategrey
lightpink
orchid
white
darkturquoise
lightsalmon
palegoldenrod
whitesmoke
darkviolet
lightseagreen
palegreen
yellow
deeppink
lightskyblue
paleturquoise
yellowgreen
deepskyblue
lightslateblue
palevioletred
 
dimgray
lightslategray
papayawhip
 


TOC PREV NEXT INDEX