TOC PREV NEXT INDEX

The Graphics Display Kit


A
Obsolete Graphics Display Kit objects

This chapter provides reference material for Graphics Display Kit objects that are still valid but whose use has been made obsolete by the Uviewer architecture now provided by AVS/Express.

The objects and these reference pages are included in order to maintain backwards compatibility.

A.1 CameraEditor
Synopsis

edit a Graphics Display Kit camera

CameraEditor
macro CameraEditor {
GDview_templ+IMPort &view_in {
GDcamera_templ+OPort2 &picked_camera;
};
ilink vis;

GDcamera_edit GDcamera_edit {
shell_vis => vis;
camera => view_in.picked_camera;
};

macro CameraEditorUI {
UIshell camera_shell {
title = "Camera Editor";
visible => vis;
width = 575;
height = 550;
};
...
};
};
Description

CameraEditor defines a dialog box to edit the picked camera subobject of the input view. It contains both a camera edit object (GDcamera_edit) and a user interface (CameraEditorUI).

Input Ports
view_in

A view. The CameraEditor edits the view's picked camera.

vis

An integer indicating whether CameraEditor's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To accomplish this, you connect vis to the UIcmd object's do element.

Example

Libraries.Templates.VIEW.Components.ViewEditors

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39].
A.2 ClickSketch
Synopsis

create a 2D drawing with successive mouse clicks

ClickSketch
macro ClickSketch {
ilink rv;
GDview_templ &view<NEportLevels={2,1}>;

UImod_panel UImod_panel {
title = "Click Sketch";
message = "Select click sketch control panel.";
height => <-.UIpanel.y + <-.UIpanel.height;
};
...
GDroi2d_click GDroi2d_click {
view_in => view;
add => AddPoint.state;
erase => ErasePoint.state;
close => ClosePoint.state;
redraw => view.trigger;
x => AddPoint.x;
y => AddPoint.y;
};
GDmap2d_ss GDmap2d_ss {
view_in => view;
cam_in => view.picked_camera;
obj_in+IPort3;
in_buf => GDroi2d_click.out_buf;
out_mesh+OPort3;
};
DataObject DataObject {
in => GDmap2d_ss.out_mesh;
obj+OPort3;
};
};
Description

ClickSketch enables you to create a 2D drawing with individual clicks of the mouse. It combines the following:

Input Ports
rv

The UIrenderView panel where the drawing is to occur. This is typically connected to one of the Graphics Display Kit's viewer macros output render view (for example, SimpleViewer2D.rv).

view

A view. This is typically connected to one of the Graphics Display Kit's viewer macros output view (for example, SimpleViewer2D.view).

obj_in

An optional connection to an object. Without an object, ClickSketch converts the drawing to a field in the camera's world space. With an object, ClickSketch converts the drawing to a field in the object's world space.

Parameters
build option

UIradioBox. A set of radio buttons to pick which type of primitive to draw. Possible primitives are point, line. box, polyline, and polygon.

immed

UItoggle. This parameter controls whether the output buffer is immediately written to upon completion of a primitive. 1 means yes.; 0 means no. When the value is 0, you must press the Done button to cause the output buffer to be written.

build red color
build green color
build blue color

UIsliders. Float sliders to set the red/green/blue build color while initially constructing the primitive. Values are in the range 0-1.

build mode

UItoggle. The mode to use when building the primitive: 0 means clear; 1 means append. If the mode selected is clear, each time a primitive is built it overwrites any previous primitive. If the mode selected is append, each time a primitive is built, it is appended to a previous primitive(s). By using append mode, you can build multiple primitives before mapping them to a field.

build clear

UIbutton. When pressed, this button causes the build buffer to be cleared of all primitives.

build done

UIbutton. When pressed, this button causes all existing primitives to be written to the build output buffer. This buffer is then converted into a field.

map red color
map green color
map blue color

UIsliders. Float sliders to set the red/green/blue map color while mapping the primitives from screen space to some world space coordinate system. Values are in the range 0-1. These colors are only used if the map color has a value of 1.

map color

UItoggle. Enable/disable the use of the map red/green/blue colors. If the value is 0, no color information is written to the field. If the value is 1, color information is written to the output field as cell data. This gives you the ability to specify color on a per primitive basis.

map mode

UItoggle. The mode to use when mapping the primitives to world space: 0 means clear; 1 means append. If the mode selected is clear, each time primitives are mapped, any previous field is overwritten. If the mode selected is append, each time primitives are mapped, they are appended to the field. By using append mode, you can incrementally build the field.

map clear

UIbutton. When pressed, this button causes the output field to be cleared.

map name

UItext. A name that, if specified, is written to the cell set as the cell name.

Output Ports
out_mesh

A field mesh plus optional cell data.

obj

The field mesh as a Graphics Display Kit object.

Example

Libraries.Examples.Graphics_Display.ClickSketch
Libraries.Examples.Graphics_Display.EditMesh
Libraries.Examples.Graphics_Display.ImageAnno
Libraries.Examples.Graphics_Display.ROIdraw

File

v/view.v

See also

For more information, see:

For a discussion of click-sketch drawing, see Section 5.2, Constructing the drawing  [page 5-3].
A.3 ContinuousSketch
Synopsis

create a 2D drawing with one continuous mouse gesture

ContinuousSketch
macro ContinousSketch {
ilink rv;
GDview_templ &view<NEportLevels={2,1}>;

UImod_panel UImod_panel {
title = "Continuous Sketch";
message = "Select continuous sketch control panel.";
height => <-.UIpanel.y + <-.UIpanel.height;
};
...
GDroi2d_cont GDroi2d_cont {
view_in => view;
redraw => view.trigger;
x => UItwoPoint.x;
y => UItwoPoint.y;
state => UItwoPoint.state;
};
GDmap2d_ss GDmap2d_ss {
view_in => view;
cam_in => view.picked_camera;
obj_in+IPort3;
in_buf => GDroi2d_cont.out_buf;
out_mesh+OPort3;
};
DataObject DataObject {
in => GDmap2d_ss.out_mesh;
obj+OPort3;
};
};
Description

ContinuousSketch enables you to create a 2D drawing with one continuous motion of the mouse. It combines the following:

Input Ports
rv

The UIrenderView panel where the drawing is to occur. This is typically connected to one of the Graphics Display Kit's viewer macros output render view (for example, SimpleViewer2D.rv).

view

A view. This is typically connected to one of the Graphics Display Kit's viewer macros output view (for example, SimpleViewer2D.view).

obj_in

An optional connection to an object. Without an object, ContinuousSketch converts the drawing to a field in the camera's world space. With an object, ContinuousSketch converts the drawing to a field in the object's world space.

Parameters
build option

UIradioBox. A set of radio buttons to pick which type of primitive to draw. Possible primitives are point, line, box, polyline, and polygon.

build draw mode

UIradioBox. A set of radio buttons to pick the drawing mode to be used to draw the primitive while it is being built. Possible values are copy and exclusive or (that is, XOR).

immed

UItoggle. This parameter controls whether the output buffer is immediately written to upon completion of a primitive: 1 means yes.; 0 means no. When the value is 0, you must press the Done button to cause the output buffer to be written.

build red color
build green color
build blue color

UIsliders. Float sliders to set the red/green/blue build color while initially constructing the primitive. Values are in the range 0-1.

build mode

UItoggle. The mode to use when building the primitive: 0 means clear; 1 means append. If the mode selected is clear, each time a primitive is built it overwrites any previous primitive. If the mode selected is append, each time a primitive is built, it is appended to a previous primitive(s). By using append mode, you can build multiple primitives before mapping them to a field.

build clear

UIbutton. When pressed, this button causes the build buffer to be cleared of all primitives.

build done

UIbutton. When pressed, this button causes all existing primitives to be written to the build output buffer. This buffer is then converted into a field.

map red color
map green color
map blue color

UIsliders. Float sliders to set the red/green/blue map color while mapping the primitives from screen space to some world space coordinate system. Values are in the range 0-1. These colors are only used if the map color has a value of 1.

map color

UItoggle. Enable/disable the use of the map red/green/blue colors. If the value is 0, no color information is written to the field. If the value is 1, color information is written to the output field as cell data. This gives you the ability to specify color on a per primitive basis.

