VisionX V4V3VIEWVisionX V4

v3view − compute 3d light shaded visualizations of a 3D image


v3view [if=<infile>] [of=<ofile>] [th=val] [m=mode] [s=size] [nt=x,y] [-a] [-t] [-i] [-vtk] [-vtkp] [-vtkv] [cf=<cfile>] [im=<imfile>] [vf=<vfile>] [cp=<cpfile>] [bgv=r,g,b] [z=zoom] [-nf] [-os] [-vr] [-vn] [sxy=x(,y)] [bg=color] [f=fudge] [iv=<afile>] [-n] [-c][-as] [-y] [-yo] [ang=angle] [-sa] [-ss] [-sc] [-v6] [-gif] [d=delay] [-w] [-v]


v3view computes light shaded visualizations of three-dimensional images. By default three orthogonal visualizations are computed and are tiled in a row. A six view mode is supported through the [-v6] flag, and a single view (axial, sagittal, or coronal) may be displayed by selecting one of the [-sa | -ss | -sc] flags.

The default image render size is 256x256 and the images are rendered with scale labels and a white background. By default, the output image is in VisionX format. Gif format output can be obtained with [-gif] flag. When visualizing an object from CT scans, the [-c] flag may be used to adjust for the anisotropic data and to reverse z coordinates.

For all rendering engines, the input if [if] can be either a VisionX polygon file or a VisionX 3D image with a specified threshold [th]. For the -vtk rendering mode, the input file [if] can also be a map file (see below for detail).

Rendering in interactive mode is supported for v3d and vtk rendering modes through the [-i] flag. VTK interactive mode is only supported for computer enviornments with an on-screen version of VTK.

If an animation option is specified then the rederend output is a sequence of images. If the -gif option is specified with the animation option an animated gif is output.

V3D Render Engine

V3view uses v3d for the rendering engine by default. See v3d man page for more detail.

Vrend/Vrender Render Engine

If the -vr option is specified then the vrend rendering engine is used. The vrender engine is used for -vn option. The xy dimension of the rendering may be set using the [sxy=] option. If -n is specified then the rendering size will be the same as the image native size. See vrend/vrender man pages for more details.

VTK Render Engine

Using VTK engine, different colors and opacity can be defined for each class of objects An object is defined as an enclosed 3D volume. A class of objects is the set of objects that are to be rendered with the same parameters.

There are three modes of rendering using vtk engine (-vtkp, -vtkv, -vtk). The -vtkp option can be used for polygon rendering of one or more VisionX polygon objects, and the -vtkv option can be used for volume rendering of a single VisionX image. The -vtk option is used when rendering multiple objects with different redering modes (polygon + volume).

By default, VTK engine scales the rendered image to fit the window size [sxy=]. [z=] can be used to specify the zoom factor for scaling the objects independently from the window size.

Polygon Surface Rendering

The -vtkp option is used for polygon rendering of one or more VisionX polygon objects. In this mode, the object’s surface is rendered using polygonal mesh.

Input should be a frame-separated VisionX polygon file. All objects will appear gray by default. The VTK color table file can be used to specify the color for each object. For the VTK color table file, "render mode" field is not need for polygon rendering. For example, for a single solid red object, the VTK color table file would have a line "1,1,0,0,1".

Example of using [-vtkp] option:
Given: VisionX polygon file img.vd
Render: an object in transparent green

# Create a VTK color table file "cfile" as following:
# ID, R, G, B, Opacity
1, 0, 1, 0, 0.2 # transparent green

# Run v3view
v3view -vtkp img.vd cf=cfile of=out.vx

Volume Rendering

The -vtkv option is used for volume rendering of a single VisionX image file. Volume rendering determines the color and opacity based on the voxel intensity within a volume.

VisionX 3D image file is used as an input. VTK transfer function file can be used to define a transfer function, or the default colors will be used.

Example of using [-vtkv] option:
Given: VisionX 3D byte image img.vx
Render: 3D image as a volume according to voxel intensities

# Create a VTK transfer function file "vfile" as following:
# Map intensity 0 to transparent white
opacityv AddPoint 0 0.0 # transparent (invisible)
colorv AddRGBPoint 0 1.0 1.0 1.0 # white

# Map intensity 255 to solid red
opacityv AddPoint 255 1.0 # solid
colorv AddRGBPoint 255 1.0 0.0 0.0 # red

# Run v3view
v3view -vtkv img.vx vf=vfile of=out.vx

Polygon+Volume Rendering

The -vtk option is used for polygon+volume rendering of multiple objects. In this mode, one object is volume-rendered and superimposed onto the other objects that are rendered with polygonal surface.

The input is a map file that has a unique label for each region to be rendered. The VTK color table file can be used to define color and rendering mode for each object. For a volume-rendered object, a VisionX 3D image should be passed in as [im=]. Optionally, the VTK transfer function file for volume rendering can be specified. The map file and VisionX image must be of the same type. Only one object in the VTK color table can be volume-rendered.

Example of using [-vtk] option:
Given: nodule image nod.vx, solid nodule mask solid.vx, and GGO mask ggo.vx
Render: solid nodule in solid white using polygon rendering, and
GGO in transparent blue using volume rendering

# Create a map image "map.vx"
vpix solid.vx th=1 hi=1 of=tmp2
vpix ggo.vx th=1 hi=2 of=tmp3
vembed tmp2 tmp3 -or of=map.vx

