Creates a window with a built-in set of controls; these controls allow you to easily select and view "slices"from a three-dimensional block of data.
shell (optional) The ID of the newly created widget. If the procedure fails, zero (0) is returned.
Cube_color The color in which the rotatable cube is drawn; a positive integer in the range (0...255). The number that is provided for cube_color is used as an index into the current color table.
Position A two-element vector specifying the x- and y-coordinates of the upper-left corner of the SliceTool window (long integer). The elements of the vector are [x, y], where x (horizontal) and y (vertical) are specified in pixels. These coordinates are measured from the upper-left corner of the screen.
Slice_color The color in which the slice is drawn; a positive integer in the range (0...255). The number that is provided for slice_color is used as an index into the current color table.
Slice_rot A three-element vector specifying the XYZ slicing plane rotation, in degrees. If not supplied, the initial rotation is [0, 0, 0] in other words, no rotation.
Slice_trans A three-element vector specifying the initial slicing plane translation, in degrees. If not supplied, the initial translation is [0, 0, 0] in other words, no translation.
Title A string containing the title that appears in the header of the SliceTool window. Default value is "Slicer Tool".
View_persp The initial perspective distance. If View_persp is zero, then the initial setting on the
Perspective Distance
slider is 0.5, but the Perspective
pushbutton is initially deselected. If View_persp is nonzero, then the initial setting on the Perspective Distance
slider is the value specified by View_persp and the Perspective
pushbutton is selected.
NOTE: Using no perspective to draw the cube is equivalent to having the eyepoint an infinite distance away from the cube, and will produce a cube with sides that all appear to be parallel to one another.
View_zoom The initial zoom factor. (Default: 0.5)
Background Specifies the background color name.
If the zoom factor is large, or the perspective parameter is small, then the cube display in the View orientation area may be erroneous. To cure the problem, reduce the zoom or increase the perspective (or disable the perspective entirely).
To select a slice, adjust the sliders that control perspective, zoom, and orientation of the slice in relationship to the cube. When you are satisfied with your selections, click the
Apply
button.
Figure 2-161 WgSliceTool is an interactive window that lets you use the mouse to view and modify the location of a slice that bisects a volume of data; your selections in the lower left part of the window affect the position of the slice.
Figure 2-162 WgSliceTool is an interactive window that lets you use the mouse to view and modify the location of a slice that bisects a volume of data; your selections in the lower left part of the window affect the position of the slice.
parent
is defined, WgSliceTool is created as a child of parent
; otherwise, WgSliceTool runs on its own (i.e., in its own event loop).When you are finished interacting with the WgSliceTool window, close it by clicking on the
Dismiss
button.
PRO Sample_wgslicetool, parent, tool_shell head = BYTARR(115, 75, 105)
IF !Version.platform EQ 'VMS' THEN $ OPENR, u, GETENV('WAVE_DIR')+$ '[data]man_head.dat', /Get_lun $ ELSE $ OPENR, u, '$WAVE_DIR/data/man_head.dat', $ /Get_lun READU, u, head
CLOSE, u FREE_LUN, u
IF N_ELEMENTS(parent) NE 0 THEN BEGIN WgSliceTool, head, slice, parent, tool_shell
ENDIF ELSE BEGIN WgSliceTool, head, slice
ENDELSE END
For information about other approaches to slicing volumes, see Chapter 7, Advanced Rendering Techniques, in the PV-WAVE User's Guide. This chapter includes an example showing how to render selected slices from a large amount of volume data.
For more information about how to write an application program based on WAVE Widgets, refer to Chapter 5, Using WAVE Widgets, in the PV-WAVE GUI Application Developer's Guide. For more information about how to write an application program based on the PV-WAVE Widget Toolbox, refer to Chapter 6, Using the Widget Toolbox, in the PV-WAVE GUI Application Developer's Guide.