# IBM Visualization Data Explorer User's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

### Image

Category

Rendering

Function

Renders an object and displays it as an image.

Syntax

This module is accessible only through the user interface.

Inputs

Name | Type | Default | Description
--- | --- | --- | ---
`object` | object | none | object to be rendered and displayed
`renderMode` | flag | 0 | software=0, hardware=1
`defaultCamera` | camera | no default | the reset camera
`resetCamera` | camera | no default | reset the camera
`bkgndColor` | vector or string | "black" | image background color
`throttle` | scalar | 0 | minimum time between image frames (in seconds)
`recordEnable` | flag | 0 | enable frame recording
`recordFile` | string | "image" | file name for frame recording
`recordFormat` | string | "rgb" | file format for frame recording
`recordRes` | integer | no default | Image resolution for recording
`recordAspect` | scalar | no default | Image aspect ratio for recording
`axesEnabled` | flag | 0 | produce axes
`axesLabels` | string list | no labels | labels for axes
`axesTicks` | integer or integer list | 15 | number of major tick marks (0 to suppress)
`axesCorners` | vector list or object | input object | bounds of axes
`axesFrame` | flag | 0 | flag for axes frame type
`axesAdjust` | flag | 1 | whether to adjust the end points to match tick marks
`axesCursor` | vector | no cursor | cursor position
`axesGrid` | flag | 0 | show grid lines on background
`axesColors` | vector list or string list | appropriate color(s) | color(s) for annotation
`axesAnnotate` | string list | "all" | annotation objects to be colored
`axesLabelScale` | scalar | 1.0 | scale factor for labels
`axesFont` | string | "standard" | font for labels
`intrctnMode` | string | "none" | sets interaction mode of window
`title` | string | "Image" | Image title
`axesXTickLocs` | scalar list | no default | locations for x-axis ticks
`axesYTickLocs` | scalar list | no default | locations for y-axis ticks
`axesZTickLocs` | scalar list | no default | locations for z-axis ticks
`axesXTickLabels` | string list | no default | labels for x-axis ticks
`axesYTickLabels` | string list | no default | labels for y-axis ticks
`axesZTickLabels` | string list | no default | labels for z-axis ticks

Outputs

Name | Type | Description
--- | --- | ---
`renderable` | object | object, ready for rendering
`camera` | camera | camera used
`where` | window | window identifier for the Image window

Functional Details

This module functions much like a combination of AutoCamera and Display. However, it activates the Data Explorer direct-interaction features of the Image window, which are unavailable when you use the combination of AutoCamera and Display. These features include resizing of the image, pan/zoom, 3-D cursors, mouse-driven rotation, navigation in the image, mouse control of the look-to and look-from points, and direct user control of Image-window size. The `View Control...` dialog box (accessed from the `Options` pull-down menu in the Image window) permits explicit specification of these features.

Note: Since Image both renders and displays its input, you would not normally pass it an already existing image (because it would be interpreted as a large number of quadrilaterals). If you do have an image (e.g., previously imported or rendered by one of the appropriate modules), you should use the Display tool, without specifying a camera.