map mode

UItoggle. The mode to use when mapping the primitives to world space: 0 means clear; 1 means append. If the mode selected is clear, each time primitives are mapped, any previous field is overwritten. If the mode selected is append, each time primitives are mapped, they are appended to the field. By using append mode, you can incrementally build the field.

map clear

UIbutton. When pressed, this button causes the output field to be cleared.

map name

UItext. A name that if specified is written to the cell set as the cell name.

Output Ports
out_mesh

A field mesh plus optional cell data.

obj

The field mesh as a graphics-display object.

Example

Libraries.Examples.Graphics_Display.RegionCrop3D
Libraries.Examples.Graphics_Display.RegionCrop2D

File

v/view.v

See also

For more information, see:

For a discussion of continuous-sketch drawing, see Section 5.2, Constructing the drawing  [page 5-3].
A.4 Datamap components

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

There are several higher-level datamap components that are composed of the objects described in the previous section. These higher-level objects are described in the sections below.

A.4.1 DefaultLinearRange
Synopsis

define a default linear data range

Description

DefaultLinearRange provides an example for defining a linear data range. It is not used.

A.4.2 DefaultStepRange
Synopsis

define a default step data range

Description

DefaultStepRange provides an example for defining a step data range. It is not used.

A.4.3 DefaultLinear
Synopsis

define a default datamap

Description

DefaultLinear defines the default datamap that is used by other Graphics Display Kit objects (for example, DataObject and GroupObject).

DefaultLinear is defined with an HSV color model. It contains a single data range of size 256 with two control points that run from blue to red, going through green.

Input Ports
dataMin
dataMax

The minimum and maximum values of the scalar input data, typically obtained through connections to the object GDminmax.

Example

Libraries.Templates.DMAP.DataObject
Libraries.Template.DMAP.GroupObject

File

v/dmap_ex.v

See also

For more information, see:

See Section 3.3, Datamaps  [page 3-14].
A.4.4 GreyScale
Synopsis

define a greyscale datamap

Description

GreyScale is defined with an HSV color model. It contains a single data range of size 256 with two control points that run from black to white.

Input Ports
dataMin
dataMax

The minimum and maximum values of the scalar input data, typically obtained through connections to the object GDminmax.

Example

Libraries.Examples.Graphics_Display.ReplaceDatamap

File

v/dmap_ex.v

See also

For more information, see:

See Section 3.3, Datamaps  [page 3-14].
A.4.5 VolumeRender
Synopsis

define a datamap for use when volume rendering

Description

VolumeRender is defined with an HSV color model. It contains two data ranges with a combined size of 256. It contains three control points that run from blue to red through green - in the same manner as DefaultLinear.

VolumeRender is configured so that only the first and last control points are allowed to be edited. The middle control point color (that is, v2, v3, v4) components are not editable; instead they are computed from the first and last control point. The values of the middle control point are kept such that the datamap always has a linear ramp from blue to red. The alpha (that is, v1) component of the middle control point is editable. This is allowed so reasonable control over the alpha component of the datamap is obtained.

Input Ports
dataMin
dataMax

The minimum and maximum values of the scalar input data, typically obtained through connections to the object GDminmax.

Example

Libraries.Examples.Graphics_Display.ReplaceDatamap

File

v/dmap_ex.v

See also

For more information, see:

See Section 3.3, Datamaps  [page 3-14].
A.4.6 HotMetal
Synopsis

define a hot metal datamap

Description

HotMetal is defined with an RGB color model. It contains three data ranges with a combined size of 256. It contains four control points that run from black to red to orange to white. Each data range has two control points. The middle data range shares control points with the ranges on either side.

HotMetal is configured so that all control points are allowed to be edited. The size of the ranges is not editable as it is computed based on the placement of the ranges within the total data range.

Input Ports
dataMin
dataMax

The minimum and maximum values of the scalar input data, typically obtained through connections to the object GDminmax.

Example

Libraries.Examples.Graphics_Display.ReplaceDatamap

File

v/dmap_ex.v

See also

For more information, see:

See Section 3.3, Datamaps  [page 3-14].
A.4.7 CyanYellowRed
Synopsis

define a cyan-yellow-red datamap

Description

CyanYellowRed is defined with an RGB color model. It contains two data ranges with a combined size of 256. It contains three control points that run from cyan to yellow to red. Each data range has two control points. The middle control point is shared between the two data ranges.

CyanYellowRed is configured so that all control points are allowed to be edited. The size of the ranges is not editable as it is computed based on the placement of the ranges within the total data range.

Input Ports
dataMin
dataMax

The minimum and maximum values of the scalar input data, typically obtained through connections to the object GDminmax.

Example

Libraries.Examples.Graphics_Display.ReplaceDatamap

File

v/dmap_ex.v

See also

For more information, see:

See Section 3.3, Datamaps  [page 3-14].
A.5 DrawCursor2D
Synopsis

display an interactive cross-hair cursor

Input Ports

rv
UIrenderView
view
GDview_templ
obj_in
GDobject_templ

Output Ports

out_mesh
Mesh

Description

DrawCursor2D displays a 2D cross-hair cursor and translates the cursor's screen coordinates to a field. DrawCursor2D is a macro that combines the following:

Input Ports
rv

The UIrenderView panel where the drawing is to occur. rv is typically connected to the same window as the view.

view

A connection to a view.

obj_in

An optional connection to an object. Without an object, DrawCursor2D converts the selected point to a field in the camera's coordinate system. With an object, DrawCursor2D converts the selected point to a field in the object's coordinate system.

Parameters
immed

UItoggle. This parameter when set to 1 indicates that immediate mode is on. In immediate mode, DrawCursor2D translates the cursor's position to a field continually during the UItwoPoint interaction. When immed is set to 0, DrawCursor2D translates the cursor's position to a field only at the end of the UItwoPoint interaction.

Output Ports
out_mesh

A mesh representing the point in the appropriate coordinate system.

Example

Libraries.Examples.Graphics_Display.DrawCursor2D
Libraries.Examples.Graphics_Display.ImageProbe

File

v/view.v

See also

For more information, see:

Section 5.6, Components  [page 5-14].
A.6 DrawLine2D
Synopsis

draw a 2D line

Input Ports
rv
UIrenderView
view
GDview_templ
obj_in
GDobject_templ

Output Ports
out_mesh
Mesh+Cell_Data

Description

DrawLine2D displays a 2D line and translates the line's screen space coordinates into a field. DrawLine2D is a macro that combines the following:

Input Ports
rv

The UIrenderView panel where the drawing is to occur. rv is typically connected to the same window as the view.

view

A connection to a view.

obj_in

An optional connection to an object. Without an object, DrawLine2D converts the line to a field in the camera's coordinate system. With an object, DrawLine2D converts the line to a field in the object's coordinate system.

Parameters
draw_mode

UIradioBox. This parameter indicates whether to draw in copy mode (0) or XORmode (1). In copy mode, the rendering window is refreshed as necessary with a pre-drawing copy of the window's contents, if possible. In XOR mode, the drawing is created (and subsequently refreshed) by performing an XOR operation on the background. XOR mode is generally faster.

immed

UItoggle. This parameter controls whether the line is immediately converted to a mesh: 1 means yes; 0 means no. When the value is 0, you must press the measure button to cause the line to be converted to a mesh.

measure

UIbutton. This parameter when set causes the line to be converted to a field.

Output Ports
out_mesh

A mesh representing the point in the appropriate coordinate system.

Example

Libraries.Examples.Graphics_Display.DrawLine2D
Libraries.Examples.Graphics_Display.ImageMeasure

File

v/view.v

See also

For more information, see:

Section 5.6, Components  [page 5-14].
A.7 EditMesh
Synopsis

edit a 2D unstructured mesh

Input Ports
UItwoPoint
UItwoPoint
view
GDview_templ

Description

EditMesh edits the coordinates in 2D unstructured meshes. Typically, the mesh is the output from the ClickSketch or ContinuousSketch modules, but any mesh of the proper type can be edited. EditMesh is a macro that combines the following:

Input Ports
UItwoPoint

