VOL_MARKER Procedure
Displays colored markers scattered throughout a volume.
Usage
VOL_MARKER, vol, n_points
Input Parameters
volA 3D volume of data to plot markers in.
n_points—The number of markers to plot.
Keywords
Axis_ColorThe color to use when plotting the axis. To suppress the axis, set Axis_Color to –1.
Copy—If specified, preserves the input variable, vol. If this keyword is not specified, the input variable is altered during processing.
Mark_SizeThe maximum marker size.
Mark_SymbolA number specifying the marker symbol to use. The number should be between 1 and 7. The default is 2 (an asterisk). For a list of symbols, see the description of !Psym in Chapter 22: System Variables.
Mark_Thick—The maximum line thickness to use when plotting markers. Typically, this is an integer between 1 and 7. (A thickness of 1.0 is normal, 2.0 is twice as wide, and so on.)
Discussion
VOL_MARKER plots a polymarker field from volumetric data. The color of each marker displayed by VOL_MARKER is determined by the value of the volumetric data at the point where the marker is plotted.
Unless the Copy keyword is specified, the original input variable is altered.
Examples
This program displays an MRI scan of a human head using three different display techniques.
; Specify the size of the volumes.
volx = 115
voly =  75
volz = 105
; Specify the window size.
winx = 512
winy = 512
head = BYTARR(volx, voly, volz)
; Read in the volumetric data.
OPENR, 1, !Data_Dir + 'man_head.dat'
READU, 1, head
CLOSE, 1
band = 5
; Pad the volume with zeroes and smooth it.
head = VOL_PAD(head, band)
head = SMOOTH(head, band)
; Set up the viewing window and load the color table.
CENTER_VIEW, Xr=[0, 124], Yr=[0, 84], Zr=[0, 114], Az=60.0, $
   Ax=(-60.0), Winx=512, Winy=512, Zoom=0.9
WINDOW, 0, XSize=winx, YSize=winx, XPos=16, YPos=384, $
   Colors=128
LOADCT, 9
; Render the data using a 3D polymarker field.
VOL_MARKER, head, 6000, Axis_Color=100, Mark_Symbol=2, $
   Mark_Size=2, Mark_Thick=2
; Create a second window for plotting.
WINDOW, 1, XSize=winx, YSize=winx, XPos=496, YPos=324, $
   Colors=128
; Change the direction of the light source for shading.
SET_SHADING, Light=[-1.0, 1.0, 0.5], /Gouraud, /Reject
; Compute the 3D contour surface as a list of polygons.
SHADE_VOLUME, head, 18, vertex_list, polygon_list, /Low
; Display the polygon list with light source shading.
TVSCL, POLYSHADE(vertex_list, polygon_list, $
   XSize=winx, YSize=winy, /Data, /T3d)
; Create another window for plotting.
WINDOW, 2, XSize=winx, YSize=winy, XPos=256, YPos=48, $
   Colors=128
; Transform the volumetric data to the current view.
head = VOL_TRANS(head, 128, !P.T)
; Display a translucent image of the data.
TVSCL, VOL_REND(head, winx, winy, Depth_Q=0.4)
See Also