While the Image tool is only available while using the User Interface, you can implement your own interactions with an image using SuperviseWindow, SuperviseState, and Display. Thus direct interaction can be implemented from a stand-alone program using DXCallModule (see 13.10 , "Module Access" in IBM Visualization Data Explorer Programmer's Reference), from a program interacting with Data Explorer using DXLink (see Chapter 17. "DXLink Developer's Toolkit" in IBM Visualization Data Explorer Programmer's Reference), or even from a script (see Chapter 10. "Data Explorer Scripting Language" in IBM Visualization Data Explorer User's Guide). See SuperviseWindow for a discussion of these tools.

If it is installed, hardware graphics acceleration is available as one of the `Rendering Options...` in the `Options` pull-down menu of the Image window.

Usually you will use only the first parameter, `object`. The other parameters, which are hidden by default, control aspects of the image which can also be modified by various pulldowns in the menu of the Image window.

To open the Configuration dialog box for Image, you select the Image tool and use the `Edit` menu `Configuration` option.

`object` | specifies the object to be rendered.
`renderMode` | specifies whether the rendering should be software (renderMode=0) or hardware (renderMode=1).
`defaultCamera` | is the camera to be used when the `Reset` button in the `View Control` dialog box or the `resetCamera` parameter (see below) is set to 1 (one).
`resetCamera` | (when set to 1) resets the camera to `defaultCamera` if that parameter is provided, or the standard "front view" if `defaultCamera` is not provided.
`bkgndColor` | specifies the color of the image background as either an RGB color or a color-name string.
`throttle` | specifies a minimum interval between successive image displays. The default is 0 (no delay).
`recordEnable` | specifies that the created images are to be saved to a file.
`recordFile` | is the name of the file to which images are saved.
`recordFormat` | specifies the format in which the images are to be written. See WriteImage for more information.
`recordRes` | specifies the horizontal resolution (in pixels) of the recorded image.
`recordAspect` | specifies the aspect ratio (i.e., the ratio of vertical to horizontal size) of the recorded image.
`axesEnabled` | specifies that a set of axes is to be drawn around `object`.
`axesLabels`...`axesFo nt` | are (except for "axes" in the name) the same as the corresponding parameters described for AutoAxes.
`intrctnMode` | specifies one of the following as the interaction mode of the Image window:
    "camera"       "none"        "roam"
    "cursors"      "panzoom"     "rotate"
    "navigate"     "pick"        "zoom"
`title` | is the title of the Image window.
`axesXTickLocs` | specifies the list of x-axis tick locations (see AutoAxes)
`axesYTickLocs` | specifies the list of y-axis tick locations (see AutoAxes)
`axesZTickLocs` | specifies the list of z-axis tick locations (see AutoAxes)
`axesXTickLabels` | specifies the list of x-axis tick labels (see AutoAxes)
`axesYTickLabels` | specifies the list of y-axis tick labels (see AutoAxes)
`axesZTickLabels` | specifies the list of z-axis tick labels (see AutoAxes)

The first output of the Image tool (`renderable`) is the object just before rendering (including, for example, any axes attached).

The second output (`camera`) is the camera used to render `object` (including, for example, any zooms or rotations applied by direct interactors).

The third output `where` is the window identifier for the Image window. This can be used, for example, by ReadImageWindow to read back the pixels from the image.

##### Recording images displayed in the Image window

1. select `Save Image...` or `Print Image...` in the `File` pull-down menu, or
2. use the `record...` parameters (see above).

##### Caching of Objects Internally in the Image Tool

The Image tool is implemented as a macro comprising a number of modules. You can control the caching of intermediate results between these modules using the special "Internal Caching" option in the module's configuration dialog box (see IBM Visualization Data Explorer User's Guide, "Using Data Explorer Effectively".

##### How the Image Window Centers on an Object

The first time the Image tool executes after being placed on the canvas, it "centers" itself on `object`. From then on, it maintains that viewpoint unless the user explicitly changes it (e.g., by using rotate, zoom, roam, etc.). Thus, if the object is moving in space, you may at times see only part of it or even none of it. You can "reset" the camera at any time with `ResetCamera` in the `View Control...` dialog box or by using the Image parameter `resetCamera`.

##### Getting the Output Image

If you want to extract the rendered image so that, for example, you can filter it or arrange it with other images (see Filter), then simply pass the first and second outputs of Image to the first and second inputs of Render. Alternatively, pass the `where` output to the ReadImageWindow module. Using the ReadImageWindow module allows you to capture the pixels from a hardware-rendered image. Note however, that for some platforms, if the image window is obscured (by another window for example) the obscured pixels may not be present in the captured image.

##### Tracking the Image window with another window

If you want to have two images visible, and want to alternatively control the viewpoint, resolution, etc. of one of the windows while having the second window display a different object from the same viewpoint, simply use the `camera` output of the Image tool as input to the `camera` input of a Display tool. The first input of Display should be the other object you wish to view. For an example, see WindVorticity.net.

For more information on using the Image tool in the user interface, see 6.1 , "Using the Image Window" in IBM Visualization Data Explorer User's Guide. Also see Display for information under the following headings:
"Differences between Hardware and Software Rendering",
"Rendering Approximations",
"Using Default Color Maps",
"Using Direct Color Maps",
"Changing Rendering Properties",
"Gamma Correction",
"Image Caching",
"Texture Mapping"
See also Color for information on "Coloring Objects for Volume Rendering".

Example Visual Programs

Nearly every example visual program uses the Image tool. `ImageTool.net` uses the hidden-by-default parameters. `Image_wo_UI.net` demonstrates a substitute Image macro using SuperviseWindow, SuperviseState, and Display, which can be used independent of the User Interface.

See Also

Arrange, AutoCamera, Display, Render, AutoAxes, SuperviseWindow, SuperviseState

[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]

[IBM Home Page | Order | Search | Contact IBM | Legal ]