A reference to the UItwoPoint interactor that provides the XY positions and the events that control the edit process. UItwoPoint is typically connected to the two_point output from one of the viewer modules.

view

A connection to a view.

Parameters
mode

UIradioBox. This parameter controls if the point, primitive, or cell is edited when the mesh is selected: 0 means point; 1 means primitive;, and 2 means cell.

highlight red
highlight green
highlight blue

UIsliders. Float sliders to set the red/green/blue color while editing the mesh. Values are in the range 0-1.

delete

UIbutton. This parameter when set causes the currently selected point, primitive, or cell to be deleted.

immed

UItoggle. This parameter controls whether the edit causes the mesh to be immediately updated: 1 means yes; 0 means no. When the value is 0, you must press the Done button to cause the edit to update the mesh.

done

UIbutton. This parameter when set causes the mesh to be updated to reflect the edit. This is used when the immed parameter has a value of 0.

Example

Libraries.Examples.Graphics_Display.EditMesh
Libraries.Examples.Graphics_Display.RegionCrop2D
Libraries.Examples.Graphics_Display.ROIdraw

File

v/view.v

See also

For more information, see:

Section 5.4, Editing the drawing  [page 5-10].
Section 5.6, Components  [page 5-14].
A.8 GeomAttribPopup
Synopsis

edit the geometry attributes of the Graphics Display Kit properties

Input Ports
name
string
vis
int
dir_pt_size
float
subdiv
int
cull
int

Description

GeomAttribPopup defines a dialog box for editing geometry attributes. Geometry attributes are part of the Graphics Display Kit properties.

Input Ports
name

The dialog box's title.

vis

An integer indicating whether GeomAttribPopup's dialog box should appear: 0 means it should not appear; 1 means it should. Typical ways to make the dialog box appear are to connect the vis subobject to UIcmd.do or UIbutton.do. When the command or button is then pressed, the dialog box becomes visible.

dir_pt_size
subdiv
cull

Subobjects indicating geometry attributes. When the dialog box first appears, these objects determine the initial settings of the dialog box's widgets. When you change the widget's settings, GeomAttribPopup in turn updates the subobjects connected to dir_pt_size, subdiv, and cull.

Example

Libraries.Graphics_Display.Editors.UI_Editors.PropsEditor

File

v/view.v

See also

For more information, see:

Section A.24, PropsEditor  [page A-51].
A.9 ImageAttrPopup
Synopsis

edit the image attributes of the Graphics Display Kit object

Input Ports
name
string
vis
int
dith_tech
int
interp_type
int
missing_val
float
missing_red
float
missing_green
float
missing_blue
float

Description

ImageAttrPopup defines a dialog box for editing the image attributes. Image attributes are part of the Graphics Display Kit object.

Input Ports
name

The dialog box's title.

vis

An integer indicating whether ImageAttrPopup's dialog box should appear: 0 means it should not appear; 1 means it should. Typical ways to make the dialog box appear are to connect the vis subobject to UIcmd.do or UIbutton.do. When the command or button is pressed, the dialog box becomes visible.

dith_tech
interp_type
missing_val
missing_red
missing_green
missing_blue

Subobjects indicating the image attributes. When the dialog box first appears, these objects determine the initial settings of the dialog box's widgets. When you change the widget's settings, ImageAttrPopup in turn updates the subobjects connected to dith_tech, interp_type, missing_val, missing_red, missing_green, and missing_blue.

Example

Libraries.Graphics_Display.Editors.UI_Editors.ObjectEditor

File

v/view.v

See also

For more information, see:

Section A.17, ObjectEditor  [page A-35].
A.10 LightAttribPopup
Synopsis

edit the light attributes of the Graphics Display Kit lights

Input Ports
name
string
vis
int
att1
float
att2
float
concen
float
angle
float

Description

LightAttribPopup defines a dialog box for editing the light attributes. Light attributes are part of the Graphics Display Kit lights.

Input Ports
name

The dialog box's title.

vis

An integer indicating whether LightAttribPopup's dialog box should appear: 0 means it should not appear; 1 means it should. Typical ways to make the dialog box appear are to connect the vis subobject to UIcmd.do or UIbutton.do. When the command or button is then pressed, the dialog box becomes visible.

att1
att2
concen
angle

Subobjects indicating light attributes. When the dialog box first appears, these objects determine the initial settings of the dialog box's widgets. When you change the widget's settings, LightAttribPopup in turn updates the subobjects connected to att1, att2, concen, and angle.

Example

Libraries.Graphics_Display.Editors.UI_Editors.LightInfoEditor

File

v/view.v

See also

For more information, see:

Section A.11, LightInfoEditor  [page A-26].
A.11 LightInfoEditor
Synopsis

edit the Graphics Display Kit light information

LightInfoEditor
macro LightInfoEditor {
GDview_templ+IPort2 &view_in {
GDlight_info_templ &light_info;
};
ilink vis;

GDlinfo_edit GDlinfo_editor {
shell_vis => vis;
light_info => view_in.light_info;
};
GDlight_edit GDlight_editor {
shell_vis => vis;
light => GDlinfo_editor.sel_light;
};

macro LightInfoEditorUI {
UIshell light_info_shell {
title = "Light Info Editor";
visible => vis;
width = 225;
height = 400;
};
...
};
};
Description

LightInfoEditor defines a dialog box to edit the light information subobject of the input view. It contains both a light information edit subobject (GDlinfo_edit), a light edit subobject (GDlight_edit), and a user interface (LightInfoEditorUI).

Input Ports
view_in

A view. view_in can be any group with a GDlight_info_templ subobject called light_info.

vis

An integer indicating whether LightInfoEditor's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To accomplish this, you connect vis to the UIcmd object's do element.

Example

Libraries.Templates.VIEW.Components.ViewEditors

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39].
A.12 LineAttribPopup
Synopsis

edit the line attributes of the Graphics Display Kit properties

Input Ports
name
string
vis
int
draw_mode
int
line_width
int
line_style
int
line_aa
int

Description

LineAttribPopup defines a dialog box for editing line attributes. Line attributes are part of the Graphics Display Kit properties.

Input Ports
name

The dialog box's title.

vis

An integer indicating whether LineAttribPopup's dialog box should appear: 0 means it should not appear; 1 means it should. Typical ways to make the dialog box appear are to connect the vis subobject to UIcmd.do or UIbutton.do. When the command or button is pressed, the dialog box becomes visible.

draw_mode
line_width
line_style
line_aa

Subobjects indicating line attributes. When the dialog box first appears, these objects determine the initial settings of the dialog box's widgets. When you change the widget's settings, LineAttribPopup in turn updates the subobjects connected to draw_mode, line_width, line_style, and line_aa.

Example

Libraries.Graphics_Display.Editors.UI_Editors.PropsEditor

File

v/view.v

See also

For more information, see:

Section A.24, PropsEditor  [page A-51].
A.13 MaterialPopup
Synopsis

edit the material attributes of the Graphics Display Kit properties

Input Ports
name
string
vis
int
ambient
float
diffuse
float
spec
float
spec_exp
float
trans
float

Description

MaterialPopup defines a dialog box for editing material attributes. Material attributes are part of the Graphics Display Kit properties.

Input Ports
name

The dialog box's title.

vis

An integer indicating whether MaterialPopup's dialog box should appear: 0 means it should not appear; 1 means it should. Typical ways to make the dialog box appear are to connect the vis subobject to UIcmd.do or UIbutton.do. When the command or button is then pressed, the dialog box becomes visible.

ambient
diffuse
spec
spec_exp
trans

Subobjects indicating material attributes. When the dialog box first appears, these objects determine the initial settings of the dialog box's widgets. When you change the widget's settings, MaterialPopup in turn updates the subobjects connected to ambient, diffuse, spec, spec_exp, and trans.

Example

Libraries.Graphics_Display.Editors.UI_Editors.PropsEditor

File

v/view.v

See also

For more information, see:

Section A.24, PropsEditor  [page A-51].
A.14 ModesEditor
Synopsis

edit Graphics Display Kit modes