# Create a color file "ctable.vkc" as following:
# ID, R, G, B, Opacity, Mode
1, 1.0, 1.0, 1.0, 1.0, 0 # Solid white polygon
2, 0.0, 0.0, 1.0, 0.4, 1 # Transparent blue volume

# Run v3view
v3view -vtk if=map.vx im=nod.vx cf=ctable.vkc of=out.vx

Coloring Scheme

For map-based rendering(-vtk) mode, a color file (cfile) may be used to specify the color of each rendered object. If no color file is specified, default coloring scheme is used. Alternatively, the user can choose a pre-defined coloring scheme from the following list. For each scheme, the non-overlapping objects should be labeled as following in the map image.

Some standard .vkc tables are defined, see the "Color Table" page on the web for a list, and they can be speficied with just their name (optionally omitting the extension); otherwise a path name to the table must be specified.

Adding Captions

For any vtk rendering mode (-vtk, -vtkp, -vtkv), the user can add captions to the rendered image using a caption file (cpfile).

The format of caption file is shown below:
# (x,y,z), size, text, color(R,G,B)
0,0,0, 10, "Origin", 1,0,0
0,20,0, 20, "Hello", 0,1,0

The (x,y,z) specifies the 3D coordinate where the caption will be pointing to, the size refers to the font height (in pixels), and the color specifies RGB values (between 0 and 1).


The output file for the gif option must be a real file. Not yet validated for windows



The input file name of files


This specifies the output file name.


Assume the data originates from a DICOM file and is anisotropic. Use file header (DICOM) information if available to scale the z axis for an isotropic visualization.


Show warnings and error messages


Verbose mode


Generated gif or animated gif images instead of VisionX images


set the threshold for a 3D image input. The default image type is a polygon image.


For a tiled image output overide the defualt setting and specify the tiling arrangement. See the n= parameter for vtile(1) for details



do not show any text (labels or boxes surrounding each image)


set the image display mode, possible values are: g, gray shading (default); c, use color labels in the input file; d, range image; r color range image h, grey scale labels; and w, wireframe.


set the size of the output images (see v3d(1)) for details. Permitted sizes are:tiny, small(default), medium, and large.



Render using the vtk render engine


Render polygon file. [if] should be a frame-separated polygon image.


Volume rendering of a single image. [if] should be a 3D VisionX image.


Map file (VisionX 3D image) with unique id for each object


A color table file that defines color and rendering option for each object or a VTK color table file (.vkc).

In the custom color files, for each object, a line should be written in the following format:
"[ID],[red],[green],[blue],[opacity],[render mode]"
# [ID] is an object ID starting with 1
# [red],[green],[blue] define color (0-1)
# [opacity] defines opacity of the object (0-1)
# [render mode] is 0 (polygon render) or 1 (volume render)


VisionX image to be used for volume rendering. Required for volume rendering.


VTK transfer function text file used for volume rendering. The Opacity and color can be defined for one or more intensities, and the intermediate voxel intensities are mapped to linearly scaled opacity and color.

To define an opacity for certain voxel intensity, a line should be written in the following format:
"opacityv AddPoint [intensity] [opacity]"

To define a color for the intensity, use
"colorv AddRGBPoint [intensity] [red] [green] [blue]"


Background color [R,G,B]. Default=0,0,0 (black)


zoom (for scaling objects independently from the render window size)


vtk: no smoothing of polygonal surface (for visualizing thin objects)


Off-screen rendering.



This parameter spcifies the size of the rendered image. The default value is 256.


render the image using its native size



render using the vrend render engine


specify a file containing the viewing angle to render (see vvertoang(1) for format)


The f parameter specifies a fudge value for the zero valued border region surrounding the rendered images. It is specified by a fraction which is interpreted as the fraction of the full image size to use for the border. The default value is zero.



render using the vrender render engine, options as similar to vrend engine except that the bg= option is not supported



chest CT mode (input data is anisotropic and has reversed z coordinate)


animation sequence of the three views


animation sequence from Y-axis


animation sequence from Y-axis oblique view


rotation angle for animation sequence (default 10 degrees)


6 views are displayed instead of the default 3 views.

-sa | -ss | -sc

Only a single view is generated instead of the default 3 views. Use [-sa] for axial view, [-ss] for sagittal view, and [-sc] for coronal view.


give output in gif format


image interframe delay for animation sequence (default 1/10 seconds)


VisionX 3D image file

This file is required for volume rendering. For -vtkv mode, it should be passed in as [if=], and for [-vtk] option, it should be passed in as [im=].

VisionX polygon file [if=]

This file is only used with -vtkp flag. The image should be frame-separated for rendering multiple objects.

Map file [if=]

This file is only used with -vtk flag and passed in as [if=]. It is a VisionX 3D image file with a unique label assigned to each object’s volume.

VTK color table file [cf=]

This is a text file that can be used with -vtkp or -vtk flag. It defines the color, opacity, and rendering mode for each object to be rendered.

VTK transfer function file [vf=]

This is a text file that can be used for volume rendering. It defines the transfer function for volume rendering by mapping voxel intensity to the color and opacity.


A. P. Reeves, J. Lee


v3d(1), vrend(1), vxtoagif(1)