This chapter describes in detail some of the modules you are likely to use often, as well as a few of the more complex modules. It explains how to:
create a colormap
generate various types of lattices
slice volumetric data
display and manipulate images
use Render to visualize your data
create loops in maps
create a single executable process from a group of ImageVision Library (IL) modules
Once you have data in IRIS Explorer, you can perform many operations on it to make the visualizations more meaningful and easier to interpret. For example, you can emphasize areas of common density or intensity by redefining the color palette, or examine more closely a specific subset of the data by cutting into, or slicing, the larger dataset. You can also examine the relative density of data points within a dataset by drawing graphs to show their distribution.
When you have a geometric object, or scene containing several objects, displayed in the Render window, you can move, highlight, and otherwise manipulate the objects in many ways to provide you with new insights into the nature of your data. You can also animate an object and record its movements for later display.
Loop controller modules provide you with a means of constructing single and nested loops in your maps. For example, you may need a loop to capture successive frames in an animation sequence.
There are many operators for processing images, embodied in the ImageVision Library modules listed in Table 3-1 under Process Images. You can display and record these processed images in DisplayImg.
The modules supplied with IRIS Explorer vary widely in function and complexity, providing you with the means to manipulate and process data in many different ways. More information about specific modules is available in these places:
Table 3-1 lists some of the modules grouped according to function.
The IRIS Explorer Reference Pages list all modules alphabetically and set out the specifications of each one.
Not all the modules listed are available on all systems. The IRIS Explorer Reference Pages indicate the modules available for general distribution.
A selection of modules is listed by function in Table 3-1.
|Module Function||Module Names|
|Read data in or create it from scratch||ComposePyr, GenerateColormap, GenLat, MopacView, Read2Da, ReadAudio, ReadAVS, ReadAVSfld, ReadAVSimage, ReadAVSucd, ReadAVSvol, ReadGeom, ReadHDF, ReadImages, ReadImg, ReadLat, ReadMovieBYU, ReadNTF, ReadPDB, ReadPhoenics, ReadPyr, WaveFormColormap|
|Process images||AbsImg, AddImg, AndImg, BlendAlphaImg, BlendImg, BlurImg, CompassAngleImg, CompassDirImg, CompassImg, ComplementImg, DivImg, ExpImg, ForwardFFTImg, FourierConjgImg, FourierCrossCorrImg, FourierDivImg, FourierExpFltImg, FourierGaussFltImg, FourierMagnitudeImg, FourierMergeImg, FourierMultImg, FourierPhaseImg, FourierPwrImg, GaussBlurImg, GrayScaleImg, HistEqualImg, HistNormImg, HistScaleImg, InverseFFTImg, LaplaceEdgeImg, LogImg, MaxFltImg, MaxImg, MedianFltImg, MinFltImg, MinImg, MultImg, NegImg, OrImg, PowerImg, PseudoColorImg, RankFltImg, RobertsEdgeImg, RotZoomImg, SGIPaletteImg, SharpenImg, SobelEdgeImg, SqRootImg, SquareImg, SubtractImg, ThreshImg, XorImg|
|Generate data from other data||AtomicSurf, ChannelSelect, ClipPyr, CropPyr, DiffLat, DisplaceLat, Gradient, Gradient3D, Interpolate, LatFunction, LatToPyr, MagnitudeLat, MinMax, Mixer, MultiChannelSelect, MultiSlice, OrthoSlice, OutLine, ProbeLat, PyrToLat, Ruler, SampleCrop, SamplePyr, ShrinkPyr, ScaleLatNode, Shell, Slice, SubSample, TriangulateDelauney, Triangulate3D|
|Develop geometric representations||Annotation, Ball, BallStick, BoundBox, BoundBoxPyr, Contour, GnuPlot, Graph3D, IsosurfaceLat, IsosurfacePyr, LatToGeom, Legend, MoleculeBuilder, MultiSlice, NAGAdvectSimple, QueryLat, PyrToGeom, SliceLat, SlicePyr, Streakline, VectorGen, Vectors, VolumeToGeom, WireFrame|
|Create images||DisplayImg, Graph, Render, RenderRemote, TransformGen|
|Control looping sequences||AnimateCamera, For, Repeat, Render, Trigger, While|
|Miscellaneous||CompressPyr, DiffLat, ExpandPyr, NAGContour, NAGGraph, SwitchGeom, Timer, Trigger|
|Write data to disk||PrintLat, PrintPick, PrintPyr, WriteGeom, WriteImg, WriteLat, WritePyr|
When you are looking at large amounts of data, it helps to be able to distinguish significant features easily, and a convenient way to differentiate a range of values is by using color. The GenerateColormap module control panel (see Figure 3-1) lets you select a color space, manipulate the color bands, and send the results to Render, where the visualized data object is colored according to its data values.
GenerateColormap has two input ports, both of which accept the lattice data type, and several input parameters that are connected to widgets on the module control panel. The first input port accepts a colormap, which means you can read a colormap data file that contains preset parameters into the map. The volume map in Chapter 1 provides an example.
The second input port accepts data in the form of a lattice, which means you can feed a lattice into the colormap to set the minimum and maximum limits of the domain. Both these ports are optional.
The output port produces a colormap in the form of a 1D lattice. You can connect GenerateColormap to any module that has a Colormap input port. These include BallStick, Contour, LatToGeom, PyrToGeom, and VolumeToGeom.
You change the slope, and hence the value, of a color band in order to adjust the color spectrum in the colormap. In this fashion, you can emphasize certain subsets of your data and block out others. For this use the full-scale GenerateColormap control panel (see Figure 3-1).
The control panel has three windows:
The palette window shows the spectrum of colors currently associated with the data range. The colormap has 256 entries which are spaced uniformly through the range.
The editing window shows the relationship between the color bands. You can use the RGB (Red/Green/Blue) or HSV (Hue/Saturation/Value) color systems to create a colormap.
The scale window shows the range of data values for the map. You can change the minimum and maximum values for the domain by typing new values into the text slots on the dials.
Use the Output? option menu to select a mode in which to work. The Build option disables the module temporarily while you edit the color bands. This is useful if you want to experiment without the module constantly firing and sending data to the modules downstream.
The Run option re-enables the module. All changes are reflected in the color palette as you make them, and are simultaneously sent to the next module downstream.
Each map processes data with values over a specified range. You can set the limits of the range affected by GenerateColormap by turning the Min Domain and Max Domain dials. Each dial has two text slots that you can use to define the range for minimum values and maximum values.
To change a domain value (min, max, or current), click on the text slot to highlight it and type in the new value, then press <Enter>. The new value appears in the text slot and in the scale window.
You can edit only one color band at a time. To select a color band:
From the Color Space option menu, select RGB or HSV, depending on which system you want to use.
From the Color Band option menu, select the color band you want to adjust.
In the RGB color space, your options are Red, Green, Blue, and Opacity.
In the HSV color space, your options are Hue, Saturation, Value, and Opacity.
All four bands appear in the editing window. In the HSV color space, the bands might be superimposed on one another, and therefore more difficult to see. The active band is named on the option menu button and stands out in the editing window because the control points, shown as square boxes along the band, are enlarged.
You edit color bands by adding control points at intervals along their length and then dragging the points around in the editing window. The points appear as filled boxes (see Figure 3-2).
Use the Edit Mode option menu to add and remove control points. The Insert and Delete options default to Move after every insertion or deletion of a point.
To add a new control point to a color band, select Insert from the Edit Mode option menu and click on the color band at the place where you want the new point. The point is centered between the existing points on that segment of the color band. Move it by dragging on it.
The closer together the points are, the more precise the changes that you can make to the shape of the curve. However, you cannot move a point past the one to its left or right.
To remove an existing control point from a color band, select Delete from the Edit Mode option menu and click on that control point.
You can delete any point except the endpoints.
Each control point (except the end-points) has two empty squares associated with it, which control the slope of the curve at a given point. They are the derivatives of the curve at that point.
When you select a control point by clicking on it, the slope control points appear on either side (see Figure 3-3). They disappear when you select another point.
To alter the slope of the curve in the vicinity of a point, click and drag on the slope control points.
If you want to sharpen the curve toward the lower boundary of the window and the position of the slope control point blocks you, simply add another point to the line near the first point and use its derivatives to alter the slope.
GenerateColormap creates a rainbow-like colormap when you first launch it. You can use a different colormap as your starting point if you wish.
To read in a custom colormap, first launch a ReadLat module and connect it to the input port of GenerateColormap. Then use the file browser in ReadLat to read in the colormap file. The GenerateColormap module will approximate the input colormap as closely as it can. You can use control points to edit the color curves that it creates.
IRIS Explorer has another module, WaveFormColormap, which uses ramp waves of variable frequency, rather than direct manipulation, to establish a relationship between data values and colors. For more information, refer to WaveFormColormap in the IRIS Explorer Reference Pages.
A colormap is a lattice with a specific format: it is a 1D, 4 vector, float uniform lattice with 2 to 256 components. You can create such a lattice by saving a map produced by GenerateColormap or WaveFormColormap, or by any other module or program that can produce a lattice in this format.
You can save a colormap to disk by connecting a WriteLat module to GenerateColormap's output port. Then use the file browser to give the saved colormap a filename.
This example illustrates how to generate a colormap for a lattice and alter the relationship between the data values and the color spectrum.
Launch these modules from the Module Librarian:
GenLat, LatToGeom, Render, and GenerateColormap
Wire them up as follows:
GenLat to LatToGeom (Output -- Lattice to Input -- Lattice)
GenLat to GenerateColormap (Output -- Lattice to Data In -- Lattice (Opt))
GenerateColormap to LatToGeom (Colormap -- Lattice to Colormap -- Lattice (Opt))
LatToGeom to Render (Output -- Geometry to Input -- Geometry (Opt))
Change the GenLat settings to create a 2D curv full cyl curvilinear lattice with only 1 data variable and change the Output? option on GenerateColormap to Run. You should have a map that resembles the one in Figure 3-4. To make it more similar, increase the size of the lattice in GenLat. GenerateColormap starts in HSV mode.
Now do the following and look at the results:
Add two points to the red color curve (Hue), three points to the blue (Saturation), and two to the green (Value).
Move the points around as far as they will go. See what happens to the objects in Render.
Switch from HSV to RGB. Observe how the position of the color curves has changed, even though the color spectrum is still virtually the same.
Edit a color band in Build mode, then in Run mode.
The GenLat module (see Figure 3-5) enables you to generate synthetic lattice data for test maps. You can create a large variety of lattices of different sizes, shapes, contents, and representations in order to drive other modules that accept lattices. For example, you can easily verify that a given module performs properly on any type of input lattice. Simply connect GenLat to the module, and then start generating different types and styles of lattices.
GenLat has no input ports and only one output port for the generated lattice. You can connect it to any module that accepts the type of lattice you want to generate.
GenLat creates a single lattice each time it fires. You can control the shape and contents of this lattice by manipulating the widgets on the control panel.
Two of the most important parameters of a lattice are its size and dimensionality. If you increase these values, GenLat creates larger lattices, a process which takes commensurately more time. Depending on the domain selected GenLat creates lattices with the same number of elements on each side (square domain, e.g. 8x8x8 in 3D and 25x25 in 2D), or lattices that may have a different number of elements on each side (non-square domain, e.g. 8x6x3 in 3D and 20x25 in 2D). When non-square lattices are selected, additional widgets are visible on the module control panel (J Size and K Size).
To alter these values, move the Dimensions and Size (J Size, K Size) sliders at the bottom of the control panel. You can also type new values into the slider value areas to get an exact value.
Another way to generate test lattices that do not have the same number of elements on each side, is by combining GenLat with a module such as SampleCrop.
All lattices created by GenLat have coordinates, which can be represented as uniform, perimeter, or curvilinear. The data values of the coordinates govern the visual shape of the lattice. For example, the curv torus shape produces a lattice whose coordinates are polar in the first two dimensions and linear in the others.
To set the visual shape of a lattice, click on the Coord Type option menu and select an option.
To set the coordinate representation for a lattice, click on the Coord Representation option menu and select an option.
You can generate a curvilinear lattice with coordinates that are uniform in computational space. This option is useful for testing modules which require such lattices on their input ports.
Certain combinations of coordinate representation and coordinate style do not make sense, though, because only curvilinear representation can be used to store the position information for the torus and related coordinates.
The data values in lattices can be any of the primitive data types (see Chapter 3, "Using the Lattice Data Type" in the IRIS Explorer Module Writer's Guide (Windows NT/2000)). These include byte, short, long, float, and double.
To set a data type, click on the Data Type option menu and select an option.
Data values are scaled either in a fixed range of zero to 255 or their maximum possible range for the integer types (char, short, or long). However, a range of -1.0 to 1.0 is used for float and double.
To set the data range, click on the Coord Range option menu and select an option.
Using the maximum possible range for the long primitive type can generate very large numbers.
The values of the data can be generated by one of several functions. The default is sines, which fills the data space with the product of sine functions evaluated over a certain number of cycles in each dimension. The other functions are:
Ramps (modulo function)
Simulated gravity wells
DataVec Length indicates the number of components at each node of the lattice.
To display lattice data in IRIS Explorer, you can:
Since Render accepts only Geometry data, you must wire modules that produce lattice or pyramid data to LatToGeom, VolumeToGeom, or PyrToGeom, which in turn can be connected to Render. You can also send a lattice directly to DisplayImg. Figure 3-4 shows a lattice passed directly to LatToGeom.
A useful way to examine data is to make a 2D cut through a 3D volume, that is, to slice the volume and look at the data in that slice.
There are several ways to do this, depending on the type of data you start with and the results you want to produce. Table 3-2 shows which slicers you can use for each combination of lattice types.
You can also use other modules such as CropLat2D and CropLat3D, to view slices of a lattice. See the IRIS Explorer Reference Pages for more information on these modules.
The simplest way to slice data is to use OrthoSlice (see Figure 3-6). This module extracts a 2D lattice from a 3D uniform, perimeter, or curvilinear lattice along one of the orthogonal axial planes. The output can have different coordinate representations. Curvilinear coordinates are output by default. If desired, the output may have the same coordinates as the input lattice, except that the lattice is 2D. When in this mode, if you feed in a 3D uniform lattice, OrthoSlice produces a 2D uniform lattice.
OrthoSlice cuts along the i, j, and k axes in computational space. For a uniform or perimeter lattice, these correspond to the x, y, and z physical axes. Curvilinear lattices have a more complicated relationship between computational and physical space.
To select an axis for cutting a slice, select I Axis, J Axis or K Axis from the option menu (see Figure 3-6).
The slice number corresponds to the node number. The slice is taken along the axial plane at that particular node. Selecting slice i corresponds to cutting a slice at node i-1.
Figure 3-7 shows a map that uses OrthoSlice to display part of a lattice. You can use any lattice data. For example, you can replace GenLat with ReadLat and read in an external lattice data file if you wish. A good choice is %EXPLORERHOME%\data\lattice\testVol.lat, where %EXPLORERHOME% is the root directory of IRIS Explorer on your machine. Optionally, the output is colored with a colormap by wiring GenerateColormap to OrthoSlice and LatToGeom.
The modules in Figure 3-7 are GenLat, OrthoSlice, GenerateColormap, LatToGeom, and Render. The slice is taken along the I axis of a half-cylinder.
The Slice module (see Figure 3-8) extracts a 2D uniform slice out of a 3D uniform lattice.
The slice axis need not be orthogonal to the axes of the lattice. The Slice module has an input port that accepts transformation coordinates from TransformGen. These coordinates define the plane of the slice. You can:
Use the widgets on TransformGen to angle the slice in any direction you choose.
Use the Offset dial on the Slice control panel to position the slice plane perpendicular to its axis in the volume. The plane is offset from the center of the volume.
Use the Resolution slider on the control panel to set the scale for the slice lattice. It determines the number of nodes.
The size of the slice lattice can be larger than the original lattice, depending on the slice plane. At certain angles, the slice may extend beyond the bounds of the original lattice (see Figure 3-9), but the lattice is clipped to keep the number of samples outside the bounds to a minimum.
Slice has two outputs: a 2D slice lattice and a transform to LatToGeom. The transform sets the orientation of the slice lattice with respect to the parent in Render. It must be connected to LatToGeom, which correctly positions the slice. Figure 3-10 shows a map using Slice.
The ProbeLat module works only with curvilinear lattices, and its action is not restricted to plane surfaces (see Figure 3-11).
It takes slices from a curvilinear lattice in the form of:
The module accepts a transform from TransformGen which sets the orientation of the slice. The slice is output in the form of a pyramid.
You can select the form the probe takes (Probe Type) and the area of the slicing plane (Clip Size) from the ProbeLat control panel.
For pyramids you can use SlicePyr and ClipPyr.
Figure 3-13 shows a paddlewheel probe generated by ProbeLat.
At times, you may find it useful to display an image, as opposed to a geometric object, on the screen, perhaps to see what the original image data looks like before it is processed through a map, or so that you can compare two images, or create a composite image from two separate images.
The DisplayImg module (see Figure 3-14) accepts image data in the form of a 2D lattice, either black and white or in color.
You can display several images in the DisplayImg window at any given time. Simply wire as many modules as you require into the input port of DisplayImg.
As each module upstream from DisplayImg fires, an image appears in the DisplayImg window. The image is placed at the bottom left-hand corner of the window, and each subsequent image is stacked on top of it.
To see the images underneath, you can change the stacking position of the images with the <PgUp> and <PgDn> keys on the numerical keypad (not the <Page Up> and <Page Down> keys to the left of the numbers). Place the cursor over the image of interest.
To move the top image to another area of the window, click on it with the left mouse button and drag it to a new position. You can move all images around in the window by using this method.
To return an image to its original position, place the cursor on the image and press the <Home> key on the numerical keypad. If the window contains several images and the cursor is not on any one, and no images are selected, they all return to the lower left corner. If an image is selected while others are not, then only the selected image returns to the lower left corner.
To increase or decrease the size of an image use the Zoom widget. Click on the image you want to zoom. The slider shows the current zoom factor for that image. As you adjust the slider, the zoom factor changes with the size of the image.
You can photograph the image in the window and send it on to another module to be processed by clicking on the Snap? button. You can arrange several images in the window and Snap? will produce a single composite image that is the same size and shape as the original. Connect the Img Out -- Lattice output port to another module's input port for further processing of the image generated by Snap?.
You can also remap the image by using the Remap widget.
Because the product of DisplayImg is also a lattice, you can send the image to any module that accepts a 2D lattice, through the lattice output port on DisplayImg.
This example illustrates the use of DisplayImg to compare an image in its original form with the same image after it has been modified.
Launch a ReadImg, a BlurImg, and a DisplayImg module in the Map Editor.
Connect the output port on ReadImg to the input port on DisplayImg.
Wire the output port on ReadImg to the input port on BlurImg by clicking on Connect in the cascade menu.
Wire the output port on BlurImg to the input port on DisplayImg.
Open the file %EXPLORERHOME%\data\image\flowers2.rgb in ReadImg.
When the module fires, you should have two copies of the image in the DisplayImg window. Use the mouse to position them in the full-scale module window.
Turn the dials on the BlurImg module and compare the top image with the bottom one (see Figure 3-15).
Replace BlurImg with another image-processing module and see what effect it has on the image.
Since IRIS Explorer visualizes numerical data after it has been processed in various ways, the Render module (see Figure 3-16) is naturally a very important part of the process. It is Render that:
displays the geometric object, which it renders from 3D geometry sent to it by compatible modules, in its window
provides a wide selection of visual enhancement techniques for studying the object further
The Render module can accept multiple inputs, and it manages each one separately.
Render has several viewing modes and an edit mode, in which an object can be selected and its attributes altered. The functions and attributes of the Render module are described fully in the IRIS Explorer Reference Pages.
Before you can display an object in the Render window, you must wire Render into a map that generates the object. Render has six input ports: four of them accept geometry inputs and two accept lattices.
The most frequently used input port is the Input -- Geometry port, which accepts the geometry necessary to create an object or scene from any module with a geometry output port.
The Annotation -- Geometry port accepts text labels for parts of the geometry in the Render window. Its use is illustrated in the pick map in the Module Librarian.
Render has four output ports. The Pick -- Pick port outputs pick data to a picking module. The other ports let you take snapshots of the object in the Render window and export them to other modules, and provide synchronisation for loops. This is useful for making animations.
Render has four mutually exclusive viewing modes. The viewing mode is a way of considering how the camera in the scene is moving. The viewing modes are selected from the View menu on Render's menu bar. Each one lets you view the scene in the Render window in a slightly different way. You can examine, fly by, or walk by the object, or you can change the viewing plane.
You can zoom in and out, as if looking at the object through a telephoto or wide-angle lens. The object appears closer when you zoom in, although it actually remains the same distance from the camera.
If you have a mouse with three buttons you can zoom in or out by holding down the left and middle mouse buttons and moving the mouse towards or away from the screen. If your mouse has only two buttons you can only zoom in or out using the graphical shortcuts (see Section 3.6.6).
Render has two picking modes, viewing or picking/selecting an object. In the Viewing mode, you can change the camera parameters, that is, the position, direction, and field of view of the camera in relation to the object.
In the User Pick Mode, you use the mouse and buttons to select objects, attach manipulators, and query objects through picking.
To select an object, click the left mouse button on it. The object appears surrounded by a red box (see Figure 3-17).
You can view an object in the Render window from a different position by manipulating it using the left or middle mouse button in Examiner Viewing mode. These actions change the camera position from which you are looking at the object.
To roll the camera, that is, to rotate it on an axis perpendicular, or normal, to the screen, hold the left mouse button down and drag the object, either clockwise or counterclockwise. The object spins in the direction in which you dragged it. The object rotates faster according to the speed with which you push or drag it. It continues to rotate once you release the mouse button. To stop it, click on the mouse button outside the object.
To move the camera view around the center point, that is, to move it in the plane of the screen, hold the middle mouse button down and drag the object. This is not possible with a two-button mouse.
The Render pop-up menu (see Figure 3-18) appears when you click on the background of the Render window. If you zoom or truck in too far and lose sight of the object, click on the window background with the right mouse button and select View All from the Functions submenu of the pop-up menu.
The View All option resets the camera position, enabling you to see all the objects in the scene.
To center an object in the window, choose View Selection from the Viewing menu. You need to select an object in the Pick/Edit mode before this menu option is selectable.
To restore the original camera angle after you have moved the object around, select Home from the Functions submenu of the pop-up menu.
You can also select the Draw Style (for example wireframe), switch Headlight and Decoration on and off and set some Preferences for display. The single buffer, double buffer, and interactive buffer options on the Draw Style submenu of the pop-up menu refer to the type of buffering you are using.
The Render module provides several graphical shortcuts for manipulating objects in the Examiner Viewing, Navigator, and Edit modes. To use the shortcuts, select Decoration from the pop-up menu. A frame containing several widgets appears around the Render window (see Figure 3-19).
The widgets include:
thumbwheels that control the camera rotation or tilt and trucking motion. They also work in Pick/Edit mode.
a slider that controls the zoom action.
eight buttons that correspond to Pick/Edit, Viewing, Help, Home, Set Home, View All, Seek, and Camera Type.
When you have an opaque object in the Render window, it may be easier to examine or move around in wireframe form. You can draw the object as a wireframe structure (see Figure 3-20) by selecting Draw Style from the Render pop-up menu in either viewing mode, then clicking on wireframe.
This command acts on all the objects in the scene, not just on a selected object.
If you are viewing a complex scene with several objects, it may take a long time to render each frame while moving it. Wireframe rendering is much faster than rendering opaque objects, so you may want the objects to be rendered in wireframe while they are moving and opaque when still.
To draw the objects in wireframe as the camera moves, use the move wireframe option. When you release the mouse button, the objects are again drawn in their original mode.
Objects displayed in Render have a variety of attributes. They include surface properties, such as color, specularity, and transparency. You can change or edit all these attributes using the Render editors in User Pick Mode.
You edit object attributes by picking the object and then selecting an editor from the Editors menu.
Each editor provides access to various attributes of the object (see Table 3-3).
|Material Editor||Sets the material properties of ambient, diffuse, and specular color, shininess, and transparency.|
|Color Editor||Brings up a graphical color editor that lets you set the diffuse color on an object.|
The Material Editor (see Figure 3-21) lets you change the color and texture of an object in a scene. You can set:
Ambient intensity: the level of ambient color
Diffuse intensity: the level of diffuse color
Specular intensity: the level of specular color
Emissive intensity: the amount of light the object emits
Shininess: the amount of surface shininess on the object
Transparency: the degree of transparency or opacity
Use the sliders to set the brightness, or intensity, of each color.
To change the material color itself, click on one of the radio buttons on the left (marked Edit) on the Editor. The Color Picker appears and you can edit the ambient, diffuse (usually the same as ambient), specular, and emissive colors in turn. By clicking on the buttons on the right (marked Color), you can select to edit one or more of these colors simultaneously. In this case, a dark spot appears to indicate which colors have been selected for editing. Naturally, in this situation they will all have the same color assigned to them.
For details on how the Color Picker works, refer to Section 18.104.22.168 below.
You can change the color properties of the object material using the Color Editor (see Figure 3-22). Use the Sliders menu to select RGB, HSV, or both. Choose colors from the color wheel. Use the Edit menu to stipulate whether or not the change is immediately reflected in the object. By selecting Manual, you can prevent any color change taking effect on the object until you are ready.
Use the two color squares to test new colors and store the previous one. By clicking on the three arrowed pads beneath the squares, you can switch back and forth between colors.
The new color is always on the left and the previous color on the right. You can send the new color to the right square, or the old color to the left square.
The Color Pickers in the other editors work in the same way as the Color Editor, although they affect the color of different items.
If you want to make an object transparent, use the Transp slider in the Material Editor (see Section 22.214.171.124). To display the transparent object, you can select Screen Door Transparancy or any of the other sorted transparency widgets on the View menu on the Render title bar.
Some displays do not support sorted transparency. They can only display transparent objects in Screen Door format.
As its name implies, Screen Door Transparency renders objects as meshes that you can see through.
Sorted transparency, also called blended transparency, gives a more accurate rendering of the transparent object, but the scene is drawn more slowly than in Screen Door format.
The Render module has a headlight that is situated in the camera position, which is defined as being just over your left shoulder. The headlight moves with the camera. You can also create point, spot, and directional lights, which remain with the objects in the scene. Thus, if the camera moves left, the lights appear to move to the right. You can have as many as you like on at any given time.
You can change the direction, color, and intensity of each light in the scene by using the Lights menu to toggle lights on and off and to edit their attributes. You can also edit ambient light levels.
If you cannot see the Lights menu on the Render menu bar, just enlarge the Render window to the right.
Changes to the lights affect all the objects in the scene, unlike changes to the transform and material properties, which apply only to the selected object.
To edit the properties of a light, for example, the headlight, select Headlight from the Lights menu and click on Edit. The Edit window appears (see Figure 3-23), displaying the light you have selected.
You can change the intensity of the light emanating from the source by moving the widget on the Inten slider to increase or decrease the light intensity. The change is reflected in the image of the light.
You can also adjust the angle at which the light shines on the object by clicking on the directional arrow and changing its position in the window.
The Edit menu provides access to the Color Picker window for changing the color of the light. The Color Picker works in the same way as the Color Editor.
The Manips menu options let you rotate and translate objects in a scene by attaching one of several manipulators to them. You can use only one type of manipulator at a time, but you can attach it to each of several objects at the same time by using the shift key while you select subsequent objects with the left mouse key. You can use these manipulators to reposition the object in the scene.
To remove a manipulator from an object, click on None (this will surround the object by a red box to indicate it is selected) or select another manipulator from the Manips menu. Click on the background of the Render window to remove a manipulator completely.
The Trackball manipulator (see Figure 3-24) consists of opaque stripes surrounding the object. These stripes are aligned with the local axes of the object.
To rotate the trackball, place the cursor over the trackball but not on any of the stripes and drag the mouse in the desired direction, with the left mouse button held down. The trackball is highlighted. When you release the mouse, the ball continues to spin until you click the left mouse button.
To rotate the trackball in the direction of a single axis, place the mouse on one of the stripes, then drag it in the direction of the stripe. Only the selected stripe is highlighted.
If you start the trackball spinning and then move the mouse outside the sphere, the ball continues to spin within the plane of the screen, following the mouse.
You may sometimes need to go beyond the linear dataflow model of existing IRIS Explorer maps to build maps containing dataflow loops. They are needed, for example, for data interrogation through picking in Render, iteration through data sets using For or a multiple-data set reader, and convergence of a simulation using While.
For example, Figure 3-25 illustrates a loop from Render to QueryLat and back to Render.
The user picks on an object in Render, which fires and sends the pick coordinates to QueryLat. QueryLat turns the coordinates into text and sends it to Render. When the data arrives back at Render, the loop is terminated. To start the loop again, the user has to make another pick.
The common goal in all loops is to feed data from one phase of an IRIS Explorer computation back around to the next phase of the computation. As in most programming languages, loops in IRIS Explorer are a basic and necessary semantic element. It is also true that looped maps are more complex than linear, or unlooped, maps. This section describes how you can conveniently and correctly employ looped maps in your IRIS Explorer data visualizations.
You can create two kinds of loops, While loops and Repeat loops, like the similarly named loops in C. In While loops, a specific condition evaluates to true and then an iteration takes place. This sequence is repeated until the condition evaluates to false.
In Repeat loops, an iteration takes place and a condition is then evaluated. Similarly, the sequence is reiterated until a stopping condition is reached.
Each loop must contain a loop controller module which controls and terminates loop iteration. In While loops, the loop controller checks the condition at the start of the loop, and in Repeat loops, at the end of the loop. The While or Repeat sense of the loop is determined by the While or Repeat capability of the module controlling the loop. Loop controllers have either While or Repeat capability, but not both.
Loop controllers are identified in the Map Editor by a small square icon, the controller icon, in the centre of the title bar in the micro control panel (see Figure 3-26).
The controller icon is Off when a loop controller module is wired into a map but is not part of a loop, or when it is in a loop controlled by another module. When you wire a loop controller module into a loop, the icon turns green. For example, in Figure 3-26 Render is the loop controller, even though both modules have controller capability (see Section 3.7.3).
You can identify a loop controller module only after it has been launched in the Map Editor; until then, it is indistinguishable from other modules in the Module Librarian.
You can also look at the .mres file in the Module Builder; the Build Options window indicates whether the module is a While or Repeat loop controller, or neither. For example, Figure 3-27 shows the controller status for AnimateCamera, which is a Repeat loop controller module.
You confer loop controller status on a module in the Build Options window of the Module Builder (see Figure 3-27). Selection of While, Repeat, or None, which is the default, prompts the MCW to provide the correct interface for the module.
The distinguishing characteristic of a loop controller module is its ability to break its loop. IRIS Explorer has While and Repeat modules whose sole function is to control While and Repeat loops, but other modules can also function as loop controllers. Table 3-4 lists the IRIS Explorer loop controllers.
There can be only one active loop controller in a loop. If the loop contains more than one module with loop controller capability, IRIS Explorer selects the active loop controller, based on information from the loop connections. You can change the active controller by clicking on the loop icon. A message appears asking for confirmation.
Even though IRIS Explorer allows you to change controllers, the change may not make sense from a programmatic point of view. It is up to you to make sure that the looped map makes computational sense and that it will terminate.
A loop fires until the loop controller detects an end-of-loop condition and stops the loop. To fire a loop, or to start up a loop that has been terminated, you can fire the loop controller module. The controller module can always cause its loop to iterate if you change one of its widgets.
In addition, any module outside the loop or upstream of the loop controller can start the loop. If you have a Repeat loop, where the controller is at the end of the loop, this includes modules in the loop as well upstream of the loop itself. In a While loop, upstream modules are all outside the loop.
If a frame results from a parameter change in a module inside a loop, the While controller will not restart the loop, whereas the Repeat controller will, because the frame came from upstream. This is important when, for example, Streakline is in a loop with Render. If a parameter changes in Streakline, Render can keep the loop going.
Controller modules such as While and Repeat pass their data through like a transistor, turning off the flow by sending a sync frame when their Condition port parameter becomes zero.
Other controller modules, like Render, do not really control iteration, but need to be control modules in order to support their normal wiring paradigms, such as picking in the Render -- QueryLat map (see Figure 3-25). Render needs to be a Repeat controller so that any module in the loop can start the loop.
When you wire a loop in a map, you must include a loop controller module in the loop. If you try to close a loop without a loop controller, you will get a message saying the connection has failed because there is no controller present.
You can have:
multiple loops with a single controller
multiple controller-capable modules in a single loop (with only one of them selected as the active controller)
and (hopefully) anything else that makes programming sense
You cannot have intertwined loops, where two control modules are each in the other's loop, or where a single module is controlled by more than one controller.
Each loop controller module has an additional synchronisation port Loop Ended. When the module is the active controller you can wire this port to the Fire port of another module outside of the loop, to cause that module to fire when the loop completes, i.e., when the loop controller has detected the end-of-loop condition and stops the loop. This can be useful to control nested loops, as demonstrated in the example map %EXPLORERHOME%\maps\AnimateIso.map.
Figure 3-28 shows the wiring of the nested loops within this map. AnimateCamera is the loop controller for the inner loop and sends cameras to Render. For controls the outer loop. The Loop Ended port of AnimateCamera is wired to the Fire port of For, to start the next iteration of this outer loop.
The special coloring of loop control arcs (see Figure 3-29) can help you understand loops. Each loop has a single control arc, which is adjacent to the loop controller that governs it. The control arc is upstream of a While controller and downstream of a Repeat controller. A control arc is conceptually treated as broken by IRIS Explorer when it is computing which modules lie upstream of one another.
The special control arc wiring helps to clarify otherwise ambiguous loops, such as the one in Figure 3-30, which shows a symmetrical map with separate While loop controllers for each nested loop. Either While module can control loop 3. You will be able to deduce which module controls loop 3 by reading the controller arcs. You can change which module controls loop 3 by selecting arcs and controller buttons carefully.
If you save a map or part of a map that contains a loop, IRIS Explorer saves the identity of the active controller and will restore the map with this configuration.
In general, you would group most loops that perform a complex iteration. However, controller capability cannot be promoted from the controller module in the loop to the group module. If you wire a group module into a loop, the loop must include its own separate controller. In this case, the grouped loop constitutes a nested loop in the map.
An iterating loop may be terminated by the controller module, or it may be interrupted by the Map Editor. This is called breaking the loop, which is different from disconnecting the loop, where inter-module connections are removed.
In the Map Editor, you can also use the Break Loop option, which appears only on the module pop-up menu of active loop controllers (see Figure 3-31). It forcibly terminates a looping cycle.
If your looping map seems to be hogging resources with execution highlighting on, try switching it off before you initiate a loop.
 For more information on lattices, see Chapter 3, "Using the Lattice Data Type" in the IRIS Explorer Module Writer's Guide (Windows NT/2000).