ModesEditor
macro ModesEditor {
GDobject_templ+IPort2 &obj_in {
GDmodes_templ &modes;
};
ilink vis;

GDmodes_edit GDmodes_editor {
shell_vis => vis;
modes => obj_in.modes
};

macro ModesEditorUI {
UIshell modes_shell {
title = "Modes Editor";
visible => vis;
width = 425;
height = 480;
};
...
};
};
Description

ModesEditor defines a dialog box to edit the modes subobject of the input object. It contains both an modes edit subobject (GDmodes_edit) and a user interface (ModesEditorUI).

Input Ports
obj_in

An object. obj_in can be any group object with a GDmodes_templ subobject called modes.

vis

An integer indicating whether ModesEditor's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To accomplish this, you connect vis to the UIcmd object's do element.

Example

Libraries.Templates.VIEW.Components.ObjectEditors

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39].
A.15 ObjCmdList
Synopsis

define a command list for a viewer's menu bar

Output Ports
cmdlist
UIcmdList
cmds
UIcmd

Description

ObjCmdList defines the pull-down command list to be placed on a viewer's menu bar. It is used to control the visibility of some of the Graphics Display Kit editors. Typically, you do not use ObjCmdList since it is designed for use by Viewer and Viewer3D. The command list looks like this:

ObjEditors
Object...
Xform...
Props...
Modes...
Texture...
Datamap...

ObjCmdList works in conjunction with ObjectEditors which has the same number of editors as there are entries on the menu bar.

Output Ports
cmdlist

The command list, as a UIcmdList object.

cmds

The command list, as an array of UIcmd objects.

Example

Libraries.Main.Viewers.Viewer3D
Libraries.Main.Viewers.Viewer

File

v/view.v

A.16 Obj2DCmdList
Synopsis

define a command list for a 2D viewer's menu bar

Output Ports
cmdlist
UIcmdList
cmds
UIcmd

Description

Obj2DCmdList defines the pull-down command list to be placed on a 2D viewer's menu bar. It is used to control the visibility of some of the Graphics Display Kit editors. Typically, you do not use Obj2DCmdList since it is designed for use by Viewer2D. The command list looks like this:

ObjEditors
Object...
Xform...
Props...
Modes...
Datamap...

Obj2DCmdList works in conjunction with Object2DEditors which has the same number of editors as there are entries on the menu bar.

Output Ports
cmdlist

The command list, as a UIcmdList object.

cmds

The command list, as an array of UIcmd objects.

Example

Libraries.Main.Viewers.Viewer2D

File

v/view.v

A.17 ObjectEditor
Synopsis

edit a Graphics Display Kit object

ObjectEditor
macro ObjectEditor {
GDcamera_templ+IPort2 &camera_in;
GDobject_templ+IPort2 &obj_in;
ilink vis;

GDobj_edit GDobj_edit {
shell_vis => vis;
camera => camera_in
object => obj_in;
};

macro ObjectEditorUI {
UIshell obj_shell {
title = "Object Editor";
visible => vis;
width = 225;
height = 325;
};
...
};
};
Description

ObjectEditor defines a dialog box to edit the input object. It contains both an object edit subobject (GDobject_edit) and a user interface (ObjectEditorUI).

Input Ports
camera_in

The camera associated with the object being edited. The camera is required for the normalize operation.

obj_in

The object controlled by the object editor. Typically obj_in is connected to the current object output of the ObjectSelector.

vis

An integer indicating whether CameraEditor's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To accomplish this, you connect vis to the UIcmd object's do element.

Example

Libraries.Templates.VIEW.Components.ObjectEditors

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39].
A.18 ObjectEditors
Synopsis

define a group of editors for a viewer

Input Ports
edit_view
GDview_templ
edit_obj
GDobject_templ
vis_list
int

Description

ObjectEditors defines a group of the Graphics Display Kit editors for a viewer. The visibility of the individual editors is controlled by pulldowns on the menu bar. Typically, you do not use ObjectEditors since it is designed for use by Viewer and Viewer3D. The editors in ObjectEditors are:

ObjectEditors is used in conjunction with ObjCmdList which has the same number of entries on the menu bar as there are editors.

Input Ports
edit_view

A connection to a view.

edit_obj

A connection to an object. Typically, the object is connected to the ViewEditor's current object. Alternatively, the object may be connected to the view's picked object.

vis_list

An array of integers indicating whether the user has selected a pulldown menu choice.

Array element
Meaning
vis_list[0]
If 0, the Object... choice was not selected. If 1, the Object... choice was selected.
vis_list[1]
If 0, the Transform... choice was not selected. If 1, the Transform... choice was selected.
vis_list[2]
If 0, the Props... choice was not selected. If 1, the Props... choice was selected.
vis_list[3]
If 0, the Modes... choice was not selected. If 1, the Modes... choice was selected.
vis_list[4]
If 0, the Texture... choice was not selected. If 1, the Texture... choice was selected.
vis_list[5]
If 0, the Datamap... choice was not selected. If 1, the Datamap... choice was selected.

Example

Libraries.Main.Viewers.Viewer3D
Libraries.Main.Viewers.Viewer

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39]
A.19 Object2DEditors
Synopsis

define a group of editors for a 2D viewer

Input Ports
edit_view
GDview_templ
edit_obj
GDobject_templ
vis_list
int

Description

Object2DEditors defines a group of the Graphics Display Kit editors for a 2D viewer. The visibility of the individual editors is controlled by pulldowns on the menu bar. Typically, you do not use Object2DEditors since it is designed for use by Viewer2D. The editors in Object2DEditors are:

Object2DEditors is used in conjunction with Obj2DCmdList which has the same number of entries on the menu bar as there are editors.

Input Ports
edit_view

A connection to a view.

edit_obj

A connection to an object. Typically, the object is connected to the View2DEditor's current object. Alternatively, the object may be connected to the view's picked object.

vis_list

An array of integers indicating whether the user has selected a pulldown menu choice.

Array element
Meaning
vis_list[0]
If 0, the Object... choice was not selected. If 1, the Object... choice was selected.
vis_list[1]
If 0, the Transform... choice was not selected. If 1, the Transform... choice was selected.
vis_list[2]
If 0, the Props... choice was not selected. If 1, the Props... choice was selected.
vis_list[3]
If 0, the Modes... choice was not selected. If 1, the Modes... choice was selected.
vis_list[4]
If 0, the Datamap... choice was not selected. If 1, the Datamap... choice was selected.

Example

Libraries.Main.Viewers.Viewer2D

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39]
A.20 ObjectSelector
Synopsis

select an object from a Graphics Display Kit view

ObjectSelector
macro ObjectSelector{
GDview_templ+IPort2 &view_in;
ilink vis;

GDobj_sel obj_selector{
view => view_in;
};

macro ObjectSelectorUI {
UIselectionBox curobj_sel{
title = "Object Selector";
visible => vis;
};
...
};
olink cur_obj => obj_selector.cur_obj;
};
Description

ObjectSelector defines a dialog box to select a current object in a view. It contains both an object selector subobject (GDobj_sel) and a user interface (ObjectSelectorUI).

Input Ports
view_in

A view. The ObjectSelector creates a list of the objects in the view.

vis

An integer indicating whether ObjectSelector's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To do this, you connect vis to the UIcmd object's do element.

Output Ports
cur_obj

An object. The ObjectSelector outputs the current object. This is either the object selected from the selection box or the object that was picked in the view. This object is normally connected to any of the Graphics Display Kit editors that take an object as input.

Example

Libraries.Templates.VIEW.Components.ViewEditors

File

v/view.v

A.21 OutputEditor
Synopsis

edit a Graphics Display Kit output

OutputEditor
macro OutputEditor {
GDview_templ+IPort2 &view_in {
GDoutput_templ+OPort2 &output;
};
ilink vis;

macro OutputEditorUI {
UIshell out_shell {
title = "Output Editor";
visible => vis;
width = 225;
height = 425;
};
...
};
};
Description

OutputEditor defines a dialog box to edit the output subobject of the view input. It contains both a view edit subobject (GDview_edit) and a user interface (ViewEditorUI).

Input Ports
view_in

A view. OutputEditor edits the outpuf subobject of the input view.

vis

