vtkPipeline.tcl
|
I took the tree widget for Tk
by Richard Hipp and turned it into a vtk pipeline browser. Combined with
the "vtkShow" script by Chris Odet, it allows you to browse and modify the
objects in your vtk pipeline.
note: technically, not all vtk pipelines are trees since there are
several filters that have multiple inputs (ie. glyphs). In this case, portions
of the pipeline may not appear.
These portions will
now appear, but disjoint from the rest of the pipeline. The object that
has multiple inputs will appear multiple times (once in each tree). This
will help you make the connection.
Here are two examples: mace.tcl, coneEdges.tcl
|
It's all pure Tcl/Tk, no C modules
are required. You do need Tcl/Tk 8.0 however.
To use it, take one of your VTK Tcl/Tk scripts and:
- source tree.tcl by Richard Hipp
- source vtkShow.tcl by Chris Odet
- source vtkPipeline.tcl by Paul Rajlich
- set vtkPipelineWin . (choose toplevel window to use)
- vtkPipeline renWin (renWin is your vtkRenderWindow object)
- That's it! When running the script, click to print an object, double-click to modify an object.
Here are some example scripts: cone.tcl, torus.tcl, and headBone.tcl (need headsq dataset)
Prabhu Ramachandran has created a similar browser for Python. Click
here.
|
|