Here is VTK Reflector, a small tool using TCL and VTK
With reflector, you can browse among VTK objects you have created, display
their contents and known methods names, and apply them.
If you already knew VTK Reflector previous version, you may go directly
To use it:
From inside TCL script source or under VTK shell, execute :
reflect <regexp-1> <regexp-2> ...
to browse objects matching a given regular expression <a-regexp>
in the first case,
or matching <regexp-1> OR <regexp-2> OR ... in the
2nd case (see example).
User interface :
A new TopLevel window is popped up and splitted into a left and a right
(You'll find here a full size window snapshot
The left part displays the list of VTK objects matching the given regexp(s),
The right part is used to display selected object content or methods.
You may select an object by clicking on its name in the
You now may display its contents by hitting the "Print"
and its applicable methods with the "Methods"
Once methods have been listed, you may also apply one
of them by :
pasting it into the command line by clicking on method (underlined) name
optionally complete or edit the text generated in the command line
execute it by pressing "Exec" button or hit return key
The output of the executed command will appear in the window associated
with the tcl interpreter.
You may look to the example given here.
So when following the first convention, a way to call reflector would be
For an easier formulation of the browsing regular expression, I always
choose for objects I create myself a name beginning with a "_".
Temporary "anonymous" VTK objects are created with the name "vtkTmpXXX"
with XXX being a number starting from 0.
reflect _* vtkTemp*
You'll find here a small example of
Reflector is written in TCL/TK with no version requirement.
It runs under the TCL/TK interface of VTK.
Current version for reflect is 1.2, this page is about this version.
To copy file, you'll probably have to hold SHIFT key
when clicking HERE.
Here are changes with previous (unnamed, released in March '98) version
reflect proc can be called with a variable number of arguments.
No more need to make a list in case of multiple regexps.
object selection for printing or methods listing is now only possible in
the left-part listbox
when printing, lines color depends on indentation level (hope it improves
new interaction for calling methods on objects. See User
There is no check that the current selected object is really a VTK one.
If it is not, examining the object will cause a call to an unknown method
and will return a TCL error.
I'm still not very familiar to TCL quoting and TK packing. Some strange
things may happen on special circumstances :-)
Please report bugs or contributions to Robert