An integer indicating whether OutputEditor's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To do this, you connect vis to the UIcmd object's do element.

Example

Libraries.Templates.VIEW.Components.ViewEditors

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39]
A.22 OutputField
Synopsis

output a field in AVS/Express image format by capturing the contents of the view

GDoutput_templ
group+OPort GDoutput_templ {
int type; /* used to specify unique virtual functions */
};
GDfield_output_templ
GDoutput_templ GDfield_output_templ {
int flip;
int clear;
GDview_buffers+OPort2+write buffers {
framebuffer+nonotify;
zbuffer+nonotify;
};
method+notify_inst init = "GDfield_output_create";
method+notify_del delete = "GDfield_output_delete";
method+notify_val update = "GDfield_output_update";
};
GDfield_output
GDfield_output_templ GDfield_output {
Field_Unif+Dim2+Space2+Node_Data+Vector4+OPort2
&output => buffers.framebuffer;
ptr+nonotify+nosave local_ptr;
};
OutputFieldFuncs
group OutputFieldFuncs {
int type = 1;
func+virtual output_init = "GDoutput_init";
func+virtual output_flush = "GDoutput_flush";
func+virtual output_write = "GDfield_output_write";
func+virtual output_done = "GDoutput_done";
};
DefaultFieldOutput
GDfield_output DefaultFieldOutput {
type = 1;
flip = 0;
buffers {
fb_type = GD_FB_ARGB;
zb_type = GB_ZB_FLOAT_1NEAR;
};
};
OutputField
macro OutputField {
GDview_templ &view_in;
...
DefaultFieldOutput Output {
output<NEportLevels={0,3}>;
};
...
};
Description

These objects define field output. GDoutput_templ defines the template for all objects that produce output from a view. GDfield_output_templ defines the template for field output. It adds the subobjects unique to field output and defines the instance, update and delete methods. OutputFieldFuncs defines the virtual methods unique to field output that are called during the render process that produces the field. OutputField is the macro that is meant to be instanced. It contains a user interface that appears in the Module Panel provided by the DataViewer or ModuleStack (as appropriate).

Three different types of output are available from the AVS/Express viewers: file output, field output, and print output. They are derived from a single base group that provides the basic hooks into the rendering pipeline to get output from the view.

OutputField captures the contents of the view and writes it to an AVS/Express field. The format of the field is the same as an AVS/Express image.

Input Ports
view_in

A view. The contents of the input view are captured and written to the specified file.

Parameters
width
height

These parameters control the width and height in pixels at which the view is captured.

flip

This parameter controls whether the contents of the view are inverted before being written to the output field.

dynamic

This parameter controls whether a field is output each time the view is rendered: 0 means no; 1 means yes.

output

This parameter when set causes a field to be output. This is used when the dynamic parameter is set to a value of 0.

Output Ports
output

Field_Unif+Dim2+Space2_Node_Data+Vector4. This output is a field in AVS/Express image format.

obj

DefaultObject. This output is a renderable object. It is typically connected to one of the 2D viewers to be rendered.

Example

Not available.

File

v/gd.v, v/view.v

A.23 OutputFile
Synopsis

output an AVS/Express .x file by capturing the contents of the view

GDoutput_templ
group+OPort GDoutput_templ {
int type; /* used to specify unique virtual functions */
};
GDfile_output_templ
GDoutput_templ GDfile_output_templ {
int flip;
string+IPort filename;
method+notify_inst init = "GDfile_output_create";
method+notify_del delete = "GDfile_output_delete";
method+notify_val update = "GDfile_output_update";
};
GDfile_output
GDfile_output_templ GDfile_output {
ptr+nonotify+nosave local_ptr;
};
OutputFileFuncs
group OutputFileFuncs {
int type = 1;
func+virtual output_init = "GDoutput_init";
func+virtual output_flush = "GDoutput_flush";
func+virtual output_write = "GDfile_output_write";
func+virtual output_done = "GDoutput_done";
};
DefaultFileOutput
GDfile_output DefaultFileOutput {
type = 1;
flip = 0;
filename = "/archive/tmp/express.x";
};
OutputFile
macro OutputFile {
GDview_templ &view_in;
...
DefaultFileOutput Output;
...
};
Description

These objects define file output. GDoutput_templ defines the template for all objects that produce output from a view. GDfile_output_templ defines the template for file output. It adds the subobjects unique to file output and defines the instance, update, and delete methods. OutputFileFuncs defines the virtual methods unique to file output that are called during the render process that produces the file. OutputFile is the macro that is meant to be instanced. It contains a user interface that appears in the Module Panel provided by the DataViewer or ModuleStack (as appropriate).

Three different types of output are available from the AVS/Express viewers: file output, field output, and print output. They are derived from a single base group that provides the basic hooks into the rendering pipeline to get output from the view.

OutputFile captures the contents of the view as an AVS/Express image and writes it to a file. This could have been done as a post-process on the field output but a separate module eliminates the need to have an extra copy of the data in memory. This is significant if the size of the view being captured is large (for example, 4K by 4K).

Input Ports
view_in

A view. The contents of the input view are captured and written to the specified file.

Parameters
filename

This parameter specifies the name of the output file that is created.

width
height

These parameters control the width and height in pixels at which the view is captured.

flip

This parameter controls whether the contents of the view are inverted before being written to the output file.

dynamic

This parameter controls whether a file is output each time the view is rendered: 0 means no; 1 means yes.

output

This parameter when set causes a file to be output. This is used when the dynamic parameter is set to a value of 0.

Example

Not available.

File

v/gd.v, v/view.v

A.24 PropsEditor
Synopsis

edit Graphics Display Kit properties

PropsEditor
macro PropsEditor {
GDobject_templ+IPort2 &obj_in {
GDprops_templ &props;
};
ilink vis;

GDprops_edit GDprops_editor {
shell_vis => vis;
props => obj_in.props
};

macro PropsEditorUI {
UIshell props_shell {
title = "Props Editor";
visible => vis;
width = 225;
height = 230;
};
...
};
};
Description

PropsEditor defines a dialog box to edit the props subobject of the input object. It contains both a props edit subobject (GDprops_edit) and a user interface (PropsEditorUI).

Input Ports
obj_in

An object. obj_in can be any group object with a GDprops_templ subobject called props.

vis

An integer indicating whether PropsEditor's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To do this, you connect vis to the UIcmd object's do element.

Example

Libraries.Templates.VIEW.Components.ObjectEditors

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39]
A.25 SimpleCmdList
Synopsis

define the command list for SimpleViewer

Output Ports
cmdlist
UIcmdList
cmds
group

Description

SimpleCmdList defines the Editors pull-down command list for SimpleViewer, SimpleViewer2D, and SimpleViewer3D. Typically you do not use SimpleCmdList, since it is designed specifically for use within SimpleViewer, SimpleViewer2D, and SimpleViewer3D.

The command list looks like this:

Editors
View...
Object Selector...
Object...

Output Ports
cmdlist

The command list, as a UIcmdList object. When cmdlist is connected to the command list that represents the menu bar, its items appear on the menu bar.

cmds

The command list, as an array of UIcmd objects. The do subobject in each UIcmd is used to control the visibility of the UIshell for the GD editor to which it is connected.

Example

Libraries.Main.Viewers.SimpleViewer

File

v/view.v

A.26 SimpleEditors
Synopsis

define the editors for SimpleViewer

Input Ports
edit_view
GDview_templ
edit_rv
UIrenderView
vis_list
int
selected
int

Output Ports
cur_obj
GDobject_templ

Description

SimpleEditors defines the editors for SimpleViewer, SimpleViewer2D, and SimpleViewer3D. Typically you do not use SimpleEditors, since it is designed specifically for use within SimpleViewer, SimpleViewer2D, and SimpleViewer3D. The editors include the following:

Each editor includes both the required edit object (for example, GDview_edit) and the UI objects to access the edit object.

Input Ports
edit_view

A view, typically from the View3D, View2D, or View macros.

edit_rv

The window to be tracked by the track editor. You connect edit_rv to the same window as the view. Typically, this is the UIrenderView from the ViewUI macro.

vis_list

An array of integers indicating whether the user has selected a pulldown menu choice.

