VTKPolyData.pyΒΆ

usage: VTKPolyData.py [-h] [--vtk [VTK [VTK ...]]] [--no-frame | --frame]
                      [--surface | --no-surface] [--normal | --no-normal]
                      [--lighting | --no-lighting]
                      [--scalar-range lowest,highest] [--vtk2 VTK2]
                      [--image IMAGE] [--image-flip flipZ,flipY,flipZ]
                      [--image-origin ox,oy,oz] [--image-opacity opacity]
                      [--no-interpolate | --interpolate] [--sliceX x1,x2,...]
                      [--sliceY y1,y2,...] [--sliceZ z1,z2,...]
                      [--image-range lowest,highest]
                      [--angle azimuth,elevation] [--position x,y,z]
                      [--focal-point x,y,z] [--view-up x,y,z]
                      [--bgcolor r,g,b] [--size width,height]
                      [--clipping-range near,far] [--png file.png]
                      [--zoom zoomfactor] [--webgl webglFilePrefix]
                      [--verbose]

Description: Render a list of VTK data  and (or) a nifti image, then view or save PNG or save WebGL.
The code is modified from ITKExamples.

When an output PNG or WebGL file is not specified, an interactive windows is
displayed.  To get the camera position from the interactive window, press the
"c" key.

e: exit the application
q: quit the application

s: surface representation
w: wireframe representation

Examples:
VTKPolyData.py --vtk file1.vtk file2.vtk --image im.nii.gz
VTKPolyData.py --vtk file1.vtk file2.vtk --vtk2 tensor.vtk --image im.nii.gz
VTKPolyData.py --vtk file1.vtk file2.vtk --image im.nii.gz --sliceX 50 --sliceY 40 --sliceZ 60
VTKPolyData.py --vtk file1.vtk file2.vtk --image im.nii.gz --png out.png

Author(s): Jian Cheng (jian.cheng.1983@gmail.com)

Copyright (c) 2015-2017 the dmritool contributors.
For more information, see https://diffusionmritool.github.io

optional arguments:
  -h, --help            show this help message and exit
  --vtk [VTK [VTK ...]]
                        VTK PolyData (.vtk, .vtp, etc) input, multiple inputs. Use HueRange=(0.6667,0)
  --no-frame            without frame (default). Visualize frame.
  --frame               with frame. Visualize frame.
  --surface             with surface (default). Visualize surface.
  --no-surface          without surface. Visualize surface.
  --normal              with normal (default). Use vtkPolyDataNormals for polydata visualization.
  --no-normal           without normal. Use vtkPolyDataNormals for polydata visualization.
  --lighting            with lighting (default). Lighting.
  --no-lighting         without lighting. Lighting.
  --scalar-range lowest,highest
                        lowest and highest scalar values for the vtk coloring. It is used when scalar dimention is 1. If not set, use the range of the scalar values.
                                                Default: (-1,-1) means the (min,max)
  --vtk2 VTK2           VTK readPolydata. Use HueRange=(0,1). Specified for meshes from tensors colored by directions, generated by MeshFromTensors.
  --image IMAGE         nifti image file
  --image-flip flipZ,flipY,flipZ
                        flip x,y,z axis in image. Default: (1,1,1)
  --image-origin ox,oy,oz
                        Set image origin as given values.
  --image-opacity opacity
                        image opacity
  --no-interpolate      without interpolate (default). Image interpolation.
  --interpolate         with interpolate. Image interpolation.
  --sliceX x1,x2,...    x-axis slices of the image
  --sliceY y1,y2,...    y-axis slices of the image
  --sliceZ z1,z2,...    z-axis slices of the image
  --image-range lowest,highest
                        lowest and highest contrast value for the image visualization. If not set, use the minimal and maximal values in the image.
                                                Default: (-1,-1) means the (min,max) from the image
  --angle azimuth,elevation
                        azimuth and elevation for camera
  --position x,y,z      Camera Position
  --focal-point x,y,z   Camera FocalPoint
  --view-up x,y,z       Camera ViewUp
  --bgcolor r,g,b       back ground color
  --size width,height   Window size in pixels. Default: (600,600)
  --clipping-range near,far
                        Camera clipping range
  --png file.png        Output PNG file
  --zoom zoomfactor     camera zoom factor
  --webgl webglFilePrefix
                        File prefix for WebGL output
  --verbose, -v         verbose information