Array element
Meaning
vis_list[0]
If 0, the View... choice was not selected. If 1, the View... choice was selected.
vis_list[1]
If 0, the ObjSelect... choice was not selected. If 1, the ObjSelect... choice was selected.
vis_list[2]
If 0, the Object... choice was not selected. If 1, the Object... choice was selected.

selected

An integer that indicates what type of transformation the TrackEditor is to perform. Valid values are 0 for rotate, 1 for scale, 2 for XY translate, and 3 for Z translate. This is typically connected to the selected output port of the ViewUI macro.

Output Ports
cur_obj

The object selected through the object selector.

Example

Libraries.Main.Viewers.SimpleViewer

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39]
A.27 SimpleViewer
Synopsis

define an integrated 2D and 3D viewer with a limited user interface

Input Ports
objs_3d_in
GDobject_templ
objs_2d_in
GDobject_templ

Output Ports
rv
UIrenderView
two_point
UItwoPoint
view
GDview_templ
picked_camera
GDcamera_templ
picked_obj
GDobject_templ
cur_obj
GDobject_templ

Description

SimpleViewer defines an integrated 2D and 3D viewer with a limited user interface. It combines the following components:

Input Ports
objs_3d_in

One or more objects to be rendered in 3D.

objs_2d_in

One or more objects to be rendered in 2D.

Output Ports
rv

The UIrenderView from ViewUI.

two_point

The UItwoPoint from View.

view

The view in SimpleViewer.

picked_camera

The view's picked camera.

picked_obj

The view's picked object.

cur_obj

The view's current object.

Example

Not available.

File

v/view.v

See also

For more information, see:

Section 3.4, Views  [page 3-22]
A.28 SimpleViewer2D
Synopsis

define a 2D viewer with a limited user interface

Input Ports
objs_in
GDobject_templ

Output Ports
rv
UIrenderView
two_point
UItwoPoint
view
GDview_templ
picked_camera
GDcamera_templ
picked_obj
GDobject_templ
cur_obj
GDobject_templ

Description

SimpleViewer2D defines a 2D viewer with a limited user interface. It combines the following components:

Input Ports
objs_in

One or more objects to be rendered in 2D.

Output Ports
rv

The UIrenderView from ViewUI.

two_point

The UItwoPoint from View2D.

view

The view in SimpleViewer2D.

picked_camera

The view's picked camera.

picked_obj

The view's picked object.

cur_obj

The view's current object.

Example

Libraries.Examples.Graphics_Display.RegionCrop3D
Libraries.Examples.Graphics_Display.ImageAnno

File

v/view.v

See also

For more information, see:

Section 3.4, Views  [page 3-22]
A.29 SimpleViewer3D
Synopsis

define a 3D viewer with a limited user interface

Input Ports
objs_in
GDobject_templ

Output Ports
rv
UIrenderView
two_point
UItwoPoint
view
GDview_templ
picked_camera
GDcamera_templ
picked_obj
GDobject_templ
cur_obj
GDobject_templ

Description

SimpleViewer3D defines a 3D viewer with a limited user interface. It combines the following components:

Input Ports
objs_in

One or more objects to be rendered in 3D.

Output Ports
rv

The UIrenderView from ViewUI.

two_point

The UItwoPoint from View3D.

view

The view in SimpleViewer3D.

picked_camera

The view's picked camera.

picked_obj

The view's picked object.

cur_obj

The view's current object.

Example

Most of the examples in Libraries.Examples.Visualization

File

v/view.v

See also

For more information, see:

Section 3.4, Views  [page 3-22]
A.30 StandAloneDatamapEditor
Synopsis

edit Graphics Display Kit Datamap

macro StandAloneDatamapEditor {
int int<NEportLevels=1> = 1;
DefaultObject DefaultObject {
dmap<NEportLevels={0x3,0x0}>;
};
DatamapEditor DatamapEditor {
obj_in => <-.DefaultObject;
vis => <-.int;
DatamapEditorUI {
PALvirt {
vclass = 2;
vid =;
gamma = ;
cube_size = 6;
};
};
};
};
Description

StandAloneDatamapEditor defines a shell containing the necessary controls to edit the datamap of a subobject. It contains both a datamap editor subobject (DatamapEdit) and a user interface (DatamapEditorUI).

InputPorts
dmap

A datamap. The StandloneDatamapEditor edits the input datamap.

File

v/view.v

See also

Related modules:

A.31 SurfConvPopup
Synopsis

edit the surface conversion attributes of the Graphics Display Kit object

Input Ports
name
string
vis
int
surf_conv
int
chunk
int
surf_chunk
int
line_chunk
int
tmap_method
int
tri_subdiv_type
int
tri_subdiv_aval
int
tri_subdiv_fval
int

Description

SurfConvPopup defines a dialog box for editing the surface conversion attributes. Surface conversion attributes are part of the Graphics Display Kit object.

Input Ports
name

The dialog box's title.

vis

An integer indicating whether SurfConvPopup's dialog box should appear: 0 means it should not appear; 1 means it should. Typical ways to make the dialog box appear are to connect the vis subobject to UIcmd.do or UIbutton.do. When the command or button is pressed, the dialog box becomes visible.

surf_conv
chunk
surf_chunk
line_chunk
tmap_method
tri_subdiv_type
tri_subdiv_aval
tri_subdiv_fval

Subobjects indicating the surface conversion attributes. When the dialog box first appears, these objects determine the initial settings of the dialog box's widgets. When you change the widget's settings, SufcConvPopup in turn updates the subobjects connected to surf_conv, chunk, surf_chunk, line_chunk, tmap_method, tri_subdiv_type, tri_subdiv_aval, and tri_subdiv, and fval.

Example

Libraries.Graphics_Display.Editors.UI_Editors.ObjectEditor

File

v/view.v

See also

For more information, see:

Section A.17, ObjectEditor  [page A-35].
A.32 TextureEditor
Synopsis

edit a Graphics Display Kit texture

TextureEditor
macro TextureEditor {
GDobject_templ+IPort2 &obj_in {
GDtexture_templ &texture;
};
ilink vis;

GDtexture_edit GDtexture_editor {
shell_vis => vis;
texture => obj_in.texture
};

macro TextureEditorUI {
UIshell texture_shell {
title = "Texture Editor";
visible => vis;
width = 225;
height = 475;
};
...
};
};
Description

TextureEditor defines a dialog box to edit the texture subobject of the input object. It contains both a texture edit subobject (GDtexture_edit) and a user interface (TextureEditorUI).

Input Ports
obj_in

An object. obj_in can be any group object with a GDtexture_templ subobject called texture.

vis

An integer indicating whether TextureEditor's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To do this, you connect vis to the UIcmd object's do element.

Example

Libraries.Templates.VIEW.Components.ObjectEditors

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39].
A.33 TrackEditor
Synopsis

edit a Graphics Display Kit transform using the virtual trackball editor

Input Ports
view_in
GDview_templ
camera_in
GDcamera_templ
obj_in
GDobject_templ
track_rv
UIrenderView
vis
int
track_select
int

Description

The virtual trackball editor takes in screen space XY coordinates produced from UItwoPoint interactors, a view, a camera and an object and produces a transformation matrix that rotates, scales, or translates the input object. It combines:

Input Ports
view_in

A connection to a view.

camera_in

A connection to a camera. Typically camera_in is connected to the view's picked camera.

obj_in

A connection to an object. Typically, you connect obj_in to the current object from an object selector. Alternatively, you can connect the object to the view's picked object.

track_rv

The window to be tracked by the track editor. track_rv is typically connected to the same window as the view.

vis

An integer indicating whether TrackEditor's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To do this, you connect vis to the UIcmd object's do element.

track_select

An integer indicating which type of transformation the first pair of UItwoPoint and GDtrack_edit modules are to perform. Typically, this is connected to the selected output of the ViewUI macro. This allows the selection of the transformation to be controlled from a viewer's user interface.

Example

Libraries.Templates.VIEW.Components.ViewEditors
Libraries.Templates.VIEW.Components.SimpleEditors

File

v/view.v

A.34 Vector2Raster
Synopsis

convert a vector ROI to a raster mask

Vector2Raster
macro Vector2Raster {
ilink in_field;
GDobject_templ &object<NEportLevels={2,1}>;
...
GDvector2raster GDvector2raster {
input => in_field;
obj_in => object;
output+OPort3;
};
DataObject DataObject {
in => GDvector2raster.output;
obj+OPort3;
};
};
Description

Vector2Raster takes a mesh that represents a vector region(s) of interest (ROIs) and converts it to a raster mask with values of either 0 or 255. This raster mask can then be used as input to many of the image procesing routines.

Vector2Raster also provides a user interface that appears in the Module Panel provided by the DataViewer or ModuleStack (as appropriate) and produces a renderable object as output.

Input Ports
in_field

Mesh. The input mesh to converted to a raster mask.

object

GDobject_templ. An optional Graphics Display Kit object whose extents are used to set the extents of the ouput field. If the input does not exist, the extents of the output field are simply the extents of the input mesh.

Parameters
inside

This parameter controls if the area inside or outside the region(s) in the input mesh has a 0 or 255 value in the output field.

A value of 1 means the areas inside the mesh are set to 255 and the areas outside the mesh are set to 0 in the output field.

A value of 0 means the areas inside the mesh are set to 0 and the areas outside the mesh are set to 255 in the output field.

name

A string that can be used to filter the region(s) found in the input mesh If the name is null, all regions are processed. If the name has a value, only those regions that have the same name are processed.

Output Ports
output

Field_Unif+Dim2+Space2. The output scalar image that is created from the region(s) in the input mesh.

obj

A renderable object that can be connected to a viewer for display.

Example

Libraries.Examples.Graphics_Display.ROIdraw

File

v/view.v

See also

For more information, see:

Section 5.5, Converting vector data to raster data  [page 5-13].
Section 5.6, Components  [page 5-14].
A.35 View
Synopsis

define the basic components for rendering objects in 2D and3D

Input Ports
render_view
UIrenderView
objs_3d
GDobject_templ
objs_2d
GDobject_templ

Output Ports
view
GDview_templ
picked_camera
GDcamera_templ
picked_obj
GDobject_templ
two_point
UItwoPoint

Description

View defines the basic components for rendering Graphics Display Kit objects in 2D and 3D. View has the following subobjects:

Input Ports
render_view

The UIrenderView which serves as the parent window for the viewer.

objs_3d

One or more objects to be rendered in 3D.

objs_2d

One or more objects to be rendered in 2D.

Output Ports
view

The view.

picked_camera

The view's picked camera.

picked_obj

The view's picked object.

two_point

The view's UItwoPoint interactor.

Example

Libraries.Main.Viewers.Viewer

File

v/view.v

See also

For more information, see:

Section 3.4, Views  [page 3-22]
A.36 View2D
Synopsis

define the basic components for rendering objects in 2D

Input Ports
render_view
UIrenderView
objs
GDobject_templ

Output Ports
view
GDview_templ
picked_camera
GDcamera_templ
picked_obj
GDobject_templ
two_point
UItwoPoint

Description

View2D defines the basic components for rendering Graphics Display Kit objects in 2D. View2D has the following subobjects:

Input Ports
render_view

The UIrenderView which serves as the parent window for the viewer.

objs

One or more objects to be rendered in 2D.

Output Ports
view

The view.

picked_camera

The view's picked camera.

picked_obj

The view's picked object.

two_point

The view's UItwoPoint interactor.

Example

Libraries.Main.Viewers.Viewer2D

File

v/view.v

See also

For more information, see:

Section 3.4, Views  [page 3-22]
A.37 View3D
Synopsis

define the basic components for rendering objects in 3D

Input Ports
render_view
UIrenderView
objs
GDobject_templ

Output Ports
view
GDview_templ
picked_camera
GDcamera_templ
picked_obj
GDobject_templ
two_point
UItwoPoint

Description

View3D defines the basic components for rendering Graphics Display Kit objects in 3D. View3D has the following subobjects:

Input Ports
render_view

The UIrenderView which serves as the parent window for the viewer.

objs

One or more objects to be rendered in 3D.

Output Ports
view

The view.

picked_camera

The view's picked camera.

picked_obj

The view's picked object.

two_point

The view's UItwoPoint interactor.

Example

Libraries.Main.Viewers.Viewer3D

File

v/view.v

See also

For more information, see:

Section 3.4, Views  [page 3-22]
A.38 ViewCmdList
Synopsis

define a command list for a viewer's menu bar

Output Ports
cmdlist
UIcmdList
cmds
UIcmd

Description

ViewCmdList defines the pull-down command list to be placed on a viewer's menu bar. It is used to control the visibility of some of the Graphics Display Kit editors. Typically, you do not use ViewCmdList since it is designed for use by Viewer and Viewer3D. The command list looks like this:

ViewjEditors
View...
ObjectSelector...
Lights...
Camera...
Interactor...

ViewCmdList works in conjunction with ViewEditors which has the same number of editors as there are entries on the menu bar.

Output Ports
cmdlist

The command list, as a UIcmdList object.

cmds

The command list, as an array of UIcmd objects.

Example

Libraries.Main.Viewers.Viewer3D
Libraries.Main.Viewers.Viewer

File

v/view.v

A.39 View2DCmdList
Synopsis

define a command list for a 2D viewer's menu bar

Output Ports
cmdlist
UIcmdList
cmds
UIcmd

Description

View2DCmdList defines the pull-down command list to be placed on a 2D viewer's menu bar. It is used to control the visibility of some of the Graphics Display Kit editors. Typically, you do not use ViewCmdList since it is designed for use by Viewer2D. The command list looks like this:

ViewEditors
View...
ObjectSelector...
Camera...
Interactor...

View2DCmdList works in conjunction with View2DEditors which has the same number of editors as there are entries on the menu bar.

Output Ports
cmdlist

The command list, as a UIcmdList object.

cmds

The command list, as an array of UIcmd objects.

Example

Libraries.Main.Viewers.Viewer2D

File

v/view.v

A.40 ViewEditor
Synopsis

edit a Graphics Display Kit view

ViewEditor
macro ViewEditor {
GDview_templ+IPort2 &view_in;
ilink vis;

GDview_edit view_edit {
shell_vis => vis;
view => view_in;
};

macro ViewEditorUI {
UIshell view_shell {
title = "View Editor";
visible => vis;
width = 225;
height = 450;
};
...
};
};
Description

ViewEditor defines a dialog box to edit the view input. It contains both a view edit subobject (GDview_edit) and a user interface (ViewEditorUI).

Input Ports
view_in

A view. ViewEditor edits the input view.

vis

An integer indicating whether ViewEditor's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To do this, you connect vis to the UIcmd object's do element.

Example

Libraries.Templates.VIEW.Components.ViewEditors

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39].
A.41 ViewEditors
Synopsis

define a group of editors for a viewer

Input Ports
edit_view
GDview_templ
edit_rv
UIrenderView
vis_list
int
selected
int

Output Ports
cur_obj
GDobject_templ

Description

ViewEditors defines a group of the Graphics Display Kit editors for a viewer. The visibility of the individual editors is controlled by pulldowns on the menu bar. Typically, you do not use ViewEditors since it is designed for use by Viewer and Viewer3D. The editors in ViewEditors are:

ViewEditors is used in conjunction with ViewCmdList which has the same number of entries on the menu bar as there are editors.

Input Ports
edit_view

A connection to a view.

edit_rv

The window to be interacted with by the track editor. edit_rv is typically connected to the same window as the view.

vis_list

An array of integers indicating whether the user has selected a pulldown menu choice.

Array element
Meaning
vis_list[0]
If 0, the View... choice was not selected. If 1, the View... choice was selected.
vis_list[1]
If 0, the ObjSelect... choice was not selected. If 1, the ObjSelect... choice was selected.
vis_list[2]
If 0, the Lights... choice was not selected. If 1, the Lights... choice was selected.
vis_list[3]
If 0, the Camera... choice was not selected. If 1, the Camera... choice was selected.
vis_list[4]
If 0, the Interactor... choice was not selected. If 1, the Interactor... choice was selected.

selected

An integer that indicates what type of transformation the TrackEditor is to perform. Valid values are 0 for rotate, 1 for scale, 2 for XY translate, and 3 for Z translate. This is typically connected to the selected output port of the ViewUI macro.

Output Ports
cur_obj

The object selected through the object selector.

Example

Libraries.Main.Viewers.Viewer3D
Libraries.Main.Viewers.Viewer

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39]
A.42 View2DEditors
Synopsis

define a group of editors for a viewer

Input Ports
edit_view
GDview_templ
edit_rv
UIrenderView
vis_list
int
selected
int

Output Ports
cur_obj
GDobject_templ

Description

View2DEditors defines a group of the Graphics Display Kit editors for a viewer. The visibility of the individual editors is controlled by pulldowns on the menu bar. Typically, you do not use View2DEditors since it is designed for use by Viewer2D. The editors in View2DEditors are:

View2DEditors is used in conjunction with View2DCmdList which has the same number of entries on the menu bar as there are editors.

Input Ports
edit_view

A connection to a view.

edit_rv

The window to be interacted with by the track editor. edit_rv is typically connected to the same window as the view.

vis_list

An array of integers indicating whether the user has selected a pulldown menu choice.

Array element
Meaning
vis_list[0]
If 0, the View... choice was not selected. If 1, the View... choice was selected.
vis_list[1]
If 0, the ObjSelect... choice was not selected. If 1, the ObjSelect... choice was selected.
vis_list[2]
If 0, the Camera... choice was not selected. If 1, the Camera... choice was selected.
vis_list[3]
If 0, the Interactor... choice was not selected. If 1, the Interactor... choice was selected.

selected

An integer that indicates what type of transformation the TrackEditor is to perform. Valid values are 0 for rotate, 1 for scale, 2 for XY translate, and 3 for Z translate. This is typically connected to the selected output port of the ViewUI macro.

Output Ports
cur_obj

The object selected through the object selector.

Example

Libraries.Main.Viewers.Viewer2D

File

v/view.v

See also

For more information, see:

Section 3.7, Editors  [page 3-39]
A.43 Viewer
Synopsis

define an intergrated 2D and 3D viewer with a full user interface

Input Ports
objs_3d_in
GDobject_templ
objs_2d_in
GDobject_templ
in_buffers
GDview_buffers

Output Ports
buffers
GDview_buffers
rv
UIrenderView
two_point
UItwoPoint
view
GDview_templ
picked_camera
GDcamera_templ
picked_obj
GDobject_templ
cur_obj
GDobject_templ

Description

Viewer defines an integrated 2D and 3D viewer with a full user interface. It combines the following components:

Input Ports
objs_3d_in

One or more objects to be rendered in 3D.

objs_2d_in

One or more objects to be rendered in 2D.

in_buffers

Input framebuffer and Z buffer information.

Output Ports
buffers

Output framebuffer and Z buffer information.

rv

The UIrenderView from ViewUI.

two_point

The UItwoPoint from View.

view

The view in Viewer.

picked_camera

The view's picked camera.

picked_obj

The view's picked object.

cur_obj

The view's current object.

Example

Not available.

File

v/view.v

See also

For more information, see:

Section 3.4, Views  [page 3-22]
A.44 Viewer2D
Synopsis

define a 2D viewer with a full user interface

Input Ports
objs_in
GDobject_templ
in_buffers
GDview_buffers

Output Ports
buffers
GDview_buffers
rv
UIrenderView
two_point
UItwoPoint
view
GDview_templ
picked_camera
GDcamera_templ
picked_obj
GDobject_templ
cur_obj
GDobject_templ

Description

Viewer2D defines a 2D viewer with a full user interface. It combines the following components:

Input Ports
objs_in

One or more objects to be rendered in 2D.

in_buffers

Input framebuffer and Z buffer information.

Output Ports
buffers

Output framebuffer and Z buffer information.

rv

The UIrenderView from ViewUI.

two_point

The UItwoPoint from View2D.

view

The view in Viewer2D.

picked_camera

The view's picked camera.

picked_obj

The view's picked object.

cur_obj

The view's current object.

Example

Libraries.Examples.Graphics_Display.vpalRamp

File

v/view.v

See also

For more information, see:

Section 3.4, Views  [page 3-22]
A.45 Viewer3D
Synopsis

define a 3D viewer with a full user interface

Input Ports
objs_in
GDobject_templ
in_buffers
GDview_buffers

Output Ports
buffers
GDview_buffers
rv
UIrenderView
two_point
UItwoPoint
view
GDview_templ
picked_camera
GDcamera_templ
picked_obj
GDobject_templ
cur_obj
GDobject_templ

Description

Viewer3D defines a 3D viewer with a full user interface. It combines the following components:

Input Ports
objs_in

One or more objects to be rendered in 3D.

in_buffers

Input framebuffer and Z buffer information.

Output Ports
buffers

Output framebuffer and Z buffer information.

rv

The UIrenderView from ViewUI.

two_point

The UItwoPoint from View3D.

view

The view in Viewer3D.

picked_camera

The view's picked camera.

picked_obj

The view's picked object.

cur_obj

The view's current object.

Example

Libraries.Examples.Graphics_Display.ReplaceDatamap

File

v/view.v

See also

For more information, see:

Section 3.4, Views  [page 3-22]
A.46 ViewUI
Synopsis

define a basic user interface for a viewer

Input Ports
name
string
cmd_list
UIcmdList
cur_obj_name
string

Output Ports
shell
UIshell
panel
UIpanel
rv
UIrenderView
handle
UIwinHandle
selected
int

Description

ViewUI defines a basic user interface for a viewer. It consists of a UIcmdList, a UIshell, a UIpanel, a UIrenderView, a UIlabel, and a UIoptionMenu. The command list that contains no entries is the menu bar. The label displays the name of the currently selected object at the bottom of the window. The option menu displays the types of transformations that can be done by the left mouse button.

The width and height of the render view are tied to the panel so when the panel is resized the render view is also. The render view serves as the parent window for the viewer.

Input Ports
name

The window's name. The default is Shell.

cmd_list

Zero or more commands for the window's main menu.

cur_obj_name

The name of the currently selected object. This is typically connected to the curobj_name subobject of the ObjectSelector.

Output Ports
shell

The UIshell created by ViewUI.

panel

The UIpanel created by ViewUI.

rv

The UIrenderView created by ViewUI. This output is often connected to the view subobject of UIonePoint and UItwoPoint interactors.

handle

The UIwinHandle subobject from the UIrenderView created by ViewUI. This output is connected to the handle subobject of GDview. It provides the necessary hook for the Graphics Display Kit to obtain information about the parent window for the viewer.

selected

An integer that indicates what type of transformation has been selected from the option menu. This is connected to the selectedItem subobject of the UIoptionMenu. It provides the necessary information for the TrackEditor to have one GDtrack_edit module perform all possible transformations.

Example

Libraries.Main.Viewers.Viewer3D

File

v/view.v

See also

For more information, see:

Section 3.6, Window  [page 3-37]
A.47 XformEditor
Synopsis

edit a Graphics Display Kit transform

XformEditor
macro XformEditor {
group+IPort2 &obj_in {
GDxform_templ &xform;
};
ilink vis;

GDxform_edit GDxform_editor {
shell_vis => vis;
xform => obj_in.xform
};

macro XformEditorUI {
UIshell trans_shell {
title = "Transformation Editor";
visible => vis;
width = 475;
height = 412;
};
...
};
};
Description

XformEditor defines a dialog box to edit the xform subobject of the input object. It contains both an xform edit subobject (GDxform_edit) and a user interface (XformEditorUI).

Input Ports
obj_in

An object, camera, or light. obj_in can be any group object with a GDxform_templ subobject called xform.

vis

An integer indicating whether XformEditor's user interface should appear: 0 means no; 1 means yes. Typically, you want the user interface to appear when the user selects a pulldown menu choice (a UIcmd object). To do this, you connect vis to the UIcmd object's do element.

Example

Libraries.Templates.VIEW.Components.ObjectEditors

File

v/view.v


TOC PREV NEXT INDEX

Copyright © 2001 Advanced Visual Systems Inc.
All rights reserved.